joelpob / betfairng Goto Github PK
View Code? Open in Web Editor NEWC# API for Betfair API-NG
License: MIT License
C# API for Betfair API-NG
License: MIT License
Before I go and download OSX equivalents and step back in to the world of .NET, does mono support any of the new fancy stuff you're using?
I've rewritten the AuthClient class to work with .net core but run into an issue with the cert, the problem I have is I'm seeing a betfair response of CERT_AUTH_REQUIRED
I'm newish to c#/ .net core so any help would be appreciated, and once working i'll post the code here
thanks
Mark
I was using the BetTargetType/BetTargetSize way of using placeOrders and it was throwing an exception everytime I made the call. Turns out it's because Size shouldn't be featured in the JSON. So I made Size nullable and the problem went away. This isn't an issue when using placeOrders in the regular way becasue Size is obviously needed - but with BetTargetType/Size it isn't.
Hope this helps and thanks for all the work you've put into this.
Geoff Tyrer
Great work on the Library!
When I try do a non-interactive Login with BetfairClient.Login if fails with INVALID_USERNAME_OR_PASSWORD even though they are correct. Looking into this it seems the code for generating the post data does not correctly format the details as a URL formatted string. My password has several nonstandard characters in it which seem to be misinterpreted during login.
I replaced the following code:
string postData = string.Format("username={0}&password={1}", username, password);
with:
NameValueCollection outgoingQueryString = HttpUtility.ParseQueryString(String.Empty);
outgoingQueryString.Add("username", username);
outgoingQueryString.Add("password", password);
string postData = outgoingQueryString.ToString();
Which rectifies the problem and logs in successfully. There may be more succinct ways of achieving this but this worked for me.
Cheers.
Hi. Just downloaded the zip and extracted. Getting a ton of messages like:
Error CS2001 Source file 'C:\Repeat\betfairng-master\stream-api-sample-code\csharp\Betfair.ESAClient\Betfair.ESASwagger\Betfair\ESASwagger\Model\AllRequestTypesExample.cs' could not be found. Betfair.ESASwagger C:\Repeat\betfairng-master\CSC 1 Active
Have searched for AllRequestTypesExample.cs but cannot find the file.
Thanks
Mark.
Hi,
I just made a stack overflow post about this... https://stackoverflow.com/questions/25341330/concurrent-web-request-working-in-unit-test-but-timing-out-when-run-from-a-form
Any help is greatly appreciated.
Hi, I am trying to place bets using my live key and using PlaceOrders function of NG-API library which always returns null. And if I check account, the orders are not even placed.
I need help to make this working.
var res = BetfairClient.PlaceOrders(marketBook.MarketId, instructions).Result.Response;
Where "res" is always null.
Here is a screenshot of the errors:
This is how I build my PlaceInstructions:
This is how I try to execute PlaceOrders:
Debug screens with info generated withing Order Placement Instructions:
Would you please guide me what is require to place bets successfully using PlaceOrders function/api?
I don't understand how i can achieve the ListEvents like in the demo in https://developer.betfair.com/exchange-api/betting-api-demo/.
ListEvents and ListEventTypes return the same thing but in a different form. And they are a list of EventResult and respectively EventTypeResult. I don't really understand how to modify/make an existing method to return a list of Event type.
I
Hi.
ListEvents method in BetfairClient.cs wrongly refers to LIST_EVENT_TYPES_METHOD.
Thanks for your great work!
I'm sure I am doing something wrong here.
I've built the library and created a small program that logs on using the interactive route (as opposed to using the certificate). The login works fine and I get the necessary session id.
I then call TestAPI.Test() but the program then just sits there doing nothing.
I can trace the code going in to ListCurrencyRates and back out again, but then it just sits there waiting for a return in the main Test routine. Specifically it just sits at the line:
var currencyRates = client.ListCurrencyRates("GBP").Result;
I have checked that the request is actually being sent to the API and that a response is being sent back, but the response never seems to make it back to the main program.
What am I doing wrong?
I occasionally get an exception on
var book = client.ListMarketBook(markets.Keys.ToList(), this.priceProjection).Result;
in MarketListener.cs
What would be the best way to handle this exception as it currently crashes the program
Hi, the change of URL in the commit above does the opposite for me, it breaks login but changing it back works fine.
Hello,
first at all i want to thank you for nice Betfair library.
I started trying your code in C# in MS Visual Studio 2013. When i try to build solution i get upcoming errors. I do not know (because i am newbie in C#] if these errors are by some wrong setting in Visual studio or it's misspellings or something else. Thank you for advice.
In case 1) and 2) i removed char ? and syntax is fine
In case 3) i removed char > and syntax is fine
Is my corrections right, or i do some other mistake, which causes these errors?
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.