1.0.0-beta.22 • Published 5 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
5 years ago
1.0.0-beta.21-development
5 years ago
1.0.0-beta.21
5 years ago
1.0.0-beta.20
5 years ago
1.0.0-beta.19
5 years ago
1.0.0-beta.18
5 years ago
1.0.0-beta.17
5 years ago
1.0.0-beta.16
5 years ago
1.0.0-beta.15-development
5 years ago
1.0.0-beta.15
5 years ago
1.0.0-beta.14-development
5 years ago
1.0.0-beta.14
5 years ago
1.0.0-beta.13
5 years ago
1.0.0-beta.12
5 years ago
1.0.0-beta.11
5 years ago
1.0.0-beta.10
5 years ago
1.0.0-beta.9
5 years ago
1.0.0-beta.8-development
5 years ago
1.0.0-beta.8
5 years ago
1.0.0-beta.7-large
5 years ago
1.0.0-beta.7
5 years ago
1.0.0-beta.6
5 years ago
1.0.0-beta.4
5 years ago
1.0.0-beta.3
5 years ago
1.0.0-beta.2
5 years ago
1.0.0-beta.1
5 years ago
1.0.0-beta.0
5 years ago
1.0.0-beta
5 years ago