sei-protocol / sei-js

SeiJS is a monorepo that contains multiple NPM libraries for writing applications that interact with the Sei network.
44 stars 38 forks source link

What am I missing? #113

Closed kuklaph closed 10 months ago

kuklaph commented 10 months ago

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' }
*/
besated commented 10 months ago

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