listacandele.Clear ' as list
kandleCalc.Clear ' as map
Dim j As HttpJob
j.Initialize("", Me) 'name is empty as it is no longer needed
j.Download("https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1d&limit=10") '&orderby=my_totbalance 'limit=10 limit the number of results
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
' 'The result is a json string. We parse it and log the fields.
Dim parser As JSONParser
parser.Initialize(j.getstring)
Dim root As List = parser.NextArray
For Each colroot As List In root
Dim cndclose As String = colroot.Get(4)
Log(cndclose)
listacandele.Add(cndclose)
Next
' 'listacandele.Add(
File.WriteList(folder,"candele.txt",listacandele)