Create order
Create order
Headers
- Type: stringX
- Request - I D max length:64The unique identifier of the request. This will be used for identifying the request using updates. It is recommended that this be set to a globally unique identifier (GUID), 64 characters maximum.
Body·
Order
- Type: stringaccount
Code requiredName of the account to which the order has been allocated.
- Type: stringenumdestinationrequired
Destination of the order. Values are case-insensitive. Call orders destinations endpoint for the lifetime and pricingInstruction options of each destination.
valuesDESKAUTODESKASXASXCPBESTMKTCXACXACPNSXqCXAFIXED COTRAILING CO - Type: stringenumexchangerequired
The exchange where the security is listed. Values are case-insensitive.
valuesAOMASXAXWCXANSXNASNYS - Type: stringenumlifetimerequired
The order lifetime. The time for which the order is valid. Values are case-insensitive. Call orders destinations endpoint for the lifetimes available on each destination.
valuesDateEndOfDayGoodTillCancelFillAndKillFillOrKill - Type: numberFormat: doubleorder
Volume requiredThe order volume.
- Type: "Limit" or "MarketToLimit"enumpricing
Instruction requiredThe price attribute of the order. Values are case-insensitive. Call orders destinations endpoint for the pricing instructions available on each destination.
- Type: stringsecurity
Code requiredSecurity Code.
- Type: "Buy" or "Sell" or "Short"enumsiderequired
The side of the order.
- Type:data
Fields Properties: 19Properties that can be added on dataFields property. FixedContigentOrder properties can only be used when the destination is 'FIXED CO'. TrailingContingentOrder properties can only be used whtn the destination is 'TRAILING CO'.
- Type: stringFormat: date-timeexpiry
Date Time Date and time the order will be removed from the market if it hasn't fully traded. (Exchange time). Required when lifetime is Date, and ignored for other lifetimes.
- Type: stringnotesmax length:512
Custom notes to attach to the order.
- Type: stringorder
Giver max length:100The client or person who requested the order.
Responses
- application/json
curl https://test-oms-api.openmarkets.com.au/orders/v4 \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"accountCode": "111888",
"securityCode": "BHP",
"exchange": "ASX",
"destination": "ASX",
"side": "Buy",
"orderPrice": 4740,
"orderVolume": 200,
"lifetime": "Date",
"expiryDateTime": "2020-09-01T00:29:51.617Z",
"pricingInstruction": "Limit",
"notes": "CUST-35bd9318-74fc-4ea4-9bdc-593f8510b780",
"datafields": {
"originOfOrder": "trader01"
},
"orderGiver": "John Doe",
"orderTaker": "XYZ Company"
}'
{
"orderNumber": 41156644
}
