List tokens

Answers the tokens one chain's indexer has seen, with the decimals a caller needs to read any amount of one correctly.

GET /v1/market/tokens

Addresshttps://api.hanzo.ai/v1/market/tokens
MethodGET
Operationget_market_tokens
AuthAuthorization: Bearer $HANZO_API_KEY

Answers the tokens one chain's indexer has seen, with the decimals a caller needs to read any amount of one correctly.

This is what the indexer INGESTED, which is not the same as what exists on the chain: a token nothing has traded has no row here, and this is not a registry of what is permitted or listed.

Request

1 field.

FieldInTypeRequiredDescription
chainquerystring—Chain is the chain's slug — cchain, zoo — as chains reports it.

Response

StatusBodyMeaning
200market.Tokensok
defaultproblem-detailsrefused

200 body — 9 fields.

FieldInTypeAlwaysDescription
chainbodystring—
reachbodymarket.Reach—
reach.atbodystring—At is read, unconfigured, unreachable or refused.
reach.whybodystring—Why is the upstream's own words, on Unreachable and Refused, and empty otherwise.
tokensbodymarket.Token[]—Tokens is [] where the indexer holds none and null where the read failed.
tokens[].atbodystring—At is the token's contract address, lowercase.
tokens[].decimalsbodyinteger (int64)—
tokens[].namebodystring—
tokens[].symbolbodystring—

Failure carries the platform error shape — see Errors.

Examples

hanzo market tokens
import { Configuration, MarketApi } from 'hanzoai';

const api = new MarketApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getMarketTokens();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MarketApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MarketApi(client).get_market_tokens()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.MarketAPI.GetMarketTokens(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, market_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = market_api::get_market_tokens(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MarketApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new MarketApi(client).getMarketTokens();
curl https://api.hanzo.ai/v1/market/tokens \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches market through the market tool, which names its 3 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_market_chains"
         }
       }
     }'

Market API · All Hanzo APIs · Interactive reference

Was this page useful?