Get Order Details
Retrieves detailed information about a specific order, including execution details, fill events, and current status. This endpoint is accessed through the organization API.
Request URL
GET https://ddp.definitive.fi/v2/organization/portfolios/{portfolioId}/orders/{orderId}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
portfolioId | string | Yes | UUID of the portfolio |
orderId | string | Yes | UUID of the order |
Example
const json = await AuthHelpers.signAndSend({
path: "/v2/organization/portfolios/00000000-0000-0000-0000-000000000001/orders/00000000-0000-0000-0000-000000000005",
method: "GET",
organizationId: "00000000-0000-0000-0000-000000000000",
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});
console.log(json);
Response
{
order: {
orderId: "00000000-0000-0000-0000-000000000005",
type: "limit",
status: "partially_filled",
orderSide: "buy",
targetAsset: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
contraAsset: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
targetSymbol: "USDC",
contraSymbol: "WETH",
qty: "1000.000000",
filledQty: "750.000000",
remainingQty: "250.000000",
limitPrice: "1800.00",
averagePrice: "1799.50",
slippageTolerance: "0.01",
maxPriceImpact: "0.01",
createdAt: "2024-08-05T20:48:11.584Z",
updatedAt: "2024-08-05T20:49:11.584Z",
expiresAt: "2024-08-06T20:48:11.584Z",
chain: {
name: "Ethereum",
id: "1",
namespace: "eip:155"
}
},
fills: [
{
fillId: "00000000-0000-0000-0000-000000000006",
qty: "500.000000",
price: "1799.25",
timestamp: "2024-08-05T20:48:30.584Z",
txHash: "0x1234567890abcdef..."
},
{
fillId: "00000000-0000-0000-0000-000000000007",
qty: "250.000000",
price: "1799.75",
timestamp: "2024-08-05T20:49:00.584Z",
txHash: "0xabcdef1234567890..."
}
]
}
Fills
- The
fills
array shows matched on-chain executions against the order. - Each fill includes:
qty
: Amount filledprice
: Execution pricetimestamp
: Time of executiontxHash
: Blockchain transaction hash
Error Responses
If the order is not found or does not belong to the organization’s portfolio, a 404
will be returned:
{
error: "Order not found"
}
Notes
- Order detail includes both metadata (
order
) and executions (fills
) - This endpoint is read-only and safe to call as often as needed for tracking order progress