Type/to search
Built-in Functions
Structures
Trade
Ticker
Record
Order
Condition
OrderBook
Depth
Account
Asset
Position
Market
Funding
OtherStruct
HttpQuery-options
HttpQuery-return
LogStatus-table
LogStatus-btnTypeOne
LogStatus-btnTypeTwo
Chart-options
KLineChart-options
SetData-data
EventLoop-return
DBExec-return
Thread.join-return
Built-in Variables

Market data structure.

Attributes

NameTypeDescription

Info

object

Raw data returned by the exchange API, not included in backtesting.

Symbol

string

The Symbol field is the trading symbol code defined by the FMZ platform.

  • For spot exchange objects, the Symbol field value format is (example): BTC_USDT, representing the BTC_USDT spot trading pair.

  • For futures exchange objects, the Symbol field value format is (example): BTC_USDT.swap, representing BTC's USDT-margined perpetual contract.

  • For futures exchange objects (option-related functions are also encapsulated in futures exchange objects), the Symbol field value format is (example): BTC_USDT.BTC-240108-40000-C, representing BTC's USDT-margined option contract with an expiration date of January 8, 2024, and a strike price of 40000 for a call option.

High

number

Highest price. If the exchange API does not provide the 24-hour high, it is filled with the ask price.

Low

number

Lowest price. If the exchange API does not provide the 24-hour low, it is filled with the bid price.

Sell

number

Current best ask price.

Buy

number

Current best bid price.

Last

number

Last traded price.

Open

number

Period opening price. If the exchange API does not provide the opening price for the 24-hour rolling period, it is filled with the current price.

Volume

number

Recent trading volume. In principle, spot trading volume is in base currency units, and contract trading volume is in contract units. If the exchange API does not provide such data, it is filled with available data from the exchange API, for example, it may be trading volume in quote currency units.

Time

number

Timestamp in milliseconds.

OpenInterest

number

Open interest. Most exchange APIs do not provide this data, and the value is 0 when not supported.

See Also

Remarks

The exchange.GetTicker() function returns a Ticker structure.

For option contracts, calling the exchange.GetTicker() function is prone to errors. This is because option contract order books typically have poor liquidity, and there are often situations where there are no orders on the bid or ask side. In such cases, when the FMZ underlying system detects that the Buy or Sell field of the Ticker structure is 0, it will trigger an error message.