Created
July 12, 2018 19:24
-
-
Save vorandrew/50dad96b3dfde7384658440f73e537ac to your computer and use it in GitHub Desktop.
This file contains hidden or 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
deribit:api:ws:test {"id":742,"success":false,"testnet":false,"error":10000,"message":"authorization_required"} |
This file contains hidden or 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
import WS from 'ws' | |
let message = | |
'{"id":742,"action":"/api/v1/private/subscribe","arguments":{"instrument":["options"],"event":["order_book"]},"sig":"FqvaMjuK7KHU.1531407008281.A1fkudavUyc4MqZue9yQgXd3sljelL0/vmmXBDzzPW8="}' | |
let ws = new WS('wss://www.deribit.com/ws/api/v1/') | |
ws.on('open', () => { | |
ws.send(message) | |
}) | |
ws.on('message', debug) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment