cryptofeed icon indicating copy to clipboard operation
cryptofeed copied to clipboard

Feature request - Fixed Quantity Feed

Open AlgoTrader5 opened this issue 6 years ago • 2 comments

A useful feature where the user specifies the quantity to take in an orderbook and callback returns the average price paid for that lot size. For example if the offers in the order book for BTC-USD was the following:

Price | size 11,000 | 1 10,500 | 1 10,000 | 1

If the user specified quantity 3, the callback would return 10,500.

AlgoTrader5 avatar Feb 22 '20 21:02 AlgoTrader5

@AlgoTrader5 you can do this with the aggregation callbacks. I can provide an example eventually, but for now see:

https://github.com/bmoscon/cryptofeed/blob/master/examples/demo_custom_agg.py

bmoscon avatar Feb 23 '20 21:02 bmoscon

Is this still something desired? I need a project!

OrionSkywalker avatar Apr 24 '22 20:04 OrionSkywalker

If a PR was proposed, I'd accept it

bmoscon avatar Apr 24 '22 20:04 bmoscon

Got it, I'll orient myself and give it a go.

OrionSkywalker avatar Apr 24 '22 20:04 OrionSkywalker