The API key you use to access this endpoint must have the Trader, Fund Manager, or Auditor role assigned. See Roles for more information.
How to iterate through all transactions
Initial request: POST to
Code
https://api.gemini.com/v1/staking/history
with a JSON payload including
Code
sortAsc
set to
Code
false
and a
Code
limit
of
Code
500
.
The response is sorted by
Code
datetime
descending — the last element has the lowest
Code
timestamp
. Call it
Code
X
.
Send a second request with
Code
until
set to
Code
X-1
,
Code
sortAsc
still
Code
false
, and
Code
limit
of
Code
500
.
Repeat using the last element's timestamp minus one as the new
Code
until
value.
Continue until an empty list is returned.
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
Default: text/plain
Content-Lengthstring
Default: 0
Cache-Controlstring
Default: no-cache
Request Body
requeststring·required
The literal string "/v1/staking/history"
nonceTimestampType | integer·required
timestampExample: 1495127793000
accountstring
Required for Master API keys as described in [Private API Invocation](/authentication/api-key#private-api-invocation). The name of the account within the subaccount group.
sincestring | integer
Gemini strongly recommends using milliseconds instead of seconds for timestamps.
Timestamp format
Example
Supported request type
string (seconds)
1495127793
POST only
string (milliseconds)
1495127793000
POST only
whole number (seconds)
1495127793
GET, POST
whole number (milliseconds)
1495127793000
GET, POST
Example: 1495127793000
untilstring | integer
Gemini strongly recommends using milliseconds instead of seconds for timestamps.
Timestamp format
Example
Supported request type
string (seconds)
1495127793
POST only
string (milliseconds)
1495127793000
POST only
whole number (seconds)
1495127793
GET, POST
whole number (milliseconds)
1495127793000
GET, POST
Example: 1495127793000
limitinteger
The maximum number of transactions to return. Default is 50, max is 500.
providerIdstring
Borrower Id, in uuid4 format. providerId is accessible from the [Staking rates](#list-staking-rates) response
currencystring
Currency code, see [symbols](/market-data/symbols-and-minimums)
interestOnlyboolean
Toggles whether to only return daily interest transactions. Defaults to false.
sortAscboolean
Toggles whether to sort the transactions in ascending order by datetime. Defaults to false.
Provider Id, in uuid4 formatExample: 62b21e17-2534-4b9f-afcf-b7edb609dd8d
transactionsarray
transactions[].transactionIdstring
A unique identifier for the staking transactionExample: MPZ7LDD8
transactions[].transactionTypestring·enum
Can be any one of the following - Deposit, Redeem, Interest, RedeemPayment, AdminRedeem, AdminCreditAdjustment, AdminDebitAdjustmentEnum values: DepositRedeemInterestRedeemPaymentAdminRedeemAdminCreditAdjustmentAdminDebitAdjustmentExample: Redeem
transactions[].amountCurrencystring
Currency codeExample: MATIC
transactions[].amountnumber (decimal)
The amount that is defined by the transactionType aboveExample: 20
transactions[].priceCurrencystring
A supported three-letter fiat currency code, e.g. usdExample: USD
transactions[].priceAmountnumber (decimal)
Current market price of the underlying token at the time of the rewardExample: 0.1
transactions[].dateTimestring | integer
Gemini strongly recommends using milliseconds instead of seconds for timestamps.