List Past Orders
List Past Orders
POSThttps://api.gemini.com/v1/orders/history
Retrieve closed order history for an account.
POST
curl --request POST \
--url https://api.gemini.com/v1/orders/history \
--header 'Content-Type: application/json' \
--header 'X-GEMINI-APIKEY: <string>' \
--header 'X-GEMINI-PAYLOAD: <string>' \
--header 'X-GEMINI-SIGNATURE: <string>' \
--data '
{
"request": "/v1/orders/history",
"nonce": "<nonce>",
"limit_orders": 50
}
'Roles
The API key you use to access this endpoint must have the Trader or Auditor role assigned. See Roles for more information.
The OAuth scope must have history:read assigned to access this endpoint. See OAuth Scopes for more information.
How to retrieve your order history
To retrieve your full order history walking backwards:
- Initial request: POST to https://api.gemini.com/v1/orders/history with a JSON payload including a timestamp key with value 0 and a limit_orders key with value 500.
- The list is sorted by timestamp descending. Take the highest timestamp value X from the first element.
- Create a second request with timestamp set to X+1 and limit_orders set to 500.
- Repeat, using the highest timestamp from each response, until an empty list is returned.
Break Types
In the rare event that a trade has been reversed (broken), the trade that is broken will have this flag set. The field will contain one of these values:
- manual — The trade was reversed manually. All fees, proceeds, and debits associated with the trade have been credited or debited to the account separately. This reported trade must be included for the account balance to be correct.
- full — The trade was fully broken. The reported trade should not be accounted for. It will be as though the transfer of funds associated with the trade had simply not happened.
Headers
Request Body
Responses
Successful operation
Last modified on