> For the complete documentation index, see [llms.txt](https://www.pionex.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pionex.com/docs/api-docs/bot-api/bot-orders.md).

# Bot Orders

Bot order list query (private)

## Get bot order list

> Query bot order list with optional filters by order type, status, and trading pair. Supports pagination. Weight: 1.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Bot Open API","version":"1.0.0"},"tags":[{"name":"Bot Orders","description":"Bot order list query (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"BotOrderListResponse":{"type":"object","description":"Bot order list response with pagination","properties":{"nextPageToken":{"type":"string","nullable":true,"description":"Token to fetch the next page"},"previousPageToken":{"type":"string","nullable":true,"description":"Token to fetch the previous page"},"results":{"type":"array","description":"List of bot orders","items":{"$ref":"#/components/schemas/BotOrder"}}}},"BotOrder":{"type":"object","description":"Bot order result","properties":{"buOrderType":{"type":"string","description":"Bot order type. Supported values: `futures_grid`, `future_hedge_grid` (Cross Margin Futures Grid), `spot_grid`, `smart_copy`.\n"},"buOrderId":{"type":"string","description":"Bot order ID"},"userId":{"type":"string","description":"User ID"},"keyId":{"type":"string","description":"API Key ID"},"exchange":{"type":"string","description":"Exchange identifier"},"base":{"type":"string","description":"Base currency"},"quote":{"type":"string","description":"Quote currency"},"status":{"type":"string","description":"Order status"},"createTime":{"type":"integer","format":"int64","description":"Creation timestamp in milliseconds"},"closeTime":{"type":"integer","format":"int64","description":"Close timestamp in milliseconds"},"copyFrom":{"type":"string","description":"Copy source order ID"},"copyType":{"type":"string","description":"Copy type"},"strategyId":{"type":"string","description":"Strategy ID"},"canceling":{"type":"integer","format":"int64","description":"Canceling flag"},"note":{"type":"string","description":"Order note"},"closeNote":{"type":"string","description":"Close note"},"customizeName":{"type":"string","description":"Custom name"},"botName":{"type":"string","description":"Bot name"},"groupId":{"type":"string","description":"Group ID"},"copyBotOrderId":{"type":"string","description":"Copy bot order ID"},"buOrderData":{"type":"object","description":"Order detail data. The structure depends on `buOrderType`:\n`futures_grid` -> `FuturesGridOrderData`,\n`future_hedge_grid` -> `FutureHedgeGridOrderData`,\n`spot_grid` -> `SpotGridOrderData`,\n`smart_copy` -> `SmartCopyOrderData`\n"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code. Common bot error codes:\n- `BOT_INVALID_ARGUMENT` — Business validation failure (e.g. invalid parameters, order state conflict, PnL check failure). The `message` field contains the specific reason.\n- `BOT_INTERNAL_ERROR` — System/RPC error (network timeout, downstream service unavailable). Retrying may help.\n- `PARAMETER_ERROR` — Request parameter format error.\n"},"message":{"type":"string","description":"Human-readable error message with specific reason"},"data":{"description":"Optional partial data returned with validation errors (e.g. min_investment, estimate data)"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v1/bot/orders":{"get":{"tags":["Bot Orders"],"summary":"Get bot order list","description":"Query bot order list with optional filters by order type, status, and trading pair. Supports pagination. Weight: 1.","operationId":"getBotOrders","parameters":[{"$ref":"#/components/parameters/Timestamp"},{"name":"status","in":"query","description":"Order status filter:\n`running` - Running orders (default),\n`finished` - Closed/cancelled orders\n","schema":{"type":"string","default":"running"}},{"name":"base","in":"query","description":"Base currency filter (e.g. BTC)","schema":{"type":"string"}},{"name":"quote","in":"query","description":"Quote currency filter (e.g. USDT)","schema":{"type":"string"}},{"name":"pageToken","in":"query","description":"Pagination token (from `nextPageToken` or `previousPageToken` in response)","schema":{"type":"string"}},{"name":"buOrderTypes","in":"query","description":"Order type filter. Can pass multiple values. If omitted, returns all types.\nSupported values: `futures_grid`, `future_hedge_grid` (Cross Margin Futures Grid), `spot_grid`, `smart_copy`.\n","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BotOrderListResponse"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```
