Announcement

Collapse
No announcement yet.

downloadFile issues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • downloadFile issues

    Am I being stupid here?

    I have downloaded the list of files using curl, see some examples below:

    Code:
    filepaths = [
    '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337686/1.159918711.bz2',
    '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337690/1.159918405.bz2',
    '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337690/1.160967766.bz2',
    '/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337692/1.159918303.bz2' .....
    then go to download the file as per the examples at https://historicdata.betfair.com/#/apidocs

    My python code for doing this is:

    Code:
    import requests
    
    headers = {
        'ssoid': 'MY TOKEN HERE',
    }
    
    params = {
        'filePath': "/xds_nfs/edp_processed/BASIC/2019/Aug/3/29337686/1.159918711.bz2",
    }
    
    response = requests.get('https://historicdata.betfair.com/api/DownloadFile', params=params, headers=headers)
    
    fw = open('data.bz2', 'wb')
    fw.write(response.content)
    fw.close()


    Yet the bz2 file isn't an archive file, it contains HTML and so not the historical data I was expecting

  • #2
    Hi joelpeyton

    Please can you confirm details of the full error message your are receiving?

    Its likely that you are hitting the 100 requests in 10 second throttling limit, if for example, you are attempting to downloading 100+ files or more concurrently.

    Historical Data API calls are limit to 100 requests in 10 seconds across all endpoints

    Kind Regards

    Neil​

    Comment


    • #3
      Hi Neil, I've just tried downloading a single file and all is well. I must have been breaching the limits.

      Thanks for getting back

      Comment


      • #4


        From the code snippet you provided, it seems that you have a list of filepaths stored in the filepaths variable. Each filepath represents a specific file that you have downloaded or are planning to download. For those seeking fast-paced underground excitement, Tunnel Rush delivers with its nonstop tunnels packed with puzzles and perils.

        Comment

        Working...
        X