v1

latestOpenAPI 3.0.32026-07-1482226.1 KB
Account Data

/account

Retrieves the user's account details.

get/api/v1/account

Query parameters

accountAddressstring

Account address to fetch account details by.

Response

Successful response with account details.

groupIdstring

The (optional) group ID of the account. Accounts belonging to the same group cannot trade against each other.

canTradeboolean required

If the user can trade.

canDepositboolean required

If the current user can deposit to the account.

canWithdrawboolean required

If the current user can withdraw from the account.

crossEffectiveBalanceE9string required

Total effective balance in USD (e9 format).

crossMarginRequiredE9string required

The sum of initial margin required across all cross positions (e9 format).

totalOrderMarginRequiredE9string required

The sum of initial margin required across all open orders (e9 format).

marginAvailableE9string required

The amount of margin available to open new positions and orders (e9 format).

crossMaintenanceMarginRequiredE9string required

The sum of maintenance margin required across all cross positions (e9 format).

crossMaintenanceMarginAvailableE9string required

The amount of margin available before liquidation (e9 format).

crossMaintenanceMarginRatioE9string required

The ratio of the maintenance margin required to the account value (e9 format).

crossLeverageE9string required

The leverage of the account (e9 format).

totalUnrealizedPnlE9string required

Total unrealized profit (e9 format).

crossUnrealizedPnlE9string required

Unrealized profit of cross positions (e9 format).

crossUnrealizedLossE9string required

An implicitly negative number that sums only the losses of all cross positions.

crossAccountValueE9string required

The total value of the cross account, combining the cross effective balance and unrealized PnL across all cross positions, and subtracting any pending funding payments on any cross position.

totalAccountValueE9string required

The total value of the account, combining the total effective balance and unrealized PnL across all positions, and subtracting any pending funding payments on any position.

updatedAtMillisinteger required

Last update time in milliseconds since Unix epoch.

authorizedAccountsstring[] required

Deprecated: Replaced with authorizedWallets.

accountAddressstring required

The address of the account.

Example response

{
  "groupId": "group1",
  "tradingFees": {
    "makerFeeE9": "1000000",
    "takerFeeE9": "1000000"
  },
  "canTrade": true,
  "canDeposit": true,
  "crossEffectiveBalanceE9": "12000000000000",
  "crossMarginRequiredE9": "1000000000",
  "totalOrderMarginRequiredE9": "1000000000",
  "marginAvailableE9": "1000000000",
  "crossMaintenanceMarginRequiredE9": "5000000000",
  "crossMaintenanceMarginAvailableE9": "1000000000",
  "crossMaintenanceMarginRatioE9": "1000000000",
  "crossLeverageE9": "1000000000",
  "totalUnrealizedPnlE9": "2000000000",
  "crossUnrealizedPnlE9": "2000000000",
  "crossUnrealizedLossE9": "1000000000",
  "crossAccountValueE9": "1000000000",
  "totalAccountValueE9": "1000000000",
  "updatedAtMillis": 1627872345678,
  "positions": [
    {
      "avgEntryPriceE9": "400000000000",
      "clientSetLeverageE9": "100000000000",
      "liquidationPriceE9": "0",
      "markPriceE9": "667950671178",
      "notionalValueE9": "0",
      "sizeE9": "100000000",
      "unrealizedPnlE9": "-1000000000",
      "marginRequiredE9": "0",
      "maintenanceMarginE9": "0",
      "isIsolated": true,
      "isolatedMarginE9": "1000000000",
      "updatedAtMillis": 1733899435274,
      "fundingRatePaymentAllTimeE9": "0",
      "fundingRatePaymentSinceChangeE9": "0",
      "fundingRatePaymentSinceOpenedE9": "0"
    }
  ],
  "accountAddress": "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde"
}