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 |