curl --request DELETE \
--url https://api.example.com/v1/orders/{order_id}{
"success": true,
"data": {
"id": "<string>",
"status": "<string>",
"cancelled_at": "<string>",
"filled_amount": 123
}
}Cancel open orders
curl --request DELETE \
--url https://api.example.com/v1/orders/{order_id}{
"success": true,
"data": {
"id": "<string>",
"status": "<string>",
"cancelled_at": "<string>",
"filled_amount": 123
}
}open or pending can be cancelled.
DELETE https://api.matchr.xyz/v1/orders/{order_id}
curl -X DELETE "https://api.matchr.xyz/v1/orders/ord_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": "ord_abc123",
"market_id": "mkt_yes123",
"status": "cancelled",
"amount": 100,
"filled_amount": 0,
"cancelled_at": "2025-10-15T14:45:00Z"
}
}
DELETE https://api.matchr.xyz/v1/orders
buy or sell orders (optional)# Cancel all orders
curl -X DELETE "https://api.matchr.xyz/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY"
# Cancel orders for a specific market
curl -X DELETE "https://api.matchr.xyz/v1/orders?market_id=mkt_yes123" \
-H "Authorization: Bearer YOUR_API_KEY"
# Cancel only buy orders
curl -X DELETE "https://api.matchr.xyz/v1/orders?side=buy" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"cancelled_count": 5,
"cancelled_orders": [
{ "id": "ord_abc123", "market_id": "mkt_yes123" },
{ "id": "ord_abc124", "market_id": "mkt_yes123" },
{ "id": "ord_abc125", "market_id": "mkt_no456" },
{ "id": "ord_abc126", "market_id": "mkt_no456" },
{ "id": "ord_abc127", "market_id": "mkt_yes789" }
]
}
}
GET https://api.matchr.xyz/v1/orders/{order_id}
curl -X GET "https://api.matchr.xyz/v1/orders/ord_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": "ord_abc123",
"market_id": "mkt_yes123",
"platform": "polymarket",
"side": "buy",
"type": "limit",
"status": "open",
"amount": 100,
"price": 0.52,
"filled_amount": 0,
"average_fill_price": null,
"fees": 0,
"created_at": "2025-10-15T14:35:00Z",
"updated_at": "2025-10-15T14:35:00Z"
}
}
GET https://api.matchr.xyz/v1/orders
open, pending, filled, cancelled, allbuy, sellcurl -X GET "https://api.matchr.xyz/v1/orders?status=open&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": "ord_abc123",
"market_id": "mkt_yes123",
"platform": "polymarket",
"side": "buy",
"type": "limit",
"status": "open",
"amount": 100,
"price": 0.52,
"filled_amount": 0,
"created_at": "2025-10-15T14:35:00Z"
},
{
"id": "ord_abc124",
"market_id": "mkt_no456",
"platform": "kalshi",
"side": "sell",
"type": "limit",
"status": "open",
"amount": 50,
"price": 0.45,
"filled_amount": 25,
"created_at": "2025-10-15T13:20:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 2
}
}
| Code | Description |
|---|---|
400 | Invalid parameters |
401 | Missing or invalid API key |
404 | Order not found |
409 | Order already filled or cancelled |
429 | Rate limit exceeded |
500 | Server error |
{
"success": false,
"error": {
"code": "ORDER_NOT_CANCELLABLE",
"message": "Order has already been filled",
"details": {
"order_id": "ord_abc123",
"status": "filled"
}
}
}