okex-rest

0.0.1 • Public • Published

OKEX API Wrapper

A node.js wrapper for the REST APIs exposed by bitcoin exchange OKEX. You will need to have a registered account with OKEX and generated API keys to access the private methods.

Please contact support@okcoin.com if you are having trouble opening an account or generating an API key.

This module is forked from okcoin-china.

Install

npm install okex-rest

var OKEX = require('okex-rest');

// Test public data APIs
var publicClient = new OKEX();

// get iota_btc ticker
publicClient.getTicker(console.log, 'iota_btc');

// get iota_btc order book
publicClient.getDepth(console.log, 'iota_btc');

// get trades defaulting to iota_btc
publicClient.getTrades(console.log);

// replace the parameters with your API key and secret
var privateClient = new OKCoin('your-api-key', 'your-api-secret');

privateClient.getUserInfo(console.log);

// buy limit order for 1 IOTA at price 00021054 BTC
privateClient.addTrade(console.log, 'iota_btc', 'buy', '1', '00021054');

Package Sidebar

Install

npm i okex-rest

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

16 kB

Total Files

4

Last publish

Collaborators

  • devmanio