Closed semiBE closed 7 months ago
When I take the main source code and run npm run start etoro
with the input you provided above, I get the following result:
{
"meta": {
"date": "2024-02-09T11:58:39.900Z",
"version": "v0"
},
"activities": [
{
"accountId": "c2a3093b-beef-4232-9be3-5b28bc3dcdad",
"comment": "",
"fee": 0,
"quantity": 1,
"type": "DIVIDEND",
"unitPrice": 0.02,
"currency": "USD",
"dataSource": "YAHOO",
"date": "2024-01-07T13:21:57+01:00",
"symbol": "NXPI"
},
{
"accountId": "c2a3093b-beef-4232-9be3-5b28bc3dcdad",
"comment": "",
"fee": 0,
"quantity": 1,
"type": "DIVIDEND",
"unitPrice": 0.02,
"currency": "USD",
"dataSource": "YAHOO",
"date": "2024-01-07T13:21:57+01:00",
"symbol": "NXPI"
},
{
"accountId": "c2a3093b-beef-4232-9be3-5b28bc3dcdad",
"comment": "",
"fee": 0,
"quantity": 1,
"type": "DIVIDEND",
"unitPrice": 0.03,
"currency": "USD",
"dataSource": "YAHOO",
"date": "2024-01-07T13:21:57+01:00",
"symbol": "NXPI"
},
{
"accountId": "c2a3093b-beef-4232-9be3-5b28bc3dcdad",
"comment": "",
"fee": 0,
"quantity": 0.102626,
"type": "SELL",
"unitPrice": 18.43,
"currency": "USD",
"dataSource": "YAHOO",
"date": "2024-01-09T15:30:40+01:00",
"symbol": "OLED"
},
{
"accountId": "c2a3093b-beef-4232-9be3-5b28bc3dcdad",
"comment": "",
"fee": 0,
"quantity": 0.04942,
"type": "SELL",
"unitPrice": 8.87,
"currency": "USD",
"dataSource": "YAHOO",
"date": "2024-01-09T15:30:40+01:00",
"symbol": "OLED"
},
{
"accountId": "c2a3093b-beef-4232-9be3-5b28bc3dcdad",
"comment": "",
"fee": 0,
"quantity": 0.500702,
"type": "SELL",
"unitPrice": 89.92,
"currency": "USD",
"dataSource": "YAHOO",
"date": "2024-01-09T15:30:41+01:00",
"symbol": "OLED"
}
]
}
Which configuration did you try to run the tool with?
Interesting.. I was using the 0.4.1-beta. I have then reverted back to 0.4.0 and 0.4.0-beta but it appears there are too many queries to Yahoo and it timed out.. will have to try later on.
2024-02-09T12:57:24.558282395Z [i] Determined the file type to be of kind 'etoro'.
2024-02-09T12:57:24.564313286Z [i] Processing file using Etoro converter
2024-02-09T12:57:24.593645697Z [i] Read CSV file. Start processing..
2024-02-09T12:57:25.005825926Z
2024-02-09T12:57:25.005855260Z [e] An error ocurred while trying to retrieve symbol NKE/USD (line 5)!
2024-02-09T12:57:25.005860917Z
2024-02-09T12:57:25.005935649Z [e] An error ocurred while processing.
2024-02-09T12:57:25.005963586Z [e] Error details: FetchError: invalid json response body at https://query2.finance.yahoo.com/v1/finance/search?lang=en-US®ion=US"esCount=10&newsCount=0&enableFuzzyQuery=false"esQueryId=tss_match_phrase_query&multiQuoteQueryId=multi_quote_single_token_query&newsQueryId=news_cie_vespa&enableCb=true&enableNavLinks=true&enableEnhancedTrivialQuery=true&q=null reason: Unexpected token 'T', "Too Many Requests
Sometimes Yahoo Finance times you out for a bit. Usually within 15 minutes you will be able to try again.
I have been working on a caching mechanism for a bit (see #22 ) that caches symbols so you dont have to ping Yahoo Finance every time.
Sometimes Yahoo Finance times you out for a bit. Usually within 15 minutes you will be able to try again.
It looks like another error pops up:
2024-02-09T14:31:03.583308695Z [e] Error details: FetchError: invalid json response body at https://query2.finance.yahoo.com/v1/finance/search?lang=en-US®ion=US"esCount=10&newsCount=0&enableFuzzyQuery=false"esQueryId=tss_match_phrase_query&multiQuoteQueryId=multi_quote_single_token_query&newsQueryId=news_cie_vespa&enableCb=true&enableNavLinks=true&enableEnhancedTrivialQuery=true&q=IBE reason: Unexpected token '<', "<!doctype "... is not valid JSON
I have been working on a caching mechanism for a bit (see #22 ) that caches symbols so you dont have to ping Yahoo Finance every time.
Is it in the 0.5.0-beta docker img by chance?
Thanks!
It looks like another error pops up
The error doesn’t ring a bell. The only thing that comes to mind is yahoo finance not being available (since the response looks to be html). Can you maybe try again? Will think about some error handling regarding Yahoo finance in the future..
Is it in the 0.5.0-beta docker img by chance?
It is 🙂
Is it in the 0.5.0-beta docker img by chance?
It is 🙂
0.5.0-beta works like a charm!
I noticed one error in the conversion though.
The column Amount
in the eToro csv is not the Unit Price
. The Unit Price
would be Amount\Units.
Great to hear!!
The Unit Price would be Amount\Units.
Gotcha, will fix that as part of 0.5.0!
I have just pushed the fix for unit price calculations! When you pull the latest 0.5.0-beta image you'll be able to check it out!
Hi! I am trying to convert my January transactions and there are multiple transactions (with the same name) which are happening. It looks like the converter only took in consideration the first of the list and then it jumps to the next one which has a different value in the
Details
field.In the example below it will only count the first NXPI/USD dividend and the first OLED/USD position closed.
Thanks! for checking this out!