@coindirect/sdk

Coindirect Javascript SDK

Usage no npm install needed!

<script type="module">
  import coindirectSdk from 'https://cdn.skypack.dev/@coindirect/sdk';
</script>

README

Coindirect - Javascript SDK

Installation

npm install --save @coindirect/sdk

Setup

  1. import coindirect from '@coindirect/sdk'
  2. Initialise: coindirect.init()
  3. Use:
    coindirect.api().currencies.listCurrenciesCrypto({offset:  2, max:  20})
      .then(res  => {
        console.log(res.obj)
    })
    

Samples

Samples are located in the node_modues/@coindirect/sdk/samples folder.

Security

NB: a node sample is included which demonstrates how to make authenticated calls. This requires a key and secret which are sensitive and should not be sent to the client in the case of a web app (hopefully this goes without saying).

For this reason, the React app sample only makes unauthenticated calls while the node app makes both authenticated and non-authenticated calls.

Documentation

More documentation is available at http://docs.coindirect.com/