rssnyder / discord-stock-ticker

Add live stock & crypto prices to your discord sidebar.
https://rssnyder.github.io/discord-stock-ticker/
MIT License
293 stars 113 forks source link

The same token/coin but in different currency #110

Closed kakigorimochi closed 2 years ago

kakigorimochi commented 2 years ago

I recently attempted to host a coin, such as bitcoin, in both USD and EUR, but realized that only the USD ticker would work, and the EUR ticker would not because there is already a ticker named bitcoin in USD.

Is there a way to make this work? The only way I can think of is to run two instances, one for USD and the other for EUR.

rssnyder commented 2 years ago

@kakigorimochi yes you will need to run a second instance of the program to have multiple cryptos with different currencies.

This is due to using the name of the coin as the key in the database https://github.com/rssnyder/discord-stock-ticker/blob/master/ticker_request.go#L177

kakigorimochi commented 2 years ago

Hello @rssnyder, thank you for getting back to me.

I successfully set it up by repeating the steps I took to set up my first instance, with the exception of using a different port and adding "-eur" to the discord-stock-ticker and the service file.

discord-stock-ticker-eur.service

[Unit] Description = discord-stock-ticker-eur . . .

[Service] SyslogIdentifier = discord-stock-ticker-eur . . . ExecStart = /etc/discord-stock-ticker/eur-instance/discord-stock-ticker-eur -address=localhost:8081 -frequency=10 -db=/etc/discord-stock-ticker/profile/instance-eur