Option Allocation Order
Create an Options Allocation Order.
POST
/trading-api/v1/optionorder/create-allocation
Request
Query Parameters
Name | Data Type | Description |
---|---|---|
verifyOnly | Boolean | True: does not submit order. Response body will not return an orderId <br/> False: immediately submits order through API. If the order is successfully, the Response Body will return an orderId` |
Body
The Request Body to create an Options Allocation Order includes several required fields. This ensures that the created order has all necessary parameters for the order to return with no errors.
This request must consist of the below Stonex identifiers:
- Schema
- Example
Attributes | Data Type | Length | Value |
---|---|---|---|
accountNumber | String | 8 | Internal identifier |
blockOrderId | String | 32 | Unique ID generated by the Stock Exhange |
accountType | String | Cash, Margin, Short | |
noPostage | Boolean | True or False | |
allOrNone | Boolean | True or False | |
ttoRep | String | Character field | |
commissionType | String | FlatRate, CentsPerShare, PercentOfDiscount, Zero, Unknown, CommissionSchedule | |
commissionSchedule | Integer | Character field | |
commissionAmount | Number | $ amount for commission | |
confirmNote | String | Character field | |
underlyingSymbol | String | Cusip, Isin, Sedol, Symbol | |
expirationDate | String | (date-time) | |
putCallIndicator | String | Put, Call | |
strikePrice | Number | The price at which a Put or Call can be exercised | |
quantity | Number | Amount | |
action | String | Buy, Sell, BuyToCover, SellShort | |
timeInForce | String | Day, GoodTillCancel, FillOrKill, GTXPre, NTE |
{
"accountNumber": "string",
"blockOrderId": "00000000-0000-0000-0000-000000000000",
"accountType": "Cash",
"noPostage": false,
"allOrNone": false,
"ttoRep": "string",
"commissionType": "FlatRate",
"commissionSchedule": 0,
"commissionAmount": 0,
"confirmNote": "string",
"underlyingSymbol": "string",
"expirationDate": "2024-05-10T21:21:29.995Z",
"putCallIndicator": "Put",
"strikePrice": 0,
"quantity": 0,
"action": "BuyToOpen",
"timeInForce": "Day"
}
Response
Responses from the request will return with a Status Code.
Successful Response
The response for a Successful request will look like:
- Schema
- Example
A successful request will respond with a result containing the account number and account status
Attributes | Data Type | Length | Description |
---|---|---|---|
statusCode | Integer | 3 | Code identifies success of request |
message | String | Outcome of request | |
data | Data Block | Main field containing information of request | |
errors | Errors | API errors | |
traceId | String | Unique identifier | |
hasErrors | Boolean | True or False |
{
"statusCode": 0,
"message": "string",
"data": {
"clientAccountIdentifier": {
"accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"subNo": "string",
"branchNo": "string",
"accountNumber": "string",
"name": "string",
"sourceSystem": "string",
"subType": "Discretionary",
"catType": "string"
},
"noPostage": false,
"allOrNone": false,
"ttoRep": "string",
"commissionType": "FlatRate",
"commissionSchedule": 0,
"commissionAmount": 0,
"calculatedCommission": 0,
"confirmNote": "string",
"blockOptionOrder": {
"inventoryAccountIdentifier": {
"accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"subNo": "string",
"branchNo": "string",
"accountNumber": "string",
"name": "string",
"sourceSystem": "string",
"subType": "Discretionary",
"catType": "string"
},
"allocationOptionOrders": [
"string"
],
"stopPrice": 0,
"limitPrice": 0,
"orderId": "00000000-0000-0000-0000-000000000000",
"orderNumber": "00000000",
"orderType": "Single",
"accountType": "Cash",
"action": "BuyToOpen",
"timeInForce": "Day",
"orderStatus": "Verification",
"securityIdentifier": {
"securityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"securityNumber": "string",
"sourceSystem": "string",
"symbol": "string",
"underlyingSymbol": "string",
"isin": "string",
"sedol": "string",
"cusip": "string",
"description": "string",
"strikePrice": 0,
"expirationDate": "2024-05-10T21:21:29.997Z",
"displaySymbol": "string"
},
"openCloseIndicator": "Open",
"quantity": 0,
"filledQuantity": 0,
"solicited": false,
"notHeld": false,
"tradeInfo": {
"buyingPower": 0,
"estimatedSettlementDate": "2024-05-10T21:21:29.997Z",
"estimatedPrincipal": 0,
"estimatedNetTotal": 0,
"estimatedCommission": 0,
"estimatedHandlingFee": 0,
"estimatedPostageFee": 0,
"estimatedSecFee": 0,
"estimatedFirmFee": 0,
"estimatedPrice": 0,
"actualPrincipal": 0,
"actualNetTotal": 0,
"actualCommission": 0,
"actualHandlingFee": 0,
"actualPostageFee": 0,
"actualSecFee": 0,
"actualPrice": 0
},
"averageTradePriceAmount": 0,
"orderWarnings": [
"string"
],
"orderError": {
"code": "string",
"target": "string",
"message": "string",
"details": [
"string"
]
},
"enteredDate": "2024-05-10T21:21:29.997Z",
"completedDate": "2024-05-10T21:21:29.997Z"
},
"orderId": "00000000-0000-0000-0000-000000000000",
"orderNumber": "00000000",
"orderType": "Single",
"accountType": "Cash",
"action": "BuyToOpen",
"timeInForce": "Day",
"orderStatus": "Verification",
"securityIdentifier": {
"securityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"securityNumber": "string",
"sourceSystem": "string",
"symbol": "string",
"underlyingSymbol": "string",
"isin": "string",
"sedol": "string",
"cusip": "string",
"description": "string",
"strikePrice": 0,
"expirationDate": "2024-05-10T21:21:29.997Z",
"displaySymbol": "string"
},
"openCloseIndicator": "Open",
"quantity": 0,
"filledQuantity": 0,
"solicited": false,
"notHeld": false,
"tradeInfo": {
"buyingPower": 0,
"estimatedSettlementDate": "2024-05-10T21:21:29.997Z",
"estimatedPrincipal": 0,
"estimatedNetTotal": 0,
"estimatedCommission": 0,
"estimatedHandlingFee": 0,
"estimatedPostageFee": 0,
"estimatedSecFee": 0,
"estimatedFirmFee": 0,
"estimatedPrice": 0,
"actualPrincipal": 0,
"actualNetTotal": 0,
"actualCommission": 0,
"actualHandlingFee": 0,
"actualPostageFee": 0,
"actualSecFee": 0,
"actualPrice": 0
},
"averageTradePriceAmount": 0,
"orderWarnings": [
"string"
],
"orderError": {
"code": "string",
"target": "string",
"message": "string",
"details": [
"string"
]
},
"enteredDate": "2024-05-10T21:21:29.997Z",
"completedDate": "2024-05-10T21:21:29.997Z"
},
"errors": [
{
"code": "string",
"field": "string",
"reason": "string"
}
],
"traceId": "string",
"hasErrors": true
}