#trading #macro #candles

macro trade_aggregation_derive

The macros for trade_aggregation crate

6 releases

0.4.0 May 17, 2023
0.3.2 Sep 26, 2022
0.3.0 Aug 31, 2022
0.2.1 Aug 15, 2022

#7 in #candlestick-chart

Download history 18/week @ 2023-10-28 12/week @ 2023-11-04 17/week @ 2023-11-11 9/week @ 2023-11-18 26/week @ 2023-11-25 16/week @ 2023-12-02 26/week @ 2023-12-09 22/week @ 2023-12-16 20/week @ 2023-12-23 26/week @ 2023-12-30 8/week @ 2024-01-06 11/week @ 2024-01-13 14/week @ 2024-01-20 19/week @ 2024-01-27 9/week @ 2024-02-03 30/week @ 2024-02-10

74 downloads per month
Used in trade_aggregation

Custom license

15KB
92 lines

trade_aggregation_derive

This is a helper crate for trade_aggregation-rs which supplies the 'Candle' derive macro.


lib.rs:

This crate exposes the 'Candle' macro, It combines multiple types that implement 'CandleComponent' into a single 'ModularCandle' struct which can then be used as the output type of some aggregation process. It also exposes getter methods for each 'CandleComponent' for convenience. The name of the getter method is equivalent to the field name. e.g.: struct MyCandle { open: Open, } with the derive macro will create a "fn open(&self)" method which gets the inner value

When deriving the 'Candle' macro, make sure the following things are in scope:

  • Trade
  • ModularCandle
  • CandleComponent

Dependencies

~1.5MB
~32K SLoC