| Free £25 Bet! | Free £25 Bet! |

In association with Sports-Punter Free Bets Odds Comparison BetHelp Limso
We are the Official Forum of FreeBetting.net & FCBet.com
| Sports News | Sports Stats | Live Scores | OddsChecker | Place Bets | Suggest a Site |
| |||||||
| Punters Tools & General Betting Help Forum Everyone has tools that use to help them bet. Match reports, odds comparison services, tipster services, betting calculators, selection software - discuss them here. |
![]() |
| | Thread Tools | Display Modes |
| | #21 (permalink) |
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| Here is the xml as it is sent (token not real), without the VB6 Quote handling stuff i have to use : HTML Code: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><logout xmlns="https://api.betfair.com/global/v3/BFGlobalService"><request><header><clientStamp>0</clientStamp><sessionToken>0123456789</sessionToken></header></request></logout></soap:Body></soap:Envelope> |
| | |
| | #22 (permalink) |
| Junior Punter ![]() Join Date: 28 Oct 2004
Posts: 58
| To me it doesn't look in any way like a proper response to the Logout call (even a wrong one). The only thing I suggest is... set http header SOAPAction to https://api.betfair.com/global/v3/BF...Service/Logout and send http post request to https://api.betfair.com/global/v3/BFGlobalService I think yours is different to this but I've just had a quick look. |
| | |
| | #23 (permalink) | ||
| Junior Punter ![]() Join Date: 28 Oct 2004
Posts: 58
| Sorry, do you have the API6 reference guide? http://bdphelp.betfair.com/API6/6.0/...tml/wwhelp.htm Look at
you seem to be using an old old one with https://api.betfair.com/betex-api-public-ws/BFService I'm slightly confused as you've said Login & GetMarketPricesCompressed is working for you so I'd've thought they might not work too if you're POSTing to an old URL. | ||
| | |
| | #24 (permalink) |
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| That did it mate ![]() It was the MakeSOAPRequest "POST" function that was wrong. changed it from : HTML Code: oHTTP.open "POST", "https://api.betfair.com/betex-api-public-ws/BFService", False HTML Code: oHTTP.open "POST", "https://api.betfair.com/global/v3/BFGlobalService", False and was logged out OK ![]() Return was : HTML Code: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/global/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><n:logoutResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFGlobalService/"><n:Result xsi:type="n2:LogoutResp"><header xsi:type="n2:APIResponseHeader"><errorCode xsi:type="n2:APIErrorEnum">OK</errorCode><minorErrorCode xsi:nil="1"></minorErrorCode><sessionToken xsi:nil="1"></sessionToken><timestamp xsi:type="xsd:dateTime">2008-05-17T10:27:39.169Z</timestamp></header><minorErrorCode xsi:nil="1"></minorErrorCode><errorCode xsi:type="n2:LogoutErrorEnum">OK</errorCode></n:Result></n:logoutResponse></soap:Body></soap:Envelope> So do we need to change the "POST" url address for different API requests then ? Or will that one now cover getting the horse racing market, getting the pricescompressed and placing the bet ? Thanks again mate ![]() |
| | |
| | #25 (permalink) | |||
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| Quote:
Yes both login and pricecompressed working fine, updating fine in-running using that old address . Iam using Betfair Sports Exchange API 5.5 Reference Guide.chm | |||
| | |
| | #26 (permalink) | |||||||||||
| Junior Punter ![]() Join Date: 28 Oct 2004
Posts: 58
| Quote:
| |||||||||||
| | |
| | #27 (permalink) |
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| Thanks, just reading The Connection End-point URLs for the API Services part now. So its a simple update to make two MakeSOAPRequest functions, one for Global and one for Exchange url's. Cheers ![]() |
| | |
| | #28 (permalink) |
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| Ok that was a quick change, all ok now using 2 functions for the 2 url's ![]() I wonder if the old url i was using has an advantage being that everyone else will be using the proper url that is documented ? Its something i will keep in mind if there are problems using the proper url ! |
| | |
| | #29 (permalink) |
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| Does this look like a working placeBet call ? Nice Wee Girl - Newb 17th May - 16:30 7f Hcap £2.00 BACK to Win @ 8.0 HTML Code: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <placeBets xmlns="https://api.betfair.com/exchange/v3/BFExchangeService"> <request> <header xmlns=""> <clientStamp>0</clientStamp> <sessionToken>0123456789</sessionToken> </header> <bets xmlns=""> <PlaceBets xmlns="http://www.betfair.com/publicapi/types/exchange/v3/"> <asianLineId xmlns="">0</asianLineId> <betType xmlns="">B</betType> <marketId xmlns="">21008758</marketId> <price xmlns="">8.0</price> <selectionId xmlns="">2481355</selectionId> <size xmlns="">2</size> </PlaceBets> </bets> </request> </placeBets> </soap:Body> </soap:Envelope> |
| | |
| | #31 (permalink) |
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| Day 4 i think, and i learn a bit more ![]() If you right click the Sports API 6 (UK Exchange Services) WSDL link on the Free Access API developers page and Save As.... You end up with a file called BFExchangeService.xml Open this in Iexplorer and you get to see all correct format to send the XML in, and also see the responses you can expect to get back. Ive been using the API 5.5 help file, which doesn't have the placeBet format as the API 6 below. HTML Code: - <xsd:complexType name="PlaceBets"> - <xsd:sequence> <xsd:element name="asianLineId" nillable="false" type="xsd:int" /> <xsd:element name="betType" type="types:BetTypeEnum" /> <xsd:element name="betCategoryType" type="types:BetCategoryTypeEnum" /> <xsd:element name="betPersistenceType" type="types:BetPersistenceTypeEnum" /> <xsd:element name="marketId" nillable="false" type="xsd:int" /> <xsd:element name="price" nillable="false" type="xsd:double" /> <xsd:element name="selectionId" nillable="false" type="xsd:int" /> <xsd:element name="size" nillable="true" type="xsd:double" /> <xsd:element name="bspLiability" nillable="true" type="xsd:double" /> </xsd:sequence> </xsd:complexType> |
| | |
| | #32 (permalink) |
| Legendary Punter ![]() ![]() ![]() ![]() ![]() ![]() Join Date: 17 Oct 2006
Posts: 1,556
| Thanks for all the help on this thread, iam up and running now, did my first trades last night ![]() I thought i would post the placeBet xml string i successfully used, just in case anyone has found their way to this thread via google etc ![]() Its the same string for the Lay bet, you just change the betType xmlns part from a B to an L and make sure the bspLiability xmls covers the LAY Liability amount. placeBet: HTML Code: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <placeBets xmlns="https://api.betfair.com/exchange/v3/BFExchangeService"> <request> <header xmlns=""> <clientStamp>0</clientStamp> <sessionToken>01234567890=</sessionToken> </header> <bets xmlns=""> <PlaceBets xmlns="http://www.betfair.com/publicapi/types/exchange/v3/"> <asianLineId xmlns="">0</asianLineId> <betCategoryType xmlns="">E</betCategoryType> <betPersistenceType xmlns="">IP</betPersistenceType> <betType xmlns="">B</betType> <bspLiability xmls="">2.00</bspLiability> <marketId xmlns="">99999999</marketId> <price xmlns="">3.3</price> <selectionId xmlns="">99999</selectionId> <size xmlns="">2.00</size> </PlaceBets> </bets> </request> </placeBets> </soap:Body> </soap:Envelope> The Return xml from the server: ( iam not sure why the success xsi:type part came through split by a CrLf, but i will have that covered by stripping out invalid characters like that ) HTML Code: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://www.betfair.com/publicapi/types/exchange/v3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <n:placeBetsResponse xmlns:n="http://www.betfair.com/publicapi/v3/BFExchangeService/"> <n:Result xsi:type="n2:PlaceBetsResp"> <header xsi:type="n2:APIResponseHeader"> <errorCode xsi:type="n2:APIErrorEnum">OK</errorCode> <minorErrorCode xsi:nil="1"/> <sessionToken xsi:type="xsd:string">0123456789=</sessionToken> <timestamp xsi:type="xsd:dateTime">2008-05-19T18:10:33.153Z</timestamp> </header> <betResults xsi:type="n2:ArrayOfPlaceBetsResult"> <n2:PlaceBetsResult xsi:type="n2:PlaceBetsResult"> <averagePriceMatched xsi:type="xsd:double">3.3</averagePriceMatched> <betId xsi:type="xsd:long">999999999</betId> <resultCode xsi:type="n2:PlaceBetsResultEnum">OK</resultCode> <sizeMatched xsi:type="xsd:double">2.0</sizeMatched> <success xsi:type="xsd:boolean">tru e</success> </n2:PlaceBetsResult> </betResults> <errorCode xsi:type="n2:PlaceBetsErrorEnum">OK</errorCode> <minorErrorCode xsi:nil="1"/> </n:Result> </n:placeBetsResponse> </soap:Body> </soap:Envelope> ![]() |
| | |
| | #33 (permalink) |
| Junior Punter ![]() Join Date: 28 Oct 2004
Posts: 58
| Maybe you can help me. Let me ask you the question without poisoning your mind with what I am doing wrong. How would you set up a single PlaceBets call so that you requested a normal lay; then have any unmatched portion (or all if none at all was matched) become a BSP (Betfair Starting Price) lay at off time. |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| Free £100 Bet! | Free £100 Bet! |
| Partner Sites | ||||||||
| Football Betting Tips | Free Bets | Australian Free Bets HOT | Odds Comparison | Soccer Punter |
| Bookmakers | Livescore | SoccerVista | Asian Handicap Betting Guide |
© 2008 PuntersLounge.Com Ltd | Gambling Problems?
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.