Instrument

class async_v20.Candlestick(time: DateTime= sentinel, bid: CandlestickData= sentinel, ask: CandlestickData= sentinel, mid: CandlestickData= sentinel, volume: int= sentinel, complete: bool= sentinel)[source]

Bases: async_v20.definitions.base.Model

The Candlestick representation

time

DateTime The start time of the candlestick

bid

CandlestickData The candlestick data based on bids. Only provided if bid-based candles were requested.

ask

CandlestickData The candlestick data based on asks. Only provided if ask-based candles were requested.

mid

CandlestickData The candlestick data based on midpoints. Only provided if midpoint-based candles were requested.

volume

int The number of prices created during the time-range represented by the candlestick.

complete

bool A flag indicating if the candlestick is complete. A complete candlestick is one whose ending time is not in the future.

class async_v20.CandlestickData(o: PriceValue= sentinel, h: PriceValue= sentinel, l: PriceValue= sentinel, c: PriceValue= sentinel)[source]

Bases: async_v20.definitions.base.Model

The price data (open, high, low, close) for the Candlestick representation.

o

PriceValue The first (open) price in the time-range represented by the candlestick.

h

PriceValue The highest price in the time-range represented by the candlestick.

l

PriceValue The lowest price in the time-range represented by the candlestick.

c

PriceValue The last (closing) price in the time-range represented by the candlestick.

class async_v20.OrderBook(instrument: InstrumentName= sentinel, time: DateTime= sentinel, unix_time: DateTime= sentinel, price: PriceValue= sentinel, bucket_width: PriceValue= sentinel, buckets: ArrayOrderBookBucket= sentinel)[source]

Bases: async_v20.definitions.base.Model

The representation of an instrument’s order book at a point in time

instrument

InstrumentName The order book’s instrument

time

DateTime The time when the order book snapshot was created.

unix_time

DateTime The time when the order book snapshot was created in unix format.

price

PriceValue The price (midpoint) for the order book’s instrument at the time of the order book snapshot

bucket_width

PriceValue The price width for each bucket. Each bucket covers the price range from the bucket’s price to the bucket’s price + bucketWidth.

buckets

( OrderBookBucket, …) The partitioned order book, divided into buckets using a default bucket width. These buckets are only provided for price ranges which actually contain order or position data.

class async_v20.OrderBookBucket(price: PriceValue= sentinel, long_count_percent: DecimalNumber= sentinel, short_count_percent: DecimalNumber= sentinel)[source]

Bases: async_v20.definitions.base.Model

The order book data for a partition of the instrument’s prices.

price

PriceValue The lowest price (inclusive) covered by the bucket. The bucket covers the price range from the price to price + the order book’s bucketWidth.

long_count_percent

DecimalNumber The percentage of the total number of orders represented by the long orders found in this bucket.

short_count_percent

DecimalNumber The percentage of the total number of orders represented by the short orders found in this bucket.

class async_v20.PositionBook(instrument: InstrumentName= sentinel, time: DateTime= sentinel, unix_time: DateTime= sentinel, price: PriceValue= sentinel, bucket_width: PriceValue= sentinel, buckets: ArrayPositionBookBucket= sentinel)[source]

Bases: async_v20.definitions.base.Model

The representation of an instrument’s position book at a point in time

instrument

InstrumentName The position book’s instrument

time

DateTime The time when the position book snapshot was created

price

PriceValue The price (midpoint) for the position book’s instrument at the time of the position book snapshot

bucket_width

PriceValue The price width for each bucket. Each bucket covers the price range from the bucket’s price to the bucket’s price + bucketWidth.

buckets

( PositionBookBucket, …) The partitioned position book, divided into buckets using a default bucket width. These buckets are only provided for price ranges which actually contain order or position data.

class async_v20.PositionBookBucket(price: PriceValue= sentinel, long_count_percent: DecimalNumber= sentinel, short_count_percent: DecimalNumber= sentinel)[source]

Bases: async_v20.definitions.base.Model

The position book data for a partition of the instrument’s prices.

price

PriceValue The lowest price (inclusive) covered by the bucket. The bucket covers the price range from the price to price + the position book’s bucketWidth.

long_count_percent

DecimalNumber The percentage of the total number of positions represented by the long positions found in this bucket.

short_count_percent

DecimalNumber The percentage of the total number of positions represented by the short positions found in this bucket.