HomeDocumentationAPI Reference
Log In
API Reference

Get Collaterals

Method Name

private/get_collaterals

Get collaterals of a subaccount
Required minimum session key permission level is read_only

Parameters

subaccount_id  integer required
Subaccount_id

Response

id  string or integer required
result  object required
result. subaccount_id  integer required
Subaccount_id
result. collaterals  array of objects required
All collaterals that count towards margin of subaccount
result.collaterals[]. amount  string required
Asset amount of given collateral
result.collaterals[]. amount_step  string required
Minimum amount step for the collateral
result.collaterals[]. asset_name  string required
Asset name
result.collaterals[]. asset_type  string required
Type of asset collateral (currently always erc20)
enum erc20 option perp
result.collaterals[]. average_price  string required
Average price of the collateral, 0 for USDC.
result.collaterals[]. average_price_excl_fees  string required
Average price of whole position excluding fees
result.collaterals[]. creation_timestamp  integer required
Timestamp of when the position was opened (in ms since Unix epoch)
result.collaterals[]. cumulative_interest  string required
Cumulative interest earned on supplying collateral or paid for borrowing
result.collaterals[]. currency  string required
Underlying currency of asset (ETH, BTC, etc)
result.collaterals[]. delta  string required
Asset delta w.r.t. the delta currency
result.collaterals[]. delta_currency  string required
Currency with respect to which delta is reported.For example, LRTs like WEETH have their delta reported in ETH
result.collaterals[]. initial_margin  string required
USD value of collateral that contributes to initial margin
result.collaterals[]. maintenance_margin  string required
USD value of collateral that contributes to maintenance margin
result.collaterals[]. mark_price  string required
Current mark price of the asset
result.collaterals[]. mark_value  string required
USD value of the collateral (amount * mark price)
result.collaterals[]. open_orders_margin  string required
USD margin requirement for all open orders for this asset / instrument
result.collaterals[]. pending_interest  string required
Portion of interest that has not yet been settled on-chain. This number is added to the portfolio value for margin calculations purposes.
result.collaterals[]. realized_pnl  string required
Realized trading profit or loss of the collateral, 0 for USDC.
result.collaterals[]. realized_pnl_excl_fees  string required
Realized trading profit or loss of the position excluding fees
result.collaterals[]. total_fees  string required
Total fees paid for opening and changing the position
result.collaterals[]. unrealized_pnl  string required
Unrealized trading profit or loss of the collateral, 0 for USDC.
result.collaterals[]. unrealized_pnl_excl_fees  string required
Unrealized trading profit or loss of the position excluding fees

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}