Orders
Returns the latest state of user orders
The Orders API allows you to fetch a list of up to 50 recent orders or query for specific ones either by order id or by external reference, set by the partner.
This information can be used to learn order state changes in a passive-polling way. It is an alternative to subscribing to webhooks, which provide automatic and instant updates.
⚠️ Since this API shares sensitive data of the orders, it requires private authentication.
Returns either:
- A list of recent orders, limited to the maximum of 50 orders, sorted by descending creation date.
- If the
externalReferencequery parameter is provided, returns a list of order details for orders that match requested external reference. It could be several orders. - If the
walletAddressquery parameter is provided, returns a list of order details for orders that match requested wallet address. It could be several orders.
The number of orders to return. Default and maximum is 50. Applicable when externalReference query param is not provided.
10The number of orders to skip. Use together with limit for pagination.
20External reference of the order(s), set by partner
external_order_idUser wallet address
bc1q897va9he4zcppqgp3h7ue8hj7448ra0mr6xqtuCurrency code of the output currency
The start date of the range of orders to return (inclusive). Format: YYYY-MM-DD
2024-10-01The end date of the range of orders to return (exclusive). Format: YYYY-MM-DD
2024-10-02ok
GET /partner-gateway/partner-api/v1/orders HTTP/1.1
Host: api.blockchain.info
X-Private-API-Key: YOUR_API_KEY
Accept: */*
ok
[
{
"orderId": "f41a3e45-6392-457c-8566-a282b5f3e177",
"externalReference": "your_order_id",
"subPartnerId": "your_sub_partner_id",
"orderType": "BUY",
"createdAt": "2024-10-01T12:00:00Z",
"orderState": "COMPLETED",
"orderStateUpdatedAt": "2024-10-01T13:00:00Z",
"paymentMethod": "CARD",
"inputCurrency": "USD",
"inputAmount": "100.00",
"outputCurrency": "BTC",
"outputAmount": "0.001",
"amountUsd": "100.00",
"processingFee": "1.00",
"processingFeeUsd": "1.00",
"partnerFee": "0.50",
"partnerFeeUsd": "0.50",
"networkFee": "1.50",
"networkFeeUsd": "1.50",
"userId": "2b6f0cc9-7b0c-4f3b-8f3b-6f0cc97b0c4f",
"targetWalletAddress": "bc1q897va9he4zcppqgp3h7ue8hj7448ra0mr6xqtu",
"transactionHash": "4b1549abe58cface17d400bf50ff0fe0c2e2ca8121f4e3764d807dc841a2ab80"
}
]Returns order details for a given order id.
Unique identifier of the order
f41a3e45-6392-457c-8566-a282b5f3e177ok
Order not found
GET /partner-gateway/partner-api/v1/orders/{id} HTTP/1.1
Host: api.blockchain.info
X-Private-API-Key: YOUR_API_KEY
Accept: */*
{
"orderId": "f41a3e45-6392-457c-8566-a282b5f3e177",
"externalReference": "your_order_id",
"subPartnerId": "your_sub_partner_id",
"orderType": "BUY",
"createdAt": "2024-10-01T12:00:00Z",
"orderState": "COMPLETED",
"orderStateUpdatedAt": "2024-10-01T13:00:00Z",
"paymentMethod": "CARD",
"inputCurrency": "USD",
"inputAmount": "100.00",
"outputCurrency": "BTC",
"outputAmount": "0.001",
"amountUsd": "100.00",
"processingFee": "1.00",
"processingFeeUsd": "1.00",
"partnerFee": "0.50",
"partnerFeeUsd": "0.50",
"networkFee": "1.50",
"networkFeeUsd": "1.50",
"userId": "2b6f0cc9-7b0c-4f3b-8f3b-6f0cc97b0c4f",
"targetWalletAddress": "bc1q897va9he4zcppqgp3h7ue8hj7448ra0mr6xqtu",
"transactionHash": "4b1549abe58cface17d400bf50ff0fe0c2e2ca8121f4e3764d807dc841a2ab80"
}Last updated