Skip to main content

Module market

Module market 

Source
Expand description

Market data mapping: ALOR wire models to brokapi-core domain types.

Functions§

candle
One candle of the timeframe tf. The broker gives the open time; the close is the open plus the length of the timeframe.
candles
The candles of a history answer, oldest first.
market_trade
A trade of the market. The quantity is as the broker reports it.
order_book
An order book, from the REST answer or a stream message: always a whole snapshot (the broker sends the whole book, to the depth asked, in every message). The volume is as the broker reports it.
quote
A quotation: the best bid and ask. The broker gives their volumes in lots; with the lot size of the record they become pieces. A side with no price (an empty book side) is None.
side_of
The side of a trade of the market is the side of the aggressor (side of the record). A trade without a usable side is dropped: the domain type needs one.