Skip to content

Get a subject

GET
/api/v2/subjects/{subject}
curl --request GET \
--url 'https://v2.tokens.cardano.org/api/v2/subjects/example?show_cips_details=false&validation=ALL'

Query either all or a subset of properties of a given subject.

Returns the subject as indexed, with validation_errors saying how its metadata departs from its CIP. A subject is a 404 when nothing is indexed for it, or when the validation parameter does not accept it.

subject
required
string

The concatenation of policy id and asset name (if any) to query

property
Array<string>

The list of properties to be returned in the reponse, if none specified, all properties will be returned

query_priority
Array<string>
Allowed values: CIP_26 CIP_68

The CIP priority: if the same property is present in multiple standards, the one with highest priority is returned

show_cips_details
boolean

Whether all the CIP specific properties should be returned in the response. False by default

validation
string
default: ALL
Allowed values: ALL MANDATORY_ONLY STRICT

Which tokens to return, by how well their metadata follows its CIP: ALL (default) returns every indexed token with its validation_errors; MANDATORY_ONLY only tokens with no MANDATORY error; STRICT only tokens with no error at all (metadata.valid true). No error means none from the checks this API runs, not full CIP compliance: a CIP-68 text given as a list of byte strings is accepted, a URI is checked for its scheme only, and a CIP-26 logo for base64 and size, not for being a PNG (ADR-019). A token that is not accepted is a 404

OK

Media type application/json;charset=utf-8
object
subject

A token subject with its metadata, standards details, and optional extensions from additional CIPs

object
subject
required

The subject identifier — concatenation of policy ID and asset name (hex)

string
type
required

Token type: NATIVE for standard tokens, PROGRAMMABLE for tokens with on-chain transfer logic (e.g. CIP-113)

string
Allowed values: NATIVE PROGRAMMABLE
metadata
required

Merged display metadata from CIP-26/CIP-68 based on query priority

object
name
Any of:
object
value
string
source
string
description
Any of:
object
value
string
source
string
ticker
Any of:
object
value
string
source
string
decimals
Any of:
object
value
integer format: int64
source
string
logo
Any of:
object
value
string
source
string
url
Any of:
object
value
string
source
string
version
Any of:
object
value
integer format: int64
source
string
valid
boolean
standards
Any of:
object
cip26
Any of:
object
additionalProperties
object
key
additional properties
object
signatures
required
Array<object>
object
signature
required
string
publicKey
required
string
sequenceNumber
required
number
value
subject
required
string
policy
string
name
required
object
signatures
required
Array<object>
object
signature
required
string
publicKey
required
string
sequenceNumber
required
number
value
required
string
>= 1 characters <= 50 characters
description
required
object
signatures
required
Array<object>
object
signature
required
string
publicKey
required
string
sequenceNumber
required
number
value
required
string
0 <= 500 characters
url
object
signatures
required
Array<object>
object
signature
required
string
publicKey
required
string
sequenceNumber
required
number
value
required
string
0 <= 250 characters /^https:///
ticker
object
signatures
required
Array<object>
object
signature
required
string
publicKey
required
string
sequenceNumber
required
number
value
required
string
>= 2 characters <= 9 characters
decimals
object
signatures
required
Array<object>
object
signature
required
string
publicKey
required
string
sequenceNumber
required
number
value
required
number
<= 255
logo
object
signatures
required
Array<object>
object
signature
required
string
publicKey
required
string
sequenceNumber
required
number
value
required
string format: byte
validation_errors

How the entry departs from CIP-26 (V2 only); empty when it follows it.

Array<object>
object
cip
string
sub_standard
string | null
field_name
string
field_category
string
Allowed values: MANDATORY OPTIONAL
code
string
error
string
updated
string format: date-time
updatedBy
string
cip68
Any of:

CIP-68 fungible (label 333) or rich fungible (label 444) token metadata from a reference NFT inline datum. The token is served as indexed, whatever is wrong with it: validation_errors lists how it departs from CIP-68.

object
decimals
integer | null format: int64
description
string | null
logo

The logo as written, a URI with scheme https, ipfs, ar or data when it follows CIP-68. For a rich fungible token (444), which has no logo, this is its image.

string | null
name
string | null
ticker
string | null
url
string | null
version
integer | null format: int64
validation_errors

How the datum departs from CIP-68 for this token’s label; empty when it follows it, absent when the row was indexed before validation existed.

Array<object> | null
object
cip
string
sub_standard
string | null
field_name
string
field_category
string
Allowed values: MANDATORY OPTIONAL
code
string
error
string
extensions

Additional on-chain properties from CIP extensions. Each key is a CIP identifier (e.g. ‘cip113’). Omitted when the token has no extensions.

object
key
additional properties
One of:

CIP-113 programmable token metadata. Present when the token’s policy ID is registered in an on-chain CIP-113 programmable token registry. CIP-113 tokens are standard CIP-26/CIP-68 tokens with additional on-chain transfer validation logic — effectively tokens in a ‘smart contract jail’ for regulatory compliance, freeze/seize, or custom rules.

object
minting_logic_script

