Retrieving Historical Data at the 30 minute mark of each hour

Hi there,

I’m trying to get historical data at the 30 minute mark of each hour. I tried the following call, but it still returned data for the hour. Any ideas?

If there was a way to get 30 min intervals, that would work as well.

Thank you!

https://api.nomics.com/v1/candles?key=your-key&interval=1h&currency=TITANO&start=2022-01-18T00%3A30%3A00Z&end=2022-01-19T00%3A30%3A00Z

Aggregated candles are only available down to 1h intervals aligned to UTC hours.

Hi @nrg ,

Thank you for your quick reply. I saw that I can use a different endpoint to get 30 minute intervals (for a 14 day period) using Exchange OHLCV Candles.

Unfortunately, I’m struggling with that endpoint as well.

I’m trying to get the price of Titano in USD as listed on the Nomics website

In order to use the Exchange OHLCV Candles endpoint, I need the market information since it’s a required field.

When I call the Markets endpoint and control-find the json for “Titano”, this is the only market that comes up.
[{‘exchange’: ‘pancakeswapv2’, ‘market’: ‘0xa1d6f08a9deca30526b7eddf19404b179655dd60’, ‘base’: ‘QBT2’, ‘quote’: ‘TITANO’}]

How do I get this in USD like the Nomics website?

Thank you!

The current price in USD comes from the Currency Ticker:
https://api.nomics.com/v1/currencies/ticker?key=key&ids=TITANO

The chart for it comes from Aggregated Candles:
https://api.nomics.com/v1/candles?key=key&interval=1h&currency=TITANO

The Exchange OHLCV Candles means you have to pick a specific market. The market with the most volume for TITANO is this one:

Which you can fetch like this:
https://api.nomics.com/v1/exchange_candles?key=key&interval=1m&exchange=pancakeswapv2&market=0x44f382cec44c33067cb12fcfc08457eb6734be02&start=2022-01-21T00%3A00%3A00Z&end=2022-01-22T00%3A00%3A00Z

@nrg - thank you for the detailed reply. It still doesn’t quite get the information I’m looking for.

The goal:
Retrieve historical data for Titano in USD at :00 and :30 of each hour.

Option 1:
Every 30 minutes, make an API call to get the current price. This is run on my local machine, so it won’t be able to collect data at all times. (unless my local machine is on at all times - which it is not…)

Option 2:
Get historical data in 1 hour intervals
This isn’t really a solution because it only provides 1 hour intervals. It’s a plan B, but not preferred.

Option 3:
Use the Aggregated candles
The market data returns Titano in the price of BNB, not USD.
I thought I could make a second call for BNB & USD, but I parsed all the market data and didn’t see a BNB / USD pair. Perhaps I missed it?

Am I missing another easy option to accomplish this task?

Thank you for your help!

Option 1 and 2 both work.

For option 3 I think you meant to say “Use the Exchange Candles”. I would recommend this and then for BNB/USD pair use the Aggregated Candles to get that at 1h intervals. This price would be more stable but you’d have to use the 1h open price for the :00 price and then use open or close or the average for :30 price.

Or you could use our top market for BNB which is Binance’s BNB/USDT. I am not arguing the USDT is USD (that’s a whole can of worms!) but this may get you close to what you want in as simple a manner as possible.