{"id":8079,"date":"2025-09-04T23:21:56","date_gmt":"2025-09-05T04:21:56","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=8079"},"modified":"2025-09-04T23:23:50","modified_gmt":"2025-09-05T04:23:50","slug":"submitting-orders-2","status":"publish","type":"doc","link":"https:\/\/library-staging.tradingtechnologies.com\/apis\/tt-net-sdk\/working-with-orders-and-fills-tt-net-sdk\/submitting-orders-2\/","title":{"rendered":"Submitting orders"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To send a new order to an Exchange, you must first create an&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.OrderProfile.html\">OrderProfile<\/a>&nbsp;object, using one of its constructors, like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public OrderProfile(Instrument instrument);\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After populating the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html#tt_net_sdk_TradeSubscription_OrderProfile\">OrderProfile<\/a>&nbsp;properties with the appropriate settings that describe the order, you submit it to an exchange by calling the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html#tt_net_sdk_TradeSubscription_SendOrder_tt_net_sdk_OrderProfile_\">SendOrder()<\/a>&nbsp;method from a&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html\">TradeSubscription<\/a>&nbsp;object. After TT .NET SDK sends the order, it creates an&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Order.html\">Order<\/a>&nbsp;object that represents the working order associated with the original&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.OrderProfile.html\">OrderProfile<\/a>&nbsp;and delivers it in the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html\">TradeSubscription<\/a>&nbsp;object\u2019s order update events.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following code snippet demonstrates a simple order routing example assuming that a&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html\">TradeSubscription<\/a>&nbsp;object named \u201cm_ts\u201d has already been created and the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html#tt_net_sdk_TradeSubscription_OrderBookDownload\">OrderBookDownload<\/a>&nbsp;event has already fired.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void submitOrder(Instrument inst, Account acct, Price p)\n{\n  OrderProfile op = new OrderProfile(inst);\n  op.BuySell = BuySell.Buy;\n  op.Account = acct;\n  op.OrderQuantity = Quantity.FromDecimal(inst, 10);\n  op.OrderType = OrderType.Limit;\n  op.LimitPrice = p;\n\n  if (!m_ts.SendOrder(op))\n  {\n    Console.WriteLine(\"Send new order Failed.\");\n  }\n  else\n  {\n    Console.WriteLine(\"Sent new order: \" + \" SOK=\" + op.SiteOrderKey);\n  }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p class=\"wp-block-paragraph\">To send a new order to an Exchange, you must first create an&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.OrderProfile.html\">OrderProfile<\/a>&nbsp;object, using one of its constructors, like the following:<\/p>\n<p class=\"wp-block-paragraph\">After populating the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html#tt_net_sdk_TradeSubscription_OrderProfile\">OrderProfile<\/a>&nbsp;properties with the appropriate settings that describe the order, you submit it to an exchange by calling the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html#tt_net_sdk_TradeSubscription_SendOrder_tt_net_sdk_OrderProfile_\">SendOrder()<\/a>&nbsp;method from a&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html\">TradeSubscription<\/a>&nbsp;object. After TT .NET SDK sends the order, it creates an&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Order.html\">Order<\/a>&nbsp;object that represents the working order associated with the original&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.OrderProfile.html\">OrderProfile<\/a>&nbsp;and delivers it in the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html\">TradeSubscription<\/a>&nbsp;object\u2019s order update events.<\/p>\n<p class=\"wp-block-paragraph\">The following code snippet demonstrates a simple order routing example assuming that a&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html\">TradeSubscription<\/a>&nbsp;object named \u201cm_ts\u201d has already been created and the&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.TradeSubscription.html#tt_net_sdk_TradeSubscription_OrderBookDownload\">OrderBookDownload<\/a>&nbsp;event has already fired.<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-net-sdk","meta":{"_acf_changed":true,"footnotes":""},"docs-category":[773],"class_list":["post-8079","doc","type-doc","status-publish","hentry","docs-category-working-with-orders-and-fills-tt-net-sdk"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8079\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=8079"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=8079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}