mberk / betfairutil Goto Github PK
View Code? Open in Web Editor NEWUtility functions for working with Betfair data
License: MIT License
Utility functions for working with Betfair data
License: MIT License
This should dramatically speed up prices_file_to_data_frame
and read_prices_file
Pandas is currently only required if using the functions market_book_to_data_frame and prices_file_to_data_frame. In deployments where these functions are not used, requiring pandas to be installed is unnecessary bloat
Hi there,
I stumbled across this repo and I'm interested in getting betfair pricing data to a pandas dataframe. I'm having limitations using delayed key and would like to use streaming.
Could you upload a simple example for instance how to get premier league match data in a dataframe via streaming? Or any league for that matter?
Thanks
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
Currently, these files are not correctly handled by read_prices_file
, prices_file_to_data_frame
or prices_file_to_csv_file
Specifically, only the first market book is handled at each iteration of the historical stream generator
There is an small error using function prices_file_to_data_frame
.
~/.local/lib/python3.8/site-packages/betfairutil/init.py in prices_file_to_csv_file(path_to_prices_file, path_to_csv_file, **kwargs)
715 path_to_prices_file: str, path_to_csv_file: str, **kwargs
716 ) -> None:
--> 717 prices_file_to_data_frame(path_to_prices_file, **kwargs).to_csv(
718 path_to_csv_file, index=False
719 )~/.local/lib/python3.8/site-packages/betfairutil/init.py in prices_file_to_data_frame(path_to_prices_file, should_output_runner_names, should_format_publish_time, max_depth)
752 stream = trading.streaming.create_historical_generator_stream(
753 file_path=path_to_prices_file,
--> 754 listener=StreamListener(
755 max_latency=None, lightweight=True, debug=False, update_clk=False
756 ),TypeError: init() got an unexpected keyword argument 'debug'
Checking the historic commit at bflw I see that:
debug
param to be deprecated from v2.15.0 and handled explicitly
The README could do with some love
During a runner removal prices are removed but runner is still active:
This code results in 1 being returned, ideally lay side is checked for prices as well before defaulting to 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.