phillc73 / abettor

An R package for connecting to the online betting exchange Betfair, via their API-NG product, using JSON-RPC.
Other
51 stars 36 forks source link

Expectation Failed #17

Closed socratix closed 7 years ago

socratix commented 7 years ago

Hi, I am sometimes getting an 'Expectation Failed' error when I try to submit bets using the placeOrder function. Is this a known issue? Is it to do with this? https://forum.bdp.betfair.com/showthread.php?t=2901

Is there any known way to prevent this error when using abettor?

Many thanks. Chris

socratix commented 7 years ago

Follow-up. This is specifically what I get:

selectionPlace [1] "9438229" "10086349" "10277122" "10364717" "11079154" "11302725" MarketId [1] "1.128038083" betsidePlace [1] "BACK" "BACK" "BACK" "BACK" "BACK" "BACK" betSizePlace [1] 2 2 2 2 2 2 reqPricePlace [1] 10.00 4.40 120.00 1.95 4.90 120.00 PlaceBetReturn <- placeOrders(marketId = MarketId,

  • selectionId = selectionPlace,
  • betSide = betsidePlace,
  • betType = "LIMIT",
  • betSize = betSizePlace,
  • reqPrice = reqPricePlace,
  • persistenceType = "LAPSE"
  • )
    Error: Expectation Failed
phillc73 commented 7 years ago

Not seen or had this reported before. Will investigate and see what might be the problem.

Initially, I am wondering if pushing through six instructions in the one call could be the cause. Would you mind trying with just backing one selection first, then increasing until you hit the error?

socratix commented 7 years ago

I've done that, and found that I can indeed submit one by one, as long as I don't duplicate customer references in the call. Thanks!

socratix commented 7 years ago

To clarify: I have not increased the number of bets incrementally. I have just split into 6 separate calls. This is an acceptable workaround.

phillc73 commented 7 years ago

OK, thanks. I'm going to close this issue. If it becomes a show stopper for someone, I will re-open and address.

I appreciate you taking the time to report it and glad you're using abettor.