2 releases
new 0.1.1 | Jan 15, 2025 |
---|---|
0.1.0 | Jan 14, 2025 |
#466 in Text processing
116 downloads per month
Used in trading-enhancers
33KB
961 lines
TRADING TYPES
Defines convenient types for trading (mostly focused on spread-processing based trading):
Price
Amount (base currency quantity)
Worth = price * amount
Liq (liquidity) of price, amount and worth as main brick of calculations
Side from bid/buy or ask/sell
Depth (order book) as vec of Liq
Spread in Depth between bids and asks
OrderToPlace with neccesary data to place limit order
OrderPlaced with corresponding id etc.
Provides extra funcs:
depth_util::liqs_l2
depth_util::drop_worth
depth_util::worst_execution_price
See those descriptions in the code
These types are battle-tested as building blocks for type-safe definitions of trading strategies.
So, the first step when received market data is to align with these types and then go on.
There are some trading "enhansers" based on these types which are parts of trading strategies. Probably, the most generic will be open sourced).
Dependencies
~1.6–2.8MB
~52K SLoC