Loading...
Loading...
Compare original and translation side by side
htx-cli$PATH$HTX_CLI_BIN--jsonhtx-cli$PATH$HTX_CLI_BIN--jsonhtx-cli config set-key <AccessKeyId>
htx-cli config set-secret <SecretKey>
htx-cli config showreferences/authentication.mdhtx-cli config set-key <AccessKeyId>
htx-cli config set-secret <SecretKey>
htx-cli config showreferences/authentication.md| # | Method | Endpoint | CLI invocation | Description |
|---|---|---|---|---|
| 1 | GET | | | All accounts for the user |
| 2 | GET | | | Balance detail |
| 3 | GET | | | Total valuation of all accounts |
| 4 | GET | | | Per-account asset valuation |
| 5 | GET | | | Account flow / ledger |
| # | 请求方法 | 接口地址 | CLI调用命令 | 描述 |
|---|---|---|---|---|
| 1 | GET | | | 用户名下所有账户 |
| 2 | GET | | | 余额详情 |
| 3 | GET | | | 所有账户的总估值 |
| 4 | GET | | | 单账户资产估值 |
| 5 | GET | | | 账户流水/账本 |
| # | Method | Endpoint | CLI invocation | Description |
|---|---|---|---|---|
| 1 | POST | | | Transfer between user's own spot/margin/otc accounts |
| 2 | POST | | | Spot ↔ COIN-M (币本位交割) futures transfer ONLY. Does NOT work for USDT-M. |
| 3 | POST | | | Spot ↔ USDT-M linear swap / cross-margin / super-margin, etc. Use for any USDT-M futures transfer. |
| 4 | GET | | | HTX points balance |
| 5 | POST | | | Transfer points |
Important: For USDT-M perpetual swap (线性永续), you MUST usewith/v2/account/transfer/from=to↔spotandlinear-swap=margin-account(cross) orUSDT(isolated, e.g.USDT-<symbol>). TheUSDT-BTCendpoint is reserved for COIN-M delivery contracts and will return/v1/futures/transferif misused.Transfer service is temporarily suspended for USDT account
| # | 请求方法 | 接口地址 | CLI调用命令 | 描述 |
|---|---|---|---|---|
| 1 | POST | | | 用户自有现货/杠杆/OTC账户间划转 |
| 2 | POST | | | 仅支持现货与**COIN-M(币本位交割)**期货账户间划转,不适用于USDT-M合约。 |
| 3 | POST | | | 现货与USDT-M线性永续合约/全仓杠杆/超级杠杆等账户间划转,适用于所有USDT-M期货划转场景。 |
| 4 | GET | | | HTX积分余额 |
| 5 | POST | | | 划转积分 |
重要提示:对于USDT-M永续合约(线性永续),必须使用接口,其中/v2/account/transfer/from参数设置为to与spot,linear-swap参数设置为margin-account(全仓)或USDT(逐仓,例如USDT-<交易对>)。USDT-BTC接口仅适用于COIN-M交割合约,若误用会返回/v1/futures/transfer错误。Transfer service is temporarily suspended for USDT account
htx-cli spot account list --json # find account id with type=spot
htx-cli spot account balance <id> --json # detailed per-currency balance
htx-cli spot account valuation --json # single USD totalhtx-cli spot account list --json # 找到类型为spot的账户ID
htx-cli spot account balance <id> --json # 查看各币种的详细余额
htx-cli spot account valuation --json # 查看以美元计价的总估值/v2/account/transferhtx-cli spot call /v2/account/transfer --method POST --auth \
--body '{"from":"spot","to":"linear-swap","currency":"usdt","amount":"5","margin-account":"USDT"}' --jsonfromtospotlinear-swapmarginsuper-marginmargin-accountUSDTUSDT-BTC/v2/account/transferhtx-cli spot call /v2/account/transfer --method POST --auth \
--body '{"from":"spot","to":"linear-swap","currency":"usdt","amount":"5","margin-account":"USDT"}' --jsonfromtospotlinear-swapmarginsuper-marginmargin-accountUSDTUSDT-BTC/v1/futures/transfertypepro-to-futuresfutures-to-probtceth/v1/futures/transfertypepro-to-futuresfutures-to-probtcethhtx-cli config set-secrethtx-cli config set-secretreferences/authentication.mdreferences/authentication.md