API Reference

Preston Skupinski edited this page Apr 13, 2014 · 3 revisions
Clone this wiki locally

Camp BX API reference

Public API

You do not need to specify your username and password in the constructor if you are only using these methods.

campBX.depth(callback)

Calls the xdepth url endpoint.

campBX.ticker(callback)

Calls the xticker url endpoint.

Account and Trade API

If you are using these methods you must specify your username and password in the constructor.

campBX.myFunds(callback)

Calls the myfunds url endpoint.

campBX.myOrders(callback)

Calls the myorders url endpoint.

campBX.myMargins(callback)

Calls the mymargins url endpoint.

campBX.getBtcAddr(callback)

Calls the getbtcaddr url endpoint.

campBX.sendBtc(btcTo, btcAmount, callback)

Calls the sendbtc url endpoint.

campBX.tradeCancel(type, orderId, callback)

Calls the tradecancel url endpoint.

type must be "Buy" or "Sell".

campBX.tradeEnter(tradeMode, quantity, price, callback)

Calls the tradeenter url endpoint.

tradeMode must be "QuickBuy" or "QuickSell".

campBX.tradeAdv(tradeMode, price, quantity, optionalFields, callback)

Calls the tradeadv url endpoint.

tradeMode must be "AdvancedBuy" or "AdvancedSell".

optionalFields is an object that can contain any optional parameters you wish to specify.