Hi, Im using visual studio 8, using vb.net to access the games api. My app is coming along okay, and the GET side of things is pretty much done. So now I want to place bets and this is where I find myself stumped. The documentation directs me to this part of the schema :
"https://api.games.betfair.com/rest/v1/bet/order?username=sampleuser"
(I have put the quotes around it to prevent it showing up as a link in this post)
and these are the fields im interested in as copied from the documentation again.
<?xml version="1.0" encoding="UTF-8"?>
<postBetOrder xmlns="urn:betfair:games:api:v1"
marketId="2568540" round="1" currency="GBP">
<betPlace>
<bidType>BACK</bidType>
<price>2.5</price>
<size>2.50</size>
<selectionId>658440</selectionId>
</betPlace>
But try as I might I find I cannot place a bet. Below is the response I get.
<?xml-stylesheet type="text/xsl" href="/rest/apiStylesheet.xsl" ?>
<error xmlns="urn:betfair:games:api:v1">
<errorCode>EXCEPTION</errorCode>
<credentialCheck>LOGIN_SUCCESS</credentialCheck>
<userStatus>ACTIVE</userStatus>
<errorDetails>Content is not allowed in prolog.</errorDetails>
</error>
This is all very new to me, and if someone could point out what I am doing wrong, or even better, give me a few lines of rudimentary code that I can then develop for my own uses I would be most grateful. Thanks for all and any help.
"https://api.games.betfair.com/rest/v1/bet/order?username=sampleuser"
(I have put the quotes around it to prevent it showing up as a link in this post)
and these are the fields im interested in as copied from the documentation again.
<?xml version="1.0" encoding="UTF-8"?>
<postBetOrder xmlns="urn:betfair:games:api:v1"
marketId="2568540" round="1" currency="GBP">
<betPlace>
<bidType>BACK</bidType>
<price>2.5</price>
<size>2.50</size>
<selectionId>658440</selectionId>
</betPlace>
But try as I might I find I cannot place a bet. Below is the response I get.
<?xml-stylesheet type="text/xsl" href="/rest/apiStylesheet.xsl" ?>
<error xmlns="urn:betfair:games:api:v1">
<errorCode>EXCEPTION</errorCode>
<credentialCheck>LOGIN_SUCCESS</credentialCheck>
<userStatus>ACTIVE</userStatus>
<errorDetails>Content is not allowed in prolog.</errorDetails>
</error>
This is all very new to me, and if someone could point out what I am doing wrong, or even better, give me a few lines of rudimentary code that I can then develop for my own uses I would be most grateful. Thanks for all and any help.


Comment