CandleResult#

tradingstrategy.candle.CandleResult class.

class CandleResult[source]#

Bases: object

Server-reply for live queried candle data.

Uses dataclasses-json module for JSON serialisation.

__init__(candles)#
Parameters

candles (List[Candle]) –

Return type

None

Methods

__init__(candles)

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

schema(*[, infer_missing, only, exclude, ...])

sort_by_timestamp()

In-place sorting of candles by their timestamp.

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

Attributes

candles

A bunch of candles.

candles: List[Candle]#

A bunch of candles. Candles are unordered and subject to client side sorting. Multiple pairs and chains may be present in candles.

sort_by_timestamp()[source]#

In-place sorting of candles by their timestamp.

__init__(candles)#
Parameters

candles (List[Candle]) –

Return type

None