Reply to supunsilva (re: getMarketTradedVolumeCompressed)
Your output shows that you have succeeded in getting the market traded volume data. This is good, but it is in compressed form. You must now decompress (unpack) the string.
To do this you can use the classes shown in this post. (These classes are RunnerVolumeType, VolumeType and UnpackMarketTradedVolumeCompressed.) Then add some more code to unpack the data:
All the data is now in the oTradedVolume object. Here we print out some values just to show you what’s in there.
I will soon post a new step showing how to call getMarketTradedVolumeCompressedAsync.
Your output shows that you have succeeded in getting the market traded volume data. This is good, but it is in compressed form. You must now decompress (unpack) the string.
To do this you can use the classes shown in this post. (These classes are RunnerVolumeType, VolumeType and UnpackMarketTradedVolumeCompressed.) Then add some more code to unpack the data:
Code:
[COLOR="DimGray"]Dim ToMreq As New BFUK.GetMarketTradedVolumeCompressedReq
Dim ToMresp As BFUK.GetMarketTradedVolumeCompressedResp
With ToMreq
.header = oHeaderUK()
.marketId = marketId
End With
ToMresp = BetfairUK2.getMarketTradedVolumeCompressed(ToMreq)
With ToMresp
CheckHeader(.header)
If .errorCode = BFUK.GetMarketTradedVolumeCompressedErrorEnum.OK Then
txtstake.Text = .tradedVolume
[COLOR="Black"] Dim oTradedVolume As New UnpackMarketTradedVolumeCompressed(.tradedVolume) 'Unpack the data string
With oTradedVolume
For i = 0 To .RunnerVolume.Length - 1
With .RunnerVolume(i)
Print("selectionId = " & .selectionId)
For j = 0 To .tradedVolume.Length - 1 'This is the table of traded amounts for each runner
Print("odds = " & .tradedVolume(j).odds & " amt = " & .tradedVolume(j).totalMatchedAmount)
Next
End With
Next
End With[/COLOR]
End If
End With[/COLOR]
I will soon post a new step showing how to call getMarketTradedVolumeCompressedAsync.


Comment