Dim dataawal,dataakhir As String
dataawal="2024-04-01"
dataakhir=2024-05-01
Dim MapMain As Map = CreateMap ("symbols": $"["${Symbol}"]"$, "intervals": $"["1day"]"$, "methods": $"["time_series"]"$)
JSONGenerator.Initialize(MapMain)
Log(JSONGenerator.ToPrettyString(5).Replace("\", "").Replace("""[", "[").Replace("]""", "]")) 'REMOVE UNNECESSARY CHARACTERS
Dim J As HttpJob
J.Initialize(Null, Me)
j.PostString("https://api.goapi.io/stock/idx/AGRO/historical?from=${dataawal}&to=${dataakhir}&api_key${Twelvedata_APIKey}",JSONGenerator.ToString.Replace("\", "").Replace("""[", "[").Replace("]""", "]")) 'REMOVE UNNECESSARY CHARACTERS
j.GetRequest.SetContentType("application/json; charset=UTF-8")
Wait For (J) JobDone(j As HttpJob)
If J.Success Then
ChartTickerPrice.Visible = True 'Unhide the chart
PanInfo.Visible = True 'Unhide the information panel
Log(J.GetString)
ChartTickerPrice.Visible = True 'Unhide the chart
ParseTickerData(J.GetString) 'Parge the company ticker JSON data
End If
j.Release