ORCHESTRATION API

GET /orders/{originChain}/{orderId}

Returns the full on-chain state plus indexer enrichment for a single order.

This endpoint returns the full on-chain state plus indexer enrichment for a single order.

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/{originChain}/{orderId}

Headers

x-api-key: YOUR_API_KEY

Path Parameters

FieldTypeRequiredDescription
originChainChainYesThe chain where the order was created (e.g., Ethereum)
orderIdstringYesThe order ID to retrieve

Example Request

import type { components } from "./m0-swap";

type Order = components["schemas"]["Order"];

const originChain = "Ethereum";
const orderId = "0xabc123";

const response = await fetch(
  `https://gateway.m0.xyz/v1/orchestration/orders/${originChain}/${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 failed: ${error}`);
}

const order: Order = await response.json();

Response

Success Response (200)

Returns an Order object. On-chain fields are authoritative; indexer-only fields (openTx, fillCount, fillReportCount, resolvedAt, fills) are optional and may be absent if the indexer has not yet caught up or is unavailable.

import type { components } from "./m0-swap";

type Order = components["schemas"]["Order"];
type OrderStatus = components["schemas"]["OrderStatus"];
type Fill = components["schemas"]["Fill"];

Response Fields

FieldTypeDescription
orderIdstringUnique order identifier
versionnumberOrder version
noncestringOrder nonce
senderstringSender wallet address
recipientstringRecipient wallet address
originChainIdnumberOrigin chain ID
destChainIdnumberDestination chain ID
tokenInstringInput token address
tokenOutstringOutput token address
amountInstringInput amount (smallest unit)
amountOutstringTarget output amount (smallest unit)
designatedSolverstringAssigned solver address
createdAtnumberCreation timestamp (Unix seconds)
fillDeadlinenumberFill deadline timestamp (Unix seconds)
statusOrderStatusCurrent status (CREATED, COMPLETED, CANCELLED)
amountOutFilledstringTotal output filled so far
amountInReleasedstringInput amount released so far
amountRefundedstringAmount refunded
openTxstring | nullTransaction hash that opened the order
fillCountnumber | nullNumber of fills
fillReportCountnumber | nullNumber of fill reports
resolvedAtnumber | nullResolution timestamp when applicable
fillsFill[] | nullFill events recorded by the indexer, chronological

Fill Fields

An order may have multiple fills when filled by multiple solvers or in multiple transactions.

FieldTypeDescription
filledAtnumberFill timestamp (Unix seconds)
chainIdnumberChain ID where the fill occurred
transactionHashstringFill transaction hash
solverstringSolver address that filled
amountInToReleasestringInput amount released by this fill
amountOutFilledstringOutput amount filled by this fill
Further inspect the response fields on the API reference.

Error Responses

All errors share the { code, message, requestId } body shape. Branch on code rather than on the HTTP status.

StatusCodeDescription
400BadOrderRequestMalformed request (unknown chain, malformed orderId, etc.)
404OrderNotFoundThe referenced order does not exist on-chain

Example Response

{
  "orderId": "0xabc123",
  "version": 1,
  "nonce": "42",
  "sender": "0xYourWalletAddress",
  "recipient": "0xYourWalletAddress",
  "originChainId": 1,
  "destChainId": 8453,
  "tokenIn": "0x866A2BF4E572CbcF37D5071A7a58503Bfb36be1b",
  "tokenOut": "0x866A2BF4E572CbcF37D5071A7a58503Bfb36be1b",
  "amountIn": "1000000",
  "amountOut": "999500",
  "designatedSolver": "0xSolverAddress",
  "createdAt": 1771511463,
  "fillDeadline": 1771515063,
  "status": "COMPLETED",
  "amountOutFilled": "999500",
  "amountInReleased": "1000000",
  "amountRefunded": "0",
  "openTx": "0xOpenTxHash",
  "fillCount": 1,
  "fillReportCount": 1,
  "resolvedAt": 1771511780,
  "fills": [
    {
      "filledAt": 1771511700,
      "chainId": 8453,
      "transactionHash": "0xFillTxHash",
      "solver": "0xSolverAddress",
      "amountInToRelease": "1000000",
      "amountOutFilled": "999500"
    }
  ]
}
Copyright © M0 Foundation 2026