citycoins / api

A simple API to interact with Stacks and CityCoins data.
https://api.citycoins.co/docs
Apache License 2.0
9 stars 2 forks source link

Endpoint Request: /tools/get-market-cap #52

Open whoabuddy opened 2 years ago

whoabuddy commented 2 years ago

What endpoint would you like to request?

/tools/get-market-cap/:city

Is this something directly available, or does it have to be calculated?

It would need to be calculated in two steps:

  1. Get the price for the city
  2. Get the total supply for the city
  3. Multiply and return the value
whoabuddy commented 2 years ago

This can also be returned by existing endpoints, and might be worth reporting a combination to help make sure things are in sync, e.g.

{
  "calculated": "aggregate price * total supply"
  "coingecko": "value_from_api"
  "coinmarketcap": "value_from_api"
  "etc": "etc"
}

The aggregate price is based on #37 and #38 getting done as it's just CoinGecko data for now.