mberk / betfairutil

Utility functions for working with Betfair data
MIT License
30 stars 9 forks source link

listener_kwargs in "prices_file_to_data_frame()" #19

Open nachouve opened 2 years ago

nachouve commented 2 years ago

Would be possible pass some arguments to the listener of the function prices_file_to_data_frame()?

It would be great to pass a listener_kwargs dict to get a subset of prices. Something similar to https://betcode-org.github.io/flumine/quickstart/#listener-kwargs

mberk commented 2 years ago

Yes, happy to add this. It wouldn't really be listener_kwargs per se as these get actioned by flumine not betfairlightweight. With that in mind, anything else you would like to be able to filter other than inplay/seconds to market start?

nachouve commented 2 years ago

I have tried to implement that filter myself. I saw that and gave up.... But if you skip all the unwanted prices lines before transforming them into python objects by the generator, I think it speeds up some analysis I do, doesn't it?

About more filters... Maybe filtering only one prices side or some specific selection_ids could be good too!

nachouve commented 2 years ago

Do you think is it possible to move the "max_depth" to the stream generator? It can be a good improvement too.

mberk commented 2 years ago

I think these are all questions for @liampauling re: betfairlightweight. I would only be applying the filtering after having generated all of the market books. If you want increased performance then #18 is your best bet

liampauling commented 2 years ago

With some extra code listener_kwargs can be passed down to bflw now however as Mo mentioned this is now redundant due to #18