1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【QuickFIX】10 デモ環境サーバへ接続

Last updated at Posted at 2017-04-27

ここらでデモ環境サーバへ接続して通信ができることを確認しときます

通信には暗号化が必要ですが、QuickFIXは対応していないので stunnel というプロセスをひとつかませておきます
ちなみに時刻がサーバとズレていると強制切断されてしまうのできちんと時刻を合わせておきましょう

暗号通信 stunnel 導入

$ sudo yum install stunnel

インストールしたら設定ファイルを作成
(設定ファイルはインストールされないので自分で作成)

$ sudo vi /etc/stunnel/stunnel.conf
  ;stunnel.conf

  client = yes
  pid = /var/run/stunnel.pid

  # 出力するログのレベルを設定
  # 各レベルの意味:emerg (0), alert (1), crit (2), err (3), warning (4), notice (5), info (6), debug (7)
  debug = 3
  output = /var/log/stunnel.log

  [cnx]
  client = yes
  delay = yes
  accept = 127.0.0.1:9999
  connect = currenex-server-address:443

クライアントモードで動作させ
プロセスIDとログの記録ファイルを指定
ログの出力レベルを debug に指定

ローカルの待ち受けポートを 9999 にして
接続先のIPアドレスとポートを指定 です

暗号通信 stunnel 起動

$ sudo stunnel

stunnel は一度起動するとバックグラウンドでずっと動いてくれます

####起動確認

$ sudo ps -ef |grep stunnel
[sudo] password for admin:
root      1198     1  0 23:34 pts/0    00:00:00 stunnel
root      1199     1  0 23:34 pts/0    00:00:00 stunnel
root      1200     1  0 23:34 pts/0    00:00:00 stunnel
root      1201     1  0 23:34 pts/0    00:00:00 stunnel
root      1202     1  0 23:34 pts/0    00:00:00 stunnel
root      1203     1  0 23:34 ?        00:00:00 stunnel
admin     1216   884  0 23:35 pts/0    00:00:00 grep --color=auto stunnel

$ cat /var/run/stunnel.pid
1203

$ ls -l /var/log/stu*
-rw-r----- 1 root root 0  4月 13 23:34 /var/log/stunnel.log

待ち受けポートの確認

$ sudo ss -t4lnp
State       Recv-Q Send-Q            Local Address:Port                           Peer Address:Port
LISTEN      0      128                   127.0.0.1:9999                                      *:*                   users:(("stunnel",pid=1203,fd=12))
LISTEN      0      128                           *:22                                        *:*                   users:(("sshd",pid=817,fd=3))

ポート 9999 が待ち受けている状態

QuickFIXの接続先設定確認

設定確認 - 接続先がローカルの 9999 であること

tradeclient]$ tail tradeclient.cfg

[SESSION]
BeginString=FIX.4.4
SenderCompID=CAXDemo_Account_Str
TargetCompID=CNX
SocketConnectHost=127.0.0.1
SocketConnectPort=9999
HeartBtInt=30
Password=Pass1234
SessionType=Ratefeed

実行

tradeclient]$ ./tradeclient tradeclient.cfg
------ 2017/04/13 15:54:01.673 --------
quit) Quit
Action:
Logon - FIX.4.4:CAXDemo_Account_Trd->CNX
<h> TradingSessionStatus:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[80]]></field>
    <field number="35"><![CDATA[h]]></field>
    <field number="34"><![CDATA[2]]></field>
    <field number="49"><![CDATA[CNX]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.374]]></field>
    <field number="56"><![CDATA[CAXDemo_Account_Trd]]></field>
  </header>
  <body>
    <field number="336"><![CDATA[0]]></field>
    <field number="340"><![CDATA[2]]></field>
  </body>
  <trailer>
    <field number="10"><![CDATA[065]]></field>
  </trailer>
</message>
<h> TradingSessionStatus: OPEN

ちゃんと接続して TradingSessionStatus の OPEN が返ってきてます
まず一つ

IN: 8=FIX.4.49=8035=h34=249=CNX52=20170413-15:54:02.37456=CAXDemo_Account_Trd336=0340=210=065

