Skip to content

nolim1t/nl-bxth

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

BX.in.th api

npm version

About

My own API Library for BX.in.th. Reference library here

Installing

npm i nl-bxth

Contributing

All contributions are welcome and appreciated. Open Source is a meritocracy who doesn't care who you are.

Issues Pull Requests Donations (BTC: 14qd36n1viYAWzajZgaTQq4tPUZcEUtfcz / LTC: LSGfxUoJSC3qYsTC6DwyvKvYfDwTVXrcE2

Examples

Get Currency Parings

  i.public.pairing((cb) => {
    console.log(cb.pairing);
  });

Get Balance

The following returns a list of all the balances

i.private.balance({apikey: '', apisecret: '', endpoint: 'balance'}, function(cb) {
  console.log(cb);
});

Transaction History

i.private.transactions({apikey: '', apisecret: ''}, function(cb) {
  console.log(cb);
})

Orderbook

i.public.orderbook({pairing: '1'}, (cb) => {console.log(cb.orderbook);});

Create order

Create sell order 1 bitcoin for 1 million baht :D

i.private.customendpoint({apikey: '', apisecret: '', pairing: '1', type: 'sell', amount: '1.0', rate: '1000000'}, 'order', (cb) => {
  console.log(cb);
});

Create buy order 1 bitcoin for 1 thousand baht :)

i.private.customendpoint({apikey: '', apisecret: '', pairing: '1', type: 'buy', amount: '1.0', rate: '1000'}, 'order', (cb) => {
  console.log(cb);
});