Programming/Coding on Betfair

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

spreadbetting wrote:
Tue Nov 19, 2019 12:47 pm
Have you done/doing that course, Peter? .....[/quote]
Hi SB,
I'm probably about half way through the 30 hour course..
I'm just doing an hour or so each morning (as that's the best time for me in terms of learning)
I'm not sure why, but Ive found this easier to learn than C#? It just seems more logical to me.

Yes you can go back over the lessons as and when you want. In fact, I think Ill use it more of a reference in the future, so if i get stuck on how to do something in the code, I can just go back to that section. Im off to London Thursday/Friday, so Ill offline the course and do a few hours on the train.
It also helps when you have an idea as to what you want to do in the future...ie as an example , reading in the tick data from the API to store in a DB, I can see how the list function/method will be useful. (maybe there will be a better way, but I haven't got that far yet! :D

I cant wait to have a go with Liam's programs.
Just one question I wanted to ask please (to anyone): Are there any issues to creating the program on my mac and then subsequently using it on my PC ?
Still very much a beginner, but enjoying it the new experience
Regards
Peter

PS SB - Dont forget to join the slack community I can see how it will be a great help in the future (by the way Liam, what about having a 'Beginners' Channel within the slack app?)
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

There are slight nuances with python depending on os especially when you get closer to the metal but when you start it’s likely to be just directories that may cause issues, os.path is your friend here. Running your program in containers (docker) can prevent this but can make things fiddly, basically don’t worry about it as the program will tell you when something is wrong.

A few on the slack group are looking to do another meetup (pub :D ) if anyone here is keen?
User avatar
ruthlessimon
Posts: 2094
Joined: Wed Mar 23, 2016 3:54 pm

SweetLyrics wrote:
Mon Nov 18, 2019 10:52 pm
Maybe I can add some input here, having started a software development MSc conversion course a couple of months ago.
I have to say, it shows insane dedication taking such a step - fair play :)
SweetLyrics
Posts: 207
Joined: Sat Jun 16, 2018 7:57 pm

Thank you.

It might seem risky - a year of my life and a whole lot of money - but the realistic alternative (monotonous jobs like call centre work for years to come) is a whole lot scarier. :)
ruthlessimon wrote:
Tue Nov 19, 2019 8:13 pm
SweetLyrics wrote:
Mon Nov 18, 2019 10:52 pm
Maybe I can add some input here, having started a software development MSc conversion course a couple of months ago.
I have to say, it shows insane dedication taking such a step - fair play :)
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 pm

PeterLe wrote:
Tue Nov 19, 2019 7:02 pm
spreadbetting wrote:
Tue Nov 19, 2019 12:47 pm
Have you done/doing that course, Peter? .....
Hi SB,
I'm probably about half way through the 30 hour course..
I'm just doing an hour or so each morning (as that's the best time for me in terms of learning)
I'm not sure why, but Ive found this easier to learn than C#? It just seems more logical to me.

Yes you can go back over the lessons as and when you want. In fact, I think Ill use it more of a reference in the future, so if i get stuck on how to do something in the code, I can just go back to that section. Im off to London Thursday/Friday, so Ill offline the course and do a few hours on the train.
It also helps when you have an idea as to what you want to do in the future...ie as an example , reading in the tick data from the API to store in a DB, I can see how the list function/method will be useful. (maybe there will be a better way, but I haven't got that far yet! :D

I cant wait to have a go with Liam's programs.
Just one question I wanted to ask please (to anyone): Are there any issues to creating the program on my mac and then subsequently using it on my PC ?
Still very much a beginner, but enjoying it the new experience
Regards
Peter

PS SB - Dont forget to join the slack community I can see how it will be a great help in the future (by the way Liam, what about having a 'Beginners' Channel within the slack app?)
[/quote]


Thanks , Peter.

Reckon an hour or so a day is the way forward. Much better to try and structure the learning than cram it in and get bored and give up like I usually do when I've thought about switching my bots to a new code in the past. Wasn't aware I could download lessons offline, that'll come in handy for when I have to travel on the train even if only going back over old things
PeterLe
Posts: 3715
Joined: Wed Apr 15, 2009 3:19 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 do not have the required permissions to view the files attached to this post.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

PeterLe wrote:
Thu Nov 28, 2019 4:36 pm
I've managed to login to the API and extract the data for a race tonight
Nice one. That's a reason to get the bunting out. When you first do that you really feel you're on the way.
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 pm

I've held off jumping into Liam's code til I'm a bit further into the course. Probably done about 1/3rd of the course and just about to start the debugging section. It's surprising how little time I have to spare :) After a day's trading can't really be bothered to do more than an hour or so watching python videos.

Previously I've just edited snippets of other people's code to get up and running, so hoping to see if I can learn python properly rather than simply knowing changing this word does this without knowing why. Finding python's actually very well structured compared to the other codes I've used, bit of a pain when everything you know has a new name Std Class arrays are now dictionaries etc but the course has pulled together alot of reasons of why things I've previously done actually work.

Good to see you're now able to pull race data , Peter, once you get your bet placement, cancellation and current orders routines in place I imagine things will move along quite quickly. I think as soon as you get to the stage where you can keep all race data and bet data into memory the actual manipulation side of things isn't particularily hard as few of us use, or have, any really clever or complicated strategies.

What are the benefits of Pycharm? I went with sublime on your recommendation and obviously a big step up from notepad. I use it if I need to edit my php stuff to and just having the line number displayed makes me wonder how I ever managed to edit my php scripts with only notepad for years :)
PeterLe
Posts: 3715
Joined: Wed Apr 15, 2009 3:19 pm

spreadbetting wrote:
Thu Nov 28, 2019 6:16 pm

Good to see you're now able to pull race data , Peter, once you get your bet placement, cancellation and current orders routines in place I imagine things will move along quite quickly. I think as soon as you get to the stage where you can keep all race data and bet data into memory the actual manipulation side of things isn't particularily hard as few of us use, or have, any really clever or complicated strategies.

What are the benefits of Pycharm? I

Cheers Shaun :D

Morning SB,
When I read that first paragraph above; I had the same look on my face as when I was 17 and the cylinder head gasket blew on my car...My brother in law said "Lets whip the cylinder head off and have it skimmed and the replace the gasket"..It was a look of disbelief that he could even contemplate such a complex task! Anyway we did it and from that day, I did all the repairs on my car myself until I got a company car, so nothings impossible :D (Anyone from the same era as me will remember the Haynes manuals and taking their cars apart :D )

Pycharm - I read through the Slack postings and that name seemed to come up a few times as the best editor (i downloaded the free community version). Im sure Sublimetext would cover 101% of anything Im capable of doing at present so I would stick to what you know for now SB

Regards
Peter
Nero Tulip
Posts: 686
Joined: Wed Apr 15, 2009 5:29 pm

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 !
LinusP
Posts: 1871
Joined: Mon Jul 02, 2012 10:45 pm

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!
CallumPerry
Posts: 575
Joined: Wed Apr 19, 2017 5:12 pm
Location: Wolverhampton

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

https://www.amazon.co.uk/Coding-Beginne ... Q05KMEMTHB
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 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: 3715
Joined: Wed Apr 15, 2009 3:19 pm

...Just to add...
When you install Python, the BetfairLightweight wrapper is only certified up to and incl 3.7
Regards
Peter
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 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.
Post Reply

Return to “Betfair Exchange API”