{"id":8073,"date":"2025-09-04T23:21:58","date_gmt":"2025-09-05T04:21:58","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=8073"},"modified":"2025-09-04T23:23:51","modified_gmt":"2025-09-05T04:23:51","slug":"managing-subscription-events","status":"publish","type":"doc","link":"https:\/\/library-test.tradingtechnologies.com\/apis\/tt-net-sdk\/subscribing-for-market-data-tt-net-sdk\/managing-subscription-events\/","title":{"rendered":"Managing subscription events"},"content":{"rendered":"\n<p>The signature of the methods to which event handler delegates point takes the form:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void &lt;method name&gt; ( object sender, &lt;object derived from EventArgs&gt; args )\n<\/code><\/pre>\n\n\n\n<p>The first argument is a reference to the request object. As it is passed as a&nbsp;<code>System.Object<\/code>, you must cast it to the appropriate type of the request object before using it. The following example shows how to cast the request sender as an&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.InstrumentLookup.html\">InstrumentLookup<\/a>&nbsp;object:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public void doInstrumentLookup()\n{\n  InstrumentLookup m_req = new InstrumentLookup(\n     tt_net_sdk.Dispatcher.Current,\n     MarketId.CME, ProductType.Future, \"CL\", \"CL Dec19\");\n  m_req.OnData += new EventHandler(m_req_OnData);\n  m_req.GetAsync();\n}\n\nvoid m_req_OnData(object sender, InstrumentLookupEventArgs e)\n{\n  InstrumentLookup m_req = (InstrumentLookup)sender;\n  \/* code omitted *\/\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The signature of the methods to which event handler delegates point takes the form: The first argument is a re [&hellip;]<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-net-sdk","meta":{"_acf_changed":true,"footnotes":""},"docs-category":[771],"class_list":["post-8073","doc","type-doc","status-publish","hentry","docs-category-subscribing-for-market-data-tt-net-sdk"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-test.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/library-test.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/library-test.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/library-test.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/library-test.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8073\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-test.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=8073"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-test.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=8073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}