I found a bug when using the api /v0/equity/history/orders
on currency exchange.
I make orders using the EUR currency and when i buy a NASDAQ stock in US dollars the order that is comes from the api does not have the exchange rate but in the app on the history it does exist
EX json object:
{
"type": "MARKET",
"id": 31204824293,
"fillId": 31204824295,
"parentOrder": 31201253414,
"ticker": "PSEC_US_EQ",
"orderedQuantity": null,
"filledQuantity": null,
"limitPrice": null,
"stopPrice": null,
"timeValidity": null,
"orderedValue": 8.510000,
"filledValue": 8.510000,
"executor": "AUTOINVEST",
"dateModified": "2025-04-16T18:32:37.000Z",
"dateExecuted": null,
"dateCreated": "2025-04-16T18:32:31.000Z",
"fillResult": null,
"fillPrice": 3.510000,
"fillCost": null,
"taxes": [
{
"fillId": "31204824295",
"name": "CURRENCY_CONVERSION_FEE",
"quantity": -0.01,
"timeCharged": "2025-04-16T18:32:37.148Z"
}
],
"fillType": "OTC",
"status": "FILLED"
}
The fillPrice is 3.51USD, the value i bought filledValue is 8.51EUR so by calculating the quantity is 8.51/3.51 = 2,4245014245 but into the app is saying 2.7535
Making some research i found out that the currency is missing in my calculation.
Data from the order:
- Ordered value : €8.51
- FX fee: €0.01
- Net amount used to buy: €8.50 (€8.51 - €0.01)
- Exchange rate (EUR/USD) : 1.13703352
- Fill price per share : $3.51
Step 1: Convert €8.50 to USD using the exchange rate
8.50EUR * 1.13703352 = 9.66478492USD
Step 2: Divide by fill price ($3.51 per share)
9.66478492 / 3.51 = 2.7535 shares (aprox)
TL;DR;
The currency exchange rate is missing from the history order api retrieve