Type/to search
Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
Built-in Variables and Constants
Conventions
Exchanges

Data structure for candlestick bars in standard OHLC format, used for charting candlesticks and calculating technical indicators.

Attributes

NameTypeDescription

Time

number

Millisecond timestamp representing the start time of this candlestick period.

Open

number

Opening price.

High

number

Highest price.

Low

number

Lowest price.

Close

number

Closing price.

OpenInterest

number

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

Volume

number

Trading volume. For spot trading, volume is principally in base currency units; for futures, volume is in contract units. If the exchange API does not provide standard data, existing API data is used for filling, which may be volume in quote currency units.

See Also

Remarks

The exchange.GetRecords() function returns an array of Records; it is an empty array when there is no data, and a null value (null in JavaScript, None in Python) when the call fails. Each Record structure represents one candlestick bar.

For Python, different versions of pandas packages may require different handling, for example:

python
pandas.DataFrame(records) # May need to be adjusted to: pandas.DataFrame(list(records))

Related error message: in getattr KeyError: 'dtype'.