Skip to main content

Module market

Module market 

Expand description

Order books, market trades, candles.

Constants§

MAX_DEPTH
The deepest order book T-Bank serves.
VALID_DEPTHS
Order book depths T-Bank accepts (SUBSCRIPTION_STATUS_DEPTH_IS_INVALID: 1, 10, 20, 30, 40, 50).

Functions§

book_snapshot
An order book snapshot from the two sides of a broker message, cut to depth levels.
candle_interval
Timeframe to the interval name used when requesting historic candles.
historic_candle
A candle of GetCandles to [Candle].
levels
Levels best-first: bids by price descending, asks ascending, cut to depth.
quote
The best bid and the best ask of a broker order book message.
stream_candle
A candle of the candle stream to [Candle].
subscription_interval
Timeframe to the interval name used when subscribing to candles.
timeframe_duration_nanos
Length of one candle of timeframe tf, in nanoseconds.
timeframe_from_interval
The interval of a candle stream message to timeframe, or None for an interval with no counterpart in the domain model.
trade
Trades without a direction cannot be given a Side and are skipped.
wire_depth
Smallest valid wire depth that covers depth levels.