/betfair-nodejs-api

Betfair NodeJS REST API

Primary LanguageJavaScript

betfair-nodejs-api

A REST API for the Betfair API-NG library created by AlgoTrader for node.js.

installation

$ npm install

App Key

Follow these instructions to get your app key, you can either use a delayed or live key. Add it as an environmental variable.

Usage

The API can be tested with Postman or Curl. You need hit the login endpoint before you are able to access the other ones.

Login First

curl -X POST -H "Content-Type: application/json" \
    -d '{ "user": "user_here", "password": "password_here" }' \
    http://localhost:3000/api/login

Account Details

curl http://localhost:3000/api/get-account-details

Place an order

curl -X POST -H "Content-Type: application/json" \
    -d '{ "marketId": "1.176329443", "selectionId": "489720", "side": "BACK", "size": "2", "price": "2.02" }' \
    http://localhost:3000/api/place-order