betcode-org / flumine

flūmine - Betting trading framework
MIT License
177 stars 60 forks source link

Add process_market_catalogue method to BaseStrategy #699

Closed mzaja closed 1 year ago

mzaja commented 1 year ago

Rationale

Some information relevant for betting is only provided in market catalogues (e.g. race length, race class, trap numbers for greyhound races). Right now, processing such information needs to be done inside process_market_book, which is both clunky and not synchronised with the actual market catalogue updates (which are pulled in another thread).

Bet logging facility may also require this metadata.

Proposal

Add BaseStrategy.process_market_catalogue() method and call it inside BaseFlumine._process_market_catalogues() on each market catalogue update.

Opening this thread for discussion, expect a PR at some point later.

mzaja commented 1 year ago

PR opened: https://github.com/betcode-org/flumine/pull/701