Sub Activity_Create(FirstTime As Boolean)
DownloadString 'IMPORTANT: need Json and OkHttpUtils2 libraries
End Sub
Sub DownloadString
Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USDT&e=Binance")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim parser As JSONParser
parser.Initialize(j.GetString)
Dim root As Map = parser.NextObject
Dim USDT As Double = root.Get("USDT")
Log("USDT= " & USDT) 'displays: USDT= 3823.19 .The value changes slightly every time you run
End If
j.Release
End Sub