{"_id":"5953e4ce74ea3e001518d93e","project":"563cc7119799fb0d00047685","version":{"_id":"563cc7119799fb0d00047688","__v":18,"project":"563cc7119799fb0d00047685","createdAt":"2015-11-06T15:28:17.683Z","releaseDate":"2015-11-06T15:28:17.683Z","categories":["563cc7129799fb0d00047689","566f37f37ffa002300c3cd5b","56914e9bd47b020d002225ac","5692b19ffe72e00d00e4f0a8","56940bc2d8c04d1700e5adb6","56940bc83e9d080d00f064f0","56951b2dfcb1032d0089df7a","569522aecaa32519009c410c","569523ce562335190016da97","569523fddcaf0d1700cb86bf","56980e4a8560a60d00e2c3c3","569921a41693520d002e1305","5699323b7465970d00650b82","569e6cc4fbee990d0072d927","56a2768a0aefae0d00b7fe66","5862e862b8b7fa23009665b7","592835c7bc8bca0f000cc9ff","596f693df43cca002e690e1c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Model T","version_clean":"1.0.0","version":"1"},"category":{"_id":"56940bc2d8c04d1700e5adb6","__v":8,"pages":["56940ce773f48f0d0075c9df","56941dd246b943190027fdf8","5694325e5f1c951900644d0a","569443761005590d0062cacc","5694450e46b943190027fe45","569511bcfe18811700c9bf59","56951873dcaf0d1700cb86a3","56951a76caa32519009c40f4"],"project":"563cc7119799fb0d00047685","version":"563cc7119799fb0d00047688","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-11T20:08:34.666Z","from_sync":false,"order":5,"slug":"orders","title":"Orders"},"user":"569574eccaa32519009c4202","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-28T17:18:06.917Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"POST /v1/orders HTTP/1.1\nHost: api.drivewealth.io\nAccept: application/json\nContent-Type: application/json\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-20T20:50:48.680Z\n\n{\n    \"accountID\":\"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456\",\n    \"accountNo\":\"DWTE000005\",\n    \"userID\":\"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n    \"accountType\":2,\n    \"ordType\":\"6\",\n    \"side\":\"B\",\n    \"instrumentID\":\"06926627-e950-48f3-9c53-b679f61120ec\",\n    \"amountCash\":1000,\n    \"comment\":\"\",\n    \"mitTriggerPrice\": \"950\"\n}","language":"http"},{"language":"curl","code":"curl -X POST -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"x-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-20T20:50:48.680Z\" -d '{\n    \"accountID\":\"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456\",\n    \"accountNo\":\"DWTE000005\",\n    \"userID\":\"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n    \"accountType\":2,\n    \"ordType\":\"6\",\n    \"side\":\"B\",\n    \"instrumentID\":\"06926627-e950-48f3-9c53-b679f61120ec\",\n    \"amountCash\":1000,\n    \"comment\":\"\",\n    \"mitTriggerPrice\": \"950\"\n}' \"http://api.drivewealth.io/v1/orders\""}]},"method":"post","results":{"codes":[{"name":"New","code":"{\n    \"orderID\": \"EF.36e5505d-77f0-4df2-81ed-59b6cd365375\",\n    \"instrumentID\": \"06926627-e950-48f3-9c53-b679f61120ec\",\n    \"orderNo\": \"EFNH000237\",\n    \"ordType\": \"6\",\n    \"side\": \"B\",\n    \"mitTriggerPrice\": \"950\",\n    \"commissionDesc\": \"Standard Commission\",\n    \"statusPath\": \"/v1/orders/EF.36e5505d-77f0-4df2-81ed-59b6cd365375\"\n}","language":"json","status":200},{"status":400,"language":"json","code":"{\n  \"code\": 400,\n  \"message\": \"Invalid value: instrumentID\"\n}"}]},"settings":"","auth":"required","params":[{"_id":"56940ce773f48f0d0075c9e0","ref":"","in":"body","required":true,"desc":"Instrument ID.","default":"a67422af-8504-43df-9e63-7361eb0bd99e","type":"string","name":"instrumentID"},{"_id":"569511bcfe18811700c9bf62","ref":"","in":"body","required":true,"desc":"Account ID.","default":"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456","type":"string","name":"accountID"},{"_id":"569511bcfe18811700c9bf61","ref":"","in":"body","required":true,"desc":"Account Number.","default":"DWTE000005","type":"string","name":"accountNo"},{"_id":"569511bcfe18811700c9bf60","ref":"","in":"body","required":true,"desc":"User ID.","default":"02e57c7d-d071-4c63-b491-1194a9939ea5","type":"string","name":"userID"},{"_id":"569511bcfe18811700c9bf5f","ref":"","in":"body","required":true,"desc":"Type of account: `\"1\"` - Practice or `\"2\"` - Live.","default":"2","type":"int","name":"accountType"},{"_id":"569511bcfe18811700c9bf5e","ref":"","in":"body","required":true,"desc":"Type of order: `\"6\"` - Market If Touched order.","default":"6","type":"string","name":"ordType"},{"_id":"569511bcfe18811700c9bf5d","ref":"","in":"body","required":true,"desc":"Side of order: `\"B\"` - Buy or `\"S\"` - Sell.","default":"B","type":"string","name":"side"},{"_id":"569511bcfe18811700c9bf5c","ref":"","in":"body","required":true,"desc":"Amount of cash up to two decimal places.","default":"1000","type":"double","name":"amountCash"},{"_id":"569511bcfe18811700c9bf5b","ref":"","in":"body","required":false,"desc":"User generated comment.","default":"Generated by Me","type":"string","name":"comment"},{"_id":"5953e35073082700156d6645","ref":"","in":"body","required":true,"desc":"Price at which the order will be released to the market","default":"100","type":"string","name":"mitTriggerPrice"}],"url":"/orders/"},"isReference":true,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response\"\n}\n[/block]\nThe response will contain a single order object and is successfully accepted when there is a response (see \"Result Format\"). To get status of this order, see [Get - Market Order](doc:get_market).\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`orderID`\",\n    \"1-0\": \"`instrumentID`\",\n    \"3-0\": \"`ordType`\",\n    \"4-0\": \"`side`\",\n    \"0-1\": \"Order ID that will be used to query it's status via [Get - Market Order](doc:get_market).\",\n    \"1-1\": \"Instrument ID.\",\n    \"3-1\": \"Type of order: `\\\"6\\\"` - market if touched order.\",\n    \"4-1\": \"Order side: either `\\\"B\\\"` - Buy or `\\\"S\\\"` - Sell.\",\n    \"7-0\": \"`statusPath`\",\n    \"7-1\": \"Path to check status of order\",\n    \"2-0\": \"`orderNo`\",\n    \"2-1\": \"Order Number.\",\n    \"5-0\": \"`mitTriggerPrice`\",\n    \"5-1\": \"Price at which order will be released to the market.\",\n    \"6-0\": \"`commissionDesc`\",\n    \"6-1\": \"Commission schedule that will be applied to the executed trade.\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Market If Touched Order Notes\"\n}\n[/block]\n#### Buy Market If Touched Order Notes\n\n**Buy Market If Touched orders are Good Til Cancel (GTC) orders.**\n\n**Buy Market If Touched orders are released to the market when the ASK price equals the mitTriggerPrice.**\n\n**Buy Market If Touched orders DO NOT GUARANTEE that executed price will equal the mitTriggerPrice.**\n\nIf a user wants to buy an instrument, the following rules apply:\n\n1.  Use the Ask when calculating or displaying market rate.\n2.  Must have sufficient cash to cover the amount requested plus commission. \n    -  Commission rate attached to a user's account and is available when the user logs in via [Create Session](doc:create-session).\n3.  Practice buy Market If Touched orders are accepted 24/7 except between 4:00 - 4:15pm EST on [trading days](https://www.nyse.com/markets/hours-calendars#holidays).\n4.  For live market, buy Market If Touched order orders are only released and executed when the market is open. Between 4:00pm - 4:15 EST, Market If Touched orders are rejected. After 4:15pm EST, Market If Touched orders are accepted for next market open.\n\n#### Sell Market If Touched Order Notes\n\n**Sell Market If Touched orders are Good Til Cancel (GTC) orders.**\n\n**Sell Market If Touched orders are released to the market when the BID price equals the mitTriggerPrice.**\n\n**Sell Market If Touched orders DO NOT GUARANTEE that executed price will equal the mitTriggerPrice.**\n\nIf a user wants to sell an instrument , the following rules apply:\n\n1.  Use the Bid when calculating or display market rate.\n2.  User must own the shares before selling. Short selling is currently not permitted.\n3.  Practice sell Market If Touched orders are accepted 24/7 except between 4:00 - 4:15pm EST on [trading days](https://www.nyse.com/markets/hours-calendars#holidays).\n4.  For live market, sell Market If Touched order orders are only released and executed when the market is open. Between 4:00pm - 4:15 EST, Market If Touched orders are rejected. After 4:15pm EST, Market If Touched orders are accepted for next market open.","excerpt":"Add a new market If Touched order, cash amount based.","slug":"create-order-market-if-touched-order-cash-amount","type":"endpoint","title":"Create Order (Market If Touched Order - Cash Amount)"}

