设置websocket,数据读取到这里就读不下去了。
ret = exchanges.IO("websocket", 1)
Log('ret ==> ', ret)
while true:
Log('websocket ==> start')
#tmp = exchanges[0].IO("websocket")
tmp = exchanges[0].GetTicker()
Log('tmp ==> ',tmp)
sleep(5000) ![img](/upload/asset/1a5f5513162ee29b9b20928677d748ad6a567ac4.png)
Inventors quantify - small dreamsWhat's up? ret = exchanges.IO (("websocket", 1) What's up? This is not the way to use it. See API documentation for more details. Also, the only thing that packs the WS protocol is the token and the OKEX cash.
Inventors quantify - small dreamsThis can be done by contacting Ali Yun's customer service and seeing what's going on with their network, which should be accessible in Hong Kong.
yukunjakeIt's always been out of date, thank you.
Inventors quantify - small dreamsOccasional timeouts are normal. If they are constant, the server cannot access the exchange. You can also try VPS like Amazon.
yukunjakeThe server in Hong Kong has been hosted by the host, but there is still a timeout. And, after testing, the local version is still able to read the account data in websocket mode.
Inventors quantify - small dreamsThe code you are testing, paste it and see.
JCIt's a real disk, exchange.IO (("rest") is the way to access the data, exchange.IO (("websocket") is not.
Inventors quantify - small dreamsrest, is the URL entered directly in the browser, the rest of your test can be accessed to OKEX, is it a real disk test on FMZ, you deploy the host to a foreign server, is it possible to test.
JCI've added an agent, REST access is fine, websocket doesn't work.
Inventors quantify - small dreamsThe code below is correct.
Inventors quantify - small dreamsYou can't access the exchanges, which are currently walled (OKEX, Bitcoin, etc.), so you have to use a foreign server to access them.
JCDirect point, is Python correct code?
yukunjakeHello, I can't read the data even if I try to write it using the API.
Inventors quantify - small dreamsYou see, you have written the code wrong.
yukunjakehttps://dn-filebox.qbox.me/e9b08af82916ec3023a67250a9991e50cbff3c0b.png Is this where the question is?