Skip to content

Commit 945aff5

Browse files
committed
update domain to api.luno.com
1 parent eb4e173 commit 945aff5

File tree

4 files changed

+29
-28
lines changed

4 files changed

+29
-28
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### 1.7.1
22

33
* Parse Luno API errors
4+
* Update domain to `api.luno.com`
45

56
### 1.7.0
67

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Build Status](https://travis-ci.org/bausmeier/node-bitx.png)](https://travis-ci.org/bausmeier/node-bitx)
33
[![codecov](https://codecov.io/gh/bausmeier/node-bitx/branch/master/graph/badge.svg)](https://codecov.io/gh/bausmeier/node-bitx)
44

5-
A simple wrapper for the BitX API.
5+
A simple wrapper for the Luno API.
66

77
## Usage
88
Add bitx as a dependency:
@@ -12,21 +12,21 @@ $ npm install --save bitx
1212
```
1313

1414
### BitX([keyId, keySecret, ][options])
15-
To access the private BitX 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.
15+
To 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

1717
The optional options argument can be used to override the default options. The default options are equivalent to:
1818

1919
```javascript
2020
{
21-
hostname: 'api.mybitx.com',
21+
hostname: 'api.luno.com',
2222
port: 443,
2323
ca: undefined,
2424
pair: 'XBTZAR'
2525
}
2626
```
2727

2828
## Methods
29-
For details about the API endpoints see https://api.mybitx.com/api.
29+
For details about the API endpoints see https://www.luno.com/en/developers/api.
3030

3131
### Callbacks
3232
The arguments passed to the callback function for each method are:
@@ -35,7 +35,7 @@ The arguments passed to the callback function for each method are:
3535
1. An object containing the data returned by the BitX API.
3636

3737
### getTicker([options, ]callback)
38-
GET https://api.mybitx.com/api/1/ticker
38+
GET https://api.luno.com/api/1/ticker/XBTZAR
3939

4040
Default options:
4141

@@ -52,7 +52,7 @@ bitx.getTicker(function(err, ticker) {});
5252
```
5353

5454
### getAllTickers(callback)
55-
GET https://api.mybitx.com/api/1/tickers
55+
GET https://api.luno.com/api/1/tickers
5656

5757
Example:
5858

@@ -61,7 +61,7 @@ bitx.getAllTickers(function(err, tickers) {});
6161
```
6262

6363
### getOrderBook([options, ]callback)
64-
GET https://api.mybitx.com/api/1/orderbook
64+
GET https://api.luno.com/api/1/orderbook
6565

6666
Default options:
6767

@@ -78,7 +78,7 @@ bitx.getOrderBook(function(err, orderBook) {});
7878
```
7979

8080
### getTrades([options, ]callback)
81-
GET https://api.mybitx.com/api/1/trades
81+
GET https://api.luno.com/api/1/trades
8282

8383
Default options:
8484

@@ -95,7 +95,7 @@ bitx.getTrades(function(err, trades) {});
9595
```
9696

9797
### getTradeList([options, ]callback)
98-
GET https://api.mybitx.com/api/1/listtrades
98+
GET https://api.luno.com/api/1/listtrades
9999

100100
Default options:
101101

@@ -112,7 +112,7 @@ bitx.getTradeList({sort_desc: true, limit: 10}, function(err, tradeList) {});
112112
```
113113

114114
### getOrderList([options, ]callback)
115-
GET https://api.mybitx.com/api/1/listorders
115+
GET https://api.luno.com/api/1/listorders
116116

117117
Default options:
118118

@@ -130,7 +130,7 @@ bitx.getOrderList({state: 'PENDING'}, function(err, orderList) {});
130130
```
131131

132132
### getBalance([asset, ]callback)
133-
GET https://api.mybitx.com/api/1/balance
133+
GET https://api.luno.com/api/1/balance
134134

135135
Example:
136136

@@ -139,7 +139,7 @@ bitx.getBalance('ZAR', function(err, balance) {});
139139
```
140140

141141
### getFundingAddress(asset, [options, ]callback)
142-
GET https://api.mybitx.com/api/1/funding_address
142+
GET https://api.luno.com/api/1/funding_address
143143

144144
Default options:
145145

@@ -156,7 +156,7 @@ bitx.getFundingAddress('XBT', {address: 'B1tC0InExAMPL3fundIN6AdDreS5t0Use'}, fu
156156
```
157157

158158
### createFundingAddress(asset, callback)
159-
POST https://api.mybitx.com/api/1/funding_address
159+
POST https://api.luno.com/api/1/funding_address
160160

161161
Example:
162162

@@ -165,7 +165,7 @@ bitx.createFundingAddress('XBT', function(err, fundingAddress) {});
165165
```
166166

167167
### getFeeInfo([options, ]callback)
168-
GET https://api.mybitx.com/api/1/fee_info
168+
GET https://api.luno.com/api/1/fee_info
169169

170170
Default options:
171171

@@ -182,7 +182,7 @@ bitx.getFeeInfo({pair: 'XBTZAR'}, function(err, feeInfo) {});
182182
```
183183

184184
### postBuyOrder(volume, price, [options, ]callback)
185-
POST https://api.mybitx.com/api/1/postorder
185+
POST https://api.luno.com/api/1/postorder
186186

187187
Example:
188188

@@ -191,7 +191,7 @@ bitx.postBuyOrder(9999.99, 0.01, function(err, order) {});
191191
```
192192

193193
### postSellOrder(volume, price, [options, ]callback)
194-
POST https://api.mybitx.com/api/1/postorder
194+
POST https://api.luno.com/api/1/postorder
195195

196196
Example:
197197

@@ -200,7 +200,7 @@ bitx.postSellOrder(0.01, 9999.99, function(err, order) {});
200200
```
201201

202202
### postMarketBuyOrder(volume, [options, ]callback)
203-
POST https://api.mybitx.com/api/1/marketorder
203+
POST https://api.luno.com/api/1/marketorder
204204

205205
Example:
206206

@@ -209,7 +209,7 @@ bitx.postMarketBuyOrder(0.01, function(err, order) {});
209209
```
210210

211211
### postMarketSellOrder(volume, [options, ]callback)
212-
POST https://api.mybitx.com/api/1/marketorder
212+
POST https://api.luno.com/api/1/marketorder
213213

214214
Example:
215215

@@ -218,7 +218,7 @@ bitx.postMarketSellOrder(0.01, function(err, order) {});
218218
```
219219

220220
### stopOrder(orderId, callback)
221-
POST https://api.mybitx.com/api/1/stoporder
221+
POST https://api.luno.com/api/1/stoporder
222222

223223
Example:
224224

@@ -227,7 +227,7 @@ bitx.stopOrder('BXMC2CJ7HNB88U4', function(err, result) {});
227227
```
228228

229229
### getOrder(orderId, callback)
230-
GET https://api.mybitx.com/api/1/orders/{orderId}
230+
GET https://api.luno.com/api/1/orders/{orderId}
231231

232232
Example:
233233

@@ -236,7 +236,7 @@ bitx.getOrder('BXHW6PFRRXKFSB4', function(err, result) {});
236236
```
237237

238238
### getTransactions(asset, [options, ]callback)
239-
GET https://api.mybitx.com/api/1/transactions
239+
GET https://api.luno.com/api/1/transactions
240240

241241
Default options:
242242
```javascript
@@ -253,7 +253,7 @@ bitx.getTransactions('XBT', {offset: 5, limit: 20}, function(err, transactions)
253253
```
254254

255255
### getWithdrawals(callback)
256-
GET https://api.mybitx.com/api/1/withdrawals
256+
GET https://api.luno.com/api/1/withdrawals
257257

258258
Example:
259259

@@ -262,7 +262,7 @@ bitx.getWithdrawals(function(err, withdrawals) {});
262262
```
263263

264264
### getWithdrawal(withdrawalId, callback)
265-
GET https://api.mybitx.com/api/1/withdrawals/{withdrawalId}
265+
GET https://api.luno.com/api/1/withdrawals/{withdrawalId}
266266

267267
Example:
268268

@@ -271,7 +271,7 @@ bitx.getWithdrawal('1212', function(err, withdrawal) {});
271271
```
272272

273273
### requestWithdrawal(type, amount, callback)
274-
POST https://api.mybitx.com/api/1/withdrawals
274+
POST https://api.luno.com/api/1/withdrawals
275275

276276
Example:
277277

@@ -280,7 +280,7 @@ bitx.requestWithdrawal('ZAR_EFT', 1000, function(err, withdrawal) {});
280280
```
281281

282282
### cancelWithdrawal(withdrawalId, callback)
283-
DELETE https://api.mybitx.com/api/1/withdrawals/{withdrawalId}
283+
DELETE https://api.luno.com/api/1/withdrawals/{withdrawalId}
284284

285285
Example:
286286

lib/BitX.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function BitX (keyId, keySecret, options) {
2626
options = keyId
2727
}
2828
options = options || {}
29-
this.hostname = options.hostname || 'api.mybitx.com'
29+
this.hostname = options.hostname || 'api.luno.com'
3030
this.port = options.port || 443
3131
this.ca = options.ca
3232
this.pair = options.pair || 'XBTZAR'

test/UnitTests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tap.test('BitX constructor', {autoend: true}, function (t) {
2121

2222
tap.test('should have default options', function (tt) {
2323
var bitx = new BitX()
24-
tt.equal(bitx.hostname, 'api.mybitx.com')
24+
tt.equal(bitx.hostname, 'api.luno.com')
2525
tt.equal(bitx.port, 443)
2626
tt.equal(bitx.pair, 'XBTZAR')
2727
tt.end()
@@ -67,7 +67,7 @@ tap.test('Internal', {autoend: true}, function (t) {
6767
'Accept': 'application/json',
6868
'Accept-Charset': 'utf-8'
6969
},
70-
hostname: 'api.mybitx.com',
70+
hostname: 'api.luno.com',
7171
path: '/api/1/' + path,
7272
port: 443,
7373
auth: keyId + ':' + keySecret

0 commit comments

Comments
 (0)