Hi,
I am having trouble understanding how the placeOrders request works with the new API-NG, I am getting a response of 'SUCCESS' when placing the order, however the priceMatched is being returned as 0.0 so the bet is actually never being placed.
Here's an example of my placeOrders request
and here's the response from the server:
I am confused, because this doesn't happen with every request and I am using the same request string with two different accounts, each time one account has matched the price asked, while the other fails. This leads me to believe there isn't a problem with my request JSON.
I am aware that in this response the persistenceType is set to LAPSE and the placedDate is 12:25:01 (one second later than the race is due to begin), however from my experience, races never begin the second they are due to.
I am having trouble understanding how the placeOrders request works with the new API-NG, I am getting a response of 'SUCCESS' when placing the order, however the priceMatched is being returned as 0.0 so the bet is actually never being placed.
Here's an example of my placeOrders request
Code:
{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/placeOrders", "params": { "marketId": "123456", "instructions": [{ "selectionId": 123456, "side": "LAY", "orderType": "LIMIT", "limitOrder": { "size": "2.00", "price": "3.00", "persistenceType":"LAPSE" } }] }, "id": 1 }
and here's the response from the server:
Code:
{ "jsonrpc": "2.0", "result": { "status": "SUCCESS", "instructionReports": [ { "status": "SUCCESS", [B]"sizeMatched": 0.0, [/B] "betId": "123456", "instruction": { "orderType": "LIMIT", "selectionId": 123456, "limitOrder": { "price": 2.00, "persistenceType": "LAPSE", "size": 3.00 }, "side": "LAY" }, "placedDate": "2014-12-20T12:25:01.000Z", [B]"averagePriceMatched": 0.0[/B] } ], "marketId": "123456" }, "id": 1 }
I am aware that in this response the persistenceType is set to LAPSE and the placedDate is 12:25:01 (one second later than the race is due to begin), however from my experience, races never begin the second they are due to.
Comment