Logon - FIX.4.4:CAXDemo_Account_Str->CNX
<h> TradingSessionStatus:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[80]]></field>
    <field number="35"><![CDATA[h]]></field>
    <field number="34"><![CDATA[2]]></field>
    <field number="49"><![CDATA[CNX]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.400]]></field>
    <field number="56"><![CDATA[CAXDemo_Account_Str]]></field>
  </header>
  <body>
    <field number="336"><![CDATA[0]]></field>
    <field number="340"><![CDATA[2]]></field>
  </body>
  <trailer>
    <field number="10"><![CDATA[070]]></field>
  </trailer>
</message>
<h> TradingSessionStatus: OPEN

そしてもう一つ OPEN を受信
2つ受信したので自動的に 通貨ペア取得に行きます

OUT: 8=FIX.4.49=10935=x34=249=CAXDemo_Account_Trd52=20170413-15:54:02.53056=CNX320=SecListReq_20170413-155402.530559=010=068
<x> SecurityListRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[109]]></field>
    <field number="35"><![CDATA[x]]></field>
    <field number="34"><![CDATA[2]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Trd]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.530]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
    <field number="320"><![CDATA[SecListReq_20170413-155402.530]]></field>
    <field number="559"><![CDATA[0]]></field>
  </body>
  <trailer>
    <field number="10"><![CDATA[068]]></field>
  </trailer>
</message>

IN: 8=FIX.4.49=8035=h34=249=CNX52=20170413-15:54:02.40056=CAXDemo_Account_Str336=0340=210=070

ちゃんと SecurityListRequest を送ってます
送ったら SecurityList が返ってきました

<y> SecurityList:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[939]]></field>
    <field number="35"><![CDATA[y]]></field>
    <field number="34"><![CDATA[3]]></field>
    <field number="49"><![CDATA[CNX]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.662]]></field>
    <field number="56"><![CDATA[CAXDemo_Account_Trd]]></field>
  </header>
  <body>
    <field number="146"><![CDATA[19]]></field>
    <field number="320"><![CDATA[SecListReq_20170413-155402.530]]></field>
    <field number="322"><![CDATA[1]]></field>
    <field number="560"><![CDATA[0]]></field>
    <group>
      <field number="55"><![CDATA[USD/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[AUD/CHF]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[USD/CHF]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[AUD/USD]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[EUR/CHF]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[EUR/AUD]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[EUR/GBP]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[EUR/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[EUR/USD]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[GBP/USD]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[ZAR/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[NZD/USD]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[GBP/CHF]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[CHF/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[CAD/CHF]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[4]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[GBP/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[AUD/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[CAD/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
    <group>
      <field number="55"><![CDATA[NZD/JPY]]></field>
      <field number="870"><![CDATA[2]]></field>
      <group>
        <field number="871"><![CDATA[18]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
      <group>
        <field number="871"><![CDATA[16]]></field>
        <field number="872"><![CDATA[2]]></field>
      </group>
    </group>
  </body>
  <trailer>
    <field number="10"><![CDATA[131]]></field>
  </trailer>
</message>

通貨ペア毎にまだ作ってない MarketDataRequest の空メッセージをおくっちゃってます
以下はゴミ

OUT: 8=FIX.4.49=6835=V34=249=CAXDemo_Account_Str52=20170413-15:54:02.87156=CNX10=053
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[2]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.871]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[053]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6835=V34=349=CAXDemo_Account_Str52=20170413-15:54:02.88456=CNX10=058
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[3]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.884]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[058]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6835=V34=449=CAXDemo_Account_Str52=20170413-15:54:02.89656=CNX10=062
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[4]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.896]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[062]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6835=V34=549=CAXDemo_Account_Str52=20170413-15:54:02.90756=CNX10=056
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[5]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.907]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[056]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6835=V34=649=CAXDemo_Account_Str52=20170413-15:54:02.91956=CNX10=060
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[6]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.919]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[060]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6835=V34=749=CAXDemo_Account_Str52=20170413-15:54:02.92756=CNX10=060
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[7]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.927]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[060]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6835=V34=849=CAXDemo_Account_Str52=20170413-15:54:02.94056=CNX10=056
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[8]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.940]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[056]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6835=V34=949=CAXDemo_Account_Str52=20170413-15:54:02.95156=CNX10=059
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[68]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[9]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.951]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[059]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1049=CAXDemo_Account_Str52=20170413-15:54:02.96056=CNX10=100
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[10]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.960]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[100]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1149=CAXDemo_Account_Str52=20170413-15:54:02.97256=CNX10=104
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[11]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.972]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[104]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1249=CAXDemo_Account_Str52=20170413-15:54:02.98256=CNX10=106
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[12]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.982]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[106]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1349=CAXDemo_Account_Str52=20170413-15:54:02.99556=CNX10=111
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[13]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:02.995]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[111]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1449=CAXDemo_Account_Str52=20170413-15:54:03.00856=CNX10=098
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[14]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:03.008]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[098]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1549=CAXDemo_Account_Str52=20170413-15:54:03.02056=CNX10=093
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[15]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:03.020]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[093]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1649=CAXDemo_Account_Str52=20170413-15:54:03.03356=CNX10=098
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[16]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:03.033]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[098]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1749=CAXDemo_Account_Str52=20170413-15:54:03.04356=CNX10=100
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[17]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:03.043]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[100]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1849=CAXDemo_Account_Str52=20170413-15:54:03.05656=CNX10=105
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[18]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:03.056]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[105]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=1949=CAXDemo_Account_Str52=20170413-15:54:03.06856=CNX10=109
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[19]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:03.068]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[109]]></field>
  </trailer>
