Currently POST and PUT request interactivity supply the entire JSON schema in the Try It Out section. In this guide, you'll find examples specific to Orders and Saved Orders for use in the Try It Out section. These would be sent as the POST data for Place Order.

 

 

Buy Market: Stock

{
  "orderType": "MARKET",
  "session": "NORMAL",
  "duration": "DAY",
  "orderStrategyType": "SINGLE",
  "orderLegCollection": [
    {
      "instruction": "Buy",
      "quantity": 15,
      "instrument": {
        "symbol": "XYZ",
        "assetType": "EQUITY"
      }
    }
  ]
}

Buy Limit: Single Option

{
  "complexOrderStrategyType": "NONE",
  "orderType": "LIMIT",
  "session": "NORMAL",
  "price": "6.45",
  "duration": "DAY",
  "orderStrategyType": "SINGLE",
  "orderLegCollection": [
    {
      "instruction": "BUY_TO_OPEN",
      "quantity": 10,
      "instrument": {
        "symbol": "XYZ_032015C49",
        "assetType": "OPTION"
      }
    }
  ]
}

Buy Limit: Call Ratio Backspread

{
  "orderType": "NET_DEBIT",
  "session": "NORMAL",
  "price": "4.13",
  "duration": "DAY",
  "orderStrategyType": "SINGLE",
  "orderLegCollection": [
    {
      "instruction": "BUY_TO_OPEN",
      "quantity": 20,
      "instrument": {
        "symbol": "XYZ_011516C45",
        "assetType": "OPTION"
      }
    },
    {
      "instruction": "SELL_TO_OPEN",
      "quantity": 10,
      "instrument": {
        "symbol": "XYZ_011516C42.5",
        "assetType": "OPTION"
      }
    }
  ]
}

Custom Option

{
  "orderStrategyType": "SINGLE",
  "orderType": "MARKET",
  "orderLegCollection": [
    {
      "instrument": {
        "assetType": "OPTION",
        "symbol": "XYZ_011819P45"
      },
      "instruction": "SELL_TO_OPEN",
      "quantity": 1
    },
    {
      "instrument": {
        "assetType": "OPTION",
        "symbol": "XYZ_011720P43"
      },
      "instruction": "BUY_TO_OPEN",
      "quantity": 2
    }
  ],
  "complexOrderStrategyType": "CUSTOM",
  "duration": "DAY",
  "quantity": 1,
  "session": "NORMAL"
}

Conditional Order: One Triggers Another

{
  "orderType": "LIMIT",
  "session": "NORMAL",
  "price": "4.97",
  "duration": "DAY",
  "orderStrategyType": "TRIGGER",
  "orderLegCollection": [
    {
      "instruction": "BUY",
      "quantity": 10,
      "instrument": {
        "symbol": "XYZ",
        "assetType": "EQUITY"
      }
    }
  ],
  "childOrderStrategies": [
    {
      "orderType": "LIMIT",
      "session": "NORMAL",
      "price": "42.03",
      "duration": "DAY",
      "orderStrategyType": "SINGLE",
      "orderLegCollection": [
        {
          "instruction": "SELL",
          "quantity": 12,
          "instrument": {
            "symbol": "XYZ",
            "assetType": "EQUITY"
          }
        }
      ]
    }
  ]
}

Conditional Order: One Cancels Another

{
  "orderStrategyType": "OCO",
  "childOrderStrategies": [
    {
      "orderType": "LIMIT",
      "session": "NORMAL",
      "price": "45.97",
      "duration": "DAY",
      "orderStrategyType": "SINGLE",
      "orderLegCollection": [
        {
          "instruction": "SELL",
          "quantity": 2,
          "instrument": {
            "symbol": "XYZ",
            "assetType": "EQUITY"
          }
        }
      ]
    },
    {
      "orderType": "STOP_LIMIT",
      "session": "NORMAL",
      "price": "35.03",
      "stopPrice": "37.03",
      "duration": "DAY",
      "orderStrategyType": "SINGLE",
      "orderLegCollection": [
        {
          "instruction": "SELL",
          "quantity": 2,
          "instrument": {
            "symbol": "XYZ",
            "assetType": "EQUITY"
          }
        }
      ]
    }
  ]
}

Conditional Order: One Triggers A One Cancels Another

{
  "orderStrategyType": "TRIGGER",
  "session": "NORMAL",
  "duration": "GOOD_TILL_CANCEL",
  "orderType": "LIMIT",
  "cancelTime": "2015-09-10",
  "price": 14.97,
  "orderLegCollection": [
    {
      "instruction": "BUY",
      "quantity": 5,
      "instrument": {
        "assetType": "EQUITY",
        "symbol": "XYZ"
      }
    }
  ],
  "childOrderStrategies": [
    {
      "orderStrategyType": "OCO",
      "childOrderStrategies": [
        {
          "orderStrategyType": "SINGLE",
          "session": "NORMAL",
          "duration": "DAY",
          "orderType": "LIMIT",
          "price": 15.27,
          "orderLegCollection": [
            {
              "instruction": "SELL",
              "quantity": 5,
              "instrument": {
                "assetType": "EQUITY",
                "symbol": "XYZ"
              }
            }
          ]
        },
        {
          "orderStrategyType": "SINGLE",
          "session": "NORMAL",
          "duration": "DAY",
          "orderType": "LIMIT",
          "price": 13.27,
          "orderLegCollection": [
            {
              "instruction": "SELL",
              "quantity": 5,
              "instrument": {
                "assetType": "EQUITY",
                "symbol": "XYZ"
              }
            }
          ]
        }
      ]
    }
  ]
}