Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Best Way to Input Data Into QtCandleStickCharts



  • I am curious what is the easiest way to input data from a .json format into QtCandlestick charts when it uses an API. I currently use iex cloud api, in which I use libcurl to retrieve the speicifc .json i want and then use jsoncpp to parse through it. Now i have access to the .json format that looks like this

    [{"date":"2020-04-30","minute":"09:30","label":"09:30 AM","high":290,"low":288.59,"open":290,"close":289.32,"average":289.183,"volume":4926,"notional":1424515.42,"numberOfTrades":46},{"date":"2020-04-30","minute":"09:31","label":"09:31 AM","high":289.52,"low":288.92,"open":289.52,"close":289.015,"average":289.21,"volume":706,"notional":204182.105,"numberOfTrades":10},{"date":"2020-04-30","minute":"09:32","label":"09:32 AM","high":289.3,"low":288.68,"open":288.85,"close":289.22,"average":289.095,"volume":3358,"notional":970782.015,"numberOfTrades":36},{"date":"2020-04-30","minute":"09:33","label":"09:33 AM","high":289.23,"low":288.86,"open":289.2,"close":289.09,"average":289.014,"volume":1605,"notional":463867.9,"numberOfTrades":20},{"date":"2020-04-30","minute":"09:34","label":"09:34 AM","high":289.59,"low":289.3,"open":289.33,"close":289.3,"average":289.491,"volume":120,"notional":34738.95,"numberOfTrades":3},{"date":"2020-04-30","minute":"09:35","label":"09:35 AM","high":289.47,"low":288.75,"open":289.4,"close":288.75,"average":289.108,"volume":1997,"notional":577348.41,"numberOfTrades":22},{"date":"2020-04-30","minute":"09:36","label":"09:36 AM","high":288.72,"low":288.48,"open":288.7,"close":288.49,"average":288.656,"volume":6464,"notional":1865873.69,"numberOfTrades":27},{"date":"2020-04-30","minute":"09:37","label":"09:37 AM","high":288.9,"low":288.47,"open":288.47,"close":288.9,"average":288.778,"volume":1664,"notional":480526.2,"numberOfTrades":16},{"date":"2020-04-30","minute":"09:38","label":"09:38 AM","high":289.69,"low":289.22,"open":289.22,"close":289.6,"average":289.389,"volume":475,"notional":137460,"numberOfTrades":6},{"date":"2020-04-30","minute":"09:39","label":"09:39 AM","high":289.48,"low":289.46,"open":289.48,"close":289.46,"average":289.47,"volume":200,"notional":57894,"numberOfTrades":2},{"date":"2020-04-30","minute":"09:40","label":"09:40 AM","high":289.7,"low":289.36,"open":289.54,"close":289.55,"average":289.612,"volume":333,"notional":96440.86,"numberOfTrades":7},{"date":"2020-04-30","minute":"09:41","label":"09:41 AM","high":290.65,"low":289.565,"open":289.7,"close":290.65,"average":290.137,"volume":1129,"notional":327565.135,"numberOfTrades":15},{"date":"2020-04-30","minute":"09:42","label":"09:42 AM","high":290.55,"low":290.38,"open":290.43,"close":290.39,"average":290.462,"volume":271,"notional":78715.09,"numberOfTrades":5},{"date":"2020-04-30","minute":"09:43","label":"09:43 
    

    obviously there is a lot more than this but this is the general form of it. What can i use to input live data right into QT charts and have it update maybe every minute or so? Thank you in advance!


Log in to reply