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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe API endpoint path
Example: /v1/marginnonce
requiredtimestamp
symbol
string · requiredTrading pair symbol. See symbols and minimums
account
stringRequired 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
Responses
margin_assets_value
string · decimalThe $ equivalent value of all the assets available in the current trading account that can contribute to funding a derivatives position.
initial_margin
string · decimalThe $ amount that is being required by the accounts current positions and open orders.
available_margin
string · decimalThe difference between the
margin_assets_value
andinitial_margin
.margin_maintenance_limit
string · decimalThe minimum amount of
margin_assets_value
required before the account is moved to liquidation status.leverage
string · decimalThe ratio of Notional Value to Margin Assets Value.
notional_value
string · decimalThe $ value of the current position.
estimated_liquidation_price
string · decimalThe estimated price for the asset at which liquidation would occur.
initial_margin_positions
string · decimalThe contribution to
initial_margin
from open positions.reserved_margin
string · decimalThe contribution to
initial_margin
from open orders.reserved_margin_buys
string · decimalThe contribution to
initial_margin
from open BUY orders.reserved_margin_sells
string · decimalThe contribution to
initial_margin
from open SELL orders.buying_power
string · decimalThe amount of that product the account could purchase based on current
initial_margin
andmargin_assets_value
.selling_power
string · decimalThe amount of that product the account could sell based on current
initial_margin
andmargin_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
since
If specified, only return funding payments after this point. Default value is 24h in past. See Timestamps for more information
to
If specified, only returns funding payment until this point. Default value is now. See Timestamps for more information
Headers
X-GEMINI-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe API endpoint path
Example: /v1/perpetuals/fundingPaymentnonce
requiredtimestamp
account
stringRequired 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
Responses
eventType
string · enum · requiredEvent type
Enum values:Hourly Funding TransferhourlyFundingTransfer
object · required
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
fromDate
string · dateIf empty, will only fetch records by numRows value.
toDate
string · dateIf empty, will only fetch records by numRows value.
numRows
integerIf empty, default value '8760'
Headers
X-GEMINI-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe API endpoint path
Example: /v1/perpetuals/fundingpaymentreport/records.xlsxnonce
requiredtimestamp
account
stringRequired 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
Responses
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
fromDate
string · dateIf empty, will only fetch records by numRows value.
toDate
string · dateIf empty, will only fetch records by numRows value.
numRows
integerIf empty, default value '8760'
Headers
X-GEMINI-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe API endpoint path
Example: /v1/perpetuals/fundingpaymentreport/records.json?fromDate=2024-04-10&toDate=2024-04-25&numRows=1000nonce
requiredtimestamp
account
stringRequired 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
Responses
eventType
string · enum · requiredEvent type
Enum values:Hourly Funding Transfertimestamp
requiredTime of the funding payment
assetCode
string · requiredAsset symbol
action
string · enum · requiredCredit or Debit
Enum values:CreditDebitquantity
requiredA nested JSON object describing the transaction amount
instrumentSymbol
stringSymbol 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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/positions"
account
stringRequired 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.
Responses
openPositions
object[]
Get Risk Stats
path Parameters
symbol
string · requiredPerps Trading pair symbol
BTCGUSDPERP
, etc. See symbols and minimums.
Responses
product_type
string · enumContract type for which the symbol data is fetched
Enum values:PerpetualSwapContractmark_price
string · decimalCurrent mark price at the time of request
index_price
string · decimalCurrent index price at the time of request
open_interest
string · decimalstring representation of decimal value of open interest
open_interest_notional
string · decimalstring representation of decimal value of open interest notional