Type/to search
Built-in Functions
Global
Log
Market
exchange.GetTicker
exchange.GetTickers
exchange.GetDepth
exchange.GetTrades
exchange.GetRecords
exchange.GetMarkets
exchange.GetRawJSON
exchange.SetData
exchange.GetData
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

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

NameDescription
exchange.GetTickerGets the Ticker structure (market data) of a spot instrument or contract; without symbol it uses the currently set trading pair and contract code.
exchange.GetTickersRetrieves aggregated market data from the exchange (an array of Ticker structures).
exchange.GetDepthGets the Depth structure, i.e.
exchange.GetTradesGets the Trade structure array of the spot or futures corresponding to the currently set trading pair and contract code, i.e.
exchange.GetRecordsGet the Record structure array (i.e.
exchange.GetMarketsRetrieves market information from the exchange.
exchange.GetRawJSONGet the raw content returned by the most recent rest request from the current exchange object (exchange, exchanges).
exchange.SetDataSets the data loaded when the strategy is running.
exchange.GetDataRetrieves data loaded by the exchange.SetData() function, or data provided by an external link.