Skip to content

Get order history

GET
/v1/orders/history

Get historical orders placed by you.

Results can be filtered using the following query parameters:

  • skip and limit for pagination (default limit is 100).
  • startTime / endTime to filter by orderUpdatedAt date. Values are interpreted as UTC and must be in ISO 8601 format (e.g., 2023-10-13T17:30:01.000Z). These may be used together or separately.
  • statuses to filter by a comma-separated list of order statuses: PLACED, FAILED, CANCELLED, FILLED, PARTIALLY_FILLED, ACTIVE, EXPIRED, PARTIALLY_FILLED_DUE_TO_SLIPPAGE, ORDER_MODIFIED.
  • currencyPair to filter by the currency pair symbol (e.g., BTCZAR).
  • excludeFailures set to TRUE to exclude failed orders from the response.
  • showZeroVolumeCancels set to TRUE to include cancelled orders that did not match any volume.

The statusId values map to the following labels: Placed, Failed, Cancelled, Filled, Partially Filled, Instant Order Completed, Instant Order Reversed, Liquidation Order Filled.

Authorizations

apiKey

Your API key

Type
API Key (header: X-VALR-API-KEY)
+
apiSignature

HMAC SHA512 signature of the request (see Authentication section)

Type
API Key (header: X-VALR-SIGNATURE)
+
apiTimestamp

Request timestamp in milliseconds

Type
API Key (header: X-VALR-TIMESTAMP)

Parameters

Query Parameters

skip

Skip this number of results. Default 0.

Type
integer
Format
"int32"
limit

Limit the results to this number. Default and Max 100.

Type
integer
Format
"int32"
startTime

Include only records after this ISO 8601 start time (e.g., 2023-10-13T17:30:01.000Z)

Type
string
endTime

Include only records before this ISO 8601 end time (e.g., 2023-10-14T13:30:00.000Z)

Type
string
statuses

Comma-separated list of order statuses to filter by

Type
string
currencyPair

Filter returned orders by currency pair (e.g., BTCUSDC)

Type
string
excludeFailures

If TRUE, filter failed orders from the response. Default FALSE.

Type
boolean
showZeroVolumeCancels

If TRUE, show cancelled orders that did not match. Default FALSE.

Type
boolean

Responses

Order history retrieved successfully

application/json
JSON
[
{
"orderId": "612ca8ef-15a3-4a85-b991-cc8d23c0e485",
"orderStatusType": "Filled",
"currencyPair": "BTCUSDC",
"averagePrice": "66395",
"originalPrice": "66395",
"remainingQuantity": "0",
"originalQuantity": "0.00045187",
"total": "30.00190865",
"totalExecutedQuantity": "0.00045187",
"totalFee": "0",
"feeCurrency": "BTC",
"orderSide": "buy",
"orderType": "limit",
"failedReason": "",
"orderUpdatedAt": "2024-04-24T23:14:34.891Z",
"orderCreatedAt": "2024-04-24T23:13:00.280Z",
"timeInForce": "GTC"
}
]

Playground

Authorization
Variables
Key
Value

Samples