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

No enough to sell #12

Closed
scientes opened this issue Mar 2, 2021 · 6 comments
Closed

No enough to sell #12

scientes opened this issue Mar 2, 2021 · 6 comments
Labels

Comments

@scientes
Copy link
Contributor

scientes commented Mar 2, 2021

error:
2021-03-02 15:16:00,273 taxman ERROR test.csv: Line 5: Not enough IOTA in queue to sell (transaction from 2017-12-05 19:30:49+00:00 on binance)

Minimal reproducible example:

UTC_Time,Account,Operation,Coin,Change,Remark
2017-12-05 18:03:40,Spot,Buy,IOTA,2.00000000,""
2017-12-05 18:09:03,Spot,Buy,IOTA,2.00000000,""
2017-12-05 19:13:34,Spot,Sell,IOTA,-2.00000000,""
2017-12-05 19:30:49,Spot,Sell,IOTA,-2.00000000,""

changing https://github.com/provinzio/CoinTaxman/blob/main/src/bilance_queue.py#L125

if bop is None:
    return None

to

if bop is None:
    if len(sold_coins)>0:
       return sold_coins
   else:
       return None

should fix that
But i'm Not sure how good the fix is

@provinzio
Copy link
Owner

Hey @scientes,

good eye. I fixed the bug.

While testing I realized, that I am unable to gather a price for IOTA/EUR from 2017. IOTA/BTC exists, but I can not find a pair which matches with EUR (e.g. BTCEUR did not existed then).

Do you have an idea for that? Over which pairs have you traded IOTA at that time?

@scientes
Copy link
Contributor Author

scientes commented Mar 2, 2021

IOTA/ETH starts at 2017/09/15
but i do not know how to get from eth to eur that far back on binance
Does coinbase have an api? because they should have ETH/EUR
EUR started in 2019/12/30 on binance

edit: coinbase needs an api key for that
i personally don't need pricing that far back, but maybe looking at coinmarketcap or coinbase as provider for those old prices would be a feature (both need api keys, but that could be handled as sort of a fallback if binance doesn't have data)

@provinzio
Copy link
Owner

Have you bought ETH/EUR on binance at that time?

@scientes
Copy link
Contributor Author

scientes commented Mar 2, 2021

yes

for standartising api acess take a look at #14

@provinzio
Copy link
Owner

Weird that the historical data is missing, but you were able to trade the pair...

Yeah, we should implement a fallback for this situation. I created a specific issue for this #15 because this issue is basically fixed.

@scientes
Copy link
Contributor Author

scientes commented Mar 2, 2021

@provinzio sry i misread i bought via coinbase but wed still need a fallback to get data for this pair

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

No branches or pull requests

2 participants