htx-futures-market
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHTX USDT-M Futures Market
HTX USDT本位永续期货市场
USDT-margined perpetual futures market data. Mostly public — a handful of reference endpoints require a read-permission API key. Agent may call all of these freely without user confirmation.
USDT本位永续期货市场数据。大部分为公开数据——少数参考接口需要具备只读权限的API密钥。Agent可无需用户确认自由调用所有这些接口。
When to use this skill
何时使用该技能
- "BTC perpetual funding rate?"
- "ETH futures OI?"
- "Long/short ratio from top traders"
- "BTC-USDT 4h kline on futures"
- "How much liquidation volume today?"
- "What are the tier margin requirements for BTC-USDT?"
- "BTC永续合约资金费率是多少?"
- "ETH期货持仓量(OI)?"
- "顶级交易者多空比例"
- "BTC-USDT期货4小时K线"
- "今日清算量有多少?"
- "BTC-USDT的层级保证金要求是什么?"
Underlying tool
底层工具
Drives . Binary on or . Always .
htx-cli$PATH$HTX_CLI_BIN--jsonFor the 6 authenticated reference endpoints, configure credentials once (read permission is enough):
bash
htx-cli config set-key <AccessKeyId>
htx-cli config set-secret <SecretKey>驱动。二进制文件位于或路径下。始终使用参数。
htx-cli$PATH$HTX_CLI_BIN--json对于6个需要认证的参考接口,只需配置一次凭证(只读权限即可):
bash
htx-cli config set-key <AccessKeyId>
htx-cli config set-secret <SecretKey>Endpoint catalog (36)
接口目录(共36个)
Contract & system info — public (14)
合约与系统信息——公开(14个)
| # | Method | Endpoint | CLI invocation | Description |
|---|---|---|---|---|
| 1 | GET | | | Contract metadata |
| 2 | GET | | | Index price |
| 3 | GET | | | Price limit (circuit) |
| 4 | GET | | | Open interest (OI) |
| 5 | GET | | | Contract elements |
| 6 | GET | | | Estimated settlement price |
| 7 | GET | | | System status (isolated) |
| 8 | GET | | | Insurance fund balance |
| 9 | GET | | | Insurance fund history |
| 10 | GET | | | Server timestamp |
| 11 | GET | | | Heartbeat |
| 12 | GET | | | Index constituents |
| 13 | GET | | | Liquidation orders |
| 14 | GET | | | Settlement history |
| 序号 | 请求方法 | 接口地址 | CLI调用命令 | 描述 |
|---|---|---|---|---|
| 1 | GET | | | 合约元数据 |
| 2 | GET | | | 指数价格 |
| 3 | GET | | | 价格限制(熔断机制) |
| 4 | GET | | | 持仓量(OI) |
| 5 | GET | | | 合约要素 |
| 6 | GET | | | 预估结算价格 |
| 7 | GET | | | 系统状态(逐仓) |
| 8 | GET | | | 保险基金余额 |
| 9 | GET | | | 保险基金历史记录 |
| 10 | GET | | | 服务器时间戳 |
| 11 | GET | | | 心跳检测 |
| 12 | GET | | | 指数成分 |
| 13 | GET | | | 清算订单 |
| 14 | GET | | | 结算历史记录 |
Funding rate & sentiment — public (5)
资金费率与市场情绪——公开(5个)
| # | Method | Endpoint | CLI invocation | Description |
|---|---|---|---|---|
| 1 | GET | | | Current funding rate |
| 2 | GET | | | Batch funding rates |
| 3 | GET | | | Historical funding rate |
| 4 | GET | | | Top-account long/short ratio |
| 5 | GET | | | Top-position long/short ratio |
| 序号 | 请求方法 | 接口地址 | CLI调用命令 | 描述 |
|---|---|---|---|---|
| 1 | GET | | | 当前资金费率 |
| 2 | GET | | | 批量资金费率 |
| 3 | GET | | | 历史资金费率 |
| 4 | GET | | | 顶级账户多空比例 |
| 5 | GET | | | 顶级持仓多空比例 |
Market data — public (11)
市场数据——公开(11个)
| # | Method | Endpoint | CLI invocation | Description |
|---|---|---|---|---|
| 1 | GET | | | Order book depth |
| 2 | GET | | | Best bid / offer |
| 3 | GET | | | K-line |
| 4 | GET | | | Mark-price kline |
| 5 | GET | | | Single-contract overview |
| 6 | GET | | | All-contracts overview |
| 7 | GET | | | Latest trade |
| 8 | GET | | | Recent trades |
| 9 | GET | | | Historical OI |
| 10 | GET | | | Premium index kline |
| 11 | GET | | | Estimated funding rate kline |
| 序号 | 请求方法 | 接口地址 | CLI调用命令 | 描述 |
|---|---|---|---|---|
| 1 | GET | | | 订单簿深度 |
| 2 | GET | | | 最优买卖报价(BBO) |
| 3 | GET | | | K线数据 |
| 4 | GET | | | 标记价格K线 |
| 5 | GET | | | 单个合约概览 |
| 6 | GET | | | 所有合约概览 |
| 7 | GET | | | 最新成交 |
| 8 | GET | | | 近期成交记录 |
| 9 | GET | | | 历史持仓量 |
| 10 | GET | | | 溢价指数K线 |
| 11 | GET | | | 预估资金费率K线 |
Reference data — requires read permission (6)
参考数据——需要只读权限(6个)
| # | Method | Endpoint | CLI invocation | Description |
|---|---|---|---|---|
| 1 | GET | | | Unified account type |
| 2 | POST | | | Cross tier margin |
| 3 | POST | | | Isolated tier margin |
| 4 | POST | | | Isolated adjustment factor |
| 5 | POST | | | Cross adjustment factor |
| 6 | POST | | | Switch account type (write, keep in market skill per plan) |
Endpoint #6 is a write but the HTX plan groups it with reference-data configuration. Agent should still display the target account type to the user before calling it.
| 序号 | 请求方法 | 接口地址 | CLI调用命令 | 描述 |
|---|---|---|---|---|
| 1 | GET | | | 统一账户类型 |
| 2 | POST | | | 跨仓层级保证金 |
| 3 | POST | | | 逐仓层级保证金 |
| 4 | POST | | | 逐仓调整系数 |
| 5 | POST | | | 跨仓调整系数 |
| 6 | POST | | | 切换账户类型(写操作,按规划归入市场技能) |
接口#6为写操作,但HTX规划中将其归入参考数据配置类。Agent在调用前仍需向用户展示目标账户类型。
Contract code format
合约代码格式
USDT-M perpetual codes are :
<BASE>-USDTBTC-USDT, ETH-USDT, SOL-USDT, ...Not all endpoints accept a filter — some return the whole universe.
contract_codeUSDT本位永续合约代码格式为:
<BASE>-USDTBTC-USDT, ETH-USDT, SOL-USDT, ...并非所有接口都支持过滤——部分接口会返回全市场数据。
contract_codeTypical queries
典型查询示例
- "BTC funding rate?" →
htx-cli futures market funding-rate BTC-USDT --json - "ETH 1-hour futures klines" →
htx-cli futures call GET /linear-swap-ex/market/history/kline --query contract_code=ETH-USDT&period=60min&size=200 --json - "Total liquidations today for BTC" →
htx-cli futures market liquidation-orders --contract-code BTC-USDT --json - "Top traders long/short ratio" →
htx-cli futures call GET /linear-swap-api/v1/swap_elite_position_ratio --query contract_code=BTC-USDT --json
- "BTC资金费率?" →
htx-cli futures market funding-rate BTC-USDT --json - "ETH期货1小时K线" →
htx-cli futures call GET /linear-swap-ex/market/history/kline --query contract_code=ETH-USDT&period=60min&size=200 --json - "BTC今日总清算量" →
htx-cli futures market liquidation-orders --contract-code BTC-USDT --json - "顶级交易者多空比例" →
htx-cli futures call GET /linear-swap-api/v1/swap_elite_position_ratio --query contract_code=BTC-USDT --json
References
参考文档
- — contract code & tier margin quick reference
references/contract-info.md - — funding mechanics
references/funding-rate.md
- — 合约代码与层级速查手册
references/contract-info.md - — 资金费率机制说明
references/funding-rate.md