Socket
Book a DemoInstallSign in
Socket

changelly-js

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changelly-js

Unofficial JavaScript Wrapper for changelly api

latest
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

ChangellyJS

version license vulnerabilities

Unofficial Javascript SDK for changelly cryptocurrency exchange service API. For more detail about this API, visit the official document.

changelly logo

Install

npm install changelly-js

Custom Build

npm run build

Example

//  nodejs
require("isomorphic-fetch") // install this package to use fetch in nodejs
const { Changelly } = require('changelly-js')

const apiKey = 'your api key'
const apiSecret = 'your api secret'
const changelly = new Changelly(apiKey, apiSecret);

changelly.getExchangeAmount('ltc','eth', '23').then(res => {
  console.log(res)
})
// 6.881168762500000000

changelly.createTransaction('eth', 'btc', '3AT4CYbw8UVNPhPNBrr5YwCrxLquKtFWWx', '0.23')
.then(res => {
  console.log(res)
})
/**
  {
    id: '6308bn10e13o97m7',
    apiExtraFee: '0.5',
    changellyFee: '0.5',
    payinExtraId: null,
    amountExpectedFrom: '0.23',
    status: 'new',
    currencyFrom: 'eth',
    currencyTo: 'btc',
    amountTo: 0,
    amountExpectedTo: '0.00455935',
    payinAddress: '0xda6e060cdedd5ecdfe650b68e04c278ac0fee244',
    payoutAddress: '3AT4CYbw8UVNPhPNBrr5YwCrxLquKtFWWx',
    createdAt: '2019-12-09T03:23:13.000Z',
    kycRequired: false
  }
**/

FAQs

Package last updated on 29 Apr 2020

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