> For the complete documentation index, see [llms.txt](https://k4k3ru.gitbook.io/k4k3ru-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k4k3ru.gitbook.io/k4k3ru-docs/agent/market-data.md).

# Market Data

Use Agent to discover available markets, retrieve consolidated BBO and OrderBook data, and evaluate cross-market spreads through K4K3RU Gateway.

## List Venues

Run:

```
/markethub list-venues
```

This public command lists configured venues and their current startup states. A listed venue is not by itself a guarantee that every symbol or market type is enabled.

## List Symbols

Run:

```
/markethub list-symbols
```

This public command lists enabled canonical symbols using the service defaults. Use the returned market types and symbols when selecting a BBO request.

## Get a Consolidated BBO Snapshot

Run:

```
/markethub bbo get
```

This public command does not require an account or API credential. Gateway applies the configured per-IP, per-method rate limit.

Agent guides you through these selections:

1. Select a canonical market.
2. Select the `ALL`, `CEX`, or `DEX` source category.
3. Submit the request and view the consolidated snapshot.

Agent does not display or allow selection of individual contributing Venue names. Source selection uses broad categories, while K4K3RU manages eligible underlying sources.

The snapshot includes the consolidated best bid and ask, quantities, source count, version, and timestamp. Use `/markethub bbo subscribe` followed by `/markethub bbo watch` for real-time updates, and `/markethub bbo unsubscribe` to stop a stream.

## Get Consolidated OrderBook Depth

Run:

```
/markethub orderbook get
```

Select a canonical market, a broad source category, and a depth from 1 through 20. The default depth is 3. This public command does not require an account or API credential and is subject to the Gateway method rate limit.

For order-book venues, the result contains synchronized book levels. An AMM or another source that only provides synthetic BBO contributes at most one bid and one ask level. Levels at the same price are combined across sources, and fewer levels than requested may be returned when less fresh liquidity is available.

Use `/markethub orderbook subscribe` followed by `/markethub orderbook watch` for real-time updates, and `/markethub orderbook unsubscribe` to stop a stream. Subscription operations require local account state and an unexpired API credential.

## Evaluate Cross-Market Spreads

Run:

```
/markethub spread get
```

Select a canonical symbol, enter a base-asset quantity and minimum gross spread in basis points, then select all route families or one of `spot-spot`, `spot-perp`, `perp-spot`, and `perp-perp`. An optional broad source category restricts evaluation to CEX or DEX sources.

The public Get command prices each leg from fresh OrderBook depth, with executable BBO fallback where full depth is unavailable. Its result is a Gross Spread signal: trading fees, funding, borrowing, gas, transfer costs, inventory constraints, and net position exposure are not included.

Use `/markethub spread subscribe` followed by `/markethub spread watch` for derived real-time signals, and `/markethub spread unsubscribe` to stop a stream. Subscription operations require local account state and an unexpired API credential. Agent shows an empty eligible-route set when a previously visible opportunity drops below the configured threshold.

## Common Recovery Steps

| Situation                           | Recovery                                                                                                            |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| BBO Get is rate limited             | Wait for the method rate-limit window to reset.                                                                     |
| OrderBook Get is rate limited       | Wait for the method rate-limit window to reset.                                                                     |
| Spread Get is rate limited          | Wait for the method rate-limit window to reset.                                                                     |
| A subscription lacks authentication | Run `/account signup` or `/account signin`, then configure an API credential.                                       |
| No current BBO is available         | Verify the selected symbol and market type, then try again when eligible fresh data is available.                   |
| No current OrderBook is available   | Verify the selected symbol, market type, and source category, then try again when eligible fresh data is available. |
| No Spread route is eligible         | Change the quantity or route family, or wait for market prices to change.                                           |

For the underlying API behavior, see [Get a Consolidated BBO Snapshot](/k4k3ru-docs/api/market-hub/get-bbo-snapshot.md), [Get a Consolidated OrderBook Snapshot](/k4k3ru-docs/api/market-hub/get-order-book-snapshot.md), and [Get a Cross-Market Spread Snapshot](/k4k3ru-docs/api/market-hub/get-spread-snapshot.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://k4k3ru.gitbook.io/k4k3ru-docs/agent/market-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
