Betfair Exchange API : Programming/Coding on Betfair

Post Reply
LinusP
Posts: 1740
Joined: Mon Jul 02, 2012 10:45 pm
Contact:

Fri Nov 29, 2019 11:45 am

PeterLe wrote:
Thu Nov 28, 2019 4:36 pm
Just though id post an update in case anyone is thinking of having a go at this in the future..
I decided to pause the Udemy Course and jump straight into the API, the reason was as the course is so long, I was forgetting the stuff I had learned at the beginning! My thought process was that if you were learning Excel for instance, you wouldn't try and learn each command, you'd just start to create a spreadsheet and learn what you need as you go along (not sure if that is a good thing, but we'll see)
First off, as a very inexperienced programmer, Ive found Python easier than C# (Within the context of connecting to the Betfair API)
Mainly due to the code shared by Liam (BetfairLightweighWrapper). The code is well commented so you can see what the various lines of code do.
However, the best way of describing the information available to you, it is like a mixed up jigsaw. All the pieces are there in github, but you have to work out what pieces you need, if you need to modify those pieces (ie certificates, Keys) and then how you assemble in the right order.
After a couple of hours and quite a few failures), I've managed to login to the API and extract the data for a race tonight, cant help but feel like a major triumph! I think the syndicates and teams out there wont be quaking in their boot just yet :D
Overall, really enjoying the new learning and hopefully I will look back at this post in a couple of years and realise how green I was!
Regards
Peter
Edit: By the way, I decided to drop SublimeText in favour of Pycharm
You can't beat the excitement of getting something to work with Betfair for the first time, it can be so satisfying working with API's and piecing everything together :)

Great to see so many of you starting out and joining the slack group!

User avatar
CallumPerry
Posts: 497
Joined: Wed Apr 19, 2017 5:12 pm
Location: Wolverhampton

Fri Nov 29, 2019 12:50 pm

Could be posted here or Black Friday thread, today only.

https://www.amazon.co.uk/Coding-Beginne ... Q05KMEMTHB

spreadbetting
Posts: 2941
Joined: Sun Jan 31, 2010 8:06 pm

Fri Nov 29, 2019 1:45 pm

Nero Tulip wrote:
Fri Nov 29, 2019 11:09 am
Right, that's it. I'm joining in. I've wanted to learn this for myself for a long time. I'm also on Liam's slack, but for now, I'm going to tentatively step into the udemy course (now £9.99 !!). I think learning the syntax of the code could be the easier (still hard) part of the job for me, but what I don't yet understand at all currently is piecing together the infrastructure.. pycharm, git and so on, feels like I need someone to hold my hand while I begin to learn to walk, after that it'll be tough but more enjoyable getting involved in the code.

Any support or pointers along the way greatly appreciated, I'll probably need it !
The course covers the infrastructure side also so no need to worry about that, it's no more than installing python and a text editor that highlights syntax and errors.

If you've never coded before the syntax shouldn't be too hard to grasp, Python seems a lot better structured than the languages I've tinkered with in the past so knowing zilch could be a bonus as I'm having to forget syntax I know as they conflict somewhat or have different names.

PeterLe
Posts: 3580
Joined: Wed Apr 15, 2009 3:19 pm

Fri Nov 29, 2019 2:03 pm

...Just to add...
When you install Python, the BetfairLightweight wrapper is only certified up to and incl 3.7
Regards
Peter

spreadbetting
Posts: 2941
Joined: Sun Jan 31, 2010 8:06 pm

Fri Nov 29, 2019 2:24 pm

PeterLe wrote:
Fri Nov 29, 2019 2:03 pm
...Just to add...
When you install Python, the BetfairLightweight wrapper is only certified up to and incl 3.7
Regards
Peter
Current python is 3.8, what do you mean by certified,Peter? That it's only been tested on up to 3.7 or it'll only run on 3.7 and below? Can't imagine anything drastic would have been introduced between 3.7 to date.

LinusP
Posts: 1740
Joined: Mon Jul 02, 2012 10:45 pm
Contact:

Fri Nov 29, 2019 2:34 pm

spreadbetting wrote:
Fri Nov 29, 2019 2:24 pm
PeterLe wrote:
Fri Nov 29, 2019 2:03 pm
...Just to add...
When you install Python, the BetfairLightweight wrapper is only certified up to and incl 3.7
Regards
Peter
Current python is 3.8, what do you mean by certified,Peter? That it's only been tested on up to 3.7 or it'll only run on 3.7 and below? Can't imagine anything drastic would have been introduced between 3.7 to date.
Currently only tested up to 3.7, 3.8 should be fine but I haven't tested yet (working on v2.0)

https://travis-ci.org/liampauling/betfair
https://travis-ci.org/liampauling/betfa ... /600776505

PeterLe
Posts: 3580
Joined: Wed Apr 15, 2009 3:19 pm

Fri Nov 29, 2019 2:43 pm

Sorry SB, I intended to say Tested rather than certified; Thanks for clarifying Liam

spreadbetting
Posts: 2941
Joined: Sun Jan 31, 2010 8:06 pm

Fri Nov 29, 2019 3:12 pm

Thanks.

spreadbetting
Posts: 2941
Joined: Sun Jan 31, 2010 8:06 pm

Tue Dec 17, 2019 4:26 pm

Haven't had much time, or more likely inclination, to get much further with the python course, about 45% done. But I have just written a script to log into the interactive API and get a session key returned :o

Now able to pull down the markets, just have to figure out how to order the json data within python now into some kind of order I can visualise it as I'm so used to std class multidimensional arrays from php

PeterLe
Posts: 3580
Joined: Wed Apr 15, 2009 3:19 pm

Tue Dec 17, 2019 8:09 pm

Nice one! You're further ahead than me; just maxed with my day job 12 hour days at the mo...will be clear by end of jan...
Have you joined the Slack group? There's lot of people willing to help on there if you get stuck..
Im making progress in the right direction; The problem I have is one of frustration, I have some very good ideas and cant implement them (yet!) but Ill get there.

Also, Ive just posted in the good book thread..about the book "the man who solved the markets" I thought of you, xitan and Liam to name a few who would really enjoy this book...
Regards
Peter

Post Reply

Return to “Betfair Exchange API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest