Get Account Risk Metrics

GET https://api.sfox.com/v1/margin/account

Returns your account's current risk metrics.

Response Body

KeyDescription

account_value

Your account's current value in USD

equity

Your account's USD balance - position_notional

position_notional

The USD value of the active short positions in your account

collateral

The total amount of collateral you hold in your account (USD balance - USD proceeds from opening short positions)

free_collateral

The collateral available for opening new short positions

margin_level

Your account's current risk level (equity / position_notional). null if you have no active positions

margin_call_level

The margin_level at which you will receive a notification from sFOX to let you know that your margin_level is low and we suggest either closing positions or depositing additional collateral (USD) to avoid liquidation

maintenance_margin_level

The margin_level at which your position will be automatically liquidated

Responses

200
{
    "account_value": 100885.75696235,
    "equity": 97850.05595684,
    "position_notional": 88153.20356472,
    "collateral": 97850.05595684,
    "free_collateral": 97850.05595684,
    "margin_level": 1.11,
    "margin_call_level": 0.15,
    "maintenance_margin_level": 0.05
}
403: Forbidden
//Your account does not have Margin enabled
{
    "error": "account is not enabled for margin trading"
}

Example Requests

curl -H 'Authorization: Bearer <API_TOKEN>' \
https://api.sfox.com/v1/margin/account

Last updated