Extendible, customizable real-time arbitrage scanning and placing software
import { H2HArber } from '@arbers';
import { Betfair, Bookmaker } from '@bookies';
import { money } from '@money/currencies';
// Make instances
const [betfair, bookmaker] = await Promise.all([
Betfair.instance({ headless: false }, money.USD),
Bookmaker.instance({ headless: false }, money.USD),
]);
// Login if needed
await Promise.all([
betfair.login({ user: 'yourUser', password: 'yourPassword' }),
]);
// Set quantity to invest per opportunity
const investment = { amount: 200, currency: money.USD };
// Create retrievers
const retrievers = [
{
bookie: betfair,
retriever: () => betfair.repo().live.tennis.h2h({ include: ['back'] }),
},
{
bookie: bookmaker,
retriever: () => bookmaker.repo().live.tennis.h2h(),
},
];
// Start predefined arber (ML / Head 2 Head markets)
const tennisArber = new H2HArber(retrievers, investment);
tennisArber.start();
// Listen to close event
tennisArber.closed.pipe(take(1)).subscribe(() => {
process.exit(0);
});
After this the arber will start to search for opportunities given by the retrievers. It uses fuzzy string matching fuzzball.js to match the same event/asset across bookies
For example:
The following features are included in the project
Feature | Status |
---|---|
Retriever agnostic | Retrievers can be websockets, api calls, selenium, playwright, puppeteer, etc. Just implement common interface |
Multiple sources/bookies | Arber can run multiple tough sources/bookies at the same time and place the bets accordingly |
Customizable arber | Custom strategies supported. See base arber to implement. Examples for h2h arber (tennis, mma) or 1x2 arber (soccer) markets |
Customizable genetic strategy | See available strategies: genetics |
Fiat conversion | See: here for rates. (Right now hardcoded) |
Fuzzy string matching | Fuzzy string to match equal events between sources even when the names dont match exactly |
0815.mov
> npm install
> npm run build