{"action":"created","issue":{"url":"https://api.github.com/repos/okcoin-okex/API-docs-OKEx.com/issues/182","repository_url":"https://api.github.com/repos/okcoin-okex/API-docs-OKEx.com","labels_url":"https://api.github.com/repos/okcoin-okex/API-docs-OKEx.com/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/okcoin-okex/API-docs-OKEx.com/issues/182/comments","events_url":"https://api.github.com/repos/okcoin-okex/API-docs-OKEx.com/issues/182/events","html_url":"https://github.com/okcoin-okex/API-docs-OKEx.com/issues/182","id":377412380,"node_id":"MDU6SXNzdWUzNzc0MTIzODA=","number":182,"title":"Not getting responses via WebSocket","user":{"login":"Archie888","id":8908266,"node_id":"MDQ6VXNlcjg5MDgyNjY=","avatar_url":"https://avatars1.githubusercontent.com/u/8908266?v=4","gravatar_id":"","url":"https://api.github.com/users/Archie888","html_url":"https://github.com/Archie888","followers_url":"https://api.github.com/users/Archie888/followers","following_url":"https://api.github.com/users/Archie888/following{/other_user}","gists_url":"https://api.github.com/users/Archie888/gists{/gist_id}","starred_url":"https://api.github.com/users/Archie888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Archie888/subscriptions","organizations_url":"https://api.github.com/users/Archie888/orgs","repos_url":"https://api.github.com/users/Archie888/repos","events_url":"https://api.github.com/users/Archie888/events{/privacy}","received_events_url":"https://api.github.com/users/Archie888/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-05T13:59:39Z","updated_at":"2018-11-13T10:02:17Z","closed_at":null,"author_association":"NONE","body":"I can get connected via WebSocket, but I am not getting any responses to\r\n\r\n{'event':'ping'}\r\nor\r\n{'event':'addChannel','channel':'ok_sub_spot_btc_usdt_ticker'}\r\n\r\nOr if I am, it is only an empty object.\r\n\r\nIs the WebSocket connection to Okex down, or could my IP be banned?\r\n\r\nAlso, different sources show to use different addresses to connect to, which is the correct one?\r\n-The doc says: wss://real.okex.com:10440/ws/v1\r\n-This article here https://support.okex.com/hc/en-us/articles/360018278931 says to use: spot:wss://real.okex.com:10441/websocket\r\n\r\nI seem to be able to connect via both, but which one should we use?"},"comment":{"url":"https://api.github.com/repos/okcoin-okex/API-docs-OKEx.com/issues/comments/438207431","html_url":"https://github.com/okcoin-okex/API-docs-OKEx.com/issues/182#issuecomment-438207431","issue_url":"https://api.github.com/repos/okcoin-okex/API-docs-OKEx.com/issues/182","id":438207431,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODIwNzQzMQ==","user":{"login":"ilyacherevkov","id":822364,"node_id":"MDQ6VXNlcjgyMjM2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/822364?v=4","gravatar_id":"","url":"https://api.github.com/users/ilyacherevkov","html_url":"https://github.com/ilyacherevkov","followers_url":"https://api.github.com/users/ilyacherevkov/followers","following_url":"https://api.github.com/users/ilyacherevkov/following{/other_user}","gists_url":"https://api.github.com/users/ilyacherevkov/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyacherevkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyacherevkov/subscriptions","organizations_url":"https://api.github.com/users/ilyacherevkov/orgs","repos_url":"https://api.github.com/users/ilyacherevkov/repos","events_url":"https://api.github.com/users/ilyacherevkov/events{/privacy}","received_events_url":"https://api.github.com/users/ilyacherevkov/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T10:02:17Z","updated_at":"2018-11-13T10:02:17Z","author_association":"NONE","body":"> Did you see last changes?\r\n> \r\n> > All the messages returning from WebSocket API will be optimized by Deflate compression. All users will be required to decompress the messages by themselves with the methods they find most appropriate\r\n> \r\n> see [demo](https://github.com/okcoin-okex/API-docs-OKEx.com/tree/master/demo)\r\n\r\nThanks, now I can see what's wrong. If anyone interested, here is how to decompress in ruby.\r\n\r\n```\r\nclient.on :message do |message|\r\n    require 'zlib'\r\n    zstream  = Zlib::Inflate.new(-Zlib::MAX_WBITS)\r\n   buf = zstream.inflate(message.pack('c*'))\r\n   msg = JSON.parse buf\r\nend\r\n```"}}
{"actor":{"display_login":"ilyacherevkov"}}