How to use Google Sheets to get the price of specific crypto-currencies at specific times?

I have an assortment of cryptocurrency transactions over time. Different currency pairs at different prices. I must determine the price of these currencies, in Bitcoin, when I bought them.

The manual solution is to look for a historical price graph of each pair (ETH / BTC, LTC / BTC, XRP / BTC, etc.) at the time of purchase and to record it. But it goes without saying that this process is extremely tedious and tedious.

I already have the date and time of each purchase, with the currency purchased and the amount, in a spreadsheet. I would like to be able to extract the final data that I need from an API, directly in my sheet.

I had something similar using but it returns only the value of BTC in USD. I need to get the value of other currencies in BTC.