Hi there,
I am trying to catch an update when a new Trade is added to the trades table. OnTableUpdate function does not catch a when a trade is added - but does catch an event when the trade is closed (table update type = deleted)
Public Sub onTablesUpdates(ByVal response As O2GResponse) Implements IO2GResponseListener.onTablesUpdates
Dim factory As O2GResponseReaderFactory = mSession.getResponseReaderFactory()
If (factory IsNot Nothing) Then
Dim updatesReader As O2GTablesUpdatesReader = factory.createTablesUpdatesReader(response)
Dim i As Integer = 0
For i = 0 To updatesReader.Count - 1
Dim tableType As O2GTableType = updatesReader.getUpdateTable(i)
If (tableType = O2GTableType.Trades) Then
Dim trade As O2GTradeRow = updatesReader.getTradeRow(i)
'If (trade.OfferID = g_CurrPair) Then
'Dim msg As String =
Dim updateType As O2GTableUpdateType = updatesReader.getUpdateType(i)
'"OfferId: " & trade.OfferID & " BuySell: " & trade.BuySell & " Amount : " & trade.Amount
Debug_Msg("")
'End If
End If
i = i + 1
Next
End If
End sub
Please help we are using a us account
many thanks
I am trying to catch an update when a new Trade is added to the trades table. OnTableUpdate function does not catch a when a trade is added - but does catch an event when the trade is closed (table update type = deleted)
Public Sub onTablesUpdates(ByVal response As O2GResponse) Implements IO2GResponseListener.onTablesUpdates
Dim factory As O2GResponseReaderFactory = mSession.getResponseReaderFactory()
If (factory IsNot Nothing) Then
Dim updatesReader As O2GTablesUpdatesReader = factory.createTablesUpdatesReader(response)
Dim i As Integer = 0
For i = 0 To updatesReader.Count - 1
Dim tableType As O2GTableType = updatesReader.getUpdateTable(i)
If (tableType = O2GTableType.Trades) Then
Dim trade As O2GTradeRow = updatesReader.getTradeRow(i)
'If (trade.OfferID = g_CurrPair) Then
'Dim msg As String =
Dim updateType As O2GTableUpdateType = updatesReader.getUpdateType(i)
'"OfferId: " & trade.OfferID & " BuySell: " & trade.BuySell & " Amount : " & trade.Amount
Debug_Msg("")
'End If
End If
i = i + 1
Next
End If
End sub
Please help we are using a us account
many thanks
Aucun commentaire:
Enregistrer un commentaire