GET /orders/{chain}/{orderId}
This endpoint returns the full state and details for a single order. It is only applicable to orders routed through the
limit-order provider.
On-chain fields are authoritative. Indexer-only fields (openTx, fillCount, fillReportCount, resolvedAt, fills)
may be absent if the indexer has not yet caught up or is unavailable.
TypeScript Types: Generate types for this API with a single command. See Type Generation.
API Reference: For detailed schema definitions and interactive testing, see the API Reference.
Request
Endpoint
GET /orders/{chain}/{orderId}Headers
x-api-key: YOUR_API_KEYPath Parameters
| Field | Type | Required | Description |
|---|---|---|---|
chain | Chain | Yes | The chain where the order was placed |
orderId | string | Yes | The order ID to retrieve |
Example Request
import type { components } from './m0-swap';
type Order = components['schemas']['Order'];
const chain = 'Ethereum';
const orderId = '0xabc123';
const response = await fetch(`https://gateway.m0.xyz/v1/orchestration/orders/${chain}/${orderId}`, {
method: 'GET',
headers: {
'x-api-key': YOUR_API_KEY,
},
});
if (response.status === 404) {
throw new Error('Order not found');
}
if (!response.ok) {
const error = await response.text();
throw new Error(`Get order status failed: ${error}`);
}
const order: Order = await response.json();Response
Success Response (200)
Returns an Order object.
import type { components } from './m0-swap';
type Order = components['schemas']['Order'];
type OrderStatus = components['schemas']['OrderStatus'];
type Fill = components['schemas']['Fill'];Response Fields
| Field | Type | Description |
|---|---|---|
orderId | string | Unique order identifier |
version | number | Order schema version |
nonce | string | Order nonce |
sender | string | Sender wallet address |
recipient | string | Recipient wallet address |
originChainId | number | Origin chain ID |
destChainId | number | Destination chain ID |
tokenIn | string | Input token address |
tokenOut | string | Output token address |
amountIn | string | Input amount (smallest unit) |
amountOut | string | Target output amount (smallest unit) |
designatedSolver | string | Assigned solver address |
createdAt | number | Creation timestamp (unix seconds) |
fillDeadline | number | Fill deadline (unix seconds) |
status | OrderStatus | Current status (CREATED, COMPLETED, CANCELLED) |
amountOutFilled | string | Total output filled so far |
amountInReleased | string | Input amount released so far |
amountRefunded | string | Amount refunded |
openTx | string | null | Transaction hash that opened the order |
fillCount | number | null | Number of fills |
fillReportCount | number | null | Number of fill reports |
resolvedAt | number | null | Resolution timestamp (unix seconds) when resolved |
fills | Fill[] | null | Chronological list of fill events for the order |
Fill
A single fill event recorded by the indexer. An order may have multiple fills when filled by multiple solvers or in multiple transactions; entries are ordered chronologically.
| Field | Type | Description |
|---|---|---|
filledAt | number | Fill timestamp (unix seconds) |
chainId | number | Chain ID where the fill occurred |
transactionHash | string | Transaction hash of the fill |
solver | string | Address of the solver that filled this portion |
amountInToRelease | string | Input amount to release for this fill |
amountOutFilled | string | Output amount filled in this event |
💡 Further inspect the response fields on the API reference.
Error Responses
| Status | Description |
|---|---|
400 | Invalid chain or request |
404 | Order not found |
Example Response
{
"orderId": "0xabc123",
"version": 1,
"nonce": "42",
"sender": "0xYourWalletAddress",
"recipient": "0xRecipientAddress",
"originChainId": 1,
"destChainId": 8453,
"tokenIn": "0x866A2BF4E572CbcF37D5071A7a58503Bfb36be1b",
"tokenOut": "0x866A2BF4E572CbcF37D5071A7a58503Bfb36be1b",
"amountIn": "1000000",
"amountOut": "999500",
"designatedSolver": "0xSolverAddress",
"createdAt": 1740000663,
"fillDeadline": 1740001263,
"status": "COMPLETED",
"amountOutFilled": "999500",
"amountInReleased": "1000000",
"amountRefunded": "0",
"openTx": "0xOpenTxHash",
"fillCount": 1,
"fillReportCount": 1,
"resolvedAt": 1740000980,
"fills": [
{
"filledAt": 1740000900,
"chainId": 8453,
"transactionHash": "0xFillTxHash",
"solver": "0xSolverAddress",
"amountInToRelease": "1000000",
"amountOutFilled": "999500"
}
]
}
