Our use case requires us to get a token priced in USD,GBP,EUR, but the api only gives the price in USD by getting a “usdPrice” value.
https://docs.moralis.io/moralis-server/web3-sdk/token#gettokenprice
I’d like to pass in the options a list of currencies like:
const options = {
address: "0x7...2",
chain: "bsc",
exchange: "PancakeSwapv2",
currencies: ["USD", "EUR", "BTC"]
};
const price = await Moralis.Web3API.token.getTokenPrice(options);
And the result could look like this:
{
"nativePrice": {
"value": "8409770570506626",
"decimals": 18,
"name": "Ether",
"symbol": "ETH"
},
"currenciesPrice": {
"USD": 19.12,
"EUR": 17.6,
"BTC": 0.0000123
}
"exchangeAddress": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
"exchangeName": "Uniswap v3"
}