Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
HitBTC
Spot trading on HitBTC (API address https://api.hitbtc.com, v3 API), without HitBTC's perpetual contracts (_PERP): exchange.GetMarkets() and exchange.GetTickers() list only the spot pairs whose exchange status is working. It uses REST only, with no market-data or order push. Private endpoints use a HitBTC API key (Access Key and Secret Key).
Names and Configuration
exchange.GetName(): HitBTC (Spot).
| Field | Required |
|---|---|
| Access Key | Yes |
| Secret Key | Yes |
Trading Pairs and Contract Codes
Pair examples: BTC_USDT, ETH_BTC
Trading pairs are written BASE_QUOTE, matching the HitBTC native code BTCUSDT.
Function Support
No unsupported standard functions.
Served through a fallback:
exchange.GetRecords: Native periods are 1m, 3m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M; other periods are synthesized by the docker.
Notes
- The amount of a spot market buy order is in the base currency, not a quote-currency amount (orders are placed by HitBTC
quantity). - Limit orders support IOC, FOK and maker-only (
postOnly). - Order IDs use the HitBTC
client_order_id(order queries, cancellation and amendment all address orders by it). exchange.ModifyOrder()can change the price and amount; a price or amount that is not positive is left unchanged. Amending gives the order a newclient_order_id, so the new order ID is returned; use the new ID from then on.- Conditional orders support take-profit and stop-loss (without an order price they execute at market once triggered), not OCO;
exchange.ModifyConditionOrder()can change the trigger price, order price and amount (values that are not positive are left unchanged) and, like a normal amendment, returns the new order ID; conditional orders are canceled through the same endpoint as normal orders. exchange.GetHistoryOrders()queries by trading pair and returns finished orders only; withoutlimit, at most 1000 orders are returned.