title: How to get the historical data from bitfinex.com with out a limit?
body: <p>I am drawing a chart using the data pulled from bitfinex.com via a simple API query. As the result, i will need to render a chart which is going to show the historical data of BTCUSD for the past two years.
  Docs are available right here: <a href="https://bitfinex.readme.io/v2/reference#rest-public-candles" rel="nofollow noreferrer">https://bitfinex.readme.io/v2/reference#rest-public-candles</a> 
  Everything works fine except the limit of the retrieved data. </p>
  
  <p>This is my request: 
  <a href="https://api.bitfinex.com/v2/candles/trade:1h:tBTCUSD/hist?start=1514764800000&amp;sort=1" rel="nofollow noreferrer">https://api.bitfinex.com/v2/candles/trade:1h:tBTCUSD/hist?start=1514764800000&amp;sort=1</a></p>
  
  <p>The result can be seen over here or you can copy the request to the browser: <a href="https://docs.google.com/document/d/1sG11Ro0X21_UFgUtdqrlitcCchoSh30NzGCgAe6M0u0/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/document/d/1sG11Ro0X21_UFgUtdqrlitcCchoSh30NzGCgAe6M0u0/edit?usp=sharing</a>  </p>
  
  <p>The problem is that I receive candles for only 5 days no matter what dates or parameters I use. I can get more candles if i add the limit parameter to the string. But still, I can not get more than 1100-1000 candles. I even get the 500 error from the server:</p>
  
  <p>Server error: <code>GET https://api.bitfinex.com/v2/candles/trade:1h:tBTCUSD/hist?limit=1100&amp;start=1512086400000&amp;end=1516233600000&amp;sort=1</code> resulted in a <code>500 Internal Server Error</code> response:\n ["error",10020,"limit: invalid"]. What should be the valid limit? There is no such information in the docs.</p>
  
  <p>The author of this topic has the same question but no solutions are given. The last answer does not make big changes:  <a href="https://stackoverflow.com/questions/47107106/bitfinex-data-api">Bitfinex data api</a> </p>
  
  <p>How can I get the desired amount of data for the two years period of time? I do not want to break my query down into smaller pieces and go step by step. It will look ugly.</p>