Hello, i am trying to get a connection to the free finance api of up and running. As far as I understood, I should be able to send a get URL and receive and parse the json response. But I am already stuck at getting the socket to send the URL.

So far I have tried to

[code]Dim Socket as new HTTPSocket
Dim Result As String

Result = Socket.get(“***********”, 30)
Result = DefineEncoding(Result, Encodings.UTF8)

Window1.ResponseArea.Text =Result

But my response is this. ( Yes I have entered and tested a valid api_token, just opening the url in a browser receives the json data)


301 Moved Permanently

301 Moved Permanently

nginx/1.15.8 [code][/code][/code]

Any pointers where I am going wrong?


  1. Use the HTTPSecureSocket class instead of HTTPSocket for HTTPS connections
  2. For 301 responses, the redirect url is given in the Location header. Though using the HTTPSecureSocket may do away with the redirect.

Thank you for the fast reply. I solved it in the end by using just a URLConnection

Dim content As String = Window1.Worldata.SendSync("GET","

Here is the final code that returns date and price from the worldtradingdata api. The Url can be adjusted to receive other symbols, dates etc…
(Window1.Worlddata is a public URLConnection)

[code]Dim content As String = Window1.Worlddata.SendSync(“GET”,“”,30)
Var j As String = content.DefineEncoding(Encodings.UTF8)
Var ji As New JSONItem(j)
Var j0 As JSONItem = ji.Child(“history”)

For Each name As String In j0.Names

Hope it helps somebody else as well.