Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Market
Fetch market data through an exchange object: tickers, depth, trades, K-lines and market information; without symbol they use the exchange object's current trading pair and contract code.
A failed request returns a null value, so check it before use (see Failures and Null Values); for how to write symbol see Symbols. exchange.GetRawJSON reads the raw response of the latest request, and exchange.SetData and exchange.GetData load and read custom data.
In this sectionRead the whole section
| Name | Description |
| exchange.GetTicker | Gets the Ticker structure (market data) of a spot instrument or contract; without symbol it uses the currently set trading pair and contract code. |
| exchange.GetTickers | Retrieves aggregated market data from the exchange (an array of Ticker structures). |
| exchange.GetDepth | Gets the Depth structure, i.e. |
| exchange.GetTrades | Gets the Trade structure array of the spot or futures corresponding to the currently set trading pair and contract code, i.e. |
| exchange.GetRecords | Get the Record structure array (i.e. |
| exchange.GetMarkets | Retrieves market information from the exchange. |
| exchange.GetRawJSON | Get the raw content returned by the most recent rest request from the current exchange object (exchange, exchanges). |
| exchange.SetData | Sets the data loaded when the strategy is running. |
| exchange.GetData | Retrieves data loaded by the exchange.SetData() function, or data provided by an external link. |