@@ -11,7 +11,7 @@ Add bitx as a dependency:
1111$ npm install --save bitx
1212```
1313
14- ### BitX([ keyId, keySecret, ] [ options ] )
14+ ### BitX([ keyId, keySecret] [ options ] )
1515To access the private Luno API methods you must supply your key id and key secret as the first two arguments. If you are only accessing the public API endpoints you can leave these two arguments out.
1616
1717The optional ` options ` argument can be used to override the default options. The default options are equivalent to:
@@ -36,7 +36,7 @@ The arguments passed to the callback function for each method are:
3636
3737The ` callback ` function is optional. If the ` callback ` is not provided, the methods return a promise.
3838
39- ### getTicker([ options, ] [ callback ] )
39+ ### getTicker([ options] [ , callback] )
4040GET https://api.luno.com/api/1/ticker/XBTZAR
4141
4242Default options:
@@ -62,7 +62,7 @@ Example:
6262bitx .getAllTickers (function (err , tickers ) {});
6363```
6464
65- ### getOrderBook([ options, ] [ callback ] )
65+ ### getOrderBook([ options] [ , callback] )
6666GET https://api.luno.com/api/1/orderbook
6767
6868Default options:
@@ -79,7 +79,7 @@ Example:
7979bitx .getOrderBook (function (err , orderBook ) {});
8080```
8181
82- ### getTrades([ options, ] [ callback ] )
82+ ### getTrades([ options] [ , callback] )
8383GET https://api.luno.com/api/1/trades
8484
8585Default options:
@@ -96,7 +96,7 @@ Example:
9696bitx .getTrades (function (err , trades ) {});
9797```
9898
99- ### getTradeList([ options, ] [ callback ] )
99+ ### getTradeList([ options] [ , callback] )
100100GET https://api.luno.com/api/1/listtrades
101101
102102Default options:
@@ -113,7 +113,7 @@ Example:
113113bitx .getTradeList ({sort_desc: true , limit: 10 }, function (err , tradeList ) {});
114114```
115115
116- ### getOrderList([ options, ] [ callback ] )
116+ ### getOrderList([ options] [ , callback] )
117117GET https://api.luno.com/api/1/listorders
118118
119119Default options:
@@ -131,7 +131,34 @@ Example:
131131bitx .getOrderList ({state: ' PENDING' }, function (err , orderList ) {});
132132```
133133
134- ### getBalance([ asset, ] [ callback ] )
134+ ### getOrderListV2([ options] [ , callback ] )
135+ GET https://api.luno.com/api/exchange/2/listorders
136+
137+ Default options:
138+
139+ ``` javascript
140+ {
141+ pair: bitx .pair ,
142+ state: undefined
143+ }
144+ ```
145+
146+ Example:
147+
148+ ``` javascript
149+ bitx .getOrderListV2 ({ closed: true }, function (err , orderList ) {});
150+ ```
151+
152+ ### getOrderListV3(options[ , callback] )
153+ GET https://api.luno.com/api/exchange/3/order
154+
155+ Example:
156+
157+ ``` javascript
158+ bitx .getOrderListV3 ({id: ' BXMC2CJ7HNB88U4' }, function (err , orderList ) {});
159+ ```
160+
161+ ### getBalance([ asset] [ , callback ] )
135162GET https://api.luno.com/api/1/balance
136163
137164Example:
@@ -140,7 +167,7 @@ Example:
140167bitx .getBalance (' ZAR' , function (err , balance ) {});
141168```
142169
143- ### getFundingAddress(asset, [ options, ] [ callback ] )
170+ ### getFundingAddress(asset[ , options ] [ , callback] )
144171GET https://api.luno.com/api/1/funding_address
145172
146173Default options:
@@ -157,7 +184,7 @@ Example:
157184bitx .getFundingAddress (' XBT' , {address: ' B1tC0InExAMPL3fundIN6AdDreS5t0Use' }, function (err , fundingAddress ) {});
158185```
159186
160- ### createFundingAddress(asset, [ callback] )
187+ ### createFundingAddress(asset[ , callback] )
161188POST https://api.luno.com/api/1/funding_address
162189
163190Example:
@@ -166,7 +193,7 @@ Example:
166193bitx .createFundingAddress (' XBT' , function (err , fundingAddress ) {});
167194```
168195
169- ### getFeeInfo([ options, ] [ callback ] )
196+ ### getFeeInfo([ options] [ , callback] )
170197GET https://api.luno.com/api/1/fee_info
171198
172199Default options:
@@ -183,7 +210,7 @@ Example:
183210bitx .getFeeInfo ({pair: ' XBTZAR' }, function (err , feeInfo ) {});
184211```
185212
186- ### postBuyOrder(volume, price, [ options, ] [ callback ] )
213+ ### postBuyOrder(volume, price[ , options ] [ , callback] )
187214POST https://api.luno.com/api/1/postorder
188215
189216Example:
@@ -192,7 +219,7 @@ Example:
192219bitx .postBuyOrder (9999.99 , 0.01 , function (err , order ) {});
193220```
194221
195- ### postSellOrder(volume, price, [ options, ] [ callback ] )
222+ ### postSellOrder(volume, price[ , options ] [ , callback] )
196223POST https://api.luno.com/api/1/postorder
197224
198225Example:
@@ -201,7 +228,7 @@ Example:
201228bitx .postSellOrder (0.01 , 9999.99 , function (err , order ) {});
202229```
203230
204- ### postMarketBuyOrder(volume, [ options, ] [ callback ] )
231+ ### postMarketBuyOrder(volume[ , options ] [ , callback] )
205232POST https://api.luno.com/api/1/marketorder
206233
207234Example:
@@ -210,7 +237,7 @@ Example:
210237bitx .postMarketBuyOrder (0.01 , function (err , order ) {});
211238```
212239
213- ### postMarketSellOrder(volume, [ options, ] [ callback ] )
240+ ### postMarketSellOrder(volume[ , options ] [ , callback] )
214241POST https://api.luno.com/api/1/marketorder
215242
216243Example:
@@ -219,7 +246,7 @@ Example:
219246bitx .postMarketSellOrder (0.01 , function (err , order ) {});
220247```
221248
222- ### stopOrder(orderId, [ callback] )
249+ ### stopOrder(orderId[ , callback] )
223250POST https://api.luno.com/api/1/stoporder
224251
225252Example:
@@ -228,7 +255,7 @@ Example:
228255bitx .stopOrder (' BXMC2CJ7HNB88U4' , function (err , result ) {});
229256```
230257
231- ### getOrder(orderId, [ callback] )
258+ ### getOrder(orderId[ , callback] )
232259GET https://api.luno.com/api/1/orders/{orderId}
233260
234261Example:
@@ -237,7 +264,16 @@ Example:
237264bitx .getOrder (' BXHW6PFRRXKFSB4' , function (err , result ) {});
238265```
239266
240- ### getTransactions(asset, [ options, ] [ callback ] )
267+ ### getOrderV2(orderId[ , callback] )
268+ GET https://api.luno.com/api/exchange/2/orders/{orderId}
269+
270+ Example:
271+
272+ ``` javascript
273+ bitx .getOrder (' BXHW6PFRRXKFSB4' , function (err , result ) {});
274+ ```
275+
276+ ### getTransactions(asset[ , options] [ , callback ] )
241277GET https://api.luno.com/api/1/transactions
242278
243279Default options:
@@ -263,7 +299,7 @@ Example:
263299bitx .getWithdrawals (function (err , withdrawals ) {});
264300```
265301
266- ### getWithdrawal(withdrawalId, [ callback] )
302+ ### getWithdrawal(withdrawalId[ , callback] )
267303GET https://api.luno.com/api/1/withdrawals/{withdrawalId}
268304
269305Example:
@@ -272,7 +308,7 @@ Example:
272308bitx .getWithdrawal (' 1212' , function (err , withdrawal ) {});
273309```
274310
275- ### requestWithdrawal(type, amount, [ callback] )
311+ ### requestWithdrawal(type, amount[ , callback] )
276312POST https://api.luno.com/api/1/withdrawals
277313
278314Example:
@@ -281,7 +317,7 @@ Example:
281317bitx .requestWithdrawal (' ZAR_EFT' , 1000 , function (err , withdrawal ) {});
282318```
283319
284- ### cancelWithdrawal(withdrawalId, [ callback] )
320+ ### cancelWithdrawal(withdrawalId[ , callback] )
285321DELETE https://api.luno.com/api/1/withdrawals/{withdrawalId}
286322
287323Example:
0 commit comments