List pools

Answers the automated market makers on one chain: their two tokens, their fee tier, and what has moved through each.

GET /v1/market/pools

Addresshttps://api.hanzo.ai/v1/market/pools
MethodGET
Operationget_market_pools
AuthAuthorization: Bearer $HANZO_API_KEY

Answers the automated market makers on one chain: their two tokens, their fee tier, and what has moved through each.

The two price fields on a pool are the ratio its own reserves stand at, as the indexer computed them. They are not a price ON either token and not a mark: nothing here derives one, ranks the pools, or names a route through them.

A chain with no market maker deployed answers read with no pools. That is the chain's real condition, and it is deliberately not the same answer as an indexer that could not be asked.

Request

1 field.

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

Response

StatusBodyMeaning
200market.Poolsok
defaultproblem-detailsrefused

200 body — 22 fields.

FieldInTypeAlwaysDescription
chainbodystring—
poolsbodymarket.Pool[]—Pools is [] where the chain has none and null where the read failed.
pools[].atbodystring—At is the pool contract's address, lowercase.
pools[].countbodyinteger (int64)—
pools[].feebodyinteger (int64)—Fee is the pool's tier in hundredths of a basis point — 3000 is 0.3%.
pools[].lockedbodystring—
pools[].token0bodymarket.Token—
pools[].token0.atbodystring—At is the token's contract address, lowercase.
pools[].token0.decimalsbodyinteger (int64)—
pools[].token0.namebodystring—
pools[].token0.symbolbodystring—
pools[].token0Pricebodystring—Token0Price is token1 per token0, and Token1Price its reciprocal, both as the indexer computed them.
pools[].token1bodymarket.Token—
pools[].token1.atbodystring—At is the token's contract address, lowercase.
pools[].token1.decimalsbodyinteger (int64)—
pools[].token1.namebodystring—
pools[].token1.symbolbodystring—
pools[].token1Pricebodystring—
pools[].volumebodystring—
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.

Failure carries the platform error shape — see Errors.

Examples

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

const api = new MarketApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getMarketPools();
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_pools()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.MarketAPI.GetMarketPools(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_pools(&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).getMarketPools();
curl https://api.hanzo.ai/v1/market/pools \
  -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?