Blake2b-224 hash of the minting logic credential (script or verification key) that authorises minting and burning of this token. Bound on-chain to the token’s policy ID at registration. Null when the registry node does not specify one.

string | null
transfer_logic_script

Blake2b-224 hash of the Plutus script that validates every transfer of this token. This script runs on-chain via the withdraw-zero pattern whenever tokens move between addresses. Null when the registry node does not specify a transfer logic script.

string | null
third_party_transfer_logic_script

Blake2b-224 hash of the Plutus script that validates issuer/admin operations such as freeze, seize, or burn. Allows a token issuer to perform privileged actions on tokens held by other addresses. Null when the substandard has no third-party operations.

string | null
unfracking_logic_script

Blake2b-224 hash of the credential (script or verification key) that must approve any unfracking action touching this token. Null means unfracking is forbidden for this token.

string | null
global_state_policy_id

Policy ID of an optional global state NFT used by the transfer logic. For example, a freeze-and-seize substandard uses this to reference a denylist of blocked addresses. Null when the token’s substandard has no global state.

string | null
validation_errors

How the metadata of the token departs from its CIP, from every standard that has it, in query priority order (each entry names its cip and, for CIP-68, its sub_standard, the label). The token is returned as indexed; a MANDATORY error means it lacks something its CIP requires, so a wallet that wants to be strict may reject it, or ask with validation=MANDATORY_ONLY. Absent when the token was indexed before validation existed; metadata.valid then falls back to name and description being present.

codemeaning
missing_valuea field the CIP requires is missing or empty: for CIP-68 the version and, as the label requires it, name, description (333) and image (222, 444); for CIP-26 name and description; for CIP-113 the CIP-26 or CIP-68 metadata of a programmable token (companion_metadata)
wrong_typethe value has a type the CIP does not allow (for example a number where text is expected); a value that cannot be kept is left out
invalid_uri_schemean image or logo is not a URI with one of the schemes CIP-68 allows (https, ipfs, ar, data); the value is kept as written
invalid_lengtha CIP-26 text is shorter or longer than CIP-26 allows (for example a name over 50 characters)
invalid_valuea CIP-26 value breaks a rule of the registry’s validator that is not a type, a length or a range
out_of_rangea number is outside the range allowed: decimals
invalid_versionthe CIP-68 version is there but cannot be used: it is not an integer, it does not fit a 64-bit integer (stored without a version), or it is not one CIP-68 defines (1 to 4; the datum is read by its structure and kept). The message says which. A missing version is missing_value
plutus_constructora property holds a Plutus constructor, which CIP-68 metadata does not allow; it is kept as {constructor, fields}
not_utf8a text is not valid UTF-8; it is kept as hex (mandatory for a name, and for the description of a 333)
invalid_files_entryan entry of files breaks the CIP-68 definition (for example no mediaType or src); the entry is kept
no_nested_entrya nested datum ("721") has no usable entry for the token (field 721); the token is indexed without metadata
too_deepa property is nested more than 100 levels and is dropped, the rest of the datum is kept
unsupported_keya key of a map has no text form (a list or a map) and is left out
key_collisiontwo keys read the same (for example the text 1 and the integer 1); one of them is kept
invalid_base64a CIP-26 logo is not valid base64
too_largea CIP-26 logo is over 64 KiB once decoded (kept up to about 1 MiB; anything larger is dropped)
invalid_constructorthe CIP-68 datum is not constructor 0 (#6.121), as CIP-68 defines it (field constructor); it is read as written
Array<object> | null
object
cip
string
sub_standard
string | null
field_name
string
field_category
string
Allowed values: MANDATORY OPTIONAL
code
string
error
string
queryPriority
Array<string>
Example
{
"subject": {
"type": "NATIVE",
"standards": {
"cip26": {
"subject": "b377d03a568dde663534e040fc32a57323ec00970df0e863eba3f098717569640a",
"policy": "82008200581ce62601e8eeec975f3f124a288cd0ecb2973f5fc225629f1401a79b16",
"url": {
"value": "https://www.iohk.io"
},
"ticker": {
"value": "QUID"
},
"decimals": {
"value": 1
},
"validation_errors": [
{
"field_category": "MANDATORY"
}
]
},
"cip68": {
"validation_errors": [
{
"field_category": "MANDATORY"
}
]
}
},
"extensions": {
"additionalProperty": {
"minting_logic_script": "f462a4e22e5b138c17d893d4e0811790f51f1231b8be4198313e08d0",
"transfer_logic_script": "aaa513b0fcc01d635f8535d49f38acc33d4d6b62ee8732ca6e126102",
"third_party_transfer_logic_script": "def513b0fcc01d635f8535d49f38acc33d4d6b62ee8732ca6e126103",
"unfracking_logic_script": "f91c65ec585a20176feeb2c4e5281e856d3b61e95d1980717da724fc",
"global_state_policy_id": "1234567890abcdef1234567890abcdef1234567890abcdef12345678"
}
},
"validation_errors": [
{
"field_category": "MANDATORY"
}
]
}
}

Built on Yaci Store and cardano-client-lib by BloxBean.