Get Account Info
Query the margin mode configuration of the account.
note
Query the margin mode and the upgraded status of account
HTTP Request
GET /v5/account/info
Request Parameters
None
Response Parameters
Parameter | Type | Comments |
---|---|---|
unifiedMarginStatus | integer | Account status |
marginMode | string | ISOLATED_MARGIN , REGULAR_MARGIN , PORTFOLIO_MARGIN |
dcpStatus | string | Disconnected-CancelAll-Prevention status: ON , OFF |
timeWindow | integer | DCP trigger time window which user pre-set. Between [3, 300] seconds, default: 10 sec |
smpGroup | integer | Depreciated, always 0 . Please query Get SMP Group ID endpoint |
isMasterTrader | boolean | Whether the account is a master trader (copytrading). true , false |
spotHedgingStatus | string | Whether the unified account enables Spot hedging. ON , OFF |
updatedTime | string | Account data updated timestamp (ms) |
Request Example
- HTTP
- Python
GET /v5/account/info HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672129307221
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_account_info())
Response Example
{
"retCode": 0,
"retMsg": "OK",
"result": {
"marginMode": "REGULAR_MARGIN",
"updatedTime": "1697078946000",
"unifiedMarginStatus": 4,
"dcpStatus": "OFF",
"timeWindow": 10,
"smpGroup": 0,
"isMasterTrader": false,
"spotHedgingStatus": "OFF"
}
}