ccxt 4.4.67 → 4.4.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +5 -3
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/coinbase.js +74 -2
- package/dist/cjs/src/luno.js +112 -0
- package/dist/cjs/src/tradeogre.js +7 -7
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/tradeogre.d.ts +1 -1
- package/js/src/base/Exchange.js +6 -4
- package/js/src/bitrue.js +1 -1
- package/js/src/bybit.js +1 -1
- package/js/src/coinbase.d.ts +16 -0
- package/js/src/coinbase.js +74 -2
- package/js/src/luno.d.ts +25 -1
- package/js/src/luno.js +112 -0
- package/js/src/tradeogre.d.ts +1 -0
- package/js/src/tradeogre.js +7 -7
- package/package.json +4 -4
package/js/src/luno.js
CHANGED
|
@@ -29,6 +29,7 @@ export default class luno extends Exchange {
|
|
|
29
29
|
'cancelOrder': true,
|
|
30
30
|
'closeAllPositions': false,
|
|
31
31
|
'closePosition': false,
|
|
32
|
+
'createDepositAddress': true,
|
|
32
33
|
'createOrder': true,
|
|
33
34
|
'createReduceOnlyOrder': false,
|
|
34
35
|
'fetchAccounts': true,
|
|
@@ -37,6 +38,7 @@ export default class luno extends Exchange {
|
|
|
37
38
|
'fetchClosedOrders': true,
|
|
38
39
|
'fetchCrossBorrowRate': false,
|
|
39
40
|
'fetchCrossBorrowRates': false,
|
|
41
|
+
'fetchDepositAddress': true,
|
|
40
42
|
'fetchFundingHistory': false,
|
|
41
43
|
'fetchFundingRate': false,
|
|
42
44
|
'fetchFundingRateHistory': false,
|
|
@@ -1205,6 +1207,116 @@ export default class luno extends Exchange {
|
|
|
1205
1207
|
'fee': undefined,
|
|
1206
1208
|
}, currency);
|
|
1207
1209
|
}
|
|
1210
|
+
/**
|
|
1211
|
+
* @method
|
|
1212
|
+
* @name luno#createDepositAddress
|
|
1213
|
+
* @description create a currency deposit address
|
|
1214
|
+
* @see https://www.luno.com/en/developers/api#tag/Receive/operation/createFundingAddress
|
|
1215
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
1216
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1217
|
+
* @param {string} [params.name] an optional name for the new address
|
|
1218
|
+
* @param {int} [params.account_id] an optional account id for the new address
|
|
1219
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1220
|
+
*/
|
|
1221
|
+
async createDepositAddress(code, params = {}) {
|
|
1222
|
+
await this.loadMarkets();
|
|
1223
|
+
const currency = this.currency(code);
|
|
1224
|
+
const request = {
|
|
1225
|
+
'asset': currency['id'],
|
|
1226
|
+
};
|
|
1227
|
+
const response = await this.privatePostFundingAddress(this.extend(request, params));
|
|
1228
|
+
//
|
|
1229
|
+
// {
|
|
1230
|
+
// "account_id": "string",
|
|
1231
|
+
// "address": "string",
|
|
1232
|
+
// "address_meta": [
|
|
1233
|
+
// {
|
|
1234
|
+
// "label": "string",
|
|
1235
|
+
// "value": "string"
|
|
1236
|
+
// }
|
|
1237
|
+
// ],
|
|
1238
|
+
// "asset": "string",
|
|
1239
|
+
// "assigned_at": 0,
|
|
1240
|
+
// "name": "string",
|
|
1241
|
+
// "network": 0,
|
|
1242
|
+
// "qr_code_uri": "string",
|
|
1243
|
+
// "receive_fee": "string",
|
|
1244
|
+
// "total_received": "string",
|
|
1245
|
+
// "total_unconfirmed": "string"
|
|
1246
|
+
// }
|
|
1247
|
+
//
|
|
1248
|
+
return this.parseDepositAddress(response, currency);
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* @method
|
|
1252
|
+
* @name luno#fetchDepositAddress
|
|
1253
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
1254
|
+
* @see https://www.luno.com/en/developers/api#tag/Receive/operation/getFundingAddress
|
|
1255
|
+
* @param {string} code unified currency code
|
|
1256
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1257
|
+
* @param {string} [params.address] a specific cryptocurrency address to retrieve
|
|
1258
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1259
|
+
*/
|
|
1260
|
+
async fetchDepositAddress(code, params = {}) {
|
|
1261
|
+
await this.loadMarkets();
|
|
1262
|
+
const currency = this.currency(code);
|
|
1263
|
+
const request = {
|
|
1264
|
+
'asset': currency['id'],
|
|
1265
|
+
};
|
|
1266
|
+
const response = await this.privateGetFundingAddress(this.extend(request, params));
|
|
1267
|
+
//
|
|
1268
|
+
// {
|
|
1269
|
+
// "account_id": "string",
|
|
1270
|
+
// "address": "string",
|
|
1271
|
+
// "address_meta": [
|
|
1272
|
+
// {
|
|
1273
|
+
// "label": "string",
|
|
1274
|
+
// "value": "string"
|
|
1275
|
+
// }
|
|
1276
|
+
// ],
|
|
1277
|
+
// "asset": "string",
|
|
1278
|
+
// "assigned_at": 0,
|
|
1279
|
+
// "name": "string",
|
|
1280
|
+
// "network": 0,
|
|
1281
|
+
// "qr_code_uri": "string",
|
|
1282
|
+
// "receive_fee": "string",
|
|
1283
|
+
// "total_received": "string",
|
|
1284
|
+
// "total_unconfirmed": "string"
|
|
1285
|
+
// }
|
|
1286
|
+
//
|
|
1287
|
+
return this.parseDepositAddress(response, currency);
|
|
1288
|
+
}
|
|
1289
|
+
parseDepositAddress(depositAddress, currency = undefined) {
|
|
1290
|
+
//
|
|
1291
|
+
// {
|
|
1292
|
+
// "account_id": "string",
|
|
1293
|
+
// "address": "string",
|
|
1294
|
+
// "address_meta": [
|
|
1295
|
+
// {
|
|
1296
|
+
// "label": "string",
|
|
1297
|
+
// "value": "string"
|
|
1298
|
+
// }
|
|
1299
|
+
// ],
|
|
1300
|
+
// "asset": "string",
|
|
1301
|
+
// "assigned_at": 0,
|
|
1302
|
+
// "name": "string",
|
|
1303
|
+
// "network": 0,
|
|
1304
|
+
// "qr_code_uri": "string",
|
|
1305
|
+
// "receive_fee": "string",
|
|
1306
|
+
// "total_received": "string",
|
|
1307
|
+
// "total_unconfirmed": "string"
|
|
1308
|
+
// }
|
|
1309
|
+
//
|
|
1310
|
+
const currencyId = this.safeStringUpper(depositAddress, 'currency');
|
|
1311
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1312
|
+
return {
|
|
1313
|
+
'info': depositAddress,
|
|
1314
|
+
'currency': code,
|
|
1315
|
+
'network': undefined,
|
|
1316
|
+
'address': this.safeString(depositAddress, 'address'),
|
|
1317
|
+
'tag': this.safeString(depositAddress, 'name'),
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1208
1320
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
1209
1321
|
let url = this.urls['api'][api] + '/' + this.version + '/' + this.implodeParams(path, params);
|
|
1210
1322
|
const query = this.omit(params, this.extractParams(path));
|
package/js/src/tradeogre.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export default class tradeogre extends Exchange {
|
|
|
44
44
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
45
45
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
46
46
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
47
|
+
* @param {int} [params.until] timestamp of the latest candle in ms
|
|
47
48
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
48
49
|
*/
|
|
49
50
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
package/js/src/tradeogre.js
CHANGED
|
@@ -125,7 +125,7 @@ export default class tradeogre extends Exchange {
|
|
|
125
125
|
'orders/{market}': 1,
|
|
126
126
|
'ticker/{market}': 1,
|
|
127
127
|
'history/{market}': 1,
|
|
128
|
-
'chart/{interval}/{market}
|
|
128
|
+
'chart/{interval}/{market}': 1,
|
|
129
129
|
},
|
|
130
130
|
},
|
|
131
131
|
'private': {
|
|
@@ -438,6 +438,7 @@ export default class tradeogre extends Exchange {
|
|
|
438
438
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
439
439
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
440
440
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
441
|
+
* @param {int} [params.until] timestamp of the latest candle in ms
|
|
441
442
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
442
443
|
*/
|
|
443
444
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -447,13 +448,12 @@ export default class tradeogre extends Exchange {
|
|
|
447
448
|
'market': market['id'],
|
|
448
449
|
'interval': this.safeString(this.timeframes, timeframe, timeframe),
|
|
449
450
|
};
|
|
450
|
-
|
|
451
|
-
|
|
451
|
+
const until = this.safeInteger(params, 'until');
|
|
452
|
+
if (until !== undefined) {
|
|
453
|
+
params = this.omit(params, 'until');
|
|
454
|
+
request['timestamp'] = until;
|
|
452
455
|
}
|
|
453
|
-
|
|
454
|
-
request['timestamp'] = since;
|
|
455
|
-
}
|
|
456
|
-
const response = await this.publicGetChartIntervalMarketTimestamp(this.extend(request, params));
|
|
456
|
+
const response = await this.publicGetChartIntervalMarket(this.extend(request, params));
|
|
457
457
|
//
|
|
458
458
|
// [
|
|
459
459
|
// [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccxt",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.68",
|
|
4
4
|
"description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
|
|
5
5
|
"unpkg": "dist/ccxt.browser.min.js",
|
|
6
6
|
"type": "module",
|
|
@@ -195,8 +195,8 @@
|
|
|
195
195
|
"@types/node": "^18.15.11",
|
|
196
196
|
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
197
197
|
"@typescript-eslint/parser": "^5.30.5",
|
|
198
|
-
"ansicolor": "
|
|
199
|
-
"as-table": "1.0.
|
|
198
|
+
"ansicolor": "^2.0.0",
|
|
199
|
+
"as-table": "^1.0.55",
|
|
200
200
|
"asciichart": "^1.5.25",
|
|
201
201
|
"assert": "^2.0.0",
|
|
202
202
|
"ast-transpiler": "^0.0.65",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"esmify": "^2.1.1",
|
|
209
209
|
"https-proxy-agent": "^5.0.1",
|
|
210
210
|
"jsdoc-to-markdown": "^8.0.0",
|
|
211
|
-
"ololog": "1.1.
|
|
211
|
+
"ololog": "^1.1.175",
|
|
212
212
|
"piscina": "^3.2.0",
|
|
213
213
|
"replace-in-file": "^6.3.5",
|
|
214
214
|
"rollup": "^2.70.1",
|