Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
LBank
Spot trading on LBank (API address https://api.lbank.info, v2 API), including leveraged-token (ETF) pairs. It uses REST only, with no market-data or order push. Private endpoints are signed with an LBank API key (Access Key and Secret Key). Conditional orders and order amendment are not supported.
Names and Configuration
exchange.GetName(): LBank (Spot).
| Field | Required |
|---|---|
| Access Key | Yes |
| Secret Key | Yes |
Trading Pairs and Contract Codes
Pair examples: BTC_USDT, ETH_USDT
Trading pairs are written BASE_QUOTE, matching the LBank native code btc_usdt.
Function Support
Not supported (the call fails with an error and returns null): exchange.ModifyOrder, exchange.CreateConditionOrder, exchange.ModifyConditionOrder, exchange.CancelConditionOrder, exchange.GetConditionOrder, exchange.GetConditionOrders, exchange.GetHistoryConditionOrders.
Served through a fallback:
exchange.GetRecords: Native periods are 1m, 5m, 15m, 30m, 1h, 4h, 8h, 12h, 1d, 1w, 1M; other periods are synthesized by the docker.
Notes
- Limit orders support maker-only (
postOnly) and thetif(IOC, FOK) option; market orders do not support these options and report an error when they are passed. - The open-order endpoint requires a trading pair: without the
symbolargument,exchange.GetOrders()queries the current trading pair only. exchange.GetHistoryOrders()does not support thesinceargument (the exchange API does not filter by time) and fails when it is given; without it, it returns the most recent orders.exchange.GetTickers()includes the tickers of both spot pairs and leveraged-token (ETF) pairs. The batch ticker endpoints carry no best bid or ask, so the returnedBuyandSellare both the last price.- The best bid and ask of
exchange.GetTicker()come from an extra order book query; the exchange ticker has no opening price, soOpenis derived from the last price and the 24-hour change.