Skip to content

Instantly share code, notes, and snippets.

@vorandrew
Created July 12, 2018 19:24
Show Gist options
  • Save vorandrew/50dad96b3dfde7384658440f73e537ac to your computer and use it in GitHub Desktop.
Save vorandrew/50dad96b3dfde7384658440f73e537ac to your computer and use it in GitHub Desktop.
deribit:api:ws:test {"id":742,"success":false,"testnet":false,"error":10000,"message":"authorization_required"}
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