</message>

OUT: 8=FIX.4.49=6935=V34=2049=CAXDemo_Account_Str52=20170413-15:54:03.07756=CNX10=101
<V> MarketDataRequest:
<message>
  <header>
    <field number="8"><![CDATA[FIX.4.4]]></field>
    <field number="9"><![CDATA[69]]></field>
    <field number="35"><![CDATA[V]]></field>
    <field number="34"><![CDATA[20]]></field>
    <field number="49"><![CDATA[CAXDemo_Account_Str]]></field>
    <field number="52"><![CDATA[20170413-15:54:03.077]]></field>
    <field number="56"><![CDATA[CNX]]></field>
  </header>
  <body>
  </body>
  <trailer>
    <field number="10"><![CDATA[101]]></field>
  </trailer>
</message>

IN: 8=FIX.4.49=93935=y34=349=CNX52=20170413-15:54:02.66256=CAXDemo_Account_Trd146=1955=USD/JPY870=2871=18872=2871=16872=255=AUD/CHF870=2871=18872=4871=16872=455=USD/CHF870=2871=18872=4871=16872=455=AUD/USD870=2871=18872=4871=16872=455=EUR/CHF870=2871=18872=4871=16872=455=EUR/AUD870=2871=18872=4871=16872=455=EUR/GBP870=2871=18872=4871=16872=455=EUR/JPY870=2871=18872=2871=16872=255=EUR/USD870=2871=18872=4871=16872=455=GBP/USD870=2871=18872=4871=16872=455=ZAR/JPY870=2871=18872=2871=16872=255=NZD/USD870=2871=18872=4871=16872=455=GBP/CHF870=2871=18872=4871=16872=455=CHF/JPY870=2871=18872=2871=16872=255=CAD/CHF870=2871=18872=4871=16872=455=GBP/JPY870=2871=18872=2871=16872=255=AUD/JPY870=2871=18872=2871=16872=255=CAD/JPY870=2871=18872=2871=16872=255=NZD/JPY870=2871=18872=2871=16872=2320=SecListReq_20170413-155402.530322=1560=010=131

quit

Logout - FIX.4.4:CAXDemo_Account_Trd->CNX

Logout - FIX.4.4:CAXDemo_Account_Str->CNX


通信確認ができたので quit で切断


<前 【QuickFIX】09 通貨ペア取得 SecurityList
次> 【QuickFIX】11 ログ出力設定


一覧

01 サンプルのコンパイル
02 ログイン時にPassword(554)を送信
03 送受信ログをMySQLに保存
04 情報保存用にMySQLコネクションを保持..他
05 各種メッセージの枠を作成
06 独自メッセージ仕様
07 セッション開始 TradingSessionStatus
08 通貨ペア要求 SecurityListRequest
09 通貨ペア取得 SecurityList
10 デモ環境サーバへ接続
11 ログ出力設定
12 マーケット情報要求 < V > MarketDataRequest
13 マーケット情報受信 < X > MarketDataIncrementalRefresh
14 口座情報要求 < AN > RequestForPositions
15 口座情報取得 < AZ > CollateralResponse


1
4
15

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?