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

Peter Simpson

Licensed User
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 B4A, B4i 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:


Android screenshots below:





Last edited: