From 62476e5da3f0eadda66bedd882ed56075d0338bd Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Fri, 2 Dec 2022 07:20:37 +0000 Subject: [PATCH] Remap trade details schema to expand trade variable --- core/lib/schemas/oanda_s.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core/lib/schemas/oanda_s.py b/core/lib/schemas/oanda_s.py index 6b401ee..14083e9 100644 --- a/core/lib/schemas/oanda_s.py +++ b/core/lib/schemas/oanda_s.py @@ -602,6 +602,20 @@ class TradeDetails(BaseModel): TradeDetailsSchema = { - "trade": "trade", + "id": "trade.id", + "symbol": "trade.instrument", + "price": "trade.price", + "openTime": "trade.openTime", + "initialUnits": "trade.initialUnits", + "initialMarginRequired": "trade.initialMarginRequired", + "state": "trade.state", + "currentUnits": "trade.currentUnits", + "realizedPL": "trade.realizedPL", + "closingTransactionIDs": "trade.closingTransactionIDs", + "financing": "trade.financing", + "dividendAdjustment": "trade.dividendAdjustment", + "closeTime": "trade.closeTime", + "averageClosePrice": "trade.averageClosePrice", + "clientExtensions": "trade.clientExtensions", "lastTransactionID": "lastTransactionID", }