<p>Im working on the same thing. You have to repeat the request. </p>

<p>For 1000 candles you need to loop the request 3-4 times with different start and end parameters. </p>

<p>I had it working for hole hours but now that I switched to minute granularity the request comes out weird. </p>

CC BY-SA 4.0
2018-11-09T17:26:58.800Z
2018-11-09T17:26:58.800Z
Sungod3k
<p>I am using PHP to retrieve historic candles data from <code>api.pro.coinbase.com</code></p>

<pre><code>https://api.pro.coinbase.com/products/BTC-USD/candles?granularity=86400
</code></pre>

<p>Above URL gets 300 candles. I would like to know how I can get more or less candles. </p>

<p>In bitfinex I can set the number of candles (up to 1000) using limit parameter like this <code>https://api.bitfinex.com/v2/candles/trade:1D:tBTCUSD/hist?limit=1000</code></p>

<coinbase.com><historical-trade-data><gdax>
api.pro.coinbase.com retrieve historic candles data
Jsp
# api.pro.coinbase.com retrieve historic candles data

(Asked by: username_0 on 2018-08-22)

I am using PHP to retrieve historic candles data from `api.pro.coinbase.com`

```
https://api.pro.coinbase.com/products/BTC-USD/candles?granularity=86400

```

Above URL gets 300 candles. I would like to know how I can get more or less candles.

In bitfinex I can set the number of candles (up to 1000) using limit parameter like this `https://api.bitfinex.com/v2/candles/trade:1D:tBTCUSD/hist?limit=1000`

**Tags:** coinbase.com, historical-trade-data, gdax


---

## 1 answers

### Answer by username_1 on 2018-11-09. Score: 1

Im working on the same thing. You have to repeat the request.

For 1000 candles you need to loop the request 3-4 times with different start and end parameters.

I had it working for hole hours but now that I switched to minute granularity the request comes out weird.


---

