For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exchange API

Trading operations — place, replace, bracket, and cancel orders; set leverage; manage vaults.

All trading operations go through a single endpoint:

POST /api/v1/exchange

The action.type field determines which operation to execute. Every request requires an EIP-712 signature. See Authentication for signing details.

JavaScript snippets in this section are illustrative pseudocode for action shape and flow. The official high-level SDK examples are currently provided by the Python SDK.

Python SDK Examples

The official SDK repository includes runnable examples for common Exchange actions:

Agent Revocation

Use revoke_agent.py or client.exchange.revoke_agent(...) to revoke the currently approved Agent wallet. The SDK submits an approveAgent action with the zero address and validitySeconds=0.

Revocation is a Master wallet operation. Keep it available in operational runbooks so automated trading access can be disabled quickly.

Last updated