Crate trade_aggregation[][src]

Expand description

This crate is used for aggregating raw trade data into candles using various methods

Structs

Candle

Defines a Candle

ModularCandle

Holds candle features in a vector

ModularVolumeAggregator

The modular equivalent of VolumeAggregator

TimeAggregator

Struct used for aggregating trades by time in an online (streaming) manner

Trade

Defines a taker trade

VolumeAggregator

Used for aggregating trades based on volume

Enums

By

Defines how to aggregate trade size either by Base currency or Quote Currency assumes trades sizes are denoted in Quote e.g.: buy 10 contracts of BTC would be trade size of 10

FeatureModules

enumeration of all available features

Constants

D1

1 Day candle period

H1

1 Hour candle period

H2

2 Hour candle period

H4

4 Hour candle period

H8

8 Hour candle period

H12

12 Hour candle period

M1

1 Minute candle period

M5

5 Minute candle period

M15

15 Minute candle period

M30

30 Minute candle period

Traits

Aggregator

Defines the needed methods for any online aggregator

Functions

aggregate_all_trades

apply an aggregator for all trades at once

candle_volume_from_time_period

Determine the candle volume which produces the same number of candles as the given time aggregation equivalent

load_trades_from_csv

load trades from csv file