Open eduardo-olivares1 opened 3 years ago
This looks like it would be pretty fun to use. Just some questions/comments.
Accidentally closed issue.
A great way for people who are on the sideline to get some exposure. It would be nice if long-term you could integrate some actual purchases based on trades they've made. Awesome proj!
This looks like it would be pretty fun to use. Just some questions/comments.
- What is the date argument used for in the buy/sell command? Does it purchase the coin at a specific date?
- I think showing total market value/net liquid value in the portfolio table would be useful.
- PostgreSQL would probably be better instead of sqlite if you're going host it somewhere. Sqlite is easy if you're just going to be running it on your computer though.
- I think a way to view transactions would be cool to see
Hi @Alackey ,
It could be interesting to have users be able to buy and sell dummy cryptocurrency at prices pulled from CoinGecko's API at any point in time and have them able to view their theoretical profit and loss. This would allow people who are unsure about purchasing cryptocurrencies be able to experience the potential that some have to offer.
The Idea
This feature would consist of 3 commands:
This would most likely require some kind of storage and a good option may be SQLite
Buy
Users could be able to "purchase" a crytpocurrency with a command like:
$buy [coin] [optional_date_arg _in _UTC]
If the user does not input the optional date argument, then the coin is simply "purchased" at the current CoinGecko listed price.
The bot could then return a message to confirm the purchase:
[user] purchased [coin_amount] [coin] @ [price]
Sell
Users could also "sell" their cyrptocurrency holdings in exchange for fiat currency (USD default) with a command like:
$sell [coin] [optional_date_arg _in _UTC]
Portfolio
Users could be given the ability to see their "portfolio" and see their profit and loss for each transaction/currency with the command:
$portfolio [optional_coin_arg]
If the user inputs the optional coin arguement, then only the data for one coin would be displayed. The portfolio command with no additional arguments would simply return a table like so:
How it would work
The process would work something like this
SELECT SUM(amount) FROM Transactions WHERE coin_id="[coin_id]" AND user="[user_id]";