Account & Asset
This document covers all endpoints related to your account configuration and asset balances. All endpoints require API Key authentication.
1. Get Spot Account Balance
GET /api/v1/asset/spot
Retrieve the overall asset summary and coin-specific details of your spot account.
Permission: read
Parameters: None
Success Response (200 OK):
{
"code": "0",
"msg": "",
"data": [
{
"total_asset_usdt": "15000.00",
"asset_list": [
{
"currency_name": "BTC",
"quantity": "0.1",
"available": "0.1",
"frozen": "0.0"
}
]
}
]
}2. Get Contract Account Balance
GET /api/v1/asset/contract
Retrieve the overall asset summary, P&L, and coin-specific details of your contract account.
Permission: read
Parameters: None
Success Response (200 OK):
{
"code": "0",
"msg": "",
"data": [
{
"total_margin_balance_usdt": "120350.50",
"total_unrealized_pnl": "2350.50",
"asset_list": [
{
"currency_name": "USDT",
"margin_balance": "51000.00",
"unrealized_pnl": "1000.00",
"transferable": "48000.00"
}
]
}
]
}3. Get Funding Account Balance
GET /api/v1/asset/funding
Retrieve the overall asset summary and coin-specific details of your funding account (used for deposits, withdrawals, and transfers).
Permission: read
Parameters: None
Success Response (200 OK):
{
"code": "0",
"msg": "",
"data": [
{
"total_asset_usdt": "21000.00",
"asset_list": [
{
"currency_name": "USDT",
"quantity": "21000.00",
"available": "20000.00",
"frozen": "1000.00"
}
]
}
]
}4. Get Positions
GET /api/v1/account/positions
Retrieve information about your current open positions.
Permission: read
Query Parameters:
instType
String
No
Instrument type, e.g., SWAP. Returns all if omitted.
instId
String
No
Instrument ID to query a single position.
Success Response (200 OK):
{
"code": "0",
"msg": "",
"data": [
{
"instId": "BTC-USDT-SWAP",
"posId": "3456789012345",
"posSide": "long",
"pos": "10",
"availPos": "8",
"avgPx": "29500.5",
"upl": "120.55",
"lever": "10",
"liqPx": "26800.0"
}
]
}Last updated