Skip to content

Commit

Permalink
Prep to remove from private repo
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelnindodev committed Oct 31, 2023
1 parent 62084cf commit 3f00e09
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 13 deletions.
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,47 @@

Next evolution of work started on StatsNerd. Repo to ramp up on finding positive EV and arbitrage opportunities.

## Project update

Won't be working on this repo anymore privately, or at all I think. Explanation below:

So this project started of from watching this random [Youtube Video](https://www.youtube.com/watch?v=s6R9xB1RdZU&t)

Never knew anything about sports betting before, but thought it would be awesome to create a platform similar to [OddsJam](https://oddsjam.com/) for African markets, since there's no support for said markets in OddsJam, and betting is quite popular in Kenya.

Unfortunately in Kenya as I have found out, all bet winnings are subject to 20% tax, which negatives all positive EV opportunities, which effectively makes any long term profit strategy next to impossible.

This repo would be important for anyone who would still want to find misplaced odds by Kenyan bookies for the short term, and creates a structure that can be extended if you would like to.

## Significant Libraries and Tools

- [Cheerio](https://cheerio.js.org/): Library for parsing html.
- [Puppeteer](https://pptr.dev/): Used for web scrapping sports odds from bookmakers and also fetching true odds from betting exchanges.
- [Redis](https://redis.io/): Used as a pub-sub mechanism to pass events between the core modules.
- [TypeOrm](https://typeorm.io/): Interface with PostgresSQL database.

## Modules

The core modules are designed to be decoupled, and can be deployed independently as well. For scrapping, the scrapping module can be deployed as lambda functions are they are short lived, then result passed on via pub-sub to the other modules.

### Config

Config stores JSON configuration objects for different providers, specifically which urls and game metadata is associated with the webpage to scrape.

### Core

#### Scraping
#### Analysis

Analyzes collected odds to find mismatched odds from bookies.

Functionality for fetching raw html data from bet providers.
#### Game Events

Functionality for handling specific game event data. Combines the same game event from different providers into a single unified event.

#### Parsers

Functionality for parsing html content from bet providers into useful bet meta data.

#### Game Events
#### Scraping

Functionality for handling specific game event data.
Functionality for fetching raw html data from bet providers and betting exchanges. Each provider requires different web scrapping techniques to get the required data, and this is defined here.
8 changes: 1 addition & 7 deletions src/bet_providers/betika.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { BetProviders, Games } from "../utils/types/common";
import { BetProvider } from ".";
import { BetProviders } from "../utils/types/common";

export class BetikaProvider extends BetProvider {
constructor() {
super(BetProviders.BETIKA, "src/config/betika.json");
}

override getSupportedGames(): Games[] {
return [
Games.TENNIS_SINGLES
];
}
}
2 changes: 0 additions & 2 deletions src/bet_providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export abstract class BetProvider {
this.configPath = configPath;
}

abstract getSupportedGames(): Games[]

public async getConfig(): Promise<Result<BetProviderConfig, Error>> {
const readFileResult = await readFileAsync(this.configPath);
if (readFileResult.result === "success") {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3f00e09

Please sign in to comment.