0

MarketDataIncrementalRefresh から次の値を取得するにはどうすればよいですか?

  • シンボル/楽器
  • オファー
  • 入札
  • オファーサイズ
  • 入札サイズ

Quoteたとえば、次のようなメッセージ処理に精通しています。

If quote.isSetOfferPx Then Offer = quote.getOfferPx.getValue

で同じアプローチを試みましたMarketDataIncrementalRefreshが、そのようなメソッドはなく、フィールドが存在してもisSetField常に戻ります。false

MarketDataIncrementalRefreshメッセージの例:

8 = fix.4.29 = 22535 = x34 = 349 = abc52 = 20110928-12:47:53.31656 = Targetcompid262 = 634528216663837491268 = 2279 = 0269 = 0278 = 1555 = 15555 = 10012715151515151515555 = 15555555555555555555555555555555555555555555555555555555555555555555555 255=豪ドル/カナダドル270=1.0130715=豪ドル271=1000000346=110=094

4

1 に答える 1

2

問題が解決しました。からデータを取得するためにMarketDataIncrementalRefresh、 のビルドですGroups。したがって、各グループを取得し、そのデータを個別に取得する必要がありました。

方法は次のとおりです。

Public Overrides Sub onMessage(message As QuickFix42.MarketDataIncrementalRefresh, session As SessionID)

    Try
        If message IsNot Nothing Then
            Dim group As New MarketDataIncrementalRefresh.NoMDEntries()

            For i = 1 To message.getNoMDEntries.getValue

                group = message.getGroup(i, group)

                If group.isSetSymbol Then
                    Dim l_symbol As String = group.getSymbol().getValue

                    If group.getMDEntryType().getValue() = "0"c Then
                        SetBid(l_symbol, group.getMDEntryPx().getValue())
                        If group.isSetMDEntrySize Then
                            SetBidSize(l_symbol, group.getMDEntrySize().getValue)
                        End If
                    End If

                    If group.getMDEntryType().getValue() = "1"c Then
                        SetOffer(l_symbol, group.getMDEntryPx().getValue())
                        If group.isSetMDEntrySize Then
                            SetOfferSize(l_symbol, group.getMDEntrySize().getValue)
                        End If
                    End If
                End If
            Next
        End If
    Catch ex As Exception

    End Try

End Sub
于 2011-09-30T05:57:23.327 に答える