GeminiGemini
SandboxGet API key
  • Crypto Trading
  • Prediction Markets
Resources
  • Changelog

© 2026 Gemini Space Station, Inc.

Gemini Crypto Exchange LogoGemini Crypto Exchange Logo
Market Data
    List SymbolsgetGet Symbol DetailsgetGet Assets for NetworkgetGet NetworkgetGet TickergetList Fee PromosgetGet Current Order BookgetList TradesgetList PricesgetGet Funding AmountgetGet Funding Amount Report FilegetGet Ticker V2getList CandlesgetList Derivative CandlesgetFX Rateget
Orders
    Create New OrderpostCancel OrderpostCancel All Active OrderspostCancel All Session OrderspostGet Order StatuspostList Active OrderspostList Past OrderspostList Past TradespostGet Trading VolumepostGet Notional Trading VolumepostWrap Orderpost
Fund Management
    Get Available BalancespostGet Notional BalancespostList Deposit AddressespostCreate New Deposit AddresspostList Past TransferspostList Custody Fee TransferspostGet Gas Fee EstimationpostWithdraw Crypto FundspostAdd BankpostAdd Bank CADpostList Payment MethodspostList Approved AddressespostCreate New Approved AddresspostRemove Approved AddresspostTransfer Between AccountspostGet Transaction Historypost
Margin Trading
    Get Margin Account SummarypostGet Margin Interest RatespostPreview Margin Order Impactpost
Session
    Heartbeatpost
Clearing
    Create New Clearing OrderpostGet Clearing OrderpostCancel Clearing OrderpostConfirm Clearing OrderpostList Clearing OrderspostList Clearing BrokerspostCreate New Broker OrderpostList Clearing Tradespost
Instant
    Get Instant QuotepostExecute Instant Orderpost
Account Administration
    Get Account DetailpostCreate New AccountpostRename AccountpostList Accounts in GrouppostRoles Endpointpost
OAuth
    Revoke OAuth Tokenpost
Staking
    List Staking BalancespostStake Crypto FundspostList Staking Event HistorypostList Staking RatesgetList Staking RewardspostUnstake Crypto Fundspost
Derivatives
    Get Account MarginpostList Funding PaymentspostGet Funding Payment Report FilegetGet Funding Payment Report JSONpostGet Open PositionspostGet Risk Statsget
Schemas
REST API
REST API

Derivatives (1.0.0)

Endpoint

Get Account Margin

POST
https://api.gemini.com
/v1/margin

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 orders:read assigned to access this endpoint. See OAuth Scopes for more information.

Get Account Margin › Headers

X-GEMINI-APIKEY
string · required

Your API key

X-GEMINI-SIGNATURE
string · required

HEX-encoded HMAC-SHA384 of payload signed with API secret

X-GEMINI-PAYLOAD
string · required

Base64-encoded JSON payload

Content-Type
string
Default: text/plain
Content-Length
string
Default: 0
Cache-Control
string
Default: no-cache

Get Account Margin › Request Body

request
string · required

The API endpoint path

Example: /v1/margin
TimestampType · required

timestamp

symbol
string · required

Trading pair symbol. See symbols and minimums

account
string

Required for Master API keys as described in Private API Invocation. The name of the account within the subaccount group. Specifies the account on which you intend to place the order. Only available for exchange accounts.

Example: primary

Get Account Margin › Responses

200

JSON object

margin_assets_value
string · decimal

The $ equivalent value of all the assets available in the current trading account that can contribute to funding a derivatives position.

initial_margin
string · decimal

The $ amount that is being required by the accounts current positions and open orders.

available_margin
string · decimal

The difference between the margin_assets_value and initial_margin.

margin_maintenance_limit
string · decimal

The minimum amount of margin_assets_value required before the account is moved to liquidation status.

leverage
string · decimal

The ratio of Notional Value to Margin Assets Value.

notional_value
string · decimal

The $ value of the current position.

estimated_liquidation_price
string · decimal

The estimated price for the asset at which liquidation would occur.

initial_margin_positions
string · decimal

The contribution to initial_margin from open positions.

reserved_margin
string · decimal

The contribution to initial_margin from open orders.

reserved_margin_buys
string · decimal

The contribution to initial_margin from open BUY orders.

reserved_margin_sells
string · decimal

The contribution to initial_margin from open SELL orders.

buying_power
string · decimal

The amount of that product the account could purchase based on current initial_margin and margin_assets_value.

selling_power
string · decimal

