1.0.0 • Published 5 years ago

blockchain_exchange_ms v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

blockchain_exchange_ms

Description

This library provides access to blochchain exchange krypto-microservice.

Getting Started

* Install Node.js and npm.
* npm login
* npm install @npm-kryptotech/blockchain_exchange_ms

Example

Init BlockchainExchangeMS

import BlockchainExchangeMS from '@npm-kryptotech/blockchain_exchange_ms';

let blockchainExchangeMS = new BlockchainExchangeMS('dev');

Susbribe to notification

const options = {
	"tx_id": "fd57efbacd733a97d5751af19a24af23c1c41d05e0b2f2bfacb7168634dca667",
	"cryptocurrency": "BTC",
	"confirmations": 6,
	"webhook": "https://webhook.site/c9b16cec-02fd-4600-9e18-8a8869624ddc"
}

BlockchainExchangeMS.suscribe(options)

Request new order for selling cryptos on kraken

const options = {
	"amount": "0.00000001",
	"cryptocurrency": "BTC",
	"webhook": "https://webhook.site/c9b16cec-02fd-4600-9e18-8a8869624ddc"
}

BlockchainExchangeMS.sell(options)

Test

* npm test
* npm run test:coverage