betfair-api-ts
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Betfair exchange API

Wrapper around Betfair exchange API with TypeScript type definitions and a simple API for interacting with endpoints.

🔐 Authentication

When consuming this library you will need to call the authenticate method. This method requires all information to authenticate your account and then sets auth headers on all API wrappers.

You will need the following information to authenticate the API

import { authenticate } from 'betfair-api-ts';

const main = async() => {
  await authenticate({
    username: '',             //Betfair Username
    password: '',             // Betfair password
    appKey: '',               // Betfair Application Key
    certificate: '',          // Self Signed Certificate
    certificateKey: '',       // Self Signed Certificate Key
    certificatePassword: '',  // Optional passphrase for Certificate Key
  })
  
  // You are now free to interact with the API and all requests will be authenticated automatically.
}

Note: Current version does not support refreshing authentication tokens. This will need to be handled manually.

Package Sidebar

Install

npm i betfair-api-ts

Weekly Downloads

0

Version

0.1.2

License

ISC

Unpacked Size

127 kB

Total Files

11

Last publish

Collaborators

  • mtimbs