The amount of that product the account could sell based on current initial_margin and margin_assets_value.

POST/v1/margin
curl --request POST \
  --url https://api.gemini.com/v1/margin \
  --header 'Content-Type: application/json' \
  --header 'X-GEMINI-APIKEY: <string>' \
  --header 'X-GEMINI-PAYLOAD: <string>' \
  --header 'X-GEMINI-SIGNATURE: <string>' \
  --data '
{
  "request": "/v1/margin",
  "nonce": "<nonce>",
  "symbol": "BTC-GUSD-PERP"
}
'
shell
Example Request Body
{
  "request": "/v1/margin",
  "nonce": "<nonce>",
  "symbol": "BTC-GUSD-PERP"
}
json
application/json
Example Responses
{
  "margin_assets_value": "9800",
  "initial_margin": "6000",
  "available_margin": "3800",
  "margin_maintenance_limit": "5800",
  "leverage": "12.34567",
  "notional_value": "1300",
  "estimated_liquidation_price": "1300",
  "initial_margin_positions": "3500",
  "reserved_margin": "2500",
  "reserved_margin_buys": "1800",
  "reserved_margin_sells": "700",
  "buying_power": "0.19",
  "selling_power": "0.19"
}
json
application/json

List Funding Payments

POST
https://api.gemini.com
/v1/perpetuals/fundingPayment
Note that the response field 'instrumentSymbol' is only attached to requests from 16th April 2024 onwards.

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 orders:read assigned to access this endpoint. See OAuth Scopes for more information.

List Funding Payments › query Parameters

since

If specified, only return funding payments after this point. Default value is 24h in past. See Timestamps for more information

timestamp

to

If specified, only returns funding payment until this point. Default value is now. See Timestamps for more information

timestamp

List Funding Payments › Headers

X-GEMINI-APIKEY
string · required

Your API key

X-GEMINI-SIGNATURE
string · required

HEX-encoded HMAC-SHA384 of payload signed with API secret

X-GEMINI-PAYLOAD
string · required

Base64-encoded JSON payload

Content-Type
string
Default: text/plain
Content-Length
string
Default: 0
Cache-Control
string
Default: no-cache

List Funding Payments › Request Body

request
string · required

The API endpoint path

Example: /v1/perpetuals/fundingPayment
TimestampType · required

timestamp

account
string

Required for Master API keys as described in Private API Invocation. The name of the account within the subaccount group. Specifies the account on which you intend to place the order. Only available for exchange accounts.

Example: primary

List Funding Payments › Responses

200

The response will be an array of funding payment objects.

object[]
eventType
string · enum · required

Event type

Enum values:
Hourly Funding Transfer
object · required
POST/v1/perpetuals/fundingPayment
curl --request POST \
  --url https://api.gemini.com/v1/perpetuals/fundingPayment \
  --header 'Content-Type: application/json' \
  --header 'X-GEMINI-APIKEY: <string>' \
  --header 'X-GEMINI-PAYLOAD: <string>' \
  --header 'X-GEMINI-SIGNATURE: <string>' \
  --data '
{
  "request": "/v1/perpetuals/fundingPayment",
  "nonce": "<nonce>"
}
'
shell
Example Request Body
{
  "request": "/v1/perpetuals/fundingPayment",
  "nonce": "<nonce>"
}
json
application/json
Example Responses
[
  {
    "eventType": "Hourly Funding Transfer",
    "hourlyFundingTransfer": {
      "eventType": "Hourly Funding Transfer",
      "timestamp": 1683730803940,
      "assetCode": "GUSD",
      "action": "Debit",
      "quantity": {
        "currency": "GUSD",
        "value": "4.78958"
      }
    }
  },
  {
    "eventType": "Hourly Funding Transfer",
    "hourlyFundingTransfer": {
      "eventType": "Hourly Funding Transfer",
      "timestamp": 1683734406746,
      "assetCode": "GUSD",
      "action": "Debit",
      "quantity": {
        "currency": "GUSD",
        "value": "4.78958"
      },
      "instrumentSymbol": "BTCGUSDPERP"
    }
  }
]
json
application/json

Get Funding Payment Report File

GET
https://api.gemini.com
/v1/perpetuals/fundingpaymentreport/records.xlsx

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 orders:read assigned to access this endpoint. See OAuth Scopes for more information.

