{"id":8069,"date":"2025-09-04T23:22:06","date_gmt":"2025-09-05T04:22:06","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=8069"},"modified":"2025-09-04T23:23:52","modified_gmt":"2025-09-05T04:23:52","slug":"price-class-format-converters","status":"publish","type":"doc","link":"https:\/\/library-staging.tradingtechnologies.com\/apis\/tt-net-sdk\/subscribing-for-market-data-tt-net-sdk\/more-about-prices\/an-in-depth-look-at-the-price-class\/price-class-format-converters\/","title":{"rendered":"Price class: format converters"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">After you get a&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Price.html\">Price<\/a>&nbsp;object that is both valid and tradable, you can use the following methods to extract the price in different formats.<\/p>\n\n\n<?xml encoding=\"utf-8\" ?><figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Desired format<\/th><th>Price class method<\/th><\/tr><\/thead><tbody><tr><td>Points<\/td><td><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Price.html#tt_net_sdk_Price_ToDecimal\">ToDecimal()<\/a><\/td><\/tr><tr><td>Ticks<\/td><td><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Price.html#tt_net_sdk_Price_ToTicks\">ToTicks()<\/a><\/td><\/tr><tr><td>TT Display<\/td><td><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Price.html#tt_net_sdk_Price_ToString\">ToString()<\/a><\/td><\/tr><tr><td>Full price (in contract currency)<\/td><td><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Price.html#tt_net_sdk_Price_ToPrimaryCurrency\">ToPrimaryCurrency()<\/a><\/td><\/tr><tr><td>Full price (in trader&#8217;s currency)<\/td><td><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Price.html#tt_net_sdk_Price_ToNativeCurrency\">ToNativeCurrency()<\/a><\/td><\/tr><tr><td>Full price (in specific currency)<\/td><td><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Price.html#tt_net_sdk_Price_ToCurrency\">ToCurrency()<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For example, assume that the variable inst represents a valid&nbsp;<a href=\"\/tt-net-sdk\/api\/tt_net_sdk.InstrumentDetails.html\">InstrumentDetails<\/a>&nbsp;instance for the Eurex FGBL-Dec20 futures contract. You could use these methods as follows to display the price in the various formats:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Price p = Price.FromString(inst,\"114.73\");\nConsole.WriteLine(\"Points: \" + p.ToDouble() + \", Ticks: \" + p.ToTicks() +\n  \", TT Display: \" + p.ToString() + \", Full Price: \" + p.ToPrimaryCurrency());\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The result of this code snippet would be:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Points: 114.73, TT Display: 114.73, Full Price: 114730.00<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>After you get a&nbsp;Price&nbsp;object that is both valid and tradable, you can use the following methods to e [&hellip;]<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-net-sdk","meta":{"_acf_changed":true,"footnotes":""},"docs-category":[778],"class_list":["post-8069","doc","type-doc","status-publish","hentry","docs-category-an-in-depth-look-at-the-price-class"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8069","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\/8069\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=8069"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=8069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}