Skip to content

Orders

Pulls order history across all portfolios.

Request URL

https://ddp.definitive.fi/v1/orders

Query Parameters

ParameterTypeRequiredDefaultDescription
limitnumberNo100Maximum number of orders to return
offsetnumberNo0Number of orders to skip for pagination

Response

{
  "orders": [
    {
      "fromAsset": {
        "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
        "name": "EURC",
        "address": "0xA12B34C56D78E90F12AB34CD56EF78A901BC234D",
        "ticker": "EURC",
        "chain": {
          "name": "Base",
          "id": "3481",
          "namespace": "eip155"
        }
      },
      "toAsset": {
        "id": "f0987654-3210-bcda-5678-90efabcd1234",
        "name": "CbBTC",
        "address": "0xF98765C43210D78E90AB56CD12EF34A908BC765D",
        "ticker": "cbBTC",
        "chain": {
          "name": "Base",
          "id": "9274",
          "namespace": "eip155"
        }
      },
      "fromAmount": 27.39485,
      "toAmount": 0.00029341,
      "orderDate": "Mon Feb 03 2025 08:04:42 GMT-0800 (Pacific Standard Time)",
      "acceptedAt": "Mon Feb 03 2025 08:04:42 GMT-0800 (Pacific Standard Time)",
      "closedAt": "Mon Feb 03 2025 20:03:46 GMT-0800 (Pacific Standard Time)",
      "closeReason": "REASON_FULLY_FILLED",
      "filledSize": 27.39485,
      "fromNotional": 28.03412,
      "maxPriceImpact": 0.05,
      "orderId": "e12f34a5-b678-90cd-12ef-3456abcd7890",
      "organizationName": "Some Organization",
      "portfolioId": "b67890cd-12ef-3456-a789-0123bcdef456",
      "rate": 1.04567892345678,
      "size": 27.39485,
      "status": "ORDER_STATUS_FILLED",
      "type": "ORDER_TYPE_TWAP",
      "vaultId": "c12d34e5-f678-90ab-1234-ef567890bcda"
    }
  ],
  "totalCount": 150,
  "limit": 100,
  "offset": 0
}

Example

// Get first page of orders (default 100 items)
const firstPage = await AuthHelpers.signAndSend({
  path: "/v1/orders",
  method: "GET",
  apiKey: process.env.API_KEY,
  apiSecret: process.env.API_SECRET,
});
 
// Get second page of orders with custom limit
const secondPage = await AuthHelpers.signAndSend({
  path: "/v1/orders?limit=50&offset=50",
  method: "GET",
  apiKey: process.env.API_KEY,
  apiSecret: process.env.API_SECRET,
});

See the getting started page for a full walkthrough of the /orders endpoint.