betfairy
v0.0.1
Published
Betfair JSON API-NG for node.js
Downloads
8
Maintainers
Readme
Betfair JSON API for node.js
Install
$ npm install --save betfairy
Usage
var bf = require('betfairy')(APPLICATION_KEY, USERNAME, PASSWORD, DEBUG);
bf.login(function() {
bf.account('getAccountFunds', function(err, res) {
console.log(res);
});
bf.account('getAccountDetails', function(err, res) {
console.log(res);
});
bf.betting('listMarketCatalogue', {
maxResults: 20,
marketProjection: [
'COMPETITION',
'EVENT',
'EVENT_TYPE',
'MARKET_START_TIME',
'MARKET_DESCRIPTION',
'RUNNER_DESCRIPTION',
'RUNNER_METADATA'
],
filter: {
eventTypeIds: [
'7'
],
marketCountries: [
'GB'
],
marketStartTime: {
from: new Date()
},
marketTypeCodes: [
'PLACE',
'WIN'
],
turnInPlayEnabled: true
}
}, function(err, res) {
console.log(res);
});
setInterval(function() {
bf.keepAlive();
}, 420000);
});
License
MIT © Ray Gerrard