Get All Orders
Retrieve orders of any status (open, filled, partial, canceled) for a specific pair.
warning
For all transactions related to the private endpoint, you must authorize before sending your request.
For more information you can check our Authentication V1 article. This endpoint requires the Trade API key permission.
pairSymbolis required.- If neither
startTimenorendTimeis supplied, the last 1 month of orders is returned. pageis zero-based (defaults to0).limitis optional, must be between1and50, and defaults to50.
All Orders
GET /api/v1/allOrders
Query Parameters
| Name | Type | Description |
|---|---|---|
| pairSymbol* | string | BTCUSDT, ETHUSDT etc. |
| orderId | long | If set, returns orders with an id greater than or equal to this order id |
| startTime | long | Unix time in milliseconds |
| endTime | long | Unix time in milliseconds |
| page | integer | Zero-based page number (default 0) |
| limit | integer | Page size, 1–50. Default 50. |
Headers
| Name | Type | Description |
|---|---|---|
| X-PCK* | string | API public key. |
| X-Stamp* | integer | Current time in milliseconds since the Unix epoch (UTC). |
| X-Signature* | string | HMAC-SHA256 signature. See Authentication V1. |
| X-Nonce | integer | Optional. Backward tolerance for X-Stamp in milliseconds. Default 5000, maximum 60000. |
- 200
- 400: missing pairSymbol
{
"success": true,
"message": null,
"code": 0,
"data": [
{
"id": 9932534,
"price": "85400.00",
"amount": "0.001",
"quantity": "0.001",
"pairSymbol": "BTCUSDT",
"pairSymbolNormalized": "BTC_USDT",
"type": "buy",
"method": "limit",
"orderClientId": "test",
"time": 1543996112263,
"updateTime": 1543996112263,
"status": "Untouched",
"stopPrice": "0",
"leftAmount": "0.001"
},
{
"id": 9932523,
"price": "85000.00",
"amount": "0.01",
"quantity": "0.01",
"pairSymbol": "BTCUSDT",
"pairSymbolNormalized": "BTC_USDT",
"type": "buy",
"method": "limit",
"orderClientId": "test",
"time": 1543500891493,
"updateTime": 1543501769613,
"status": "Canceled",
"stopPrice": "0",
"leftAmount": null
}
]
}
{"success": false, "message": "PAIR_SYMBOL_IS_NECESSARY", "code": 1079}
type is buy or sell, and method is limit or market. status is Untouched, Partial, Closed
or Canceled.
Stop orders cannot be placed through the API, but orders you place on the BtcTurk Global website can be stop
orders: their method is stoplimit or stopmarket and stopPrice is the trigger price. For other orders
stopPrice is "0".
Code Example
- curl
- C#
curl -X GET "https://api.global.btcturk.com/api/v1/allOrders?pairSymbol=BTCUSDT&limit=50" \
-H "X-PCK: YOUR_API_PUBLIC_KEY" \
-H "X-Stamp: 1735866257711" \
-H "X-Signature: COMPUTED_SIGNATURE"
using var client = new HttpClient { BaseAddress = new Uri("https://api.global.btcturk.com") };
client.DefaultRequestHeaders.Add("X-PCK", apiKey);
client.DefaultRequestHeaders.Add("X-Stamp", stamp);
client.DefaultRequestHeaders.Add("X-Signature", signature);
var response = await client.GetAsync("/api/v1/allOrders?pairSymbol=BTCUSDT&limit=50");
Console.WriteLine(await response.Content.ReadAsStringAsync());