Get Margin Account Summary
Retrieves comprehensive margin account information including collateral, leverage, buying/selling power, and liquidation risk.
This endpoint provides real-time margin statistics for spot margin trading accounts, helping you monitor your account health and manage risk.
Roles
The API key you use to access this endpoint must have the Trader, Fund Manager or Auditor role assigned. See Roles for more information.
The OAuth scope must have balances:read assigned to access this endpoint. See OAuth Scopes for more information.
Account Type
This endpoint is only available for margin trading accounts. Standard exchange accounts will receive an error.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/margin/account"
accountstringRequired for Master API keys as described in Private API Invocation. The name of the account within the subaccount group.
Responses
Margin account summary with risk statistics
marginAssetValueobject · requiredThe total value of all assets available in the margin account that can contribute to funding positions
availableCollateralobject · requiredThe amount of collateral available for new positions or withdrawals
notionalValueobject · requiredThe total value of all open positions
totalBorrowedobject · requiredThe total amount currently borrowed across all currencies
leveragestring · decimal · requiredThe current leverage ratio (notionalValue / marginAssetValue)
Example: 1.5buyingPowerobject · requiredThe maximum value that can be purchased with available collateral
sellingPowerobject · requiredThe maximum value that can be sold with available collateral
reservedBuyOrdersobject · requiredCollateral reserved for open buy orders
reservedSellOrdersobject · requiredCollateral reserved for open sell orders
liquidationRiskobjectLiquidation risk information (only present if positions exist)
interestRateobjectCurrent interest rate on borrowed amounts (only present if borrows exist)
Get Margin Interest Rates
Retrieves current margin interest rates for all borrowable assets.
Returns hourly, daily, and annual borrow rates for each currency that can be borrowed on margin. Interest is charged on borrowed amounts at the hourly rate and compounds over time.
Roles
The API key you use to access this endpoint must have the Trader, Fund Manager or Auditor role assigned. See Roles for more information.
The OAuth scope must have balances:read assigned to access this endpoint. See OAuth Scopes for more information.
Account Type
This endpoint is only available for margin trading accounts.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/margin/rates"
accountstringRequired for Master API keys as described in Private API Invocation. The name of the account within the subaccount group.
Responses
Current margin interest rates for all borrowable assets
ratesobject[] · requiredArray of interest rates for all borrowable currencies
Preview Margin Order Impact
Previews the margin impact of a hypothetical spot order without actually placing it.
Returns both pre-order and post-order margin risk statistics, allowing you to understand how an order would affect your margin account before execution. This is useful for risk management and planning trades.
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.
Account Type
This endpoint is only available for margin trading accounts.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/margin/order/preview"
symbolstring · requiredThe trading pair symbol (e.g., "btcusd")
Example: btcusdsidestring · enum · requiredThe order side
Enum values:buysellExample: buytypestring · enum · requiredThe order type
Enum values:marketlimitExample: limit
amountstring · decimalThe order amount in base currency (required for limit orders and sell market orders)
Example: 0.5pricestring · decimalThe limit price (required for limit orders)
Example: 50000.00totalSpendstring · decimalTotal spend in quote currency (required for buy market orders)
Example: 25000.00accountstringRequired for Master API keys as described in Private API Invocation. The name of the account within the subaccount group.
Responses
Pre-order and post-order margin risk statistics
preorderobject · requiredMargin risk statistics before the order would be executed
postorderobject · requiredMargin risk statistics after the order would be executed

