OANDA · Schema

StopLossOrderRejectTransaction

A StopLossOrderRejectTransaction represents the rejection of the creation of a StopLoss Order.

ForexFX TradingCFD TradingFinancial ServicesTrading APIs

Properties

Name Type Description
id string The Transaction's Identifier.
time string The date/time when the Transaction was created.
userID integer The ID of the user that initiated the creation of the Transaction.
accountID string The ID of the Account the Transaction was created for.
batchID string The ID of the "batch" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
requestID string The Request ID of the request which generated the transaction.
type string The Type of the Transaction. Always set to "STOP_LOSS_ORDER_REJECT" in a StopLossOrderRejectTransaction.
tradeID string The ID of the Trade to close when the price threshold is breached.
clientTradeID string The client ID of the Trade to be closed when the price threshold is breached.
price string The price threshold specified for the Stop Loss Order. If the guaranteed flag is false, the associated Trade will be closed by a market price that is equal to or worse than this threshold. If the flag
distance string Specifies the distance (in price units) from the Account's current price to use as the Stop Loss Order price. If the Trade is short the Instrument's bid price is used, and for long Trades the ask is u
timeInForce string The time-in-force requested for the StopLoss Order. Restricted to "GTC", "GFD" and "GTD" for StopLoss Orders.
gtdTime string The date/time when the StopLoss Order will be cancelled if its timeInForce is "GTD".
triggerCondition string Specification of which price component should be used when determining if an Order should be triggered and filled. This allows Orders to be triggered based on the bid, ask, mid, default (ask for buy,
guaranteed boolean Flag indicating that the Stop Loss Order is guaranteed. The default value depends on the GuaranteedStopLossOrderMode of the account, if it is REQUIRED, the default will be true, for DISABLED or ENABLE
reason string The reason that the Stop Loss Order was initiated
clientExtensions object
orderFillTransactionID string The ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).
intendedReplacesOrderID string The ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).
rejectReason string The reason that the Reject Transaction was created
View JSON Schema on GitHub

JSON Schema

