atlas-dashboard-apis

A nice greeter

Usage no npm install needed!

<script type="module">
  import atlasDashboardApis from 'https://cdn.skypack.dev/atlas-dashboard-apis';
</script>

README

This is Atlas dashboard api package

Functions

  • getPriceWithTokenAddress

Get price of token

Usage:

  token.realPrice = (await getPriceWithTokenAddress(token.tokenStr));
  token.price = '

 + token.realPrice.toFixed(6);
  • getLPPrice

Get total supply, coin, pc of lp token

Usage:

  const [totalSupply, coin, pc] = await getLPPrice(connection, token.tokenStr);
  let price = 0;
  price += prices[coin.symbol] * coin.balance.fixed(2);
  price += prices[pc.symbol] * pc.balance.fixed(2);

  token.realPrice = price / totalSupply;
  token.price = '

 + token.realPrice.toFixed(6);

How to publish

npm publish

Current version

1.0.8