zaif
Version:
Zaif API wrapper for Node.js
57 lines (39 loc) • 1.34 kB
Markdown
zaif
[](https://travis-ci.org/meruri/zaif-js)
Node.js library for the [Zaif Exchange API](https://corp.zaif.jp/api-docs/)
This package support for Zaif Exchange API Ver 1.05.02.
# Install
```
npm install zaif
```
# Usage
If you only use Public API, you don't need key and secret.
``` javascript
const Zaif = require('zaif');
const zaif = new Zaif('YOUR_KEY', 'YOUR_SECRET');
```
Please read Zaif Exchange API documentation for details.
* [Public API](https://corp.zaif.jp/api-docs/)
* [Private API](https://corp.zaif.jp/api-docs/trade-api/)
## Public API
The return type of all methods is `Promise`.
### zaif.lastPrice(currencyPair)
### zaif.ticker(currencyPair)
### zaif.trades(currencyPair)
### zaif.depth(currencyPair)
## Private API
The return type of all methods is `Promise`.
### zaif.getInfo()
### zaif.getInfo2()
### zaif.getPersonalInfo()
### zaif.tradeHistory(params={})
### zaif.activeOrders(currencyPair)
### zaif.trade(currencyPair, action, price, amount, limit=null)
### zaif.cancelOrder(orderId)
### zaif.withdraw(currency, address, amount, params={})
### zaif.depositHistory(currency, params={})
### zaif.withdrawHistory(currency, params={})
## Streaming API
## zaif.stream(currencyPair)
# License
MIT License