> For the complete documentation index, see [llms.txt](https://sodex.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sodex.com/documentation/for-developers/developers/trading.md).

# Trading

SoDEX provides order-book Spot and perpetual markets with REST APIs for state and actions, plus WebSocket streams for realtime market and account events.

Trading APIs move balances that are **already in a Spot or Perps account**. External deposit and withdrawal are [Mirror Protocol](/documentation/for-developers/developers/mirror-protocol.md). The first trading-account credit must be **USDC or SOSO** (activation costs 1 unit).

| Step                                      | Path                                                                                                                                                                                                                                                                                              |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| External network → Spot or ValueChain EVM | [Custody Deposits](/documentation/for-developers/developers/mirror-protocol/lifecycle/custody-deposits.md) credit Spot directly. [Bridge Deposits](/documentation/for-developers/developers/mirror-protocol/lifecycle/deposits.md) credit Spot when `toClob` is `true`, otherwise ValueChain EVM. |
| ValueChain → Spot or Perps                | [ValueChain to Spot or Perps](/documentation/for-developers/developers/mirror-protocol/lifecycle/valuechain-transfers.md) (`ClobGateway`).                                                                                                                                                        |
| Place and track orders                    | [Trading Quickstart](/documentation/for-developers/developers/trading/quickstart.md), then [Spot Trading](/documentation/for-developers/developers/trading/spot-trading.md) or [Perp Trading](/documentation/for-developers/developers/trading/perp-trading.md).                                  |
| Perps → Spot → ValueChain → external      | [Withdrawals](/documentation/for-developers/developers/mirror-protocol/lifecycle/withdrawals.md). Trading `transferAsset` only reaches EVM; off-chain settlement is Mirror.                                                                                                                       |

Order placement is available on Testnet and Mainnet. There is no Testnet Mirror API — the deposit/withdraw loop above is Mainnet.

## Start here

{% content-ref url="/pages/AWT2USWBEq58NRgR0pxR" %}
[Quickstart](/documentation/for-developers/developers/trading/quickstart.md)
{% endcontent-ref %}

{% content-ref url="/pages/EHI3mUMvf6Ci6NYJZwU1" %}
[API Keys and Nonces](/documentation/for-developers/developers/trading/api-keys-and-nonces.md)
{% endcontent-ref %}

{% content-ref url="/pages/o3Yj9kHutFbmg6uDLnhS" %}
[Authentication & Signing](/documentation/for-developers/developers/trading/authentication-and-signing.md)
{% endcontent-ref %}

{% content-ref url="/pages/TiSzbH54hIG3d97UM3pJ" %}
[Spot Trading](/documentation/for-developers/developers/trading/spot-trading.md)
{% endcontent-ref %}

{% content-ref url="/pages/4mBKkGHzsPQrl69jyXK3" %}
[Perp Trading](/documentation/for-developers/developers/trading/perp-trading.md)
{% endcontent-ref %}

{% content-ref url="/pages/0fz4LvWyWhE7fAy4vGyl" %}
[SDKs & Tools](/documentation/for-developers/sdks.md)
{% endcontent-ref %}

## Integration by Builder Codes

{% content-ref url="/pages/kJiDvlZsE6kiCK4OskOS" %}
[Builder Codes in Trading](/documentation/for-developers/developers/trading/builder-codes-in-trading.md)
{% endcontent-ref %}

## API Reference

{% content-ref url="/pages/HWeWqIzQUTNao2smQ2pp" %}
[Rate Limits](/documentation/for-developers/developers/trading/api-rate-limits.md)
{% endcontent-ref %}

{% content-ref url="/pages/JhkOXmaIr0osLMjp2DfF" %}
[REST API](/documentation/for-developers/api-reference/trading-api/rest-v1.md)
{% endcontent-ref %}

{% content-ref url="/pages/U25Aeh8OoqsoN02ofoj4" %}
[WebSocket Streams](/documentation/for-developers/api-reference/trading-api/websocket-v1.md)
{% endcontent-ref %}

{% content-ref url="/pages/8O69liORmMccphq48PVL" %}
[Schema](/documentation/for-developers/api-reference/trading-api/rest-v1/schema.md)
{% endcontent-ref %}
