Socket
Socket
Sign inDemoInstall

ccxt-private-ws

Package Overview
Dependencies
69
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ccxt-private-ws

CCXT compatible private websocket client


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

CCXT Private Websockts

A JavaScript library for cryptocurrency trading using authenticated websocket connections.

Features

  • Provides data structure compatibility to CCXT.
  • Typescript support
  • Missing websocket features are executed via REST API using CCXT

WARNING THIS PROJECT IS IN AN EARLY STAGE, HAS NO TESTS AND GIVES YOU NO GUARANTEES ON ANYTHING!

Supported Exchanges

ExchangeOrdersAccountNotes
Bitfinex
BinanceOrder creation/cancellation via REST API
KrakenOrder creation/cancellation via REST API

Installation

yarn install ccxt-private-ws

Subscribing to order stream

Import the library:

import * as CcxtPrivateWs from 'ccxt-private-ws';

Create an exchange instance using your credentials:

const exchange = new CcxtPrivateWs['bitfinex']({ credentials: { apiKey: 'XXX', secret: 'YYY' } });

Subscribe the channels you are interested in and start the connection.

exchange.subscribeOrders({
  callback: event => console.log(event.type, event.order)
});
exchange.connect();

Creating an order

await exchange.createOrder({
    symbol: 'USDT/USD';
    type: 'limit';
    side: 'buy';
    amount: 1;
    price: 1.001;
})

Canceling an order

await exchange.createOrder({
    id: 'XXXX-XXXX-XXXX-XXXX';
})

FAQs

Last updated on 09 Oct 2019

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc