Loading...
Loading...
Place, cancel, and query spot orders on HTX; apply for and repay margin loans. Requires API key with trade permission. HIGH RISK — all write operations require explicit user confirmation.
npx skill4agent add htx-exchange/htx-skills-hub htx-spot-tradinghtx-cli$PATH$HTX_CLI_BIN--jsonhtx-cli config set-key <AccessKeyId>
htx-cli config set-secret <SecretKey>| Field | Shown value |
|---|---|
| Action | place / cancel / batch-cancel / margin-borrow / margin-repay |
| Symbol | e.g. |
| Side | buy / sell |
| Type | |
| Amount | quantity (and whether base or quote) |
| Price | limit price (omit for market) |
| Account | spot / margin / super-margin account id |
| Estimated cost | price × amount |
| # | Method | Endpoint | CLI invocation | RW |
|---|---|---|---|---|
| 1 | POST | | | W |
| 2 | POST | | | W |
| 3 | POST | | | W |
| 4 | GET | | | R |
| 5 | GET | | | R |
| 6 | GET | | | R |
| 7 | GET | | | R |
| # | Method | Endpoint | CLI invocation | RW |
|---|---|---|---|---|
| 1 | POST | | | W |
| 2 | POST | | | W |
| 3 | GET | | | R |
| 4 | GET | | | R |
references/order-types.md--typebuy-limitsell-limitbuy-marketsell-marketbuy-marketamountbuy-iocsell-iocbuy-limit-makersell-limit-makerbuy-stop-limitsell-stop-limitbuy-limit-foksell-limit-fokhtx-cli spot market ticker <symbol> --json# 1. Check price
htx-cli spot market ticker btcusdt --json
# 2. Find account id
htx-cli spot account list --json # type=spot
# 3. Confirm with user, then place order
htx-cli spot order place --account-id 123 --symbol btcusdt \
--type buy-limit --amount 0.01 --price 82000 --json
# 4. Monitor
htx-cli spot order query <order-id> --jsonreferences/authentication.mdreferences/order-types.md