Skip to main content

All Tokens

Queries all tokens associated with a factory contract for a specific chain UID.

query All_tokens($chainUid: String!, $limit: Int, $offset: Int) {
factory(chain_uid: $chainUid) {
all_tokens(limit: $limit, offset: $offset) {
tokens
pagination {
total_count
limit
offset
}
}
}
}

Example​

curl --request POST \
    --header 'content-type: application/json' \
    --url 'https://api.euclidprotocol.com/graphql' \
    --data '{"query":"query All_tokens($chainUid: String!, $limit: Int, $offset: Int) {\n  factory(chain_uid: $chainUid) {\n    all_tokens(limit: $limit, offset: $offset) {\n      tokens\n      pagination {\n        total_count\n        limit\n        offset\n      }\n    }\n  }\n}","variables":{"chainUid":"nibiru","limit":7,"offset":null}}'

Open in Playground

Arguments​

ArgumentTypeDescription
chainUidString!The unique identifier of the chain.
limitIntOptional limit to the number of results to return.
offsetIntOptional number of tokens to skip before starting to return the result set.

Return Fields​

FieldTypeDescription
tokens[String]The list of tokens.
total_countIntThe total number of token pairs (pools) available.
limitIntThe maximum number of pools returned per request.
offsetIntThe number of pools to skip before starting to return the result set.