Trade

Account Assets

GEThttps://openapi.longbridge.com/v1/asset/account

Authorization

Signed mode: every request is signed with your App Key/Secret. Header set:

NameTypeRequiredDescription
Authorizationstring · headerRequiredThe account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation.
X-Api-Keystring · headerRequiredYour App Key.
X-Timestampstring · headerRequiredRequest timestamp in seconds (Unix epoch).
X-Api-Signaturestring · headerRequiredHMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=.

The API is used to obtain the available, desirable, frozen, to-be-settled, and in-transit funds (fund purchase and redemption) information for each currency of the user.

>_ CLI
longbridge assets

Request

Query parameters

NameTypeRequiredDescription
currencystringOptionalCurrency (HKD, USD, CNH)

Response

Response properties

NameTypeRequiredDescription
listobject[]OptionalAccount Balance
└ total_cashstringOptionalTotal Cash
└ max_finance_amountstringOptionalMaximum Financing Amount
└ remaining_finance_amountstringOptionalRemaining Financing Amount
└ risk_levelstringOptionalRisk control level. <b>Option:</b>, `0` - safe, `1` - medium risk, `2` - early warning, `3` - danger
└ margin_callstringOptionalMargin Call
└ currencystringOptionalCurrency
└ cash_infosobject[]OptionalCash Details
└ ∟ withdraw_cashstringOptionalWithdraw Cash
└ ∟ available_cashstringOptionalAvailable Cash
└ ∟ frozen_cashstringOptionalFrozen Cash
└ ∟ settling_cashstringOptionalCash to be Settled
└ ∟ redemption_cashstringOptionalRedeemable cash.
└ ∟ currencystringOptionalCurrency
└ net_assetsstringOptionalnet asset
└ init_marginstringOptionalinitial margin
└ maintenance_marginstringOptionalmaintenance margin
└ buy_powerstringOptionalBuy Power
└ frozen_transaction_feesarrayOptionalfrozen fees

Response JSON example

{
  "code": 0,
  "data": {
    "list": [
      {
        "total_cash": "1759070010.72",
        "max_finance_amount": "977582000",
        "remaining_finance_amount": "0",
        "risk_level": "1",
        "margin_call": "2598051051.50",
        "currency": "HKD",
        "net_assets": "24145.90",
        "init_margin": "1540.09",
        "maintenance_margin": "1540.09",
        "buy_power": "1759070.12",
        "cash_infos": [
          {
            "withdraw_cash": "97592.30",
            "available_cash": "195902464.37",
            "frozen_cash": "11579339.13",
            "settling_cash": "207288537.81",
            "currency": "HKD"
          },
          {
            "withdraw_cash": "199893416.74",
            "available_cash": "199893416.74",
            "frozen_cash": "28723.76",
            "settling_cash": "-276806.51",
            "currency": "USD"
          }
        ],
        "frozen_transaction_fees": [
          {
            "currency": "USD",
            "frozen_transaction_fee": "6.51"
          }
        ]
      }
    ]
  }
}

Error code

See the Error Codes page for the full list of error codes.