Examples

  • &fromDate=2024-04-10&toDate=2024-04-25&numRows=1000
    Compare and obtain the minimum records between (2024-04-10 to 2024-04-25) and 1000. If (2024-04-10 to 2024-04-25) contains 360 records. Then fetch the minimum between 360 and 1000 records only.

  • &numRows=2024-04-10&toDate=2024-04-25
    If (2024-04-10 to 2024-04-25) contains 360 records. Then fetch 360 records only.

  • &numRows=1000
    Fetch maximum 1000 records starting from Now to a historical date

  • <blank>
    Fetch maximum 8760 records starting from Now to a historical date

Get Funding Payment Report File › query Parameters

fromDate
string · date

If empty, will only fetch records by numRows value.

toDate
string · date

If empty, will only fetch records by numRows value.

numRows
integer

If empty, default value '8760'

Get Funding Payment Report File › Headers

X-GEMINI-APIKEY
string · required

Your API key

X-GEMINI-SIGNATURE
string · required

HEX-encoded HMAC-SHA384 of payload signed with API secret

X-GEMINI-PAYLOAD
string · required

Base64-encoded JSON payload

Content-Type
string
Default: text/plain
Content-Length
string
Default: 0
Cache-Control
string
Default: no-cache

Get Funding Payment Report File › Request Body

request
string · required

The API endpoint path

Example: /v1/perpetuals/fundingpaymentreport/records.xlsx
TimestampType · required

timestamp

account
string

Required for Master API keys as described in Private API Invocation. The name of the account within the subaccount group. Specifies the account on which you intend to place the order. Only available for exchange accounts.

Example: primary

Get Funding Payment Report File › Responses

XLSX file downloaded containing funding payment report.

string
GET/v1/perpetuals/fundingpaymentreport/records.xlsx
curl --request GET \
  --url https://api.gemini.com/v1/perpetuals/fundingpaymentreport/records.xlsx \
  --header 'Content-Type: application/json' \
  --header 'X-GEMINI-APIKEY: <string>' \
  --header 'X-GEMINI-PAYLOAD: <string>' \
  --header 'X-GEMINI-SIGNATURE: <string>' \
  --data '
{
  "request": "/v1/perpetuals/fundingpaymentreport/records.xlsx?fromDate=2024-04-10&toDate=2024-04-25&numRows=1000",
  "nonce": "<nonce>"
}
'
shell
Example Request Body
{
  "request": "/v1/perpetuals/fundingpaymentreport/records.xlsx?fromDate=2024-04-10&toDate=2024-04-25&numRows=1000",
  "nonce": "<nonce>"
}
json
application/json
Example Responses
No example specified for this content type
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Get Funding Payment Report JSON

POST
https://api.gemini.com
/v1/perpetuals/fundingpaymentreport/records.json

This endpoint retrieves funding payment report in JSON format.

Examples

  • &fromDate=2024-04-10&toDate=2024-04-25&numRows=1000
    Compare and obtain the minimum records between (2024-04-10 to 2024-04-25) and 1000. If (2024-04-10 to 2024-04-25) contains 360 records. Then fetch the minimum between 360 and 1000 records only.

  • &numRows=2024-04-10&toDate=2024-04-25
    If (2024-04-10 to 2024-04-25) contains 360 records. Then fetch 360 records only.

  • &numRows=1000
    Fetch maximum 1000 records starting from Now to a historical date

  • <blank>
    Fetch maximum 8760 records starting from Now to a historical date

Get Funding Payment Report JSON › query Parameters

fromDate
string · date

If empty, will only fetch records by numRows value.

toDate
string · date

If empty, will only fetch records by numRows value.

numRows
integer

If empty, default value '8760'

Get Funding Payment Report JSON › Headers

X-GEMINI-APIKEY
string · required

Your API key

X-GEMINI-SIGNATURE
string · required

HEX-encoded HMAC-SHA384 of payload signed with API secret

X-GEMINI-PAYLOAD
string · required

Base64-encoded JSON payload

Content-Type
string
Default: text/plain
Content-Length
string
Default: 0
Cache-Control
string
Default: no-cache

Get Funding Payment Report JSON › Request Body

request
string · required

The API endpoint path

Example: /v1/perpetuals/fundingpaymentreport/records.json?fromDate=2024-04-10&toDate=2024-04-25&numRows=1000
TimestampType · required

timestamp

account
string

Required for Master API keys as described in Private API Invocation. The name of the account within the subaccount group. Specifies the account on which you intend to place the order. Only available for exchange accounts.

Example: primary

Get Funding Payment Report JSON › Responses

