bennycode / coinbase-pro-node

Coinbase API written in TypeScript and covered by tests.
https://bennycode.com/coinbase-pro-node
MIT License
254 stars 62 forks source link

getProductHistoricRates function? #93

Closed bfailing closed 4 years ago

bfailing commented 4 years ago

What is the equivalent in your library to the following code from the coinbase-pro library:

publicClient.getProductHistoricRates(
  'BTC-USD',
  { 
    granularity: 3600,
    start: start_time,
    end: end_time
  }  
)
bennycode commented 4 years ago

Hi @bfailing, the product history data at Coinbase Pro is actually what everybody else (like Binance exchange) calls "candlesticks". That's why this library here makes it available with:

client.rest.product.getCandles('BTC-USD', {
  granularity: CandleGranularity.ONE_HOUR,
  start: start_time,
  end: end_time
});

I hope this helps you further. Please leave a star if it does. If not, you can create a new issue and I will help you with it.