Comments (6)
Thanks for the detailed explanation. Tested again with manual intra CSV for the receiving side and the spot price was fetched from Coinbase Pro. Closing the issue.
from dali-rp2.
For intra-transactions the fee is implicitly defined as crypto_sent - crypto_received: when you add the missing half of the transaction it will get populated. The spot price should have been populated: are you sure you passed the -s option? If you did can you instrument the code around https://github.com/eprbell/dali-rp2/blob/main/src/dali/transaction_resolver.py#L202? Add a few LOGGER.debug calls to see what is happening. If -s has been passed it should get inside _update_spot_price_from_web() and it should read the price from Coinbase Pro.
from dali-rp2.
Dali is indeed calling _update_spot_price_from_web, but the transaction spot_price is None, and it returns right away. Not sure how to fix this without breaking something else. What do you recommend?
from dali-rp2.
Can you add more LOGGER.debug calls inside _update_spot_price_from_web() to see what path it is taking? Also: does this happen for only one transaction or for all of them?
from dali-rp2.
In my limited testing, _update_spot_price_from_web() always exits without doing anything, but for different reasons depending on the transaction.
For "match" transactions (BUY), the spot price is a numeric value upon entry to _update_spot_price_from_web(), so it exits without needing to fetch the price from the web.
For "transfer" / "withdraw" transactions. The function is exiting in this snippet:
if transaction.spot_price is None: # type: ignore
return transaction
from dali-rp2.
Thanks for running the code with instrumentation: that gave me enough context to understand what is happening. This is not a bug, but intended behavior. In intra-transaction the only field that has an effect on taxes (or more precisely on the in-out coin flow) is crypto_fee
, which is crypto_sent
- crypto_received
, as explained above. Since this is an unresolved transaction (there is only one half of it), either crypto_sent
or crypto_received
are missing and therefore crypto_fee
cannot be computed: so the spot_price
is also not computed, because it would be useless (it only affects the "taxable" part of the transaction, which is crypto_fee
). If you were to complete the transaction by providing the missing half, then the transaction resolver would notice that both crypto_sent
and crypto_received
are present and therefore it would compute crypto_fee
and resolve spot_price
. Can you try that and let me know if it works?
from dali-rp2.
Related Issues (20)
- LUNA->EUR not found HOT 5
- WARNING: Unrecognized Dividend: LUNA compensation. HOT 1
- Internal error wheh Coinbase makes 2 withdrawals in same tx HOT 16
- Implement BitGet REST API Data Loader CCXT Plugin HOT 4
- Detect Beginning of Market when using Kraken CSV Reader
- USD->EUR not found on any pair converter plugin HOT 6
- Add bitmex exchange
- Implement Authentication for Exchangerate.host HOT 4
- Coinbase deprecated some endpoints, breaking the CB plugin HOT 3
- Kraken No Longer Offers Individual CSV Files HOT 6
- Kraken REST plugin bugs HOT 3
- Forex Services Unavailable
- Website Error: Running test under Windows 10 (config filename issue) HOT 3
- Transaction Resolver resolves InTransaction into IntraTransaction for Existing RP2 Input HOT 5
- cointracker format example HOT 4
- dali.plugin.input.rest.binance_com issue with using the interestHistory api endpoint from binance HOT 6
- Spot price for USD->USD not found HOT 4
- Transaction Type - RECEIVE and SPEND <Kraken REST> HOT 4
- fiat access key required when not needed HOT 3
- Large file download warning not visible before accepting HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dali-rp2.