Cancel Order
Cancel a pending order that hasn't been fully executed.
Request URL
DELETE https://ddp.definitive.fi/v2/portfolio/trade/:orderId
Example
const json = await AuthHelpers.signAndSend({
path: "/v2/portfolio/trade/00000000-0000-0000-0000-000000000001",
method: "DELETE",
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});
console.log(json);
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
orderId | string | Yes | The unique ID of the order |
Response
{
orderId: string, // e.g. "00000000-0000-0000-0000-000000000001"
status: string, // "CANCELLED"
type: string, // e.g. "MARKET"
side: string, // e.g. "BUY"
baseAsset: {
id: string,
name: string,
ticker: string,
address: string,
chain: {
id: string,
name: string,
namespace: string
}
},
quoteAsset: {
id: string,
name: string,
ticker: string,
address: string,
chain: {
id: string,
name: string,
namespace: string
}
},
baseQuantity: number,
quoteQuantity: number,
executedBaseQuantity: number,
executedQuoteQuantity: number,
price: number,
createdAt: string, // ISO date string
updatedAt: string // ISO date string
}