> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yellow.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools

> The full tool surface of the Yellow.pro MCP server — market data, account state, and opt-in trading — plus order types, timestamp units, and pagination.

Tools are grouped into three modules. Market tools need no credentials; account and trading tools do. Trading is opt-in (see [Configuration](https://docs.yellow.pro/mcp/configuration.md)).

## Market

Available without credentials:

`get_health`, `get_markets`, `get_ticker`, `get_orderbook`, `get_klines`, `get_funding_rate`, `get_funding_rate_history`, `get_networks`, `get_transfer_assets`

> [!WARNING]
>
> `get_markets` does not fail if the perpetual side is unavailable. It returns `{"perp":{"unavailable":"..."}}` instead of an error, which an agent may report as "there are no perpetual markets". Check for that key before trusting an empty perp list.

## Account

Require API credentials, with one exception noted below:

`get_balance`, `get_open_orders`, `get_order_history`, `get_my_trades`, `get_positions`, `get_position_history`, `get_position_history_detail`, `get_spot_accounts`, `get_spot_account`, `get_perpetual_accounts`, `get_fee_schedule`, `get_fee_tier`, `get_market_fee_rate`, `get_transaction_history`, `get_funding_payments`

> [!NOTE]
>
> **`get_fee_schedule` is public.** It calls a public endpoint and works with no credentials at all, despite sitting in this list. Because it lives in the `account` module, `YELLOW_PRO_MODULES=market` hides it — so a credential-free market-data agent needs `market,account` to reach the public fee schedule.

Which API-key scope each group needs is in the [scope table](https://docs.yellow.pro/mcp/credentials.md#scopes-and-tools).

## Trading (opt-in)

Only registered when `YELLOW_PRO_ENABLE_TRADING=true`:

`place_order`, `cancel_order`, `cancel_all_orders`, `close_positions`, `set_leverage`, `transfer`

> [!WARNING]
>
> `cancel_all_orders` and `close_positions` act on your whole account when called without a `market`. See [Risk and safety](https://docs.yellow.pro/mcp/risk-and-safety.md).

## Conventions

Markets use native ids: spot as `ETHUSDT`, perpetual as `BTCUSDT-PERP`. Amounts and prices are decimal strings. All results are raw exchange JSON.

## Timestamp units differ per tool

Three formats are in use. Passing the wrong one returns an **empty result set rather than an error**, so it reads as "no data" instead of a mistake.

| Tool | Unit |
| - | - |
| `get_klines` | Milliseconds |
| `get_transaction_history` | Unix seconds |
| `get_my_trades`, `get_position_history`, `get_position_history_detail`, `get_funding_payments` | RFC3339 |

## Order types

`place_order` supports these single-order types:

> [accordion] limit
>
> Requires `price`.

> [accordion] market
>
> No `price`.

> [accordion] post\_only
>
> Requires `price` and guarantees the order is maker-only.

> [accordion] trigger\_limit (Stop Limit)
>
> Requires both `trigger_price` and `price`.

> [accordion] trigger\_market (Stop Market)
>
> Requires `trigger_price`.

> [!WARNING]
>
> `post_only` is accepted by the MCP but is **not currently listed** in the published [Spot Trading API](https://docs.yellow.pro/api-and-programmatic-access/spot-trading-api.md) or [Perpetuals Trading API](https://docs.yellow.pro/api-and-programmatic-access/perpetuals-trading-api.md) order types. Confirm with [support](https://docs.yellow.pro/community-and-resources/contact-support.md) before relying on it — the exchange may reject the order.

Perpetual trigger orders also accept an optional `trigger_type` of `stop_loss` or `take_profit`. Order queries return the classified conditional type, such as `stop_limit`, `stop_loss`, `take_limit`, or `take_profit`. `cancel_order` accepts either the request type (`trigger_*`) or these returned types and normalizes Spot cancellation.

### Time in force

Not passed explicitly, `time_in_force` defaults to `gtc` for limit-style orders and `ioc` for market-style orders.

## Perpetual behaviour worth knowing

> [accordion] Leverage is always sent, and place\_order is not where you set it
>
> Perpetual `place_order` always sends a `leverage` value, defaulting to `"1"`. The effective margin still follows your account and market settings, so passing leverage here does not change your real leverage — `set_leverage` is the actual control.

> [accordion] Perpetuals are cross margin only
>
> There is no isolated-margin mode. Risk is aggregated across positions; see [Cross-Margin Risk & ADL](https://docs.yellow.pro/perpetual-trading/risk-and-liquidation/cross-margin-risk-and-adl.md).

## Position modes (Perpetual)

Perpetual markets have a per-market position mode, listed under `position_modes` in `get_perpetual_accounts`.

> [tab] HEDGE mode
>
> A market holds separate long and short legs. Orders take `direction` `long` or `short`, defaulting from `side` and flipped by `reduce_only`.

> [tab] ONE\_WAY mode
>
> A market holds a single net position. The exchange requires `direction: "both"` — pass it explicitly, it is never inferred.

> [!NOTE]
>
> Switching position modes is only available in the Yellow\.pro web UI, not through the MCP.

## Transfers

`transfer` moves funds between your spot and perpetual accounts. Constraints from the [Account Transfers API](https://docs.yellow.pro/api-and-programmatic-access/account-transfers-api.md):

* Only stablecoins can move between spot and perpetuals.
* Source and destination must differ. The MCP schema permits identical values, but the exchange rejects them.
* Perpetuals-to-spot transfers are capped at 80% of `min(total - locked, available)`.

## Pagination

Most list tools use the documented opt-in cursor protocol. Omit `cursor` for the first request; the MCP sends `use_cursor=true`. Pass the returned `next_cursor` to fetch the next page. `page_size` defaults to 50 and is capped at 100.

Fill-level position history (`get_position_history_detail`) is cursor-native: its first request omits both `cursor` and `use_cursor`, and its `page_size` defaults to **200** with a maximum of **500**.

The `yellow-pro` CLI covers this same surface under different command names — see the [CLI reference](https://docs.yellow.pro/mcp/cli.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.