Skip to content

Commit

Permalink
docs/readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
liampauling committed Nov 14, 2024
1 parent 9485ada commit ed9f271
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 39 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

flumine is an open-source, event-based trading framework for sports betting, designed to simplify the development and execution of betting strategies on betting exchanges. flumine provides efficient handling of data streams, risk management, and execution capabilities.

[docs](https://betcode-org.github.io/flumine/)

[join betcode slack group (2k+ members!)](https://join.slack.com/t/betcode-org/shared_invite/zt-2uer9n451-w1QOehxDcG_JXqQfjoMvQA)

## overview

- Event-based Execution: Real-time execution of trading strategies based on incoming market events
Expand All @@ -23,10 +27,6 @@ flumine is an open-source, event-based trading framework for sports betting, des

![Backtesting Analysis](docs/images/jupyterloggingcontrol-screenshot.png?raw=true "Jupyter Logging Control Screenshot")

[docs](https://betcode-org.github.io/flumine/)

[join betcode slack group](https://join.slack.com/t/betcode-org/shared_invite/zt-2uer9n451-w1QOehxDcG_JXqQfjoMvQA)

Tested on Python 3.8, 3.9, 3.10, 3.11 and 3.12.

## installation
Expand All @@ -46,7 +46,7 @@ from flumine import Flumine, BaseStrategy
from betfairlightweight.filters import streaming_market_filter

# Define your strategy here
class MyStrategy(BaseStrategy):
class ExampleStrategy(BaseStrategy):
def check_market_book(self, market, market_book) -> bool:
# process_market_book only executed if this returns True
return True
Expand All @@ -60,7 +60,7 @@ framework = Flumine()

# Add your strategy to the framework
framework.add_strategy(
MyStrategy(
ExampleStrategy(
market_filter=streaming_market_filter(
event_type_ids=["7"],
country_codes=["GB"],
Expand All @@ -85,7 +85,7 @@ from betfairlightweight.resources import MarketBook


class ExampleStrategy(BaseStrategy):
def start(self) -> None:
def start(self, flumine) -> None:
print("starting strategy 'ExampleStrategy'")

def check_market_book(self, market: Market, market_book: MarketBook) -> bool:
Expand Down Expand Up @@ -120,23 +120,25 @@ class ExampleStrategy(BaseStrategy):
market.replace_order(order, 1.02) # move


strategy = ExampleStrategy(
market_filter=streaming_market_filter(
event_type_ids=["7"],
country_codes=["GB"],
market_types=["WIN"],
# Initialize the framework
framework = Flumine()

# Add your strategy to the framework
framework.add_strategy(
ExampleStrategy(
market_filter=streaming_market_filter(
event_type_ids=["7"],
country_codes=["GB"],
market_types=["WIN"],
)
)
)

framework.add_strategy(strategy)
```

Run framework:

```python
# Start the trading framework
framework.run()
```


## features

- Streaming
Expand Down
32 changes: 11 additions & 21 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,9 @@ flūmine
</p>
</div>

Betfair trading framework with a focus on:
flumine is an open-source, event-based trading framework for sports betting, designed to simplify the development and execution of betting strategies on betting exchanges. flumine provides efficient handling of data streams, risk management, and execution capabilities.

- simplicity
- modular
- pythonic
- rock-solid
- safe

Support for market, order and custom streaming data.

[join slack group](https://join.slack.com/t/betcode-org/shared_invite/zt-2uer9n451-w1QOehxDcG_JXqQfjoMvQA)
[join betcode slack group (2k+ members!)](https://join.slack.com/t/betcode-org/shared_invite/zt-2uer9n451-w1QOehxDcG_JXqQfjoMvQA)

Tested on Python 3.8, 3.9, 3.10, 3.11 and 3.12.

Expand Down Expand Up @@ -102,20 +94,18 @@ class ExampleStrategy(BaseStrategy):
market.replace_order(order, 1.02) # move


strategy = ExampleStrategy(
market_filter=streaming_market_filter(
event_type_ids=["7"],
country_codes=["GB"],
market_types=["WIN"],
# Add your strategy to the framework
framework.add_strategy(
ExampleStrategy(
market_filter=streaming_market_filter(
event_type_ids=["7"],
country_codes=["GB"],
market_types=["WIN"],
)
)
)

framework.add_strategy(strategy)
```

Run framework:

```python
# Start the trading framework
framework.run()
```

Expand Down

0 comments on commit ed9f271

Please sign in to comment.