Get Account 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.
Headers
X-GEMINI-APIKEYYour API key
X-GEMINI-SIGNATUREHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADBase64-encoded JSON payload
Content-TypeContent-LengthCache-ControlGet Account Margin › Request Body
requestThe API endpoint path
timestamp
symbolTrading pair symbol. See symbols and minimums
accountRequired 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.
Get Account Margin › Responses
JSON object
margin_assets_valueThe $ equivalent value of all the assets available in the current trading account that can contribute to funding a derivatives position.
initial_marginThe $ amount that is being required by the accounts current positions and open orders.
available_marginThe difference between the margin_assets_value and initial_margin.
margin_maintenance_limitThe minimum amount of margin_assets_value required before the account is moved to liquidation status.
leverageThe ratio of Notional Value to Margin Assets Value.
notional_valueThe $ value of the current position.
estimated_liquidation_priceThe estimated price for the asset at which liquidation would occur.
initial_margin_positionsThe contribution to initial_margin from open positions.
reserved_marginThe contribution to initial_margin from open orders.
reserved_margin_buysThe contribution to initial_margin from open BUY orders.
reserved_margin_sellsThe contribution to initial_margin from open SELL orders.
buying_powerThe amount of that product the account could purchase based on current initial_margin and margin_assets_value.
selling_powerThe amount of that product the account could sell based on current initial_margin and margin_assets_value.
List Funding Payments
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.
query Parameters
sinceIf specified, only return funding payments after this point. Default value is 24h in past. See Timestamps for more information
timestamp
toIf specified, only returns funding payment until this point. Default value is now. See Timestamps for more information
timestamp
Headers
X-GEMINI-APIKEYYour API key
X-GEMINI-SIGNATUREHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADBase64-encoded JSON payload
Content-TypeContent-LengthCache-ControlList Funding Payments › Request Body
requestThe API endpoint path
timestamp
accountRequired 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.
List Funding Payments › Responses
The response will be an array of funding payment objects.
eventTypeEvent type
Get Funding Payment Report File
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
query Parameters
fromDateIf empty, will only fetch records by numRows value.
toDateIf empty, will only fetch records by numRows value.
numRowsIf empty, default value '8760'
Headers
X-GEMINI-APIKEYYour API key
X-GEMINI-SIGNATUREHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADBase64-encoded JSON payload
Content-TypeContent-LengthCache-ControlGet Funding Payment Report File › Request Body
requestThe API endpoint path
timestamp
accountRequired 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.
Get Funding Payment Report File › Responses
XLSX file downloaded containing funding payment report.
Get Funding Payment Report 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
query Parameters
fromDateIf empty, will only fetch records by numRows value.
toDateIf empty, will only fetch records by numRows value.
numRowsIf empty, default value '8760'
Headers
X-GEMINI-APIKEYYour API key
X-GEMINI-SIGNATUREHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADBase64-encoded JSON payload
Content-TypeContent-LengthCache-ControlGet Funding Payment Report JSON › Request Body
requestThe API endpoint path
timestamp
accountRequired 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.
Get Funding Payment Report JSON › Responses
JSON response containing funding payment report.
eventTypeEvent type
timestamp
assetCodeAsset symbol
actionCredit or Debit
instrumentSymbolSymbol of the underlying instrument. Note that this is only attached to requests from 16th April 2024 onwards.
Get Open 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.
Headers
X-GEMINI-APIKEYYour API key
X-GEMINI-SIGNATUREHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADBase64-encoded JSON payload
Content-TypeContent-LengthCache-ControlGet Open Positions › Request Body
requestThe literal string "/v1/positions"
The nonce, as described in Private API Invocation
accountRequired 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
Get Risk Stats
path Parameters
symbolPerps Trading pair symbol
BTCGUSDPERP, etc. See symbols and minimums.
Get Risk Stats › Responses
The response will be an json object
product_typeContract type for which the symbol data is fetched
mark_priceCurrent mark price at the time of request
index_priceCurrent index price at the time of request
open_intereststring representation of decimal value of open interest
open_interest_notionalstring representation of decimal value of open interest notional

