Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oscars changes #46

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Oscars changes #46

wants to merge 11 commits into from

Conversation

oschub
Copy link

@oschub oschub commented Sep 4, 2017

I really like the idea and the look and feel of cryptop. Decided to add a few things that I like to have myself. Never really did anything serious with Python before so it was also nice learning opportunity.

Here's a list of things I added

  • 24h change is shown for each coin in your wallet (color coded)
  • Value can be expressed in terms of FIAT (USD or EUR), ETH or BTC. Switch between these options with 'f'
  • Transactions can be added to a 'Transaction Ledger' that is stored in ledger.json in the same folder as wallet.json. The transactions make changes to the wallet file as well. The ledger can be viewed by pressing 'v'. I plan on adding some more functionality to the ledger in the future.
  • Every other line has a different background color for better readability.

@talisein
Copy link
Contributor

With just 1 ETH in a wallet, the program ends 'Could not parse data' when hiting the f key (switch to per-eth). With an additional coin in the wallet it works ok. Same problem with just BTC in wallet and pushing f key to per-btc.

@oschub
Copy link
Author

oschub commented Sep 11, 2017

You're right. I didn't notice it before because I had multiple coins in my wallet. Turns out this is related to how the cryptocompare API works.

If you only have BTC in your wallet and try to view your portfolio in terms of BTC, then right now data is requested using
https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC&tsyms=BTC. If you go to that url you will see that it returns nonsense.

However, if you add another coin to your wallet, say ETH, then data is requested using
https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC,ETH&tsyms=BTC. If you visit this url you see it returns the correct data for both BTC and ETH.

I should write some logic to correct for this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants