addToQueue

Use this command to submit changes to your trades. The command does not submit revisions to the clearinghouse for reclearing, but adds them to the queue. The request payload of the POST should be two key/value pairs. The keys are id and data. The values should be in JSON format.

When used to add multiple trades to the queue in a single method call, all trades must be be associated with the same clearing house. All trades in a single method call must be cleared either OCC or CCUS, but not a mixture of both.

The Cboe order_id and exec_id are always required in the ids object when submitting an addToQueue command. The position, capacity, clearing_firm, and qty values are required to submit an edit for a single trade. Changing capacity from C to another value may not be done using the API and can only be changed using the Clearing Editor. The remaining fields must be included as parts of the object; however, each field can be submitted as an empty string with the following exceptions:

  • If editing an execution that has already been modified, the item information must be provided. The item can be obtained using the viewTrades command
  • firm_id, firm_sub_id, and routing_broker must be provided in the object if editing the clearing_firm on a trade
  • sub_account must not be empty for capacity 'M' or 'N' trades

For floor trades, the following fields may not be edited using the API and can only be edited via the Clearing Editor:

  • osi_root
  • call_put_flag
  • expire_date
  • strike_price
  • price
  • floor_trader
  • contra_floor_trader
Table 1. addToQueue
ParameterRequired Description
commandYaddToQueue
idsY
  • JSON-formatted list of objects.
  • Each object must contain order_id, exec_id, item, firm_id, firm_sub_id, and routing_broker keys to identify the order(s) to be modified.
dataY
  • JSON-formatted object. The keys for the objects are numbers indexed by zero.
  • The values are objects that contain the following keys.
  • position, cmta, capacity, account, sub_account, clearing_firm, clearing_opt_data, and qty
  • The following are available on C1 only: cl_order_id, frequent_trader_id, strategy_id, compression_trade, and ors_eligible.

viewTrades to addToQueue Translation Guide

The table below provides a guide to translating between the fields values received for the viewTrades command and the field values that should be sent for addToQueue.

Table 2. viewTrades to addToQueue
viewTradesaddToQueue
Ids
order_idorder_id
exec_idexec_id
itemItem
firm_idfirm_id
firm_sub_idfirm_sub_id
routing_brokerrouting_broker
Data
accountaccount
capacity (value is spelled out)
  • capacity (value must be a single letter, see viewTrades values above)
  • Changing capacity from C to another value may not be done using the API and can only be changed using the Clearing Editor.
reason_code
  • Valid values include the following:
  • I = Input Error or Error Rpt. (Rule 6.6)
  • U = Unmatched Trade (Rule 6.6)
  • K = Unknown at Ord Entry (Rule 6.6)
  • M = Manual Add (Rule 6.6)
  • O = Other, Text Required (Rule 6.6)
  • A = Allocation
  • N = Trade Nullification (Rule 6.5)
  • J = Trade Adjustment (Rule 6.5)
  • E = Error Account (Rule 5.91)
  • S = System Issue
