# Chain Data

Endpoints to access on‑chain specific data.

## Get Token Information

`GET /v2/assets/{source}/token-information`

Get on-chain information for an asset

**Parameters**

| Name | In | Required | Type | Description |
|------|-----|----------|------|-------------|
| `source` | path | Yes | string | If trading via API use OFFCHAIN, else specify the blockchain you wish to trade on to see its supported tokens. |

**Responses**

- **200**: Ok

  | Field | Type | Description |
  |-------|------|-------------|
  | `tokenInfoResponses` | TokenInfoResponse[] | tokenInformation |


  Example (Token Information):
  ```json
  {"tokenInfoResponses":[{"asset":"usd","tokens":[{"token":"usdc","tokenAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","decimals":"6"}]}]}
  ```
- **400**: Bad request

  | Field | Type | Description |
  |-------|------|-------------|
  | `code` | string | Error code |
  | `description` | string | Error description |


  Example (Invalid Order Source):
  ```json
  {"code":"INVALID_ORDER_SOURCE","description":"Order source TINMAN is invalid. Valid order sources are [OFFCHAIN, ETHEREUM, OPTIMISM, POLYGON, LINEA]"}
  ```
- **401**: Unauthorized

  | Field | Type | Description |
  |-------|------|-------------|
  | `code` | string | Error code |
  | `description` | string | Error description |


  Example (Invalid JWT):
  ```json
  {"code":"INVALID_JWT_TOKEN","description":"Invalid JWT"}
  ```
- **403**: Invalid permissions

  | Field | Type | Description |
  |-------|------|-------------|
  | `code` | string | Error code |
  | `description` | string | Error description |


  Example (Invalid permissions):
  ```json
  {"code":"INVALID_PERMISSIONS","description":"Invalid permissions"}
  ```

**Example**

```bash
curl "https://api.demo.omniaexchange.com/api/v2/assets/{source}/token-information" \
  -H "Authorization: Bearer <token>"
```

---

## Get Order Status

`GET /v3/order-status/{source}/{orderId}`

Returns the status of a given order id for a given source (chain).

**Parameters**

| Name | In | Required | Type | Description |
|------|-----|----------|------|-------------|
| `sub_account` | query | No | string | Deprecated (Sunset: 2026-02-01). Please provide as a path parameter instead - using the endpoint: /v3/accounts/{accountId}/order-status/{source}/{orderId} |
| `source` | path | Yes | string | Specify the blockchain you placed the order on |
| `orderId` | path | Yes | integer | OrderId of the on chain order (e.g. `42`) |

**Responses**

- **200**: Ok

  | Field | Type | Description |
  |-------|------|-------------|
  | `instructionId` | string | Instruction Id - If order placed via api this is the client specified id. If placed on chain this is the transaction id (e.g. `375b23de-febf-4a6e-a517-e7b5dfa9357c`) |
  | `returnTxId` | string | Return Transaction Id - If OFFCHAIN order this is null. If on chain this is the transaction id of the return transaction (Settle/Cancel) (e.g. `0x99687859ddbe6050ca9615b7a5ae7b202f856ff289255758216b16887cd072f6`) |
  | `orderSource` | string | Source (e.g. `OFFCHAIN`) |
  | `sellingAsset` | string | Selling Asset (e.g. `btc`) |
  | `buyingAsset` | string | Buying Asset (e.g. `usd`) |
  | `quantitySold` | string | Amount Sold (e.g. `5.67`) |
  | `quantityBought` | string | Amount Received (e.g. `12932.1`) |
  | `limitAmount` | string | Limit Amount To Specified (e.g. `12932.1`) |
  | `status` | string | Status (e.g. `SETTLED`) |
  | `timestampMillis` | string | Timestamp (e.g. `1653480000000`) |

- **400**: Bad request

  | Field | Type | Description |
  |-------|------|-------------|
  | `code` | string | Error code |
  | `description` | string | Error description |


  Example (Invalid order source):
  ```json
  {"code":"INVALID_ORDER_SOURCE","description":"Order source TINMAN is invalid. Valid order sources are [OFFCHAIN, ETHEREUM, OPTIMISM, POLYGON, LINEA]"}
  ```
- **401**: Unauthorized

  | Field | Type | Description |
  |-------|------|-------------|
  | `code` | string | Error code |
  | `description` | string | Error description |


  Example (Invalid JWT):
  ```json
  {"code":"INVALID_JWT_TOKEN","description":"Invalid JWT"}
  ```
- **403**: Invalid permissions

  | Field | Type | Description |
  |-------|------|-------------|
  | `code` | string | Error code |
  | `description` | string | Error description |


  Example (Invalid permissions):
  ```json
  {"code":"INVALID_PERMISSIONS","description":"Invalid permissions"}
  ```

**Example**

```bash
curl "https://api.demo.omniaexchange.com/api/v3/order-status/{source}/{orderId}" \
  -H "Authorization: Bearer <token>"
```

---

