Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including node-bitflyer with all npm packages installed. Try it out:

var nodeBitflyer = require("node-bitflyer")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

node-bitflyer v1.0.0

BitFlyer SDK

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

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free