@mistswapdex/mist-data

v0.0.1
This is a collection of utilities to query MistSwap data from smartBCH. This data has been indexed by the Graph via the subgraph the MistSwap team maintains.

mist-data

This is a collection of utilities to query MistSwap data from smartBCH. This data has been indexed by the Graph via the subgraph the MistSwap team maintains.

Supported Queries

The below all return a Promise that resolves with the requested results.

  1. sushi.priceUSD({¹}) Gets USD price of Mist.
  2. sushi.priceETH({¹}) Gets ETH price of Mist.
  3. blocks.latestBlock() Gets the latest block.
  4. blocks.getBlock({¹}) Gets data for the specified block.
  5. charts.factory() Gets data for the MistSwap factory broken down daily + weekly.
  6. charts.tokenHourly({token_address, startTime?}) Gets data for specified token broken down hourly.
  7. charts.tokenDaily({token_address}) Gets data for specified token broken down daily.
  8. charts.pairHourly({pair_address, startTime?}) Gets data for specified pair broken down hourly.
  9. charts.pairDaily({pair_address}) Gets data for specified pair broken down daily.
  10. exchange.token({¹, token_address}) Gets data for specified token.
  11. exchange.token24h({¹, token_address}) Gets 24h data for specified token.
  12. exchange.tokenHourData({², token_address}) Gets hourly data for specified token.
  13. exchange.tokenDayData({², token_address}) Gets daily data for specified token.
  14. exchange.tokens({¹}) Gets data for all tokens.
  15. exchange.tokens24h({¹}) Gets 24h data for all tokens.
  16. exchange.pair({¹, pair_address}) Gets data for specified pair.
  17. exchange.pair24h({¹, pair_address}) Gets 24h data for specified pair.
  18. exchange.pairHourData({², pair_address}) Gets hourly data for specified pair.
  19. exchange.pairDayData({{², pair_address}) Gets daily data for specified pair.
  20. exchange.pairs({¹, [pair_addresses]?}) Gets data for all / specified pairs.
  21. exchange.pairs24h({¹}) Gets 24h data for all pairs.
  22. exchange.ethPrice({¹}) Gets USD price of ETH.
  23. exchange.ethPriceHourly({²}) Gets USD price of ETH broken down hourly.
  24. exchange.factory({¹}) Gets all data for the MistSwap factory.
  25. exchange.dayData({²}) Gets data for the MistSwap factory broken down by day.
  26. exchange.twentyFourHourData({¹}) Gets 24h data for the MistSwap factory.