TradeRepublicApi icon indicating copy to clipboard operation
TradeRepublicApi copied to clipboard

Amount and price swapped in myTransactions.csv

Open bufemc opened this issue 4 years ago • 3 comments
trafficstars

Sometimes the amount and the price is swapped, as here in the first line for Amazon. Could also be a TR bug.

Datum;Typ;Stück;amount;Wert;Gebühren;ISIN;name
..
2020-10-19;Kauf;1375.0000;2.0;2751.0;1.0;US0231351067;Amazon
2020-10-16;Verkauf;9.9783;42.36;422.68;1.0;DE0005654933;Hella
2020-10-16;Kauf;5.0000;190.32;952.6;1.0;US87918A1051;Teladoc Health Inc.Dl-001
..

Hint: this seems to happen quite often for higher prices. I have also seen this for Alphabet.

Just another blind guess: even in October 2020 Amazon was valued more likely 2750 Euros. It seems that somehow it's 2 times the value 1375 and should be instead something like ;1;2750 ..

bufemc avatar May 22 '21 16:05 bufemc

hmmmm this is kinda weird. We don't do anything with the data so I assume it is a TR bug not sure

Zarathustra2 avatar May 22 '21 20:05 Zarathustra2

Next time I connect to the TR API I should create a conditional breakpoint in case of Amazon or Alphabet (better use the ISIN) and then post here what the incoming untouched data is..

bufemc avatar May 23 '21 11:05 bufemc

When running it with the latest git version the output changed now to this:

Date;Type;Amount;Value;Price;Fees;ISIN;Name 2020-10-19;Buy;1000.0000;2.75;2751.0;1.0;US0231351067;Amazon 2020-10-16;Sell;10.0638;42.0;422.68;1.0;DE0005654933;Hella 2020-10-16;Buy;5.0084;190.0;952.6;1.0;US87918A1051;Teladoc Health Inc.Dl-001

So the column amount is still a little bit strange. I did not buy 1000 Amazon for 2.75 The other amounts are no integers, although they should be, but at least not that big deviation.

I tried to nail it down to the origin, I hope this one is it from myTimeline.json:

Amazon:
{
		"type": "timelineEvent",
		"data": {
			"id": "***",
			"timestamp": 1603116662950,
			"icon": "https://assets.traderepublic.com/img/icon/timeline/Arrow-Right.png",
			"title": "Amazon",
			"body": "Limit Buy order executed at 2,750.00 \u20ac",
			"cashChangeAmount": -2751.0,
			"action": {
				"type": "timelineDetail",
				"payload": "***"
			},
			"attributes": [],
			"month": "2020-10"
		}
	},
	
Teladoc:
	{
		"type": "timelineEvent",
		"data": {
			"id": "***",
			"timestamp": 1602876873451,
			"icon": "https://assets.traderepublic.com/img/icon/timeline/Arrow-Right.png",
			"title": "Teladoc Health Inc.Dl-001",
			"body": "Buy order executed at 190.32 \u20ac",
			"cashChangeAmount": -952.6,
			"action": {
				"type": "timelineDetail",
				"payload": "***"
			},
			"attributes": [],
			"month": "2020-10"
		}
	},

If helpful I could provide you my full files? I guess that we otherwise will never solve all these mysteries ,)

For the second one I would suggest this:

  • cashChangeAmount - 1 = cash without fee = 952,6 - 1 = 951,6
  • 951,6 / 190,32 = 5 (full integer)

For Hella I am not sure, it could be this:

	{
		"type": "timelineEvent",
		"data": {
			"id": "***",
			"timestamp": 1602878596596,
			"icon": "https://assets.traderepublic.com/img/icon/timeline/Arrow-Left.png",
			"title": "Hella",
			"body": "Sell order executed at 42.36 \u20ac\nProfit: \ufffc 0.34 %",
			"cashChangeAmount": 422.68,
			"action": {
				"type": "timelineDetail",
				"payload": "***"
			},
			"attributes": [
				{
					"location": 39,
					"length": 8,
					"type": "positiveChange"
				}
			],
			"month": "2020-10"
		}
	},

bufemc avatar Dec 12 '21 13:12 bufemc