-
-
Save jheusser/9f4833cba0a98f8913a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ create table | |
ticker:flip `buy`high`last`low`sell`timestamp`vol!() | |
/ decode json data responses, insert into ticker table | |
.z.ws:{x: (.j.k x)`data; `ticker upsert (first x)} | |
/ assumes local stunnel pointing to real.okcoin.com:10440 for ssl | |
r:(`$":ws://127.0.0.1:8100")"GET /websocket/okcoinapi HTTP/1.1\r\nHost: real.okcoin.com:10440\r\n\r\n" | |
/ subscribe to ticker | |
data:.j.j `event`channel!`addChannel`ok_btcusd_ticker | |
/ needs parsing of response r for right fd | |
neg[3]data |
Author
jheusser
commented
Apr 1, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment