get https://api.web3shards.io/v1/prices/history/pool
Returns the USD price of a given pool address at a given time
"use strict";
const Shards = require("web3-shards");
const shards = Shards.API.Ethereum.V1;
shards.configure({
apiKey: "YOUR_API_KEY", // Join the discord to get your api key. https://discord.com/invite/kJd8W7Nh7e
maxRequestsPerSecond:5, // client-side limiter to prevent accidental burning
logger: 1 // 0=none,1=errors,2=verbose
});
const getPrice = async function() {
const address = "0xefb47fcfcad4f96c83d4ca676842fb03ef20a477";
const resp = await shards.prices.getPoolPriceAtTime(address, 1688915290);
console.log(resp)
}
getPrice();