apiKey, apiSecret, and apiPass when constructing the client.
Method reference
| Method | HTTP | Endpoint | Description |
|---|---|---|---|
getAccountInstruments(params) | GET | /api/v5/account/instruments | Instruments available in your account |
getBalance(params?) | GET | /api/v5/account/balance | Unified account balance |
getPositions(params?) | GET | /api/v5/account/positions | Open positions |
getPositionsHistory(params?) | GET | /api/v5/account/positions-history | Historical positions |
getAccountPositionRisk(params?) | GET | /api/v5/account/account-position-risk | Position risk snapshot |
getBills(params?) | GET | /api/v5/account/bills | Bills for last 7 days |
getBillsArchive(params?) | GET | /api/v5/account/bills-archive | Bills for last 3 months |
getAccountConfiguration() | GET | /api/v5/account/config | Account-level configuration |
setLeverage(params) | POST | /api/v5/account/set-leverage | Set leverage for instrument or currency |
getLeverage(params) | GET | /api/v5/account/leverage-info | Current leverage settings |
getMaxBuySellAmount(params) | GET | /api/v5/account/max-size | Max buy/sell quantity |
getMaxAvailableTradableAmount(params) | GET | /api/v5/account/max-avail-size | Max tradable amount |
getFeeRates(params) | GET | /api/v5/account/trade-fee | Trading fee tiers |
getAccountRiskState() | GET | /api/v5/account/risk-state | Account-level risk state |
getGreeks(params?) | GET | /api/v5/account/greeks | Portfolio greeks |
getInterestAccrued(params?) | GET | /api/v5/account/interest-accrued | Accrued interest |
getInterestRate(params?) | GET | /api/v5/account/interest-rate | Interest rates |
getMaxWithdrawals(params?) | GET | /api/v5/account/max-withdrawal | Max withdrawable amount |
changePositionMargin(params) | POST | /api/v5/account/position/margin-balance | Add or reduce isolated margin |
setPositionMode(params) | POST | /api/v5/account/set-position-mode | Switch between net and long/short mode |
setAccountMode(params) | POST | /api/v5/account/set-account-level | Set account level (simple, single, multi) |
setAutoLoan(params) | POST | /api/v5/account/set-auto-loan | Enable or disable auto loan |
positionBuilder(params) | POST | /api/v5/account/position-builder | Simulate portfolio margin scenarios |
Examples
Get account balance
Get open positions
Set leverage
Get fee rates
Query bills
Request historical bill download
Key parameter types
SetLeverageRequest
SetLeverageRequest
GetPositionsParams
GetPositionsParams
GetHistoricPositionParams
GetHistoricPositionParams

