ccxt-ir 4.9.10 → 4.9.13
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 +156 -163
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bitbarg.js +4 -4
- package/dist/cjs/src/cafearz.js +2 -2
- package/dist/cjs/src/hamtapay.js +3 -2
- package/dist/cjs/src/kifpoolme.js +3 -3
- package/dist/cjs/src/tetherland.js +3 -7
- package/dist/cjs/src/twox.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/bitbarg.js +4 -4
- package/js/src/cafearz.js +2 -2
- package/js/src/hamtapay.js +3 -2
- package/js/src/kifpoolme.js +3 -3
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.d.ts +2 -2
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/tetherland.js +3 -4
- package/js/src/twox.js +1 -1
- package/package.json +1 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -232,7 +232,7 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
232
232
|
|
|
233
233
|
//-----------------------------------------------------------------------------
|
|
234
234
|
// this is updated by vss.js when building
|
|
235
|
-
const version = '4.9.
|
|
235
|
+
const version = '4.9.13';
|
|
236
236
|
Exchange["default"].ccxtVersion = version;
|
|
237
237
|
const exchanges = {
|
|
238
238
|
'abantether': abantether["default"],
|
package/dist/cjs/src/bitbarg.js
CHANGED
|
@@ -139,8 +139,8 @@ class bitbarg extends bitbarg$1["default"] {
|
|
|
139
139
|
'baseId': baseId,
|
|
140
140
|
'quoteId': quoteId,
|
|
141
141
|
'settleId': undefined,
|
|
142
|
-
'type': '
|
|
143
|
-
'spot':
|
|
142
|
+
'type': 'spot',
|
|
143
|
+
'spot': true,
|
|
144
144
|
'margin': false,
|
|
145
145
|
'swap': false,
|
|
146
146
|
'future': false,
|
|
@@ -220,7 +220,7 @@ class bitbarg extends bitbarg$1["default"] {
|
|
|
220
220
|
const request = {
|
|
221
221
|
'pageSize': -1,
|
|
222
222
|
};
|
|
223
|
-
const response = await this.publicGetApiV1Currencies(
|
|
223
|
+
const response = await this.publicGetApiV1Currencies(request);
|
|
224
224
|
const data = this.safeDict(response, 'result', {});
|
|
225
225
|
const items = this.safeList(data, 'items', []);
|
|
226
226
|
const result = {};
|
|
@@ -271,7 +271,7 @@ class bitbarg extends bitbarg$1["default"] {
|
|
|
271
271
|
// "isFavorite": false,
|
|
272
272
|
// "chart": [...]
|
|
273
273
|
// }
|
|
274
|
-
const marketType = '
|
|
274
|
+
const marketType = 'spot';
|
|
275
275
|
const marketId = this.safeString(ticker, 'coin') + '/' + 'USDT';
|
|
276
276
|
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
277
277
|
const last = this.safeFloat(ticker, 'price', 0);
|
package/dist/cjs/src/cafearz.js
CHANGED
|
@@ -23,7 +23,7 @@ class cafearz extends cafearz$1["default"] {
|
|
|
23
23
|
'pro': false,
|
|
24
24
|
'has': {
|
|
25
25
|
'CORS': undefined,
|
|
26
|
-
'spot':
|
|
26
|
+
'spot': true,
|
|
27
27
|
'margin': false,
|
|
28
28
|
'swap': false,
|
|
29
29
|
'future': false,
|
|
@@ -169,7 +169,7 @@ class cafearz extends cafearz$1["default"] {
|
|
|
169
169
|
'baseId': baseId,
|
|
170
170
|
'quoteId': quoteId,
|
|
171
171
|
'settleId': undefined,
|
|
172
|
-
'type': '
|
|
172
|
+
'type': 'spot',
|
|
173
173
|
'spot': false,
|
|
174
174
|
'margin': false,
|
|
175
175
|
'swap': false,
|
package/dist/cjs/src/hamtapay.js
CHANGED
|
@@ -217,8 +217,9 @@ class hamtapay extends hamtapay$1["default"] {
|
|
|
217
217
|
for (let i = 0; i < quotes.length; i++) {
|
|
218
218
|
const current_qoute = quotes[i];
|
|
219
219
|
const corresponding_data = this.safeDict(data, current_qoute, {});
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
const baseSymbols = Object.keys(corresponding_data);
|
|
221
|
+
for (let j = 0; j < baseSymbols.length; j++) {
|
|
222
|
+
const current_base = baseSymbols[j];
|
|
222
223
|
const current_ticker = corresponding_data[current_base];
|
|
223
224
|
current_ticker['base'] = current_base;
|
|
224
225
|
current_ticker['quote'] = current_qoute;
|
|
@@ -202,7 +202,7 @@ class kifpoolme extends kifpoolme$1["default"] {
|
|
|
202
202
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
203
203
|
* @returns {object[]} an array of objects representing market data
|
|
204
204
|
*/
|
|
205
|
-
const response = await this.publicGetApiSpotPrice(
|
|
205
|
+
const response = await this.publicGetApiSpotPrice();
|
|
206
206
|
const result = [];
|
|
207
207
|
// Response is an array of coin objects
|
|
208
208
|
for (let i = 0; i < response.length; i++) {
|
|
@@ -240,7 +240,7 @@ class kifpoolme extends kifpoolme$1["default"] {
|
|
|
240
240
|
const baseSymbols = [];
|
|
241
241
|
for (let i = 0; i < symbols.length; i++) {
|
|
242
242
|
const market = this.market(symbols[i]);
|
|
243
|
-
if (
|
|
243
|
+
if (!(market['baseId'] in baseSymbols)) {
|
|
244
244
|
baseSymbols.push(market['baseId']);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -250,7 +250,7 @@ class kifpoolme extends kifpoolme$1["default"] {
|
|
|
250
250
|
if (symbolsParam !== undefined) {
|
|
251
251
|
request['symbol'] = symbolsParam;
|
|
252
252
|
}
|
|
253
|
-
const response = await this.publicGetApiSpotPrice(this.extend(request
|
|
253
|
+
const response = await this.publicGetApiSpotPrice(this.extend(request));
|
|
254
254
|
const result = {};
|
|
255
255
|
for (let i = 0; i < response.length; i++) {
|
|
256
256
|
const item = response[i];
|
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tetherland$1 = require('./abstract/tetherland.js');
|
|
6
|
-
require('./base/functions/platform.js');
|
|
7
|
-
var type = require('./base/functions/type.js');
|
|
8
|
-
require('./base/functions/encode.js');
|
|
9
|
-
require('./base/functions/crypto.js');
|
|
10
6
|
|
|
11
7
|
// ----------------------------------------------------------------------------
|
|
12
8
|
// ---------------------------------------------------------------------------
|
|
@@ -257,7 +253,7 @@ class tetherland extends tetherland$1["default"] {
|
|
|
257
253
|
}
|
|
258
254
|
const response = await this.publicGetApiV5Currencies(params);
|
|
259
255
|
const markets = this.safeList(response, 'data');
|
|
260
|
-
const result =
|
|
256
|
+
const result = {};
|
|
261
257
|
const quotes = ['USDT', 'IRT'];
|
|
262
258
|
for (let i = 0; i < markets.length; i++) {
|
|
263
259
|
for (let key = 0; key < quotes.length; key++) {
|
|
@@ -330,11 +326,11 @@ class tetherland extends tetherland$1["default"] {
|
|
|
330
326
|
// 'priority': 18,
|
|
331
327
|
// },
|
|
332
328
|
// }
|
|
333
|
-
const marketType = '
|
|
329
|
+
const marketType = 'spot';
|
|
334
330
|
const marketId = this.safeString(ticker, 'id');
|
|
335
331
|
const quote = this.safeString(ticker, 'quote');
|
|
336
332
|
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
337
|
-
let last =
|
|
333
|
+
let last = parseFloat(this.safeString(ticker, 'price', '').replace(',', ''));
|
|
338
334
|
if (quote === 'IRT') {
|
|
339
335
|
last = this.safeFloat(ticker, 'toman_amount', 0);
|
|
340
336
|
}
|
package/dist/cjs/src/twox.js
CHANGED
|
@@ -243,7 +243,7 @@ class twox extends twox$1["default"] {
|
|
|
243
243
|
symbols = this.marketSymbols(symbols);
|
|
244
244
|
}
|
|
245
245
|
const response = await this.publicGetApiCurrencies(params);
|
|
246
|
-
const result =
|
|
246
|
+
const result = {};
|
|
247
247
|
const quotes = ['IRT', 'USDT'];
|
|
248
248
|
for (let i = 0; i < response.length; i++) {
|
|
249
249
|
const base = this.safeString(response[i], 'symbol');
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OrderBooks, OpenInterests, ConstructorArgs } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.9.
|
|
7
|
+
declare const version = "4.9.13";
|
|
8
8
|
import abantether from './src/abantether.js';
|
|
9
9
|
import afratether from './src/afratether.js';
|
|
10
10
|
import alpaca from './src/alpaca.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.9.
|
|
41
|
+
const version = '4.9.13';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import abantether from './src/abantether.js';
|
package/js/src/bitbarg.js
CHANGED
|
@@ -140,8 +140,8 @@ export default class bitbarg extends Exchange {
|
|
|
140
140
|
'baseId': baseId,
|
|
141
141
|
'quoteId': quoteId,
|
|
142
142
|
'settleId': undefined,
|
|
143
|
-
'type': '
|
|
144
|
-
'spot':
|
|
143
|
+
'type': 'spot',
|
|
144
|
+
'spot': true,
|
|
145
145
|
'margin': false,
|
|
146
146
|
'swap': false,
|
|
147
147
|
'future': false,
|
|
@@ -221,7 +221,7 @@ export default class bitbarg extends Exchange {
|
|
|
221
221
|
const request = {
|
|
222
222
|
'pageSize': -1,
|
|
223
223
|
};
|
|
224
|
-
const response = await this.publicGetApiV1Currencies(
|
|
224
|
+
const response = await this.publicGetApiV1Currencies(request);
|
|
225
225
|
const data = this.safeDict(response, 'result', {});
|
|
226
226
|
const items = this.safeList(data, 'items', []);
|
|
227
227
|
const result = {};
|
|
@@ -272,7 +272,7 @@ export default class bitbarg extends Exchange {
|
|
|
272
272
|
// "isFavorite": false,
|
|
273
273
|
// "chart": [...]
|
|
274
274
|
// }
|
|
275
|
-
const marketType = '
|
|
275
|
+
const marketType = 'spot';
|
|
276
276
|
const marketId = this.safeString(ticker, 'coin') + '/' + 'USDT';
|
|
277
277
|
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
278
278
|
const last = this.safeFloat(ticker, 'price', 0);
|
package/js/src/cafearz.js
CHANGED
|
@@ -24,7 +24,7 @@ export default class cafearz extends Exchange {
|
|
|
24
24
|
'pro': false,
|
|
25
25
|
'has': {
|
|
26
26
|
'CORS': undefined,
|
|
27
|
-
'spot':
|
|
27
|
+
'spot': true,
|
|
28
28
|
'margin': false,
|
|
29
29
|
'swap': false,
|
|
30
30
|
'future': false,
|
|
@@ -170,7 +170,7 @@ export default class cafearz extends Exchange {
|
|
|
170
170
|
'baseId': baseId,
|
|
171
171
|
'quoteId': quoteId,
|
|
172
172
|
'settleId': undefined,
|
|
173
|
-
'type': '
|
|
173
|
+
'type': 'spot',
|
|
174
174
|
'spot': false,
|
|
175
175
|
'margin': false,
|
|
176
176
|
'swap': false,
|
package/js/src/hamtapay.js
CHANGED
|
@@ -218,8 +218,9 @@ export default class hamtapay extends Exchange {
|
|
|
218
218
|
for (let i = 0; i < quotes.length; i++) {
|
|
219
219
|
const current_qoute = quotes[i];
|
|
220
220
|
const corresponding_data = this.safeDict(data, current_qoute, {});
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
const baseSymbols = Object.keys(corresponding_data);
|
|
222
|
+
for (let j = 0; j < baseSymbols.length; j++) {
|
|
223
|
+
const current_base = baseSymbols[j];
|
|
223
224
|
const current_ticker = corresponding_data[current_base];
|
|
224
225
|
current_ticker['base'] = current_base;
|
|
225
226
|
current_ticker['quote'] = current_qoute;
|
package/js/src/kifpoolme.js
CHANGED
|
@@ -203,7 +203,7 @@ export default class kifpoolme extends Exchange {
|
|
|
203
203
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
204
204
|
* @returns {object[]} an array of objects representing market data
|
|
205
205
|
*/
|
|
206
|
-
const response = await this.publicGetApiSpotPrice(
|
|
206
|
+
const response = await this.publicGetApiSpotPrice();
|
|
207
207
|
const result = [];
|
|
208
208
|
// Response is an array of coin objects
|
|
209
209
|
for (let i = 0; i < response.length; i++) {
|
|
@@ -241,7 +241,7 @@ export default class kifpoolme extends Exchange {
|
|
|
241
241
|
const baseSymbols = [];
|
|
242
242
|
for (let i = 0; i < symbols.length; i++) {
|
|
243
243
|
const market = this.market(symbols[i]);
|
|
244
|
-
if (
|
|
244
|
+
if (!(market['baseId'] in baseSymbols)) {
|
|
245
245
|
baseSymbols.push(market['baseId']);
|
|
246
246
|
}
|
|
247
247
|
}
|
|
@@ -251,7 +251,7 @@ export default class kifpoolme extends Exchange {
|
|
|
251
251
|
if (symbolsParam !== undefined) {
|
|
252
252
|
request['symbol'] = symbolsParam;
|
|
253
253
|
}
|
|
254
|
-
const response = await this.publicGetApiSpotPrice(this.extend(request
|
|
254
|
+
const response = await this.publicGetApiSpotPrice(this.extend(request));
|
|
255
255
|
const result = {};
|
|
256
256
|
for (let i = 0; i < response.length; i++) {
|
|
257
257
|
const item = response[i];
|
|
@@ -12,7 +12,7 @@ export declare class Stream {
|
|
|
12
12
|
parseStringUTF(start: number, end: number): string;
|
|
13
13
|
parseStringBMP(start: number, end: number): string;
|
|
14
14
|
parseTime(start: number, end: number, shortYear: boolean): string;
|
|
15
|
-
parseInteger(start: number, end: number): string |
|
|
15
|
+
parseInteger(start: number, end: number): string | 0 | -1;
|
|
16
16
|
parseBitString(start: number, end: number, maxLength: number): string;
|
|
17
17
|
parseOctetString(start: number, end: number, maxLength: number): string;
|
|
18
18
|
parseOID(start: number, end: number, maxLength: number): string;
|
|
@@ -25,7 +25,7 @@ export declare class ASN1 {
|
|
|
25
25
|
private tag;
|
|
26
26
|
sub: ASN1[];
|
|
27
27
|
typeName(): string;
|
|
28
|
-
content(maxLength: number): string |
|
|
28
|
+
content(maxLength: number): string | 0 | -1;
|
|
29
29
|
toString(): string;
|
|
30
30
|
toPrettyString(indent: string): string;
|
|
31
31
|
posStart(): number;
|
|
@@ -15,7 +15,7 @@ export declare class BigInteger {
|
|
|
15
15
|
protected intValue(): number;
|
|
16
16
|
protected byteValue(): number;
|
|
17
17
|
protected shortValue(): number;
|
|
18
|
-
protected signum(): 1 |
|
|
18
|
+
protected signum(): 1 | 0 | -1;
|
|
19
19
|
toByteArray(): number[];
|
|
20
20
|
protected equals(a: BigInteger): boolean;
|
|
21
21
|
protected min(a: BigInteger): BigInteger;
|
package/js/src/tetherland.js
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import Exchange from './abstract/tetherland.js';
|
|
9
|
-
import { asFloat } from './base/functions.js';
|
|
10
9
|
// ---------------------------------------------------------------------------
|
|
11
10
|
/**
|
|
12
11
|
* @class tetherland
|
|
@@ -255,7 +254,7 @@ export default class tetherland extends Exchange {
|
|
|
255
254
|
}
|
|
256
255
|
const response = await this.publicGetApiV5Currencies(params);
|
|
257
256
|
const markets = this.safeList(response, 'data');
|
|
258
|
-
const result =
|
|
257
|
+
const result = {};
|
|
259
258
|
const quotes = ['USDT', 'IRT'];
|
|
260
259
|
for (let i = 0; i < markets.length; i++) {
|
|
261
260
|
for (let key = 0; key < quotes.length; key++) {
|
|
@@ -328,11 +327,11 @@ export default class tetherland extends Exchange {
|
|
|
328
327
|
// 'priority': 18,
|
|
329
328
|
// },
|
|
330
329
|
// }
|
|
331
|
-
const marketType = '
|
|
330
|
+
const marketType = 'spot';
|
|
332
331
|
const marketId = this.safeString(ticker, 'id');
|
|
333
332
|
const quote = this.safeString(ticker, 'quote');
|
|
334
333
|
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
335
|
-
let last =
|
|
334
|
+
let last = parseFloat(this.safeString(ticker, 'price', '').replace(',', ''));
|
|
336
335
|
if (quote === 'IRT') {
|
|
337
336
|
last = this.safeFloat(ticker, 'toman_amount', 0);
|
|
338
337
|
}
|
package/js/src/twox.js
CHANGED
|
@@ -244,7 +244,7 @@ export default class twox extends Exchange {
|
|
|
244
244
|
symbols = this.marketSymbols(symbols);
|
|
245
245
|
}
|
|
246
246
|
const response = await this.publicGetApiCurrencies(params);
|
|
247
|
-
const result =
|
|
247
|
+
const result = {};
|
|
248
248
|
const quotes = ['IRT', 'USDT'];
|
|
249
249
|
for (let i = 0; i < response.length; i++) {
|
|
250
250
|
const base = this.safeString(response[i], 'symbol');
|
package/package.json
CHANGED