Ticker
Market data structure.
Attributes
| Name | Type | Description |
Info | object | Raw data returned by the exchange API, not included in backtesting. |
Symbol | string | The
|
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.