Socket
Book a DemoInstallSign in
Socket

deriv-api

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

deriv-api

Websocket API for Deriv applications

1.0.0-beta.22
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

deriv-api

Async Websocket API for deriv.app

Code Coverage: codecov

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

FAQs

Package last updated on 30 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.