postCreate Order (Market If Touched Order - Cash Amount)

Add a new market If Touched order, cash amount based.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

instrumentID:
required
stringa67422af-8504-43df-9e63-7361eb0bd99e
Instrument ID.
accountID:
required
string02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456
Account ID.
accountNo:
required
stringDWTE000005
Account Number.
userID:
required
string02e57c7d-d071-4c63-b491-1194a9939ea5
User ID.
accountType:
required
integer2
Type of account: `"1"` - Practice or `"2"` - Live.
ordType:
required
string6
Type of order: `"6"` - Market If Touched order.
side:
required
stringB
Side of order: `"B"` - Buy or `"S"` - Sell.
amountCash:
required
double1000
Amount of cash up to two decimal places.
comment:
stringGenerated by Me
User generated comment.
mitTriggerPrice:
required
string100
Price at which the order will be released to the market

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Response" } [/block] The response will contain a single order object and is successfully accepted when there is a response (see "Result Format"). To get status of this order, see [Get - Market Order](doc:get_market). [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Description", "0-0": "`orderID`", "1-0": "`instrumentID`", "3-0": "`ordType`", "4-0": "`side`", "0-1": "Order ID that will be used to query it's status via [Get - Market Order](doc:get_market).", "1-1": "Instrument ID.", "3-1": "Type of order: `\"6\"` - market if touched order.", "4-1": "Order side: either `\"B\"` - Buy or `\"S\"` - Sell.", "7-0": "`statusPath`", "7-1": "Path to check status of order", "2-0": "`orderNo`", "2-1": "Order Number.", "5-0": "`mitTriggerPrice`", "5-1": "Price at which order will be released to the market.", "6-0": "`commissionDesc`", "6-1": "Commission schedule that will be applied to the executed trade." }, "cols": 2, "rows": 8 } [/block] [block:api-header] { "type": "basic", "title": "Market If Touched Order Notes" } [/block] #### Buy Market If Touched Order Notes **Buy Market If Touched orders are Good Til Cancel (GTC) orders.** **Buy Market If Touched orders are released to the market when the ASK price equals the mitTriggerPrice.** **Buy Market If Touched orders DO NOT GUARANTEE that executed price will equal the mitTriggerPrice.** If a user wants to buy an instrument, the following rules apply: 1. Use the Ask when calculating or displaying market rate. 2. Must have sufficient cash to cover the amount requested plus commission.  - Commission rate attached to a user's account and is available when the user logs in via [Create Session](doc:create-session). 3. Practice buy Market If Touched orders are accepted 24/7 except between 4:00 - 4:15pm EST on [trading days](https://www.nyse.com/markets/hours-calendars#holidays). 4. For live market, buy Market If Touched order orders are only released and executed when the market is open. Between 4:00pm - 4:15 EST, Market If Touched orders are rejected. After 4:15pm EST, Market If Touched orders are accepted for next market open. #### Sell Market If Touched Order Notes **Sell Market If Touched orders are Good Til Cancel (GTC) orders.** **Sell Market If Touched orders are released to the market when the BID price equals the mitTriggerPrice.** **Sell Market If Touched orders DO NOT GUARANTEE that executed price will equal the mitTriggerPrice.** If a user wants to sell an instrument , the following rules apply: 1. Use the Bid when calculating or display market rate. 2. User must own the shares before selling. Short selling is currently not permitted. 3. Practice sell Market If Touched orders are accepted 24/7 except between 4:00 - 4:15pm EST on [trading days](https://www.nyse.com/markets/hours-calendars#holidays). 4. For live market, sell Market If Touched order orders are only released and executed when the market is open. Between 4:00pm - 4:15 EST, Market If Touched orders are rejected. After 4:15pm EST, Market If Touched orders are accepted for next market open.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}