> 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/trading-mechanics.md).

# Trading Concepts

This section explains the mechanics that determine how orders execute and how risk is managed on SoDEX.

## Orders and execution

An order specifies the market, side, quantity, order type, and applicable execution options. Conditional orders add trigger conditions for take-profit and stop-loss workflows. Integrations should use the current market state and reference prices when validating or displaying an order.

## Margin and risk

Perpetual trading integrations must account for margin mode, available collateral, margin tiers, mark price, liquidation risk, and auto-deleveraging. Reconcile account state after each asynchronous action before submitting a dependent request.

## Fees

Trading fees can vary by market, volume tier, and account configuration. Use the values returned by the trading APIs when presenting estimated or completed execution costs.

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