Reputation: 11
I am trying to make an API call to retrieve historic BTC-USD prices with the coinbase pro API.
I am defining the specified parameters available: start(Start time in ISO 8601), end(End time in ISO 8601) and granularity(Desired timeslice in seconds).
I get however the message: "Invalid interval" for the below request:
The dates are in ISO 8601 and I can not figure out why coinbase would not accept this interval.
Does anybody know why this is not accepted as a valid interval?
Thanks
Upvotes: 0
Views: 1478
Reputation: 11
Thank you JJJ for the link.
I forgot to url encode the dates for the REST Api request.
Encoded, this works now: https://api.pro.coinbase.com/products/BTC-USD/candles?start=2016-01-30T19%3A06%3A05%2B00%3A00&end=2016-02-06T19%3A06%3A05%2B00%3A00&granularity=86400
Upvotes: 1