reason_textReason for change of capacity if reason_code parameter = 0
cl_order_idcl_order_id (C1 only)
clearing_opt_dataclearing_opt_data
cmtacmta
compression_trade (value is spelled out as "No" or Yes")
  • compression_trade (C1 only)
  • value must be a single letter, N or Y
executing_firm_idclearing_firm
frequent_trader_idfrequent_trader_id (C1 only)
ors_eligible (value is spelled out as "No" or Yes")
  • ors_eligible (C1 only)
  • (value must be a single letter, N or Y)
position (value is spelled out)position (value must be O or C)
sizeqty
strategy_id (value is spelled out)
  • strategy_id (C1 only)
  • (value must be a single letter, see viewTrades values above)
sub_accountsub_account

Ids Format:

JSON-formatted list of objects (do not include carriage returns):

ids:[
  {
"order_id": "

AAAAAAAAAAAAA",
"exec_id": "

01XX00001",
   "item": "",
   "firm_id": "CBOE",
   "firm_sub_id": "0002",
   "routing_broker": "CBOE"
  }
 ]

Data Format:

JSON-formatted list of objects (do not include carriage returns):

data:{
  "0": {
    "position": "C",
    "cmta": "111",
    "capacity": "C",
    "account": "AAAA",
    "sub_account": "",
    "clearing_firm": "CBOE",
    "qty": "10"
   }
 }

Example Request (Changing a Single Trade)

ids:[
  {
"order_id": "

AAAAAAAAAAAAA",
"exec_id": "

01XX00001",
   "item": "",
   "firm_id": "CBOE",
   "firm_sub_id": "0002",
   "routing_broker": "CBOE"
  }
 ]
data:{
  "0": {
    "position": "C",
    "cmta": "111",
    "capacity": "C",
    "account": "AAAA",
    "sub_account": "",
    "clearing_firm": "CBOE",
    "clearing_opt_data": ""
   }
 }

Example Request (Changing Multiple Trades)

When changing multiple executions, the data key must contain a single key. Multiple trades cannot be split with a single command.

Ids:[
  {
"order_id": "

AAAAAAAAAAAAA",
"exec_id": "

01XX00001",
   "item": "",
   "firm_id": "CBOE",
   "firm_sub_id": "0002",
   "routing_broker": "CBOE"
  }, {
"order_id": "

BBBBBBBBBBBB",
"exec_id": "

02XX00001",
   "item": "",
   "firm_id": "CBOE",
   "firm_sub_id": "0002",
   "routing_broker": "CBOE"
  }
 ]
data:{
  "0": {
    "position": "C",
    "cmta": "111",
    "capacity": "C",
    "account": "AAAA",
    "sub_account": "",
    "clearing_firm": "CBOE",
    "clearing_opt_data": ""
   }
 }

Example Request (Splitting an Execution)

Only one trade may be split at a time, and as a result, you must submit a single identifier in the id fields. The number of keys in the data object should match the number of times the trade was split. Data keys should be numbered, beginning with the first key equal to 0, followed by 1, etc.

The value of each key in the data object is a JSON-formatted object that contains all the keys described in the Parameter/Description table. The sum of the qty fields must equal the size of the trade being split. For example, if you are splitting an execution that was for ten contracts into two, five-lot trades, adding the qty fields of the two key/value objects in the data object will equal 10, the original quantity.

It is possible that one of the value objects will be the same as the original trade. For example, if you are splitting a trade for ten contracts into two, five-lot executions, and there are no changes to one of these five-lot trades, one of the two key/value pairs in the data object will have updates, while the other key/value pair will remain unchanged.

Ids:[
  {
"order_id": "

AAAAAAAAAAAAA",
"exec_id": "

01XX00001",
   "item": "",
   "firm_id": "CBOE",
   "firm_sub_id": "0002",
   "routing_broker": "CBOE"
  }
 ]
data:{
  "0": {
    "position": "C",
    "cmta": "111",
    "capacity": "C",
    "account": "AAAA",
    "sub_account": "",
    "clearing_firm": "CBOE",
    "clearing_opt_data": "",
    "qty": "2"
   }
 },
  "1": {
    "position": "O",
    "cmta": "222",
    "capacity": "U",
    "account": "BBBB",
    "sub_account": "",
    "clearing_firm": "CBOE",
    "clearing_opt_data": "",
    "qty": "8"
   }
 }

Example Response

{"code":"200",
 "msg":"Execution attribute changes queued"}

Reject Messaging

If an addToQueue command fails, the response will be an HTTP 500 status code with text indicating the reason for failure. Possible failure messages can included, but are not limited to the following:

  • Invalid capacity type has been selected
  • Invalid Broker Id has been selected
  • If you have multiple orders to edit you cannot split the orders
  • An unknown error occurred
  • Could not re-allocate orders because the order sizes did not match
Cboe Titanium U.S. Secure Web API - addToQueue | Cboe