polyrabbit / my-token

📈Track token prices in your terminal
MIT License
193 stars 33 forks source link

Support coinmarketcap api #26

Closed themotu closed 3 years ago

themotu commented 3 years ago

Would be a nice addition

polyrabbit commented 3 years ago

Yes, coinmarketcap was supported - see https://github.com/polyrabbit/my-token/blob/master/exchange/coinmarketcap.go

But last year after being acquired by binance, they put a limit on free api quota. Users need to provide a secret to use those apis. I'm planning to implement this feature soon.

polyrabbit commented 3 years ago

Hi @themotu, I just released v0.6.0 that supports coinmarketcap with an api-key.

You can specify it in the config file:

exchanges:
- name: CoinMarketCap
  tokens:
  - BTC
  api_key: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Or for an ad-hoc run, you can just set it in the command line:

mt CoinMarketCap.BTC.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx