Create a gist now

Instantly share code, notes, and snippets.

anonymous /zaif_btc_ws
Created Sep 18, 2016

Embed
What would you like to do?
import websocket
import json
ws_url = 'ws://api.zaif.jp:8888/stream?currency_pair=btc_jpy'
ws_conn = websocket.create_connection(ws_url)
while True:
res = ws_conn.recv()
print json.loads(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment