# Omnia Exchange - REST API Documentation > Omnia is a next‑generation infrastructure layer enabling users to seamlessly convert any asset in real‑time via a single API, anywhere, anytime. - [Full API Reference (llms-full.txt)](https://docs.omniaexchange.com/llms-full.txt) - [OpenAPI Specification](https://docs.omniaexchange.com/rest-api-spec.json) - [Documentation](https://docs.omniaexchange.com/) ## Key Constraints - **Authentication**: All API endpoints (except auth endpoints) require a Bearer JWT token in the `Authorization` header. - **Token Expiry**: JWT tokens expire after 24 hours. Generate tokens via `POST /v3/auth/get-token` (API keys) or `POST /v2/auth/siwe/verify` (Ethereum wallet). - **Source Parameter**: Endpoints with a `{source}` path parameter accept `OFFCHAIN` for API trading, or a blockchain name (`ETHEREUM`, `OPTIMISM`, `POLYGON`, `LINEA`, etc.) for on-chain trading. - **Error Format**: Errors return JSON with `error_code` and `error_message` fields. HTTP 4xx = client error, 5xx = server error. - **API Versioning**: The API may add new endpoints, optional request parameters, and new response fields at any time. Clients must be tolerant of unknown fields. - **Rate Limits**: Contact sales@omniaexchange.com for rate limit details for your account tier. - **Instruction IDs**: Client-specified instruction IDs must be unique per order and at most 64 characters long. - **Quote Expiry**: RFQ quotes are valid for 5 seconds after being issued. - **Webhook Limit**: Maximum 5 webhook subscriptions per user. ## Connection Details - **Demo/UAT**: https://api.demo.omniaexchange.com/api - **Production**: https://api.production.omniaexchange.com/api - **Documentation**: https://docs.omniaexchange.com/ ## Authentication ### API Key Authentication - [POST /v3/auth/token](https://docs.omniaexchange.com/docs/api-key-authentication.md#api-credential-auth): API Credential Auth — Generate a JWT token using your api credentials. Tokens will expire after 24 hours ### Blockchain Authentication - [GET /v2/auth/siwe/nonce](https://docs.omniaexchange.com/docs/blockchain-authentication.md#generate-a-siwe-nonce): Generate a SIWE nonce — Get a nonce to perform a Sign in with Ethereum (SIWE) verification. (https://docs.login.xyz/sign-in-with-ethereum/qui... - [POST /v2/auth/siwe/verify](https://docs.omniaexchange.com/docs/blockchain-authentication.md#siwe-verification): SIWE Verification — Perform Sign in with Ethereum (SIWE) verification. This will issue you a token if successful. ### Check Authentication - [GET /v2/auth/jwt-check](https://docs.omniaexchange.com/docs/check-authentication.md#check-jwt-token): Check JWT Token — Checks the presence and validity of the provided JWT token ### API Key Management - [GET /v3/api-keys](https://docs.omniaexchange.com/docs/api-key-management.md#list-api-keys): List API Keys — Returns all API keys belonging to the authenticated user with associated permissions. - [POST /v3/api-keys](https://docs.omniaexchange.com/docs/api-key-management.md#create-api-key): Create API Key — Creates a new API key with the specified label and permissions. The requested permissions must be a subset of the per... - [POST /v3/api-keys/{apiKeyId}/rotate](https://docs.omniaexchange.com/docs/api-key-management.md#rotate-api-key): Rotate API Key — Generates a new secret for the specified API key. The old secret and jwt is immediately invalidated. Store the new se... ## Information ### Assets - [GET /v2/assets/{source}](https://docs.omniaexchange.com/docs/assets.md#get-asset-list): Get Asset List — Get all assets for a given source. If you are trading via a blockchain please use that as the source, if not use OFFC... - [GET /v2/assets/{source}/token-information](https://docs.omniaexchange.com/docs/assets.md#get-token-information): Get Token Information — Get on-chain information for an asset ### Chain Data - [GET /v2/assets/{source}/token-information](https://docs.omniaexchange.com/docs/chain-data.md#get-token-information): Get Token Information — Get on-chain information for an asset - [GET /v3/order-status/{source}/{orderId}](https://docs.omniaexchange.com/docs/chain-data.md#get-order-status): Get Order Status — Returns the status of a given order id for a given source (chain). ### Account Data - [GET /v2/account-settings/{source}](https://docs.omniaexchange.com/docs/account-data.md#get-account-settings): Get Account Settings — Get the account settings for the currently authorised user - [GET /v2/account-snapshot/{source}](https://docs.omniaexchange.com/docs/account-data.md#get-account-snapshot): Get Account Snapshot — Get snapshot of your account showing your balances, their valuations in account asset, the available to withdraw in e... - [GET /v3/balance/{source}](https://docs.omniaexchange.com/docs/account-data.md#get-balance): Get Balance — Get the balances for the currently authorised user - [GET /v2/commission-rate/{source}](https://docs.omniaexchange.com/docs/account-data.md#get-commission-rate): Get Commission Rate — Get the commission rate for the specified asset pair - [GET /v2/credit/{source}](https://docs.omniaexchange.com/docs/account-data.md#get-credit-usage): Get Credit Usage — Get credit usage for the currently authorised user - [GET /v3/deposits](https://docs.omniaexchange.com/docs/account-data.md#get-historical-deposits): Get Historical Deposits — Retrieves the user's deposit history, specified by the timestamp using the query parameters. - [GET /v3/withdrawals](https://docs.omniaexchange.com/docs/account-data.md#get-historical-withdrawals): Get Historical Withdrawals — Retrieves the user's withdrawal history, specified by the timestamp using the query parameters. - [GET /v3/order-history](https://docs.omniaexchange.com/docs/account-data.md#get-order-history): Get Order History — Returns a user's order history in chronological order (oldest first) by default, can optionally reverse this order us... - [GET /v2/accounts](https://docs.omniaexchange.com/docs/account-data.md#get-sub-accounts): Get Sub Accounts — Get the sub-accounts for the current account - [GET /v2/deposit-addresses](https://docs.omniaexchange.com/docs/account-data.md#get-deposit-addresses): Get Deposit Addresses — Get all deposit addresses associated with your account. These are the addresses you can use to deposit funds. - [GET /v2/withdrawal-addresses](https://docs.omniaexchange.com/docs/account-data.md#get-withdrawal-addresses): Get Withdrawal Addresses — Get all withdrawal addresses associated with your account. These are the addresses that have been whitelisted for wit... ### Market Data - [GET /v2/price/{sellingAsset}/{buyingAsset}](https://docs.omniaexchange.com/docs/market-data.md#get-price): Get Price — Returns the price of a selling asset for a buying asset. The price is the quantity of the buying asset received for 1... - [GET /v2/prices](https://docs.omniaexchange.com/docs/market-data.md#get-prices): Get Prices — Gets multiple prices at once. The prices of each selling/buying asset pair can be requested by including them as quer... - [GET /v2/quantity-estimate](https://docs.omniaexchange.com/docs/market-data.md#get-quantity-estimate): Get Quantity Estimate — Calculates the estimated quantity of a buying asset you would receive for a specified quantity of a selling asset, ba... ## Trading ### API Trading - [POST /v2/action-quote](https://docs.omniaexchange.com/docs/api-trading.md#action-quote): Action Quote — Action a previously received quote. - [GET /v2/order/{source}/{instructionId}](https://docs.omniaexchange.com/docs/api-trading.md#get-order-status): Get Order Status — Check the status of an order. - [POST /v2/orders](https://docs.omniaexchange.com/docs/api-trading.md#submit-order): Submit Order — Swap assets using a market or limit order. Specify how much of a given asset you want to sell. - [POST /v2/request-quote](https://docs.omniaexchange.com/docs/api-trading.md#request-quote): Request Quote — Request a firm quote to swap some assets, the quote is inclusive of commission. Specify how much of an asset you want... ### On-chain Trading - [GET /v2/order/{source}/{instructionId}](https://docs.omniaexchange.com/docs/on-chain-trading.md#get-order-status): Get Order Status — Check the status of an order. - [POST /v2/order](https://docs.omniaexchange.com/docs/on-chain-trading.md#submit-dtw-order): Submit DTW order — Swap assets using a market or limit order. Specify how much of a given asset you want to sell. This utilises the depo... ## Operations ### API Withdrawal - [GET /v2/fund-locations](https://docs.omniaexchange.com/docs/api-withdrawal.md#get-fund-locations): Get Fund Locations — Get the list of available locations for withdrawals - [GET /v2/offchain-withdrawals/{instructionId}](https://docs.omniaexchange.com/docs/api-withdrawal.md#withdrawal-status): Withdrawal Status — Check the status of a withdrawal - [POST /v2/offchain-withdrawals](https://docs.omniaexchange.com/docs/api-withdrawal.md#withdrawal-request): Withdrawal Request — Create a withdrawal request ### On-chain Withdrawal - [GET /v2/withdrawals/{instructionId}](https://docs.omniaexchange.com/docs/on-chain-withdrawal.md#withdrawal-status): Withdrawal Status — Check the status of a withdrawal - [POST /v2/withdrawals](https://docs.omniaexchange.com/docs/on-chain-withdrawal.md#withdrawal-request): Withdrawal Request — Create a withdrawal request to remove assets from the Deposit, Trade, Withdraw contract. ## Websocket ### Websocket - [POST /v3/auth/ticket](https://docs.omniaexchange.com/docs/websocket.md#authentication-ticket): Authentication Ticket — Generate a ticket for use with websockets if your client does not support customisable headers. - [GET /v2/websocket](https://docs.omniaexchange.com/docs/websocket.md#open-websocket): Open Websocket — Open a websocket with Alice. This will allow you to subscribe to live data channels. **Available Channels:** **P... ## Webhooks ### Webhooks - [GET /v3/webhooks](https://docs.omniaexchange.com/docs/webhooks.md#get-all-webhooks): Get All Webhooks — Returns all webhook subscriptions for the authenticated user. Each subscription includes a subscriptionId, the event ... - [POST /v3/webhooks](https://docs.omniaexchange.com/docs/webhooks.md#create-webhook): Create Webhook — Create a new webhook subscription. You may create at most 5 webhooks per user. The response includes a subscriptionId... - [GET /v3/webhooks/{subscriptionId}](https://docs.omniaexchange.com/docs/webhooks.md#get-webhook-details): Get Webhook Details — Retrieve a specific webhook subscription by its subscriptionId. The subscriptionId is returned when you create a webh... - [DELETE /v3/webhooks/{subscriptionId}](https://docs.omniaexchange.com/docs/webhooks.md#delete-webhook): Delete Webhook — Delete a webhook subscription by its subscriptionId. Once deleted, events will no longer be delivered to the target URL. ## Sub Account ### Sub Account Information - [GET /v2/accounts/{accountId}/account-settings/{source}](https://docs.omniaexchange.com/docs/sub-account-information.md#get-account-settings): Get Account Settings — Get the account settings for the sub account - [GET /v2/accounts/{accountId}/account-snapshot/{source}](https://docs.omniaexchange.com/docs/sub-account-information.md#get-account-snapshot): Get Account Snapshot — Get snapshot of the sub account showing balances, valuations in account asset, the available to withdraw in each asse... - [GET /v3/accounts/{accountId}/balance/{source}](https://docs.omniaexchange.com/docs/sub-account-information.md#get-balance): Get Balance — Get the balances for the sub account - [GET /v2/accounts/{accountId}/commission-rate/{source}](https://docs.omniaexchange.com/docs/sub-account-information.md#get-commission-rate): Get Commission Rate — Get the commission rate for the specified asset pair on the sub account - [GET /v2/accounts/{accountId}/credit/{source}](https://docs.omniaexchange.com/docs/sub-account-information.md#get-credit-usage): Get Credit Usage — Get credit usage for the sub account - [GET /v3/accounts/{accountId}/order-history](https://docs.omniaexchange.com/docs/sub-account-information.md#get-order-history): Get Order History — Returns sub account order history in chronological order (oldest first). ### Sub Account Trading - [POST /v2/accounts/{accountId}/action-quote](https://docs.omniaexchange.com/docs/sub-account-trading.md#action-quote): Action Quote — Action a previously received quote. - [GET /v2/accounts/{accountId}/order/{source}/{instructionId}](https://docs.omniaexchange.com/docs/sub-account-trading.md#order-status): Order Status — Check the status of an order made by the sub account - [POST /v2/accounts/{accountId}/orders](https://docs.omniaexchange.com/docs/sub-account-trading.md#submit-order): Submit Order — Swap assets using a market or limit order. Specify how much of a given asset you want to sell. - [GET /v3/accounts/{accountId}/order-status/{source}/{orderId}](https://docs.omniaexchange.com/docs/sub-account-trading.md#get-order-status): Get Order Status — Returns the status of a given order id for a given source (chain). - [POST /v2/accounts/{accountId}/request-quote](https://docs.omniaexchange.com/docs/sub-account-trading.md#request-quote): Request Quote — Request a firm quote to swap some assets. Specify how much of an asset you want to receive. ### Sub Account Operations - [GET /v2/accounts/{accountId}/offchain-withdrawals/{instructionId}](https://docs.omniaexchange.com/docs/sub-account-operations.md#withdrawal-status): Withdrawal Status — Check the status of a withdrawal request made on a sub account - [POST /v2/accounts/{accountId}/offchain-withdrawals](https://docs.omniaexchange.com/docs/sub-account-operations.md#withdrawal-request): Withdrawal Request — Create a withdrawal request for the sub account ## MCP ### MCP Server - [POST /mcp](https://docs.omniaexchange.com/docs/mcp-server.md#mcp-json-rpc): MCP JSON-RPC — Send JSON-RPC requests to the MCP server (initialize, tools/list, tools/call, ping). See the MCP Server section descr... - [DELETE /mcp](https://docs.omniaexchange.com/docs/mcp-server.md#terminate-mcp-session): Terminate MCP Session — Terminate an active MCP session. The session ID must be included in the `MCP-Session-Id` request header. ## Code Examples ### Authenticate (API Key) ```bash curl -X POST "https://api.demo.omniaexchange.com/api/v3/auth/get-token" \ -H "Content-Type: application/json" \ -d '{"keyId": "", "secret": ""}' ``` ### Get Price ```bash curl "https://api.demo.omniaexchange.com/api/v2/price/btc/usd" \ -H "Authorization: Bearer " ``` ### Place Order ```bash curl -X POST "https://api.demo.omniaexchange.com/api/v2/orderV2" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"instructionId": "", "sellingAsset": "USD", "buyingAsset": "EUR", "amountToSell": "5.67"}' ``` ### Request for Quote (RFQ) Flow Step 1: Request a quote ```bash curl -X POST "https://api.demo.omniaexchange.com/api/v2/request-quote" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"instructionId": "375b23de-febf-4a6e-a517-e7b5dfa9357c", "sellingAsset": "USD", "buyingAsset": "EUR", "amountToBuy": "5.67"}' ``` Step 2: Action the quote (within 5 seconds) ```bash curl -X POST "https://api.demo.omniaexchange.com/api/v2/action-quote" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"instructionId": "375b23de-febf-4a6e-a517-e7b5dfa9357c"}' ``` ## Optional - [Full API Reference (llms-full.txt)](https://docs.omniaexchange.com/llms-full.txt): Complete endpoint detail with schemas, parameters, and response examples - [OpenAPI Specification](https://docs.omniaexchange.com/rest-api-spec.json): Machine-readable OpenAPI 3.1 spec ### Per-Tag Documentation - [API Key Authentication](https://docs.omniaexchange.com/docs/api-key-authentication.md) - [Blockchain Authentication](https://docs.omniaexchange.com/docs/blockchain-authentication.md) - [Check Authentication](https://docs.omniaexchange.com/docs/check-authentication.md) - [API Key Management](https://docs.omniaexchange.com/docs/api-key-management.md) - [Assets](https://docs.omniaexchange.com/docs/assets.md) - [Chain Data](https://docs.omniaexchange.com/docs/chain-data.md) - [Account Data](https://docs.omniaexchange.com/docs/account-data.md) - [Market Data](https://docs.omniaexchange.com/docs/market-data.md) - [API Trading](https://docs.omniaexchange.com/docs/api-trading.md) - [On-chain Trading](https://docs.omniaexchange.com/docs/on-chain-trading.md) - [API Withdrawal](https://docs.omniaexchange.com/docs/api-withdrawal.md) - [On-chain Withdrawal](https://docs.omniaexchange.com/docs/on-chain-withdrawal.md) - [Websocket](https://docs.omniaexchange.com/docs/websocket.md) - [Webhooks](https://docs.omniaexchange.com/docs/webhooks.md) - [Sub Account Information](https://docs.omniaexchange.com/docs/sub-account-information.md) - [Sub Account Trading](https://docs.omniaexchange.com/docs/sub-account-trading.md) - [Sub Account Operations](https://docs.omniaexchange.com/docs/sub-account-operations.md) - [MCP Server](https://docs.omniaexchange.com/docs/mcp-server.md) ### API Changes The API may undergo incremental changes. Code consuming this API should accept: - The addition of new API endpoints - The addition of optional parameters to existing API requests - The addition of fields to existing API responses