Retrieving a large amount of RICs

I am trying to extract FX data on different currencies with different maturities. I have a list that contains all the currency pairs and their respective maturities. This means that I have to retrieve a vast amount RICs, over 2000 to be specific. Is there a way to retrieve a large amount of RICs?

Best Answer

  • @benjamin.lian So it depends on the amount of data fields you wish to download per RIC and whether you are using get_timeseries or get_data API calls. Either way information on our API limits can be found here. Usually one would break a large RIC list into chunks using something like:

    def chunks(l, n):
        for i in range(0,len(l),n):
            yield l[i:i+n]
    rics = list(chunks(list(large_ric_list), 50))

    Which could break a large list of RICs into chucks of 50 RICs - which could then be iterated over to stay within API datapoint per call limits. I hope this can help.

Answers