﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">getsecurityvalue. StockSharp</title>
  <id>https://stocksharp.ru/handlers/atom.ashx?category=tag&amp;id=getsecurityvalue&amp;type=community</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-16T02:55:51Z</updated>
  <logo>https://stocksharp.ru/images/logo.png</logo>
  <link href="https://stocksharp.ru/handlers/atom.ashx?category=tag&amp;id=getsecurityvalue&amp;type=community" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.ru/topic/11743/</id>
    <title type="text">GetSecurityValue</title>
    <published>2020-04-27T22:41:05Z</published>
    <updated>2020-04-30T13:36:39Z</updated>
    <author>
      <name>Алексей</name>
      <uri>https://stocksharp.ru/users/99809/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <category term="GetSecurityValue" />
    <content type="html">&lt;p&gt;Здравствуйте.
S# 5.0 и Quik 8, Windows 10 Pro, WS 2019, .NET 4.8 FW.
Пытаюсь получить значение маркет-данных для инструмента:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;private Security testSecurity; 
        private string isin = &amp;quot;RU000A0JU286&amp;quot;;

        private void Test_Click(object sender, RoutedEventArgs e)
        {
            foreach (var sec in connector.Securities) 
            {
                if (sec.Code == isin &amp;amp;&amp;amp; sec.Board == ExchangeBoard.MicexEqob &amp;amp;&amp;amp; sec.Currency == CurrencyTypes.RUB)
                {
                    connector.SubscribeLevel1(sec); 
                    testSecurity = sec;
                }
            }
            Trace.TraceInformation($&amp;quot;&amp;gt; testSecurity {testSecurity.Code} / значение {connector.GetSecurityValue(testSecurity, Level1Fields.PriceStep)}&amp;quot;);
            Trace.TraceInformation($&amp;quot;&amp;gt; testSecurity {testSecurity.Code} / значение {connector.GetSecurityValue(testSecurity, Level1Fields.BestBid)}&amp;quot;);
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Результат null, что не так?&lt;/p&gt;
</content>
  </entry>
</feed>