VB.NET コードから placeOrders 関数を呼び出そうとしています。betfair Web サイトの C# ライブラリを VB.NET に変換済みです。
メソッドを呼び出す行でエラーが返され、e.dataは何もありません。
Friend Shared Sub testBetting()
Try
Dim placeInstructions As IList(Of PlaceInstruction) = New List(Of PlaceInstruction)()
Dim placeInstruction = New PlaceInstruction()
'get the first runner from the market
Dim runner = marketBook(0).Runners(0)
Dim selectionId = runner.SelectionId
placeInstruction.Handicap = 0
placeInstruction.Side = Side.BACK
placeInstruction.OrderType = OrderType.LIMIT
Dim limitOrder = New LimitOrder()
limitOrder.PersistenceType = PersistenceType.LAPSE
' place a back bet at rediculous odds so it doesn't get matched
limitOrder.Price = 3.5
limitOrder.Size = 0.05
' placing a bet below minimum stake, expecting a error in report
placeInstruction.LimitOrder = limitOrder
placeInstruction.SelectionId = selectionId
placeInstructions.Add(placeInstruction)
Dim customerRef = "785895438098" '"9876785895438098726178907895434" '"123456"
Dim placeExecutionReport = client.placeOrders(marketID, customerRef, placeInstructions)
Catch apiExcepion As BetfairLib.APINGException
MessageBox.Show("Got an exception from Api-NG: " + apiExcepion.ErrorCode)
End Try
End Sub