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

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 or an empty array. 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'.