Open CZ-DannyK opened 6 years ago
I am new to this library and am unaware of how it works, not even sure how to buy yet. If you manage to get stock data from this API please let us know how it could be done.
Thanks
Hi,
i cant say exactly how to update this API as i am not so python experienced to update module (dont know exactly how to update source code and debug them from some test script yet).
Anyway, i have reworked basic parts to .NET and found message to send to receive new chart data:
{ name: "subscribeMessage", msg: { name: "quote-generated", version: "1.0", params: { routingFilters: { active_id: 73 } } } }
Id 73 is now for BTCX (Bitcoin). After this message i am receiving updated quotes data from websocket.
Hope this help, Cheers :)
Cheers,
I am intrigued by this API but it's a shame it's not well documented or updated. Is there anyway you could send me some code so I can implement it myself. Having real-time data will be very beneficial? I imagine getting it to work might take some effort but will be great to get it done.
Thanks
Hi,
@l9sheen I gave you access to my private dummy repo. I left for you in readme way to contact me. So take a look.
Cheers
Hi,
is this issue related to how to get data from custom indicator?
Thanks in advance
Hi SonyPony,
no, this is about how to get realtime data feed from IQ. Regarding custom indicators. I dont believe server is sending any indicator data. I am quite sure indicators are calculated from predownloaded OHLC data directly in IQ plaftorm.
Cheers
CZ-DannyK, but this is for ticks data (also you can use { "name" : "setActives", "msg" : { "actives" : [1,2,3] } }
), what about candles?
@kanXuT You can read getting of candles already from this api, but here is message: { name = "candles", msg = new { active_id = 1, duration = 60, chunk_size = 6, from = XXXXXXXXXX, till = XXXXXXXXXX } }
duration: candle timeframe in seconds (1 min in my example) chunk_size: number of candles send in one batch from: from timestamp to: to timestamp
Cheers
Thx @CZ-DannyK you are right, but this is on demand, not subscription like ticks. I'm just wondered if I miss something :).
@kanXuT I dont think they have something like this :) They just download inital candles and then form new candles from incoming ticks. If you want new candle every minute for example, you could just do async request every minute with from and to parametrs for last minute candle.
Below code get details of only one active.
data = {"active_id": 95,
"duration": 1,
"chunk_size": 25,
"from": timestamp,
"till": xxxxxx}
if i want details of multiple actives at same instance, what would be the solution?
@vinydl Not sure, if candles message support array of active_ids ("active_id": [1, 2, 3]
) so you can try, if IQ can handle something like this. Otherwise send multiple requests, each one for single active_id.
@CZ-DannyK : As of now i am using multiple requests for each id's. I am not sure about array of ids
@vinydl You can try and see, and you could let us know results of this experiment :)
list is not working.. i tried now.
@vinydl Ahh, ok, shame. Thank for this! :)
@CZ-DannyK, yeah, i do it that way, but it's painful :) - but better that forming own from ticks .. the ticks seems little bit unstable for me
@kanXuT Who knows why it is messy on your environment. I dont have any problem with getting new ticks.
Its possible. You will have write new websocket object for newChartData.
First you have subscribe the active then iqoption will start sending live data with websocket message name "newChartData".
You will get it in client.py file in method on_message. just check name=="newChartData"
@Niks005 Thanks for answer, i have already figured it out, but it might help someone else :)
How to unsubscribe from the newChartData? After using setActives and used the data, I need to unsubscribe .
Hi,
i am trying to find out if is possible to subscribe to new chart data. I have found subcribe method, but it wants some channel name and i am not sure what should i put there.
Is is event possible with this library to obtain fresh chart data?
Thanks for help