StopLossOrderRejectTransaction.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "StopLossOrderRejectTransaction",
  "description": "A StopLossOrderRejectTransaction represents the rejection of the creation of a StopLoss Order.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The Transaction's Identifier.",
      "format": "String representation of the numerical OANDA-assigned TransactionID"
    },
    "time": {
      "type": "string",
      "description": "The date/time when the Transaction was created.",
      "format": "The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)."
    },
    "userID": {
      "type": "integer",
      "description": "The ID of the user that initiated the creation of the Transaction."
    },
    "accountID": {
      "type": "string",
      "description": "The ID of the Account the Transaction was created for.",
      "format": "\"-\"-delimited string with format \"{siteID}-{divisionID}-{userID}-{accountNumber}\""
    },
    "batchID": {
      "type": "string",
      "description": "The ID of the \"batch\" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.",
      "format": "String representation of the numerical OANDA-assigned TransactionID"
    },
    "requestID": {
      "type": "string",
      "description": "The Request ID of the request which generated the transaction."
    },
    "type": {
      "type": "string",
      "description": "The Type of the Transaction. Always set to \"STOP_LOSS_ORDER_REJECT\" in a StopLossOrderRejectTransaction.",
      "enum": [
        "CREATE",
        "CLOSE",
        "REOPEN",
        "CLIENT_CONFIGURE",
        "CLIENT_CONFIGURE_REJECT",
        "TRANSFER_FUNDS",
        "TRANSFER_FUNDS_REJECT",
        "MARKET_ORDER",
        "MARKET_ORDER_REJECT",
        "FIXED_PRICE_ORDER",
        "LIMIT_ORDER",
        "LIMIT_ORDER_REJECT",
        "STOP_ORDER",
        "STOP_ORDER_REJECT",
        "MARKET_IF_TOUCHED_ORDER",
        "MARKET_IF_TOUCHED_ORDER_REJECT",
        "TAKE_PROFIT_ORDER",
        "TAKE_PROFIT_ORDER_REJECT",
        "STOP_LOSS_ORDER",
        "STOP_LOSS_ORDER_REJECT",
        "TRAILING_STOP_LOSS_ORDER",
        "TRAILING_STOP_LOSS_ORDER_REJECT",
        "ORDER_FILL",
        "ORDER_CANCEL",
        "ORDER_CANCEL_REJECT",
        "ORDER_CLIENT_EXTENSIONS_MODIFY",
        "ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT",
        "TRADE_CLIENT_EXTENSIONS_MODIFY",
        "TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT",
        "MARGIN_CALL_ENTER",
        "MARGIN_CALL_EXTEND",
        "MARGIN_CALL_EXIT",
        "DELAYED_TRADE_CLOSURE",
        "DAILY_FINANCING",
        "RESET_RESETTABLE_PL"
      ]
    },
    "tradeID": {
      "type": "string",
      "description": "The ID of the Trade to close when the price threshold is breached.",
      "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."
    },
    "clientTradeID": {
      "type": "string",
      "description": "The client ID of the Trade to be closed when the price threshold is breached."
    },
    "price": {
      "type": "string",
      "description": "The price threshold specified for the Stop Loss Order. If the guaranteed flag is false, the associated Trade will be closed by a market price that is equal to or worse than this threshold. If the flag is true the associated Trade will be closed at this price.",
      "format": "A decimal number encodes as a string. The amount of precision provided depends on the Instrument."
    },
    "distance": {
      "type": "string",
      "description": "Specifies the distance (in price units) from the Account's current price to use as the Stop Loss Order price. If the Trade is short the Instrument's bid price is used, and for long Trades the ask is used.",
      "format": "A decimal number encoded as a string. The amount of precision provided depends on what the number represents."
    },
    "timeInForce": {
      "type": "string",
      "description": "The time-in-force requested for the StopLoss Order. Restricted to \"GTC\", \"GFD\" and \"GTD\" for StopLoss Orders.",
      "enum": [
        "GTC",
        "GTD",
        "GFD",
        "FOK",
        "IOC"
      ]
    },
    "gtdTime": {
      "type": "string",
      "description": "The date/time when the StopLoss Order will be cancelled if its timeInForce is \"GTD\".",
      "format": "The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places)."
    },
    "triggerCondition": {
      "type": "string",
      "description": "Specification of which price component should be used when determining if an Order should be triggered and filled. This allows Orders to be triggered based on the bid, ask, mid, default (ask for buy, bid for sell) or inverse (ask for sell, bid for buy) price depending on the desired behaviour. Orders are always filled using their default price component.\nThis feature is only provided through the REST API. Clients who choose to specify a non-default trigger condition will not see it reflected in any of OANDA's proprietary or partner trading platforms, their transaction history or their account statements. OANDA platforms always assume that an Order's trigger condition is set to the default value when indicating the distance from an Order's trigger price, and will always provide the default trigger condition when creating or modifying an Order.\nA special restriction applies when creating a guaranteed Stop Loss Order. In this case the TriggerCondition value must either be \"DEFAULT\", or the \"natural\" trigger side \"DEFAULT\" results in. So for a Stop Loss Order for a long trade valid values are \"DEFAULT\" and \"BID\", and for short trades \"DEFAULT\" and \"ASK\" are valid.",
      "enum": [
        "DEFAULT",
        "INVERSE",
        "BID",
        "ASK",
        "MID"
      ]
    },
    "guaranteed": {
      "type": "boolean",
      "description": "Flag indicating that the Stop Loss Order is guaranteed. The default value depends on the GuaranteedStopLossOrderMode of the account, if it is REQUIRED, the default will be true, for DISABLED or ENABLED the default is false."
    },
    "reason": {
      "type": "string",
      "description": "The reason that the Stop Loss Order was initiated",
      "enum": [
        "CLIENT_ORDER",
        "REPLACEMENT",
        "ON_FILL"
      ]
    },
    "clientExtensions": {
      "$ref": "#/definitions/ClientExtensions"
    },
    "orderFillTransactionID": {
      "type": "string",
      "description": "The ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).",
      "format": "String representation of the numerical OANDA-assigned TransactionID"
    },
    "intendedReplacesOrderID": {
      "type": "string",
      "description": "The ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).",
      "format": "The string representation of the OANDA-assigned OrderID. OANDA-assigned OrderIDs are positive integers, and are derived from the TransactionID of the Transaction that created the Order."
    },
    "rejectReason": {
      "type": "string",
      "description": "The reason that the Reject Transaction was created",
      "enum": [
        "INTERNAL_SERVER_ERROR",
        "INSTRUMENT_PRICE_UNKNOWN",
        "ACCOUNT_NOT_ACTIVE",
        "ACCOUNT_LOCKED",
        "ACCOUNT_ORDER_CREATION_LOCKED",
        "ACCOUNT_CONFIGURATION_LOCKED",
        "ACCOUNT_DEPOSIT_LOCKED",
        "ACCOUNT_WITHDRAWAL_LOCKED",
        "ACCOUNT_ORDER_CANCEL_LOCKED",
        "INSTRUMENT_NOT_TRADEABLE",
        "PENDING_ORDERS_ALLOWED_EXCEEDED",
        "ORDER_ID_UNSPECIFIED",
        "ORDER_DOESNT_EXIST",
        "ORDER_IDENTIFIER_INCONSISTENCY",
        "TRADE_ID_UNSPECIFIED",
        "TRADE_DOESNT_EXIST",
        "TRADE_IDENTIFIER_INCONSISTENCY",
        "INSUFFICIENT_MARGIN",
        "INSTRUMENT_MISSING",
        "INSTRUMENT_UNKNOWN",
        "UNITS_MISSING",
        "UNITS_INVALID",
        "UNITS_PRECISION_EXCEEDED",
        "UNITS_LIMIT_EXCEEDED",
        "UNITS_MIMIMUM_NOT_MET",
        "PRICE_MISSING",
        "PRICE_INVALID",
        "PRICE_PRECISION_EXCEEDED",
        "PRICE_DISTANCE_MISSING",
        "PRICE_DISTANCE_INVALID",
        "PRICE_DISTANCE_PRECISION_EXCEEDED",
        "PRICE_DISTANCE_MAXIMUM_EXCEEDED",
        "PRICE_DISTANCE_MINIMUM_NOT_MET",
        "TIME_IN_FORCE_MISSING",
        "TIME_IN_FORCE_INVALID",
        "TIME_IN_FORCE_GTD_TIMESTAMP_MISSING",
        "TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST",
        "PRICE_BOUND_INVALID",
        "PRICE_BOUND_PRECISION_EXCEEDED",
        "ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS",
        "TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED",
        "CLIENT_ORDER_ID_INVALID",
        "CLIENT_ORDER_ID_ALREADY_EXISTS",
        "CLIENT_ORDER_TAG_INVALID",
        "CLIENT_ORDER_COMMENT_INVALID",
        "CLIENT_TRADE_ID_INVALID",
        "CLIENT_TRADE_ID_ALREADY_EXISTS",
        "CLIENT_TRADE_TAG_INVALID",
        "CLIENT_TRADE_COMMENT_INVALID",
        "ORDER_FILL_POSITION_ACTION_MISSING",
        "ORDER_FILL_POSITION_ACTION_INVALID",
        "TRIGGER_CONDITION_MISSING",
        "TRIGGER_CONDITION_INVALID",
        "ORDER_PARTIAL_FILL_OPTION_MISSING",
        "ORDER_PARTIAL_FILL_OPTION_INVALID",
        "INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL",
        "TAKE_PROFIT_ORDER_ALREADY_EXISTS",
        "TAKE_PROFIT_ON_FILL_PRICE_MISSING",
        "TAKE_PROFIT_ON_FILL_PRICE_INVALID",
        "TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED",
        "TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING",
        "TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID",
        "TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING",
        "TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST",
        "TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID",
        "TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID",
        "TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID",
        "TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING",
        "TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID",
        "STOP_LOSS_ORDER_ALREADY_EXISTS",
        "STOP_LOSS_ORDER_GUARANTEED_REQUIRED",
        "STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD",
        "STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED",
        "STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION",
        "STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION",
        "STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED",
        "STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET",
        "STOP_LOSS_ORDER_NOT_CANCELABLE",
        "STOP_LOSS_ORDER_NOT_REPLACEABLE",
        "STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED",
        "STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED",
        "STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING",
        "STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER",
        "STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED",
        "STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED",
        "STOP_LOSS_ON_FILL_PRICE_MISSING",
        "STOP_LOSS_ON_FILL_PRICE_INVALID",
        "STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED",
        "STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET",
        "STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED",
        "STOP_LOSS_ON_FILL_DISTANCE_INVALID",
        "STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED",
        "STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED",
        "STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED",
        "STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING",
        "STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING",
        "STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID",
        "STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING",
        "STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST",
        "STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID",
        "STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID",
        "STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID",
        "STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING",
        "STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID",
        "TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS",
        "TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING",
        "TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID",
        "TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED",
        "TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED",
        "TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET",
        "TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING",
        "TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID",
        "TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING",
        "TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST",
        "TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID",
        "TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID",
        "TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID",
        "TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED",
        "TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING",
        "TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID",
        "CLOSE_TRADE_TYPE_MISSING",
        "CLOSE_TRADE_PARTIAL_UNITS_MISSING",
        "CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE",
        "CLOSEOUT_POSITION_DOESNT_EXIST",
        "CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION",
        "CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE",
        "CLOSEOUT_POSITION_REJECT",
        "CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING",
        "MARKUP_GROUP_ID_INVALID",
        "POSITION_AGGREGATION_MODE_INVALID",
        "ADMIN_CONFIGURE_DATA_MISSING",
        "MARGIN_RATE_INVALID",
        "MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT",
        "ALIAS_INVALID",
        "CLIENT_CONFIGURE_DATA_MISSING",
        "MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL",
        "AMOUNT_INVALID",
        "INSUFFICIENT_FUNDS",
        "AMOUNT_MISSING",
        "FUNDING_REASON_MISSING",
        "CLIENT_EXTENSIONS_DATA_MISSING",
        "REPLACING_ORDER_INVALID",
        "REPLACING_TRADE_ID_INVALID"
      ]
    }
  }
}