I've just written a test application using the c# example code as a foundation. It works just as I hoped it would except it takes many seconds for all api calls. (The stuff below may not make sense to you if you're not familiar with the c# example code.)
It takes approximately 1.5 - 2.2 seconds before I get a marketBook back from:
var marketBook = client.listMarketBook(marketIDs, priceProjection)
When I ask for data from another bigger market with many more selections, and my own position in that market it takes 11 to 12 seconds before I get my marketBook.
marketBook = client.listMarketBook(marketIDs, priceProjection, orderProjection, matchProjection)
Placing 20 bets on that market takes about 1.5 seconds
placeExecutionReport = client.placeOrders(marketID, customerRef, placeInstructions)
I've noticed this disclaimer: "Please Note: In order to aide ease of understanding, the basic Betfair samples are not intended to show certain best practices for speed and throughput. Well designed applications should follow the best practices for client design of the application/language platform and should optimise on an HTTP request level with features such as requesting gzip'd responses and http connection keep alives."
Even so up to 12 seconds seems a bit much. A series of calls that for me take just a bit more than 1 second with API6 take more than 15 seconds with API NG
. Anyone with more programming knowledge than myself (probably most people reading this
) care to guess why my calls take so long? How would you go about troubleshooting this? Any tips about where I can learn more about "best practices for speed and throughput" would also be appreciated.
It takes approximately 1.5 - 2.2 seconds before I get a marketBook back from:
var marketBook = client.listMarketBook(marketIDs, priceProjection)
When I ask for data from another bigger market with many more selections, and my own position in that market it takes 11 to 12 seconds before I get my marketBook.
marketBook = client.listMarketBook(marketIDs, priceProjection, orderProjection, matchProjection)
Placing 20 bets on that market takes about 1.5 seconds
placeExecutionReport = client.placeOrders(marketID, customerRef, placeInstructions)
I've noticed this disclaimer: "Please Note: In order to aide ease of understanding, the basic Betfair samples are not intended to show certain best practices for speed and throughput. Well designed applications should follow the best practices for client design of the application/language platform and should optimise on an HTTP request level with features such as requesting gzip'd responses and http connection keep alives."
Even so up to 12 seconds seems a bit much. A series of calls that for me take just a bit more than 1 second with API6 take more than 15 seconds with API NG
. Anyone with more programming knowledge than myself (probably most people reading this
) care to guess why my calls take so long? How would you go about troubleshooting this? Any tips about where I can learn more about "best practices for speed and throughput" would also be appreciated.


Comment