OK I have a problem with the amount of data returned in MarketBook giving me the error code "operation restricts amount of data" blah blah blah like below
What I have is my app is a structure which stores MarketCatalog e data and MarketBook data such as:
Basically I was storing say 20 lots of MarketCatalogs and associated MarketBooks such that MarketCatalog(0) and MarketBook(0) had associated data.
Now I went to increase my return to 100 MarketCatalog to look at the next 4 to 5 hours of upcoming races. This is ok, but when I call for 100 MarketBooks which the 100 different MarketIDs I get a the "to much data error"
So to me it seems the way around this is to break down the calls into say lots of 10, so I would call MarketBook 10 times asking for 10 lots of data. I could call MarketBook for each individual market ID but this I believe would take a lot longer.
This is my current code ....
Being new to VB NET (I am a classic VB guy), I think the answers lies somewhere in being able to use LIST or ARRAYLIST correctly but I need some guidance here.
Is there someway that I can declare my Full MarketBook and have a tmpMarketBook which is added to MarketBook ie ...
What does everyone else do ???
Code:
Got Response: {"jsonrpc":"2.0","error":{"data":{"exceptionname":"APINGException","APINGException":{"errorDetails":"operation restricts amount of data being returned","errorCode":"TOO_MUCH_DATA","requestUUID":"prdang003-03260452-0000f18993"}}},"id":1}
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll
Code:
Public Structure BetfairData
Dim URL As String
Dim MarketCatalog As IList(Of MarketCatalogue)
Dim MarketIds As IList(Of String) '
Dim MarketBook As IList(Of MarketBook)
End Structure
Now I went to increase my return to 100 MarketCatalog to look at the next 4 to 5 hours of upcoming races. This is ok, but when I call for 100 MarketBooks which the 100 different MarketIDs I get a the "to much data error"
So to me it seems the way around this is to break down the calls into say lots of 10, so I would call MarketBook 10 times asking for 10 lots of data. I could call MarketBook for each individual market ID but this I believe would take a lot longer.
This is my current code ....
Code:
'Get Price MarketBook data
myBFdata.MarketBook = fnReturnMarketBookData()
Public Function fnReturnMarketBookData() As IList(Of MarketBook)
Dim clientBF As JsonRpcClient = Nothing
clientBF = New JsonRpcClient(myBFdata.URL, myBFdata.sKeyInUse, myBFdata.sSessionID)
Dim priceData As ISet(Of PriceData) = New HashSet(Of PriceData)()
priceData.Add(API_NG.TO.PriceData.EX_BEST_OFFERS) 'Get best offers from betfair exchange
Dim priceProjection = New PriceProjection()
priceProjection.PriceData = priceData
'################ GET PRICES FOR MARKET(S) SELECTED ################
fnReturnMarketBookData = clientBF.listMarketBook(myBFdata.MarketIds, priceProjection)
Return fnReturnMarketBookData
End Function
Being new to VB NET (I am a classic VB guy), I think the answers lies somewhere in being able to use LIST or ARRAYLIST correctly but I need some guidance here.
Is there someway that I can declare my Full MarketBook and have a tmpMarketBook which is added to MarketBook ie ...
Code:
Dim MarketBook As IList(Of MarketBook) 'THIS GROWS AS I RETURN MORE DATA Dim tmpMarketBook As IList(Of MarketBook) myBFdata.MarketBook = fnReturnMarketBookData( First_10_MarketIDs ) MarketBook.add (tmpMarketBook ) '????? hmmm will this work myBFdata.MarketBook = fnReturnMarketBookData( Second_10_MarketIDs ) MarketBook.add (tmpMarketBook ) '????? hmmm will this work
What does everyone else do ???


Comment