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

cryptomarket

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cryptomarket - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

lib/ClientBase.js

@@ -254,3 +254,3 @@ /* eslint-disable class-methods-use-this */

reject(error);
callback(error, null);
cb(error, null);
} else if (obj.data) {

@@ -257,0 +257,0 @@ const ObjFunc = this._stringToClass(model);

{
"name": "cryptomarket",
"version": "1.0.3",
"version": "1.0.4",
"description": "The CryptoMarket for Node.js",

@@ -5,0 +5,0 @@ "homepage": "https://www.cryptomkt.com",

# cryptomkt-node
<!--- badges -->
[![NPM version](https://badge.fury.io/js/cryptomarket.svg)](https://badge.fury.io/js/cryptomarket)
[![NPM dependencies](https://david-dm.org/cryptomkt/cryptomkt-node.svg)](https://david-dm.org/cryptomkt/cryptomkt-node)
- [Installation](#Installation)
- [Quick Start](#Quick-Start)
- [API Key](#API-Key)
- [Making API Calls](#Making-API-Calls)
- [Public Endpoints](#Using-the-functions)
- [Listing available markets](#Listing-available-markets)
- [Obtain Book](#Obtain-Book)
- [Obtain ticker info](#Obtain-ticker-info)
- [Authenticated endpoints](#Authenticated-endpoints)
- [Get account info](#Get-account-info)
- [Create an order](#Create-an-order)
- [Create multiple orders](#Create-multiple-orders)
- [Obtain active orders](#Obtain-active-orders)
- [Cancel an order](#Cancel-an-order)
- [Cancel multiple orders](#Cancel-multiple-orders)
- [Make a transfer](#Make-a-transfer)
- [Obtain executed orders](#Obtain-executed-orders)
- [Obtain order status](#Obtain-order-status)
- [Obtain account balance](#Obtain-account-balance)
- [Using socket](#Using-socket)
- [Get socket instance](#Get-socket-instance)
- [Receive socket events](#Receive-socket-events)
- [Market subscription](#Market-subscription)
- [Unsubscribe from market](#Unsubscribe-from-market)
- [Receive open book info](#Receive-open-book-info)
- [Receive Historical book info](#Receive-Historical-book-info)
- [Receive candles info](#Receive-candles-info)
- [Receive ticker info](#Receive-ticker-info)
- [Receive balance info](#Receive-balance-info)
- [Receive user orders info](#Receive-user-orders-info)
- [Receive historical user orders info](#Receive-historical-user-orders-info)
- [Receive User´s operated volume](#Receive-Users-operated-volume)
## Installation

@@ -25,5 +63,7 @@

[(top &uarr;)](#cryptomkt-node)
### Public endpoints
**Using the functions**
#### Using the functions

@@ -62,3 +102,3 @@ ```javascript

```
***Expected output***
##### Expected output
```javascript

@@ -80,4 +120,5 @@ // Any of the 3 ways to call the function should return an output like this:

````
[(top &uarr;)](#cryptomkt-node)
**Listing available markets**
#### Listing available markets
```javascript

@@ -95,3 +136,3 @@ var { Client } = require('cryptomarket');

```
***Expected output***
##### Expected output
```javascript

@@ -109,4 +150,5 @@ [

```
[(top &uarr;)](#cryptomkt-node)
**Obtain Book**
#### Obtain Book
```javascript

@@ -123,3 +165,3 @@ // Receives a Js object. "market" and "side" are mandatory.

```
***Expected output***
##### Expected output
```javascript

@@ -156,4 +198,6 @@ {

```
[(top &uarr;)](#cryptomkt-node)
**Obtain ticker info**
#### Obtain ticker info
```javascript

@@ -170,3 +214,3 @@ // Receives a Js object that contains the market.

```
***Expected output***
##### Expected output
```javascript

@@ -190,6 +234,7 @@ {

```
[(top &uarr;)](#cryptomkt-node)
### Authenticated endpoints
**Get account info**
#### Get account info
```javascript

@@ -207,3 +252,3 @@ var { Client } = require('cryptomarket');

```
***Expected output***
##### Expected output
```javascript

@@ -241,4 +286,6 @@ {

```
[(top &uarr;)](#cryptomkt-node)
**Create an order**
#### Create an order
```javascript

@@ -258,3 +305,3 @@ // Receives a Js object. "market", "type", "side" and "amount" are mandatory.

```
***Expected output***
##### Expected output
```javascript

@@ -279,5 +326,6 @@ response: {

```
[(top &uarr;)](#cryptomkt-node)
**Create multiple orders**
#### Create multiple orders
```javascript

@@ -294,3 +342,3 @@ // Receives object array that contains multiple orders. "market", "type", "side" and "amount" are mandatory.

```
***Expected output***
##### Expected output
```javascript

@@ -305,4 +353,5 @@ response: {

```
[(top &uarr;)](#cryptomkt-node)
**Obtain active orders**
#### Obtain active orders
```javascript

@@ -319,3 +368,3 @@ // Receives a Js object that contains the market

```
***Expected output***
##### Expected output
```javascript

@@ -360,4 +409,5 @@ {

```
[(top &uarr;)](#cryptomkt-node)
**Cancel an order**
#### Cancel an order
```javascript

@@ -374,3 +424,3 @@ // Receives object that contains the order's ID.

```
***Expected output***
##### Expected output
```javascript

@@ -395,4 +445,6 @@ response: {

```
[(top &uarr;)](#cryptomkt-node)
**Cancel multiple orders**
#### Cancel multiple orders
```javascript

@@ -409,3 +461,3 @@ // Receives object array that contains multiple order's IDs.

```
***Expected output***
##### Expected output
```javascript

@@ -417,4 +469,6 @@ response: {

```
[(top &uarr;)](#cryptomkt-node)
**Make a transfer**
#### Make a transfer
```javascript

@@ -431,8 +485,9 @@ // Receives a Js object. "currency", "address", and "amount" are mandatory.

```
***Expected output***
##### Expected output
```javascript
{ status: 'success', data: '' }
```
[(top &uarr;)](#cryptomkt-node)
**Obtain executed orders**
#### Obtain executed orders
```javascript

@@ -449,3 +504,3 @@ // Receives a Js object that contains the market.

```
***Expected output***
##### Expected output
```javascript

@@ -481,4 +536,5 @@ {

```
[(top &uarr;)](#cryptomkt-node)
**Obtain order status**
#### Obtain order status
```javascript

@@ -495,3 +551,3 @@ // Receives a Js object that contains the ID.

```
***Expected output***
##### Expected output
```javascript

@@ -517,4 +573,5 @@ response: {

```
[(top &uarr;)](#cryptomkt-node)
**Obtain account balance**
#### Obtain account balance
```javascript

@@ -529,3 +586,4 @@ client.getBalance((err, output) => {

```
***Expected Output***
##### Expected output
```javascript

@@ -549,4 +607,4 @@ {

```
[(top &uarr;)](#cryptomkt-node)
## Using socket

@@ -575,6 +633,7 @@

```
[(top &uarr;)](#cryptomkt-node)
### Receive socket events
**Market subscription**
#### Market subscription
```javascript

@@ -584,3 +643,3 @@ socket.subscribe('ETHCLP');

**Unsubscribe from market**
#### Unsubscribe from market
```javascript

@@ -590,3 +649,3 @@ socket.unsubscribe('ETHCLP');

**Receive open book info**
#### Receive open book info
```javascript

@@ -599,3 +658,3 @@ // Subscription required.

```
***Expected Output***
##### Expected Output
```javascript

@@ -613,4 +672,5 @@ open-book {

```
[(top &uarr;)](#cryptomkt-node)
**Receive Historical book info**
#### Receive Historical book info
```javascript

@@ -623,3 +683,3 @@ // Subscription required.

```
***Expected Output***
##### Expected Output
```javascript

@@ -665,4 +725,5 @@ [

```
[(top &uarr;)](#cryptomkt-node)
**Receive candles info**
#### Receive candles info
```javascript

@@ -675,3 +736,3 @@ // Subscription required.

```
***Expected Output***
##### Expected Output
```javascript

@@ -711,4 +772,5 @@ candles {

```
[(top &uarr;)](#cryptomkt-node)
**Receive ticker info**
#### Receive ticker info
```javascript

@@ -719,3 +781,3 @@ socket.on('ticker', (data) => {

```
***Expected Output***
##### Expected Output
```javascript

@@ -744,4 +806,6 @@ ticker {

```
[(top &uarr;)](#cryptomkt-node)
**Receive Your Balance info**
#### Receive balance info
```javascript

@@ -752,3 +816,3 @@ socket.on('balance', (data) => {

```
***Expected Output***
##### Expected Output
```javascript

@@ -770,5 +834,6 @@ balance {

```
[(top &uarr;)](#cryptomkt-node)
#### Receive user orders info
**Receive Your Orders info**
```javascript

@@ -779,3 +844,3 @@ socket.on('open-orders', (data) => {

```
***Expected Output***
##### Expected Output
```javascript

@@ -802,4 +867,6 @@ open-orders [

```
[(top &uarr;)](#cryptomkt-node)
**Receive Your Historical orders info**
#### Receive historical user orders info
```javascript

@@ -810,3 +877,5 @@ socket.on('historical-orders', (data) => {

```
***Expected Output***
##### Expected Output
```javascript

@@ -850,4 +919,6 @@ historical-orders [

```
[(top &uarr;)](#cryptomkt-node)
**Receive Your operated volume**
#### Receive User´s operated volume
```javascript

@@ -858,3 +929,3 @@ socket.on('operated', (data) => {

```
***Expected Output***
##### Expected Output
```javascript

@@ -869,2 +940,2 @@ operated {

```
[(top &uarr;)](#cryptomkt-node)
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