1.0.9 • Published 2 years ago

atlas-dashboard-apis v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago