@ayinla/betfair

Betfair api wrapper

Usage no npm install needed!

<script type="module">
  import ayinlaBetfair from 'https://cdn.skypack.dev/@ayinla/betfair';
</script>

README

Betfair · Build Status

Promise based betfair api wrapper

Documentation.

installation

$ npm install @ayinla/betfair

setup

Add your api key, username and password to environment variables

export apiKey="appkey"
export username="human"
export password="enthusiast"

The library can then be used as follows:

>>> import  { login , listEventTypes} from '@ayinla/betfair' 

>>> const { apiKey, username, password } = process.env;

>>> const { token } = await login(apiKey)({ username, password})

>>> const eventTypes = listEventTypes(API_KEY, token)({filter: {}})