> For the complete documentation index, see [llms.txt](https://docs.sodex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sodex.com/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.

[REST API](https://docs.sodex.com/for-developers/api-reference/trading-api/rest-v1.md) · [WebSocket Streams](https://docs.sodex.com/for-developers/api-reference/trading-api/websocket-v1.md)

## Start here

* [Trading Concepts](https://docs.sodex.com/for-developers/developers/trading/trading-mechanics.md) — Learn how orders execute and how margin and fees work.
* [Choose Your Integration](https://docs.sodex.com/for-developers/developers/trading/choose-your-integration.md) — Find the right setup for a market-data app, trading bot, wallet, or backend.
* [Quickstart](https://docs.sodex.com/for-developers/developers/trading/quickstart.md) — Query public market data with curl or place your first testnet order with Python.

## Fund your account

Trading APIs move balances that are **already in a Spot or Perps account**. External deposit and withdrawal are [Mirror Protocol](https://docs.sodex.com/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](https://docs.sodex.com/for-developers/developers/mirror-protocol/lifecycle/custody-deposits.md) credit Spot directly. [Bridge Deposits](https://docs.sodex.com/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](https://docs.sodex.com/for-developers/developers/mirror-protocol/lifecycle/valuechain-transfers.md) (`ClobGateway`).                                                                                                                                                                |
| Place and track orders                    | [Trading Quickstart](https://docs.sodex.com/for-developers/developers/trading/quickstart.md), then [Spot Trading](https://docs.sodex.com/for-developers/developers/trading/spot-trading.md) or [Perp Trading](https://docs.sodex.com/for-developers/developers/trading/perp-trading.md).                          |
| Perps → Spot → ValueChain → external      | [Withdrawals](https://docs.sodex.com/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.

## Integration guides

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

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

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

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

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

## Run your integration

{% content-ref url="/pages/jninIkUIhDlmou3pPg86" %}
[Production Integration Guide](https://docs.sodex.com/for-developers/developers/trading/production-guide.md)
{% endcontent-ref %}

{% content-ref url="/pages/SrGkr1Qw3VjUTz4oPkX7" %}
[Trading Troubleshooting](https://docs.sodex.com/for-developers/developers/trading/troubleshooting.md)
{% endcontent-ref %}

## Integration by Builder Codes

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

## API Reference

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

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

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

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