Order Details
This endpoint pulls details about an order. Similar to the /v1/orders
endpoint but only returns details for a single order and, importantly, includes granular fill details.
Request URL
https://ddp.definitive.fi/v1/orders/:order-id
Response
{
"order": {
"orderId": "a7f45b13-2c98-4726-b65c-89deab8d9e3f",
"portfolioId": "d3c90f57-8c4d-4b81-91e2-61b0c4d2e8a9",
"organizationName": "Definitive Treasury",
"vaultId": "f9b27e6d-3458-4a23-b7a5-04d1e3a6c8b1",
"fromAsset": {
"id": "ff9a44b5-12f8-4d9d-8c3c-6d76e2a5e8b9",
"name": "EURC",
"address": "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
"ticker": "EURC"
},
"toAsset": {
"id": "bcf15e98-6a49-4a3b-a27b-521a4c67b1c5",
"name": "CbBTC",
"address": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
"ticker": "cbBTC"
},
"fromAmount": 13.98757,
"toAmount": 0.00014661,
"fromNotional": 14.288769027631414,
"maxPriceImpact": 0.05,
"rate": 1.0215333347844846,
"orderDate": "2025-02-03T08:04:42.000Z",
"acceptedAt": "2025-02-03T08:04:42.000Z",
"closedAt": "2025-02-03T20:03:46.000Z",
"closeReason": "REASON_FULLY_FILLED",
"filledSize": 13.98757,
"status": "ORDER_STATUS_FILLED",
"type": "ORDER_TYPE_TWAP"
},
"fills": [
{
"id": "5f8c7d91-2a3f-41c6-98d9-39eab5c4d2e7",
"status": "CHAIN_STATUS_FINALIZED",
"feeAmount": 0,
"notional": 4.312983274658293,
"fromAmount": 4.3821,
"toAmount": 0.00004689,
"venues": ["PancakeSwap_V3", "Uniswap_V2"],
"filledAt": "2025-02-03T08:04:42.000Z",
"rootOrderId": "a7f45b13-2c98-4726-b65c-89deab8d9e3f",
"orderId": "a7f45b13-2c98-4726-b65c-89deab8d9e3f",
"parentOrderId": "d3c90f57-8c4d-4b81-91e2-61b0c4d2e8a9",
"transactionId": "f9b27e6d-3458-4a23-b7a5-04d1e3a6c8b1",
"fillPrice": 1.0215333347844846
},
{
"id": "c1b2d9e5-7a4f-42b8-b1e3-61c4d3f2e8b4",
"status": "CHAIN_STATUS_FINALIZED",
"feeAmount": 0,
"notional": 4.982374658293748,
"fromAmount": 5.1024,
"toAmount": 0.00005412,
"venues": ["AERODROME_V3"],
"filledAt": "2025-02-03T08:04:42.000Z",
"rootOrderId": "a7f45b13-2c98-4726-b65c-89deab8d9e3f",
"orderId": "a7f45b13-2c98-4726-b65c-89deab8d9e3f",
"parentOrderId": "d3c90f57-8c4d-4b81-91e2-61b0c4d2e8a9",
"transactionId": "0xb9c5e35731a5e1aca19a7ac051c67cb0b50cd7ac2f5a4d181f21c6cf1635283c",
"fillPrice": 1.0215333347844846
},
{
"id": "a6d3f2c9-5b4f-4e78-b21d-3c9a8e5b7d41",
"status": "CHAIN_STATUS_FINALIZED",
"feeAmount": 0,
"notional": 4.719284658293748,
"fromAmount": 4.7921,
"toAmount": 0.00004892,
"venues": ["Uniswap_V4", "Aerodrome_V3"],
"filledAt": "2025-02-03T08:04:42.000Z",
"rootOrderId": "a7f45b13-2c98-4726-b65c-89deab8d9e3f",
"orderId": "a7f45b13-2c98-4726-b65c-89deab8d9e3f",
"parentOrderId": "d3c90f57-8c4d-4b81-91e2-61b0c4d2e8a9",
"transactionId": "0xb9c5e35731a5e1aca19a7ac051c67cb0b50cd7ac2f5a4d181f21c6cf1635283c",
"fillPrice": 1.0215333347844846
}
]
}
Example
const json = await AuthHelpers.signAndSend({
path: "/v1/orders/:order-id",
method: "GET",
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});
console.log(json);
Statuses
ORDER_STATUS_UNSPECIFIED
ORDER_STATUS_PENDING
ORDER_STATUS_ACCEPTED
ORDER_STATUS_PARTIALLY_FILLED
ORDER_STATUS_FILLED
ORDER_STATUS_CANCELLED
ORDER_STATUS_REJECTED
ORDER_STATUS_TERMINATED