{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "TradeReduce", "description": "A TradeReduce object represents a Trade for an instrument that was reduced (either partially or fully) in an Account. It is found embedded in Transactions that affect the position of an instrument in the account, specifically the OrderFill Transaction.", "type": "object", "properties": { "tradeID": { "type": "string", "description": "The ID of the Trade that was reduced or closed", "format": "The string representation of the OANDA-assigned TradeID. OANDA-assigned TradeIDs are positive integers, and are derived from the TransactionID of the Transaction that opened the Trade." }, "units": { "type": "string", "description": "The number of units that the Trade was reduced by", "format": "A decimal number encoded as a string. The amount of precision provided depends on what the number represents." }, "price": { "type": "string", "description": "The average price that the units were closed at. This price may be clamped for guaranteed Stop Loss Orders.", "format": "A decimal number encodes as a string. The amount of precision provided depends on the Instrument." }, "realizedPL": { "type": "string", "description": "The PL realized when reducing the Trade", "format": "A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency." }, "financing": { "type": "string", "description": "The financing paid/collected when reducing the Trade", "format": "A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency." }, "guaranteedExecutionFee": { "type": "string", "description": "This is the fee that is charged for closing the Trade if it has a guaranteed Stop Loss Order attached to it.", "format": "A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency." }, "halfSpreadCost": { "type": "string", "description": "The half spread cost for the trade reduce/close. This can be a positive or negative value and is represented in the home currency of the Account.", "format": "A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency." } } }