zaif-promise
v0.1.7
Published
Zaif API helper with Promise
Downloads
5
Maintainers
Readme
zaif-promise
API helper for ZAIF.
How to
const zaif = require('zaif-promise');
zaif.Public.depth()
.then(console.log)
.catch( (err) => {
console.log(err.message);
})
how about typescript?
import {Zaif} from 'zaif-promise';
const zaif = new Zaif();
zaif.Public.depth()
.then(console.log)
.catch((err) => {
console.log(err.message);
})
Set credential
key and secret are specified by following order
- call zaif.setCredentials(key, secret);
- set Environment Variable ZAIF_KEY and ZAIF_SECRET
import {Zaif} from 'zaif-promise';
const zaif = new Zaif('key', 'secret');
With options
const zaif = require('zaif-promise');
zaif.Private.trade({
currency_pair: 'btc_jpy',
action: 'bid',
price: 100000,
amount: 0.001
})
.then(console.log)
.catch(err => {
console.error(err.message);
})
Retry
Private api retries automatically if request failed.
Supported order
All private, leverage and public apis are on supported. check ZAIF API Description page for detail.
Any issues?
please notify me on https://github.com/kiyonori-matsumoto/zaif-promise/issues
If you like this or want to try:
please register your account from here: https://zaif.jp?ac=0w8b7hiizs
or give me some tips!
- btc:
15GnXQuw23udU8APYF8ayFeYVHnzZE38GZ
- bch:
16eF3vBMgRB2QMsKhx7yN9LEq5g3m5pyfq
- mona:
MSZcFBzwAeUrYBA8f6EDJRyQqc2n5p3Usq