UNPKG

betfair-sports-api

Version:

Betfair Sports API for Node

102 lines (81 loc) 3.37 kB
//(C) 2012 Anton Zemlyanov //This module describes Betfair Exchange Service SOAP invocations //see Sports API documentation on http://bdp.betfair.com //The exchange services are those that enable you to place your bets //as conveniently and quickly as possible. They include the services //for viewing betting markets, placing, updating and cancelling bets, //viewing your betting history, and checking your available funds //and account statement. var betfairInvocation = require("./betfair_invocation.js"); var currentService = "uk"; // set current exchange service exports.setCurrentExchange = function(ex) { if (ex !== 'uk' && ex !== 'aus') throw new Error("bad exchange"); currentService = ex; } // getAllMarkets invocation exports.getAllMarkets = function(request) { return betfairInvocation.invocation(currentService, "getAllMarkets", request); } // getMarket invocation exports.getMarket = function(request) { return betfairInvocation.invocation(currentService, "getMarket", request); } // getMarketPricesCompressed invocation exports.getMarketPricesCompressed = function(request) { return betfairInvocation.invocation(currentService, "getMarketPricesCompressed", request); } // getCompleteMarketPricesCompressed invocation exports.getCompleteMarketPricesCompressed = function(request) { return betfairInvocation.invocation(currentService, "getCompleteMarketPricesCompressed", request); } // getCurrentBets invocation exports.getCurrentBets = function(request) { return betfairInvocation.invocation(currentService, "getCurrentBets", request); } // getCurrentBetsLite invocation exports.getCurrentBetsLite = function(request) { return betfairInvocation.invocation(currentService, "getCurrentBetsLite", request); } // getMUBets invocation exports.getMUBets = function(request) { return betfairInvocation.invocation(currentService, "getMUBets", request); } // getMUBetsLite invocation // Secret invocation not described in current API doc exports.getMUBetsLite = function(request) { return betfairInvocation.invocation(currentService, "getMUBetsLite", request); } // getMarketTradedVolume invocation exports.getMarketTradedVolume = function(request) { return betfairInvocation.invocation(currentService, "getMarketTradedVolume", request); } // getMarketTradedVolumeCompressed invocation exports.getMarketTradedVolumeCompressed = function(request) { return betfairInvocation.invocation(currentService, "getMarketTradedVolumeCompressed", request); } // getMarketProfitAndLoss invocation exports.getMarketProfitAndLoss = function(request) { return betfairInvocation .invocation(currentService, "getMarketProfitAndLoss", request); } // placeBets invocation exports.placeBets = function(request) { return betfairInvocation.invocation(currentService, "placeBets", request); } // updateBets invocation exports.updateBets = function(request) { return betfairInvocation.invocation(currentService, "updateBets", request); } // cancelBets invocation exports.cancelBets = function(request) { return betfairInvocation.invocation(currentService, "cancelBets", request); } // getAccountFunds invocation exports.getAccountFunds = function(request) { return betfairInvocation.invocation(currentService, "getAccountFunds", request); }