Orders
List Past Orders
This API retrieves (closed) orders history for an account.
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
- When you receive the list of orders, it will be sorted by timestamp descending - so the first element in the list will have the highest timestamp value. For this example, say that value is X.
- Create a second POST request with a JSON payload including a timestamp key with value X+1 and a limit_orders key with value 500.
- Take the first element of the list returned with highest timestamp value Y and create a third POST request with a JSON payload including a timestamp key with value Y+1 and a limit_orders key with value 500.
- Continue creating POST requests and retrieving orders 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
| Value | Description |
|---|---|
| manual | The trade was reversed manually. This means that all fees, proceeds, and debits associated with the trade have been credited or debited to the account seperately. That means that this reported trade must be included for order 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 fund associated with the trade had simply not happened. |
post/v1/orders/history
Request
- Base URLhttps://api.gemini.com
- URLhttps://api.gemini.com/v1/orders/history
- AuthAPI key in header X-GEMINI-APIKEY and API key in header X-GEMINI-SIGNATURE and API key in header X-GEMINI-PAYLOAD
Headers
X-GEMINI-APIKEYstring required
Your API key
X-GEMINI-SIGNATUREstring required
HEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring required
Base64-encoded JSON payload
Content-Typestring
Content-Lengthstring
Cache-Controlstring
Request body
Example request
{
"nonce": "1495127793000",
"timestamp": "1495127793000"
}Response
Successful operation
Example response
[
{
"timestamp": "1495127793000",
"timestampms": "1495127793000",
"trades": [
{
"timestamp": "1495127793000",
"timestampms": "1495127793000",
"type": "Buy",
"fee_currency": "USD",
"fee_amount": "1.23",
"tid": 17379712930,
"exchange": "gemini"
}
]
}
]Changes
No recorded changes to this operation across all 1 revision of this API.