What am I missing?
kuklaph opened this issue · comments
Hi. I'm having a bit of trouble getting things to work. The assetList is returning an empty array and I'm getting no price for SEIYAN. What am I doing wrong?
const queryClient = await getQueryClient(
"https://api-sei-ia.cosmosia.notional.ventures/"
);
const assets = await queryClient.seiprotocol.seichain.dex.assetList();
console.log(assets);
/*
{ assetList: [] }
*/
const params = {
contractAddr:
"sei13cvz5gvdmt294xxxj2harre9fl35s0rzhsvpwaylzekw5vlvvy5q66czcm", // SEIYAN
lookbackInSeconds: 300,
assetDenom:
"sei1hrndqntlvtmx2kepr0zsfgr7nzjptcc72cr4ppk4yav58vvy7v3s4er8ed",
priceDenom: "usei",
};
// Getting the market summary from the Sei dex module
const dexMarketSummary =
await queryClient.seiprotocol.seichain.dex.getMarketSummary(params);
console.log(dexMarketSummary);
/*
{ totalVolume: '0.000000000000000000',
totalVolumeNotional: '0.000000000000000000',
highPrice: '0.000000000000000000',
lowPrice: '0.000000000000000000',
lastPrice: '0.000000000000000000' }
*/
Hey @kuklaph, it looks like the SEIYAN token has not been registered on the dex module yet. If you're trying to get the price for SEIYAN, you can use something like coingecko (https://www.coingecko.com/en/coins/seiyan) instead