﻿<?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">Проблемы подключения к Hydra через Fix </title>
  <id>~/topic/8874/problemy-podklyucheniya-k-hydra-cherez-fix-/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-04T09:26:44Z</updated>
  <logo>https://stocksharp.ru/images/logo.png</logo>
  <link href="https://stocksharp.ru/handlers/atom.ashx?category=topic&amp;id=8874" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.ru/posts/m/41850/</id>
    <title type="text">[quote=Support;41849]А инструменты есть в Гидре? Попробуйте конкретизировать критерий поиска. Наприм...</title>
    <published>2017-11-28T17:12:26Z</published>
    <updated>2017-11-28T17:12:26Z</updated>
    <author>
      <name>Иван З.</name>
      <uri>https://stocksharp.ru/users/6502/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;[quote=Support;41849]А инструменты есть в Гидре?&lt;/p&gt;
&lt;p&gt;Попробуйте конкретизировать критерий поиска. Например, указать маску через Security.Code[/quote]
Инструменты есть
[img=105346]image6312.png[/img]
Пробовал Code и Id  разных инструментов
Может еще что то надо?
[spoiler]
[code=C#]
using Ecng.Serialization;
using StockSharp.Algo;
using StockSharp.Algo.Candles;
using StockSharp.Algo.Storages;
using StockSharp.Algo.Storages.Csv;
using StockSharp.BusinessEntities;
using StockSharp.Configuration;
using StockSharp.Xaml.Charting;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MoreLinq;
using StockSharp.Messages;&lt;/p&gt;
&lt;p&gt;namespace HydraFIX
{
/// &lt;summary&gt;
/// Interaction logic for MainWindow.xaml
/// &lt;/summary&gt;
public partial class MainWindow : Window
{
public Connector _connector = new Connector();
Security _security;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    string ConnectorFile = &amp;quot;ConnectorFile&amp;quot;;
    public MainWindow()
    {
        InitializeComponent();

        if (File.Exists(ConnectorFile))
        {
            _connector.Load(new XmlSerializer&amp;lt;SettingsStorage&amp;gt;().Deserialize(ConnectorFile));
        }
    }

    private void Setting_Click(object sender, RoutedEventArgs e)
    {
        if (_connector.Configure(this))
        {
            new XmlSerializer&amp;lt;SettingsStorage&amp;gt;().Serialize(_connector.Save(), ConnectorFile);
        }
    }

    private void Start_Click(object sender, RoutedEventArgs e)
    {

       //SecurityPicker.SecurityProvider = _connector;
       //SecurityPicker.MarketDataProvider = _connector;

        _connector.Adapter.InnerAdapters.ForEach(a =&amp;gt; a.RemoveTransactionalSupport());


        _connector.Connected += _connector_Connected;
        _connector.NewSecurity += _connector_NewSecurity;
        _connector.Connect();
    }

    private void _connector_NewSecurity(Security obj)
    {
        //Здесь никогда не появляется
    }

    private void _connector_Connected()
    {
        _connector.LookupSecurities(new Security());
        //_connector.LookupSecurities(new Security() { Code = &amp;quot;SBER&amp;quot; }); // Так пробовал
        //_connector.LookupSecurities(new Security() { Id = &amp;quot;SBER@TQBR&amp;quot; });// Так пробовал
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}
[/code]
[/spoiler]&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/41849/</id>
    <title type="text">А инструменты есть в Гидре? Попробуйте конкретизировать критерий поиска. Например, указать маску чер...</title>
    <published>2017-11-28T16:21:47Z</published>
    <updated>2017-11-28T16:21:47Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.ru/users/97869/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;А инструменты есть в Гидре?&lt;/p&gt;
&lt;p&gt;Попробуйте конкретизировать критерий поиска. Например, указать маску через Security.Code&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/41848/</id>
    <title type="text">[quote=Support;41846]Нужно прописать trader.TransactionAdapter.RemoveTransactionalSupport(); тогда т...</title>
    <published>2017-11-28T15:30:17Z</published>
    <updated>2017-11-28T15:30:17Z</updated>
    <author>
      <name>Иван З.</name>
      <uri>https://stocksharp.ru/users/6502/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;[quote=Support;41846]Нужно прописать trader.TransactionAdapter.RemoveTransactionalSupport(); тогда транзакционный адаптер будет пустым. или его полностью удалить из trader.Adapter[/quote]&lt;/p&gt;
&lt;p&gt;Сделал так
[code]
Trader.Adapter.InnerAdapters.ForEach(a =&amp;gt; a.RemoveTransactionalSupport());
[/code]
Ошибок нет. Warning Security is not specified теперь не пишет.
В гидре пишет так
[spoiler]
S#.Data (Hydra)	11/28/2017 10:12:57 PM +10:00	Info	S#.Data (Hydra) v4.4.2.0
FixServer	11/28/2017 10:13:08 PM +10:00	Info	Server 0.0.0.0:5002 started.
FixServer	11/28/2017 10:13:08 PM +10:00	Info	FixServer started.
FixServer	11/28/2017 10:13:08 PM +10:00	Info	FixServer outgoing thread started.
FixServer	11/28/2017 10:13:25 PM +10:00	Info	Connected '127.0.0.1:56400' to '0.0.0.0:5002'.
FixServer	11/28/2017 10:13:26 PM +10:00	Info	Received first byte from '127.0.0.1:56400'.
FixServer	11/28/2017 10:13:26 PM +10:00	Info	Connected '127.0.0.1:56401' to '0.0.0.0:5002'.
FixServer	11/28/2017 10:13:26 PM +10:00	Info	Received first byte from '127.0.0.1:56401'.
FixServer	11/28/2017 10:13:26 PM +10:00	Info	From : Logon
FixServer	11/28/2017 10:13:26 PM +10:00	Info	From : Logon
FixServer	11/28/2017 10:13:26 PM +10:00	Info	Client hydra_user (127.0.0.1:56400) authorized.
FixServer	11/28/2017 10:13:26 PM +10:00	Info	Client hydra_user (127.0.0.1:56401) authorized.
FixServer	11/28/2017 10:13:28 PM +10:00	Info	Sending Logon to client.
FixServer	11/28/2017 10:13:28 PM +10:00	Info	Sending Logon to client.
FixServer	11/28/2017 10:13:28 PM +10:00	Info	Session started.
FixServer	11/28/2017 10:13:28 PM +10:00	Info	Session started.
FixServer	11/28/2017 10:13:28 PM +10:00	Info	From hydra_user 127.0.0.1:56401: SecurityListRequest
FixServer	11/28/2017 10:14:25 PM +10:00	Info	From hydra_user 127.0.0.1:56400: TestRequest
FixServer	11/28/2017 10:14:26 PM +10:00	Info	From hydra_user 127.0.0.1:56401: TestRequest
FixServer	11/28/2017 10:15:25 PM +10:00	Info	From hydra_user 127.0.0.1:56400: TestRequest
FixServer	11/28/2017 10:15:26 PM +10:00	Info	From hydra_user 127.0.0.1:56401: TestRequest
FixServer	11/28/2017 10:16:26 PM +10:00	Info	From hydra_user 127.0.0.1:56400: TestRequest
FixServer	11/28/2017 10:16:26 PM +10:00	Info	From hydra_user 127.0.0.1:56401: TestRequest
FixServer	11/28/2017 10:17:26 PM +10:00	Info	From hydra_user 127.0.0.1:56400: TestRequest
FixServer	11/28/2017 10:17:26 PM +10:00	Info	From hydra_user 127.0.0.1:56401: TestRequest
[/spoiler]
Попробовал из стандартного окна настроить коннектор.
[img=105345]image9361.png[/img]
Но инструменты так и не приходят.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/41846/</id>
    <title type="text">Нужно прописать trader.TransactionAdapter.RemoveTransactionalSupport(); тогда транзакционный адаптер...</title>
    <published>2017-11-28T14:19:23Z</published>
    <updated>2017-11-28T14:19:23Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.ru/users/97869/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;Нужно прописать trader.TransactionAdapter.RemoveTransactionalSupport(); тогда транзакционный адаптер будет пустым. или его полностью удалить из trader.Adapter&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/41842/</id>
    <title type="text">Hydra со всеми обновлениями. Не приходят инструменты при Trader.LookupSecurities(new Security()); По...</title>
    <published>2017-11-28T13:07:48Z</published>
    <updated>2017-11-28T13:07:48Z</updated>
    <author>
      <name>Иван З.</name>
      <uri>https://stocksharp.ru/users/6502/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;Hydra со всеми обновлениями.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Не приходят инструменты при Trader.LookupSecurities(new Security());
Подключение есть. У Гидры в логах пишет предупреждение Security is not specified. Ошибок нет.
С пол года назад все работало.
[spoiler]
S#.Data (Hydra)	11/28/2017 7:41:41 PM +10:00	Info	S#.Data (Hydra) v4.4.0.0
FixServer	11/28/2017 7:41:52 PM +10:00	Info	Server 0.0.0.0:5002 started.
FixServer	11/28/2017 7:41:52 PM +10:00	Info	FixServer started.
FixServer	11/28/2017 7:41:52 PM +10:00	Info	FixServer outgoing thread started.
FixServer	11/28/2017 7:42:26 PM +10:00	Info	Connected '127.0.0.1:58502' to '0.0.0.0:5002'.
FixServer	11/28/2017 7:42:26 PM +10:00	Info	Received first byte from '127.0.0.1:58502'.
FixServer	11/28/2017 7:42:26 PM +10:00	Info	From : Logon
FixServer	11/28/2017 7:42:26 PM +10:00	Info	Client hydra_user (127.0.0.1:58502) authorized.
FixServer	11/28/2017 7:42:28 PM +10:00	Info	Sending Logon to client.
FixServer	11/28/2017 7:42:28 PM +10:00	Info	Session started.
FixServer	11/28/2017 7:42:30 PM +10:00	Info	From hydra_user 127.0.0.1:58502: SecurityListRequest
FixServer	11/28/2017 7:42:30 PM +10:00	Info	From hydra_user 127.0.0.1:58502: OrderMassStatusRequest
FixServer	11/28/2017 7:42:30 PM +10:00	Info	From hydra_user 127.0.0.1:58502: SecurityListRequest
FixServer	11/28/2017 7:42:30 PM +10:00	Warning	Security is not specified.
[/spoiler]&lt;/li&gt;
&lt;li&gt;После Trader.Disconnect();
Повторно подключится к гидре не удается, в Trader.ConnectionError приходит следующая ошибка.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Connection process was interrupted because of an unexpected disconnection.
Unable to write data to the transport connection: An established connection was aborted by the software in your host machine.&lt;/p&gt;
&lt;p&gt;[spoiler]
S#.Data (Hydra)	11/28/2017 7:52:38 PM +10:00	Info	S#.Data (Hydra) v4.4.2.0
FixServer	11/28/2017 7:52:51 PM +10:00	Info	Server 0.0.0.0:5002 started.
FixServer	11/28/2017 7:52:51 PM +10:00	Info	FixServer started.
FixServer	11/28/2017 7:52:51 PM +10:00	Info	FixServer outgoing thread started.
FixServer	11/28/2017 7:53:06 PM +10:00	Info	Connected '127.0.0.1:59518' to '0.0.0.0:5002'.
FixServer	11/28/2017 7:53:06 PM +10:00	Info	Received first byte from '127.0.0.1:59518'.
FixServer	11/28/2017 7:53:06 PM +10:00	Info	Connected '127.0.0.1:59519' to '0.0.0.0:5002'.
FixServer	11/28/2017 7:53:06 PM +10:00	Info	Received first byte from '127.0.0.1:59519'.
FixServer	11/28/2017 7:53:06 PM +10:00	Info	From : Logon
FixServer	11/28/2017 7:53:06 PM +10:00	Info	From : Logon
FixServer	11/28/2017 7:53:06 PM +10:00	Info	Client hydra_user (127.0.0.1:59519) authorized.
FixServer	11/28/2017 7:53:06 PM +10:00	Info	Client hydra_user (127.0.0.1:59518) authorized.
FixServer	11/28/2017 7:53:08 PM +10:00	Info	Sending Logon to client.
FixServer	11/28/2017 7:53:08 PM +10:00	Info	Sending Logon to client.
FixServer	11/28/2017 7:53:08 PM +10:00	Info	Session started.
FixServer	11/28/2017 7:53:08 PM +10:00	Info	Session started.
FixServer	11/28/2017 7:53:08 PM +10:00	Info	From hydra_user 127.0.0.1:59519: SecurityListRequest
FixServer	11/28/2017 7:53:08 PM +10:00	Info	From hydra_user 127.0.0.1:59518: OrderMassStatusRequest
FixServer	11/28/2017 7:53:08 PM +10:00	Warning	Security is not specified.
FixServer	11/28/2017 7:53:17 PM +10:00	Info	From hydra_user 127.0.0.1:59518: Logout
FixServer	11/28/2017 7:53:17 PM +10:00	Info	From hydra_user 127.0.0.1:59519: Logout
FixServer	11/28/2017 7:53:17 PM +10:00	Info	Disconnect hydra_user (127.0.0.1:59518)
FixServer	11/28/2017 7:53:17 PM +10:00	Info	Disconnect hydra_user (127.0.0.1:59519)
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Connected '127.0.0.1:59563' to '0.0.0.0:5002'.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Received first byte from '127.0.0.1:59563'.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	From : Logon
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Client hydra_user (127.0.0.1:59563) authorized.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Sending Logon to client.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Session started.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Connected '127.0.0.1:59564' to '0.0.0.0:5002'.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Received first byte from '127.0.0.1:59564'.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	From : Logon
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Client hydra_user (127.0.0.1:59564) authorized.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Disconnect hydra_user (127.0.0.1:59563)
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Sending Logon to client.
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Session started.
FixServer	11/28/2017 7:53:36 PM +10:00	Error	System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---&amp;gt; System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at Ecng.Serialization.BinaryHelper.ReadBytes(Stream stream, Byte[] buffer, Int32 len, Int32 pos)
at StockSharp.Fix.Native.BaseFixReader.ReadByte()
at StockSharp.Fix.Native.TextFixReader.ReadTag()
at #=qECbQYrnCUhCERgXSneZKcsfqD7iSLMz3vhOhKJvt5pUZjAjcYhJzkzDN7URjtcPz.#=qK5MIUfS2gj4q$9kVDfLA6w==(IFixReader #=qP2e$994s2t_hrClE4jL2xw==, FixTags #=q$Mgx84yaYFY$VGlSefJEcg==)
at #=qECbQYrnCUhCERgXSneZKcsfqD7iSLMz3vhOhKJvt5pUZjAjcYhJzkzDN7URjtcPz.#=qnQz65V1hSjv7Za4Hu6Nvtw==(IFixReader #=qP2e$994s2t_hrClE4jL2xw==, Boolean #=qrWSUPqUkhs9_5vYvQLxXllpJ3N7fWgp$f$nXIUfbOMI=, String #=qVAZasEIKImPf_tmVsmAv0t6CLQQ5nU2gPAaUqmSK2wk=)
at StockSharp.Fix.FixServer.#=q2oyo7MU$2AxjJdNknh2rVQ==(IFixReader #=qP2e$994s2t_hrClE4jL2xw==, FixSession[] #=qzsL33j8BZAesfcdiGtibxw==, #=qENMrL9OvFG4yJ5oX$GQk4sUdqp32hSd4iKkZMCc44ZfZ02p_Nxww2SAnTPN5Votu&amp;amp; #=qJWPLcnjelO$jE$im53AK9g==, TcpClient #=q2noQdgv3H4k_vOEqIWSB6w==, EndPoint #=qc8B1ratO37irYZ3U9HNS6w==, String&amp;amp; #=qhhxyp7GJm3H2m7cyE7N4yQ==, Boolean&amp;amp; #=qYM_AMtaiN2bvAMgxnwWRow==)
at StockSharp.Fix.FixServer.#=qPtKoq0t9t$3urUjq81dORPJNiMhhUvRYsxQHJbOPBFg=.#=q9foryVv8CbzoZJ16TJbpUA==(IAsyncResult #=qRmghNt46RgH54v0HlSGj4A==)
FixServer	11/28/2017 7:53:36 PM +10:00	Info	Disconnect hydra_user (127.0.0.1:59563)
FixServer	11/28/2017 7:53:36 PM +10:00	Info	From hydra_user 127.0.0.1:59564: SecurityListRequest&lt;/p&gt;
&lt;p&gt;[/spoiler]
Приходится перезагружать гидру&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>