Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coinjarexchange

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coinjarexchange

Typescript wrapper for CoinJar Exchange

  • 4.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Coverage Status Dependencies

CoinJar Exchange Wrapper

Typescript / Node wrapper for the Data and Trading APIs offered by CoinJar Exchange

Setup

Install the dependancies with npm or yarn.

npm install coinjarexchange --save
yarn add coinjarexchange

API Key

In order to utilise the trading-api you'll need to generate an API Key.

Usage

The API wrapper exposes a Data and a Trading method, which contain each of the endpoint functions.

Exposed Functions

  • Trading methods are within trading.ts
  • Data methods are within data.ts

Examples

Examples for usage of each function can be found within the examples folder

import { CoinJarExchange } from 'coinjarexchange';

const cje = new CoinJarExchange('MyApiKey');

// Access Data API Methods
cje.data().getProductTicker('BTCAUD')
  .then(resp => {
    console.log(resp);
  });

/*
{
  volume: '31.45000000',
  transition_time: '2018-04-16T15:50:00Z',
  status: 'continuous',
  session: 1220,
  prev_close: '10190.00000000',
  last: '10190.00000000',
  current_time: '2018-04-16T10:11:16.166692Z',
  bid: '10030.00000000',
  ask: '10240.00000000'
}
*/

// Access Trading API Methods
cje.trading().getFills()
  .then(resp => {
    console.log(resp);
  });

/*
{
  cursor: 0,
  payload: [
    {
      tid: 2,
      oid: 225,
      product_id: 'LTCAUD',
      price: '100.00000000',
      size: '5.00000000',
      value: '500.00',
      side: 'buy',
      liquidity: 'taker',
      timestamp: '2018-04-16T00:00:50.154Z'
    },
    {
      tid: 1,
      oid: 112,
      product_id: 'LTCAUD',
      price: '164.00000000',
      size: '10.00000000',
      value: '1640.00',
      side: 'buy',
      liquidity: 'taker',
      timestamp: '2018-03-12T00:05:59.339Z'
    }
  ]
}
*/

Keywords

FAQs

Package last updated on 18 Apr 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc