# List survey

URL: https://docs.hanzo.ai/docs/openapi/market/get-market-survey

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

`GET /v1/market/survey`

> [Market →](https://docs.hanzo.ai/docs/openapi/market) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                         |
| ------------- | --------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/market/survey` |
| **Method**    | `GET`                                   |
| **Operation** | `get_market_survey`                     |
| **Auth**      | `Authorization: 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.

| Field   | In    | Type   | Required | Description                                                           |
| ------- | ----- | ------ | -------- | --------------------------------------------------------------------- |
| `chain` | query | string | —        | Chain is the chain's slug — `cchain`, `zoo` — as `chains` reports it. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | market.Survey   | ok      |
| `default` | problem-details | refused |

`200` body — 10 fields.

| Field            | In   | Type                 | Always | Description                                                                       |
| ---------------- | ---- | -------------------- | ------ | --------------------------------------------------------------------------------- |
| `carries`        | body | market.Precompile\[] | —      | Carries is all four where the node answered and `null` where it did not.          |
| `carries[].at`   | body | string               | —      |                                                                                   |
| `carries[].code` | body | boolean              | —      | Code is whether the address carries any.                                          |
| `carries[].name` | body | string               | —      |                                                                                   |
| `carries[].role` | body | string               | —      |                                                                                   |
| `chain`          | body | string               | —      |                                                                                   |
| `reach`          | body | market.Reach         | —      |                                                                                   |
| `reach.at`       | body | string               | —      | At is `read`, `unconfigured`, `unreachable` or `refused`.                         |
| `reach.why`      | body | string               | —      | Why is the upstream's own words, on Unreachable and Refused, and empty otherwise. |
| `rpc`            | body | string               | —      | RPC is the endpoint that was asked, so an answer names where it came from.        |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo market survey
```

**SDK**

**.ts**

```ts
import { Configuration, MarketApi } from 'hanzoai';

const api = new MarketApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getMarketSurvey();
```

**.py**

```python
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()
```

**.go**

```go
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
}
```

**.rs**

```rust
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?;
```

**.java**

```java
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();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/market/survey \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

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

```bash
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](https://docs.hanzo.ai/docs/openapi/market) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
