Thanks I didn't know about that!
Probably, one problem I didn't think about was how to operate and calculate the price difference between first item price and the last item price. I thought that I could make operations between labels using cint, but I need to re organize the things!
So, I think to get also the last item value, which should be item#60 and as arrays are zero base, it should be #59, right?
but when I'm doing :
I get an Exception thrown: 'System.ArgumentOutOfRangeException' in mscorlib.dllCode:Dim downloadTasks As New List(Of Task(Of String)) Dim payload = wc.DownloadStringTaskAsync("https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1m&limit=60") downloadTasks.Add(payload) Await Task.WhenAll(downloadTasks) Dim parsedArray = JArray.Parse((Await payload)) Dim lastItem = parsedArray(59) Dim lastItemPrice = lastItem(60) Console.WriteLine(lastItemPrice)
Am I doing something wrong? I'm sure the items are 60 as the API shows 60 values for 60m chart.
I'm trying then to do FirstItemPrice - LastItemPrice = 1 h price change
Hope I explained well my problem
Thanks,
Mattia




Reply With Quote
