Built-in Functions
The whole API a strategy can call directly, grouped by purpose: global utilities, logs and charts, market data, trading, account, futures, exchange object settings, extension commands, network, storage, concurrency, indicator libraries and the file system.
Function pages describe the common semantics: for what a failed or unsupported call returns see Failures and Null Values, for how to write symbols see Symbols, and for differences between exchanges see the Capability Matrix and the exchange pages.
In this sectionRead the whole section
| Name | Description |
| Global (20) | Functions that need no exchange object: sleeping and time, error handling and retries, number formatting, JSON, encoding and hashing, and information about the… |
| Log (12) | Write to the robot or backtest page: the log panel (Log, and trade logs with exchange.Log), the status bar (LogStatus), the profit curve (LogProfit) and custom… |
| Market (9) | Fetch market data through an exchange object: tickers, depth, trades, K-lines and market information; without symbol they use the exchange object's current trad… |
| Trade (14) | Trading functions place, modify, cancel and query orders, both ordinary orders and conditional (take-profit / stop-loss) orders; they act only on the account bo… |
| Account (2) | Query the funds of the account bound to an exchange object: exchange.GetAccount returns the quote and base currency balances of the current trading pair (margin… |
| Futures (6) | Set contract trading parameters and query positions: contract code, open/close direction, leverage, positions and funding rates. |
| Exchange (15) | Properties and settings of an exchange object (exchange, exchanges[n]): name and label, current trading pair and quote currency, K-line period, order precision,… |
| IO (7) | Calls an extended function of the exchange object. |
| Network (5) | HTTP requests, long-lived WebSocket/TCP connections, serving HTTP/TCP from a strategy (threading.Serve), and sending mail. |
| Storage (4) | Persistence and communication between live robots: the _G key-value store, the built-in database DBExec, and broadcasting data between robots with SetChannelDat… |
| Threads (15) | This section introduces concurrency-related functions. |
| TA (13) | The built-in library of common indicators. |
| Talib (10) | Exposes the TA-Lib indicator library to JavaScript and Python strategies (not available in Rust). |
| OS (4) | FMZ Quant Trading Platform supports file read/write operations. |