List Past Trades
List Past Trades
Get trade history for your account.
Gemini recommends using our WebSocket Order Events API to be notified when a trade executes on your account instead of polling this endpoint.
Under the terms of the Gemini API Agreement, polling this endpoint may be subject to rate limiting.
Enabled for perpetuals accounts from July 10th, 0100hrs ET onwards. Trade info for all perpetuals orders submitted prior to this timing will not be available through this API.
curl --request POST \
--url https://api.gemini.com/v1/mytrades \
--header 'Content-Type: application/json' \
--header 'X-GEMINI-APIKEY: <string>' \
--header 'X-GEMINI-PAYLOAD: <string>' \
--header 'X-GEMINI-SIGNATURE: <string>' \
--data '
{
"request": "/v1/mytrades",
"nonce": "<nonce>",
"symbol": "btcusd"
}
'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 trade history
To retrieve your full trade history walking backwards:
- Initial request: POST to https://api.gemini.com/v1/mytrades with a JSON payload including a timestamp key with value 0 and a limit_trades 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_trades 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
The past trades