1.0.0-beta.22 • Published 6 years ago
deriv-api v1.0.0-beta.22
deriv-api
Async Websocket API for deriv.app
Usage
There are two ways to establish a connection:
Use a previously opened connection:
import DerivAPI from 'DerivAPI'; const connection = new WebSocket('ws://...'); const api = new DerivAPI({ connection });
Pass the arguments needed to create a connection:
import DerivAPI from 'DerivAPI'; const api = new DerivAPI({ endpoint: 'ws://...', appId: 1003, lang: 'EN' });
For more detailed examples see the wiki See also: DerivAPI reference
Development
npm install
To run the tests
npm test
Run tests automatically on source code edits
npm run devel
Run linter
npm run syntax
Run all tests (lint + js tests)
npm run test_all
Prettify the code (done automatically on commit)
npm run prettify
Generate documentations
npm run docs
Regenerate docs automatically on source code edit
Needs inotify
to work.
npm run devel_docs
Serve docs on localhost and update on source code changes
npm run serve_docs
Generate html version of the docs and publish it to gh-pages
npm run gh-pages
Build the package
npm run build
Run examples
DERIV_TOKEN=YourTokenHere npm run examples
1.0.0-beta.22
6 years ago
1.0.0-beta.21-development
6 years ago
1.0.0-beta.21
6 years ago
1.0.0-beta.20
6 years ago
1.0.0-beta.19
6 years ago
1.0.0-beta.18
6 years ago
1.0.0-beta.17
6 years ago
1.0.0-beta.16
6 years ago
1.0.0-beta.15-development
6 years ago
1.0.0-beta.15
6 years ago
1.0.0-beta.14-development
6 years ago
1.0.0-beta.14
6 years ago
1.0.0-beta.13
6 years ago
1.0.0-beta.12
6 years ago
1.0.0-beta.11
6 years ago
1.0.0-beta.10
6 years ago
1.0.0-beta.9
6 years ago
1.0.0-beta.8-development
6 years ago
1.0.0-beta.8
6 years ago
1.0.0-beta.7-large
6 years ago
1.0.0-beta.7
6 years ago
1.0.0-beta.6
6 years ago
1.0.0-beta.4
6 years ago
1.0.0-beta.3
6 years ago
1.0.0-beta.2
6 years ago
1.0.0-beta.1
6 years ago
1.0.0-beta.0
6 years ago
1.0.0-beta
6 years ago