Skip to content

Instantly share code, notes, and snippets.

@KobayashiTakaki
Created January 22, 2020 16:06
Show Gist options
  • Save KobayashiTakaki/4cd3b66d149d70f2254a0f884ef9b177 to your computer and use it in GitHub Desktop.
Save KobayashiTakaki/4cd3b66d149d70f2254a0f884ef9b177 to your computer and use it in GitHub Desktop.
bitFlyerのWebSocket APIで約定履歴を取得する
import socketio
sio = socketio.Client()
@sio.event
def connect():
sio.emit('subscribe', 'lightning_executions_FX_BTC_JPY')
@sio.event
def lightning_executions_FX_BTC_JPY(data):
print(data)
sio.connect('https://io.lightstream.bitflyer.com', transports=['websocket'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment