Capture Betfair Charts

A place to discuss anything.
User avatar
Realrocknrolla
Posts: 1903
Joined: Fri Jun 05, 2020 7:15 pm

No worries. I will.

Check the market is in guardian for it to have a full effect and record all data.
Anbell
Posts: 2049
Joined: Fri Apr 05, 2019 2:31 am

Realrocknrolla wrote:
Sat Apr 03, 2021 9:35 am
No worries. I will.

Check the market is in guardian for it to have a full effect and record all data.
Yeah - I've had it in guardian, looking at the final 5 minutes, but it's not doing what I want/expect it to do
User avatar
Realrocknrolla
Posts: 1903
Joined: Fri Jun 05, 2020 7:15 pm

Anbell wrote:
Sat Apr 03, 2021 9:40 am
Realrocknrolla wrote:
Sat Apr 03, 2021 9:35 am
No worries. I will.

Check the market is in guardian for it to have a full effect and record all data.
Yeah - I've had it in guardian, looking at the final 5 minutes, but it's not doing what I want/expect it to do
Which markets? As in sports?
User avatar
ODPaul82
Posts: 683
Joined: Sun May 08, 2011 6:32 am
Location: Digswell Herts

I put this code together which from inspecting the byte data it does start to download a jpg based image but the file size is larger than if I was to just download the image directly from betfair. At a guess it's because it's not logged into betfair that it doesn't like it.

Feel free to play with it

Code: Select all

Private Const URL_MAIN As String = "https://xtsd.betfair.com/LoadRunnerInfoChartAction/"


' https://xtsd.betfair.com/LoadRunnerInfoChartAction/?marketId=180655630&selectionId=127991
' Paul Arrowsmith
' 03.04.2021
Public Sub gFetchChart(ByVal pstrMarketID As String, _
                       ByVal pstrSelID As String)
    
    Dim strURL As String
    Dim objWs As Excel.Worksheet
    Dim strFile As String
    Dim b As Byte
    Dim lngFileID As Long
    
    Dim xmlRequest As Object
    Set xmlRequest = CreateObject("MSXML2.XMLHTTP")
     
    strURL = URL_MAIN & "?marketId=" & pstrMarketID & "&selectionId=" & pstrSelID
    
    ' Request the hyperlink that generates the betfair graph
    
    xmlRequest.Open "GET", strURL, False
    xmlRequest.setRequestHeader "Content-Type", "image/jpg"
    xmlRequest.send
    
    ' Need to wait to ensure everything downloads
    Do While xmlRequest.readyState <> 4
        DoEvents
    Loop

    
    ' Get file ref, kill file if it already exists and then write out new file
    lngFileID = FreeFile
    If Dir("D:\Trading\BF Download Test\" & pstrMarketID & ".jpg") <> "" Then Kill "D:\Trading\BF Download Test\" & pstrMarketID & ".jpg"
    
    Open "D:\Trading\BF Download Test\" & pstrMarketID & ".jpg" For Binary As #lngFileID
    Put #lngFileID, , xmlRequest.responseBody
    Close #lngFileID
    
    Set xmlRequest = Nothing
    
       
'    Set objWs = ThisWorkbook.Worksheets("Market Charts")
'    objWs.Shapes.AddPicture strURL, msoTrue, msoTrue, 100, 100, 100, 100
    'Set xmlRequest = Nothing
    
End Sub

User avatar
Derek27
Posts: 23636
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

Naffman wrote:
Sat Apr 03, 2021 6:51 am
Derek27 wrote:
Sat Apr 03, 2021 6:47 am
Naffman wrote:
Sat Apr 03, 2021 6:09 am


It seems to be a software app like BA so it would need to
They don't need to place bets to access charts. It seems a lot of trust/permissions just to download Betfair charts that are free anyway!
The app places bets too
Fair point. I shouldn't try to read posts when trading Rosehill. :)
User avatar
Derek27
Posts: 23636
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

Realrocknrolla wrote:
Sat Apr 03, 2021 8:22 am
Derek27 wrote:
Sat Apr 03, 2021 5:05 am
ShaunWhite wrote:
Sat Apr 03, 2021 4:44 am

Some pretty bold claims there for what charts can tell you, and do people seriously click through this? !!!!
Screenshot_3.png
They forgot to ask for permission to withdraw funds from your account!
🤣🤣🤣

Not for me that one. It amazes me that people still use BF charts. They are absolutely pony compared to what you can build in the advanced charts.

Attention to detail goes along way.

viewtopic.php?f=67&t=22921

Try this. You can adjust time frames accordingly.
Cheers RRR, I'll take a look at that.
robsmith
Posts: 76
Joined: Wed Aug 25, 2010 12:19 pm

Thanks guys and thanks to Paul especially for the code
User avatar
Derek27
Posts: 23636
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

robsmith wrote:
Sat Apr 03, 2021 9:10 pm
Thanks guys and thanks to Paul especially for the code
+1, I'll experiment with that as well. :)
Post Reply

Return to “General discussion”