node-bitflyer

1.0.0 • Public • Published

CircleCI Maintainability Test Coverage Dependency Status MIT License

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

  1. Fork this repository
  2. Create your feature branch & commit
  3. Create a new pull request

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i node-bitflyer

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • masayannuu