List survey

Answers which of the four settlement precompiles carry code on one chain.

GET /v1/market/survey

Addresshttps://api.hanzo.ai/v1/market/survey
MethodGET
Operationget_market_survey
AuthAuthorization: Bearer $HANZO_API_KEY

Answers which of the four settlement precompiles carry code on one chain.

An address with no code answers a call with empty data rather than an error, so "this chain has no view precompile" and "this market was never opened" reach a caller as the same silence — and only the second is a fact about a market. This says which it is, by asking the node for the code at each address.

It reads presence and nothing else. No market, no quote, no depth and no order is requested here, and eth_getCode is the only method this operation ever sends.

Request

1 field.

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

Response

StatusBodyMeaning
200market.Surveyok
defaultproblem-detailsrefused

200 body — 10 fields.

FieldInTypeAlwaysDescription
carriesbodymarket.Precompile[]—Carries is all four where the node answered and null where it did not.
carries[].atbodystring—
carries[].codebodyboolean—Code is whether the address carries any.
carries[].namebodystring—
carries[].rolebodystring—
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.
rpcbodystring—RPC is the endpoint that was asked, so an answer names where it came from.

Failure carries the platform error shape — see Errors.

Examples

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

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

resp, _, err := client.MarketAPI.GetMarketSurvey(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_survey(&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).getMarketSurvey();
curl https://api.hanzo.ai/v1/market/survey \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool market, op get_market_survey — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

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

Market API · All Hanzo APIs · Interactive reference

Was this page useful?