Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
BigONE
Spot trading on BigONE; only spot pairs are served. The exchange has no regular market order, so only limit orders can be placed (IOC and maker-only are supported); conditional orders support take-profit and stop-loss and can execute at a limit or at market once triggered. Access uses an API Key and Secret Key created on BigONE.
Names and Configuration
exchange.GetName(): BigONE (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 BigONE native code BTC-USDT.
Exchange-specific IO Commands
| Command | Arguments | Description | Returns |
|---|---|---|---|
api | method, path[, params[, raw[, sign]]] | Call a BigONE endpoint directly; requests are signed by default, and signed requests support GET and POST only. (more below the table) | The full exchange response (code, data and the page_token used for paging, etc.); an error is raised when code is not 0. |
The rest of the longer descriptions in the table:
api:paramsgoes into the query string forGETand into a JSON body forPOST(all values are sent as strings). Therawargument is a query string forGET(appended afterparams) and a JSON body sent as is forPOST(keeping booleans, numbers and other value types; passing it together withparamsreports an error); withfalseas the last argument the request is not signed, which only works forGET.
For the common commands base and currency see exchange.IO.
Function Support
Not supported (the call fails with an error and returns null): exchange.ModifyOrder, exchange.ModifyConditionOrder.
Served through a fallback:
exchange.GetRecords: Native periods are 1m, 5m, 15m, 30m, 1h, 3h, 4h, 6h, 12h, 1d, 1w, 1M; other periods are synthesized by the docker.
Notes
- Market orders are not supported, only limit orders; FOK is not supported (a
tifoffokfails), while IOC and maker-only (postOnly) are supported. - The open-order and open-conditional-order endpoints require a trading pair: without the
symbolargument,exchange.GetOrders()andexchange.GetConditionOrders()query the current trading pair only. exchange.GetHistoryOrders()andexchange.GetHistoryConditionOrders()do not support thesinceargument (the exchange API has no time-range parameter) and fail when it is given; without it they return the most recent orders, at most 200 by default.- Conditional orders support take-profit and stop-loss (without an order price they execute at market once triggered), not OCO.
- The order limits in
exchange.GetMarkets()are given as quote-currency amounts (MinNotional,MaxNotional);MinQtyandMaxQtyare 0.