node-bitflyer
v1.0.0
Published
BitFlyer SDK
Downloads
11
Readme
node-bitflyer
Nodejs wrapper for the BitFlyer lightning API based on OpenAPI Spec.
Installation
npm install node-bitflyer
APIs
Please refer to API Reference
Basic request
const { RestClient, RealtimeClient } = require('node-bitflyer')
const client = new RestClient('api_key', 'api_secret')
client.fetch('GET', '/me/getpermissions').then((res) => { console.log(res)} )
//with query
client.fetch('GET', '/board?product_code=ETH_BTC').then((res) => { console.log(res)} )
//with body
client.fetch('POST', '/me/sendchildorder',
{ "product_code": "BTC_JPY",
"child_order_type": "LIMIT",
"side": "BUY",
"price": 30000,
"size": 0.1,
"minute_to_expire": 10000,
"time_in_force": "GTC"}
).then((res) => { console.log(res)} )
Load Function from swagger.yaml
const { RestClient, RealtimeClient } = require('node-bitflyer')
const client = new RestClient('api_key', 'api_secret')
client.getMarkets().then((res) => { console.log(res) })
Sorry, Now I have defined only the list below.
I will create issues and I will add it now.
REST(public)
- getMarkets(/markets)
- getBoard(/board)
REST(private)
- getPermissions(/me/getpermissions)
- getBalance(/me/getbalance)
- sendChildOrder(/me/sendchildorder)
RealtimeAPI
Not implemented now and create an issue.
Contributing
- Fork this repository
- Create your feature branch & commit
- Create a new pull request
License
MIT