JSON response containing funding payment report.

object[]
eventType
string · enum · required

Event type

Enum values:
Hourly Funding Transfer
required

timestamp

assetCode
string · required

Asset symbol

action
string · enum · required

Credit or Debit

Enum values:
Credit
Debit
object · required
instrumentSymbol
string

Symbol of the underlying instrument. Note that this is only attached to requests from 16th April 2024 onwards.

POST/v1/perpetuals/fundingpaymentreport/records.json
curl --request POST \
  --url https://api.gemini.com/v1/perpetuals/fundingpaymentreport/records.json \
  --header 'Content-Type: application/json' \
  --header 'X-GEMINI-APIKEY: <string>' \
  --header 'X-GEMINI-PAYLOAD: <string>' \
  --header 'X-GEMINI-SIGNATURE: <string>' \
  --data '
{
  "request": "/v1/perpetuals/fundingpaymentreport/records.json?fromDate=2024-04-10&toDate=2024-04-25&numRows=1000",
  "nonce": "<nonce>"
}
'
shell
Example Request Body
{
  "request": "/v1/perpetuals/fundingpaymentreport/records.json?fromDate=2024-04-10&toDate=2024-04-25&numRows=1000",
  "nonce": "<nonce>"
}
json
application/json
Example Responses
[
  {
    "eventType": "Hourly Funding Transfer",
    "timestamp": 1713344403617,
    "assetCode": "GUSD",
    "action": "Credit",
    "quantity": {
      "currency": "GUSD",
      "value": "35.81084"
    },
    "instrumentSymbol": "BTCGUSDPERP"
  }
]
json
application/json

Get Open Positions

POST
https://api.gemini.com
/v1/positions

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 orders:read assigned to access this endpoint. See OAuth Scopes for more information.

Get Open Positions › Headers

X-GEMINI-APIKEY
string · required

Your API key

X-GEMINI-SIGNATURE
string · required

HEX-encoded HMAC-SHA384 of payload signed with API secret

X-GEMINI-PAYLOAD
string · required

Base64-encoded JSON payload

Content-Type
string
Default: text/plain
Content-Length
string
Default: 0
Cache-Control
string
Default: no-cache

Get Open Positions › Request Body

request
string · required

The literal string "/v1/positions"

required

The nonce, as described in Private API Invocation

account
string

Required for Master API keys as described in Private API Invocation. The name of the account within the subaccount group. Specifies the account on which the orders were placed. Only available for exchange accounts.

Get Open Positions › Responses

Successful operation

object[]
POST/v1/positions
curl --request POST \
  --url https://api.gemini.com/v1/positions \
  --header 'Content-Type: application/json' \
  --header 'X-GEMINI-APIKEY: <string>' \
  --header 'X-GEMINI-PAYLOAD: <string>' \
  --header 'X-GEMINI-SIGNATURE: <string>' \
  --data '
{
  "request": "/v1/positions",
  "nonce": "<nonce>",
  "account": "primary"
}
'
shell
Example Request Body
{
  "request": "/v1/positions",
  "nonce": "<nonce>",
  "account": "primary"
}
json
application/json
Example Responses
[
  {
    "symbol": "btcgusdperp",
    "instrument_type": "perp",
    "quantity": "0.2",
    "notional_value": "4000.036",
    "realised_pnl": "1234.5678",
    "unrealised_pnl": "999.946",
    "average_cost": "15000.45",
    "mark_price": "20000.18"
  }
]
json
application/json

Get Risk Stats

GET
https://api.gemini.com
/v1/riskstats/{symbol}

Get Risk Stats › path Parameters

symbol
string · required

Perps Trading pair symbol

BTCGUSDPERP, etc. See symbols and minimums.

Get Risk Stats › Responses

200

The response will be an json object

product_type
string · enum

Contract type for which the symbol data is fetched

Enum values:
PerpetualSwapContract
mark_price
string · decimal

Current mark price at the time of request

index_price
string · decimal

Current index price at the time of request

open_interest
string · decimal

string representation of decimal value of open interest

open_interest_notional
string · decimal

string representation of decimal value of open interest notional

GET/v1/riskstats/{symbol}
curl --request GET \
  --url https://api.gemini.com/v1/riskstats/:symbol
shell
Example Responses
{
  "product_type": "PerpetualSwapContract",
  "mark_price": "30080.00",
  "index_price": "30079.046",
  "open_interest": "14.439",
  "open_interest_notional": "434325.12"
}
json
application/json

Staking