htx-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HTX_API_KEY | No | HTX Access Key; required for private interfaces | |
| HTX_LOG_LEVEL | No | stderr log level | INFO |
| MCP_TRANSPORT | No | Transport: stdio, sse or streamable-http | stdio |
| HTX_API_SECRET | No | HTX Secret Key; only used for local signing | |
| HTX_API_BASE_URL | No | Spot API host | https://api.huobi.pro |
| HTX_ENABLE_TRADING | No | Whether to allow write interfaces to actually send to HTX | false |
| HTX_SPOT_ACCOUNT_ID | No | Default spot account ID; can be obtained by calling spot_get_accounts | |
| HTX_TIMEOUT_SECONDS | No | HTTP request timeout in seconds | 20 |
| HTX_FUTURES_API_BASE_URL | No | USDT-margined contracts API host | https://api.hbdm.com |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| htx_diagnose_private_accessA | Diagnose authenticated access to HTX spot and USDT-swap private APIs without trading. The result reports credential presence, configured hosts, each check's success, and sanitized HTX error codes/messages. It never returns a secret, signature, or signed URL. |
| htx_get_market_snapshotA | Return one compact, concurrently collected market snapshot for analysis or execution. Prefer this aggregate over several low-level market calls. For technical analysis, call htx_get_technical_indicators instead of requesting raw K-lines. |
| htx_get_technical_indicatorsA | Return only the requested, Decimal-calculated technical indicators. The model chooses which named indicators to inspect; it never calculates them itself. Results are display-rounded only at response time: EMA uses candle price precision plus one decimal, MACD uses it plus three, and RSI/KDJ use two decimal places. Raw K-lines remain available solely through the opt-in advanced compatibility toolset for research and diagnostics. |
| htx_wait_for_market_eventA | Block until bounded declarative market conditions match or the timeout expires. This safe MCP wait primitive performs read-only calls, executes no caller-supplied code, has a fixed deadline, and returns compact evidence. A future WebSocket market daemon can satisfy the identical contract. Important: while this call is pending, the agent receives no intermediate
market updates and cannot react to them. For an uninterrupted wait, set
the outer host |
| htx_get_instrument_rulesA | Return HTX precision, minimum, status, and contract rules for one product. Use these rules before constructing any quantity or price. |
| htx_get_account_snapshotB | Return a compact authenticated snapshot of balances, positions, and orders. This is read-only and requires API credentials. |
| htx_get_portfolio_snapshotA | Return one compact cross-product portfolio snapshot for account review. It concurrently reads spot and USDT-swap balances and positions. V5 swap accounts also return open orders across every contract, so this is the preferred pre-session portfolio check; no market data is fetched. |
| htx_get_market_contextA | Return bounded research context without exposing raw HTX envelopes. Use this when indicators alone are insufficient and a trader needs inspectable OHLCV, a recent public trade tape, or swap funding history. It is a REST snapshot, not a low-latency stream. |
| htx_get_trade_historyA | Return compact executed-fill history for one instrument, not order history. Traders normally review fills to reconcile an order, calculate realized
entry/exit prices and fees, or inspect recent execution quality. Provide
|
| htx_get_risk_snapshotA | Combine current market and account state into a pre-trade risk snapshot. The tool supplies facts and warnings; it does not make a trading decision. |
| htx_get_spot_margin_snapshotA | Return compact spot-margin balances, debt/risk fields, and current loan quotas. This read-only preflight is designed to precede borrowing, repayment, or any margin-funded trade. |
| htx_plan_spot_margin_actionA | Validate and normalize one spot-margin transfer, borrow, or targeted repayment. Borrow plans check HTX's live currency quota where available; a ready plan is still a review artifact, not an execution request. |
| htx_validate_trade_intentA | Validate a product-neutral trade intent and return checks without a request preview. |
| htx_preview_tradeB | Build a normalized dry-run request after validating a product-neutral trade intent. |
| htx_reconcile_tradeA | Read final order and fill state after a submission or network timeout. Query this before retrying a timed-out submission. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| trade_preflight | Create a compact HTX trade-preflight checklist before enabling a mutation tool. This prompt does not place an order; it asks the model to verify contract rules, balance, leverage, existing orders/positions, and protection direction first. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| configuration | Expose non-secret HTX MCP configuration and safety state as JSON. The resource reports API hosts, credential presence, trading enablement, account-ID configuration, supported products, and the dry-run safety gates; it never contains API secrets. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TeacherLi07/htx-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server