iOS Tutorial 💡 [B4X] [XUI] [B4XPages] Simple B4i stock ticker code using JSON REST API - Newer developers

Hello to you all,
Here is a simple example on retrieving data from a REST API requested using the JSON Generator (you could also use http URL download), the same JSON library is also used to parse the received JSON data (2 JSON feeds). Once you receive the filtered JSON ticker data, displaying the results on xCharts is extremely simple to accomplish and shows 28 days worth of High and Low trading prices including the dates. The code in B4XMainPage is relatively simple to follow and works with B4i, B4A and also B4J, I've added comments where feasible to do so.

Please note that not all the symbol names will display company ticker data, this is part of the limitations for using the free ticker REST API.

CLICK HERE to register for FREE at Twelve Data to access their free stock ticker API.


NOTE: The zip file in the link below contains the Stock Ticker B4XPages project for B4A, B4i and also B4j.
>>> CLICK HERE <<< to download the B4XPages source code.

Libraries needed:
1613574837289.png


iOS screenshots below:


16886.png


41531.png



Enjoy...
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi Peter.
To post B4XPages projects you should use the function in the IDE to zip the entire project for all three platforms.

1613576817107.png


You could also replace:
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
by
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=%PROJECT_NAME%.zip
 

Peter Simpson

Expert
Licensed User
Longtime User
Hi Peter.
To post B4XPages projects you should use the function in the IDE to zip the entire project for all three platforms.

View attachment 108191

You could also replace:
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
by
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=%PROJECT_NAME%.zip

I will do next time, thank you 👍
 
Top