ccxt-ir 4.16.0 → 4.16.3
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 +3 -3
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +240 -240
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/asacoine.js +359 -299
- package/dist/cjs/src/bitpin.js +478 -478
- package/js/ccxt.d.ts +706 -706
- package/js/ccxt.js +513 -513
- package/js/src/asacoine.d.ts +23 -22
- package/js/src/asacoine.js +363 -303
- package/js/src/base/Exchange.d.ts +926 -926
- package/js/src/bitpin.js +481 -481
- package/js/src/coinbaseexchange.d.ts +334 -334
- package/js/src/protobuf/mexc/compiled.d.cts +8 -2
- package/js/src/static_dependencies/fflake/browser.d.ts +222 -222
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +101 -101
- package/js/src/static_dependencies/qs/formats.d.cts +14 -8
- package/js/src/static_dependencies/qs/index.d.cts +10 -4
- package/js/src/static_dependencies/qs/parse.d.cts +8 -2
- package/js/src/static_dependencies/qs/stringify.d.cts +8 -2
- package/js/src/static_dependencies/qs/utils.d.cts +15 -9
- package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +5 -5
- package/js/test.js +79 -91
- package/package.json +1 -1
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const
|
|
8
|
-
export
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
declare const _default: string;
|
|
8
|
+
export declare namespace formatters {
|
|
9
|
+
function RFC1738(value: any): string;
|
|
10
|
+
function RFC3986(value: any): any;
|
|
11
|
+
}
|
|
12
|
+
declare const RFC1738_1: string;
|
|
13
|
+
declare const RFC3986_1: string;
|
|
14
|
+
export { _default as default, RFC1738_1 as RFC1738, RFC3986_1 as RFC3986 };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
import formats = require("./formats.cjs");
|
|
8
|
+
import parse = require("./parse.cjs");
|
|
9
|
+
import stringify = require("./stringify.cjs");
|
|
10
|
+
export { formats, parse, stringify };
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
declare function _exports(str: any, opts: any): any;
|
|
8
|
+
export = _exports;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
declare function _exports(object: any, opts: any): string;
|
|
8
|
+
export = _exports;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export function
|
|
8
|
-
export function
|
|
9
|
-
export function
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
export function arrayToObject(source: any, options: any): any;
|
|
8
|
+
export function assign(target: any, source: any): any;
|
|
9
|
+
export function combine(a: any, b: any): any[];
|
|
10
|
+
export function compact(value: any): any;
|
|
11
|
+
export function decode(str: any, decoder: any, charset: any): any;
|
|
12
|
+
export function encode(str: any, defaultEncoder: any, charset: any): any;
|
|
13
|
+
export function isBuffer(obj: any): boolean;
|
|
14
|
+
export function isRegExp(obj: any): boolean;
|
|
15
|
+
export function merge(target: any, source: any, options: any): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Abi, FunctionAbi, RawArgs } from '../../../types/index.js';
|
|
2
|
-
import { AbiParserInterface } from './interface.js';
|
|
3
|
-
export declare function createAbiParser(abi: Abi): AbiParserInterface;
|
|
4
|
-
export declare function getAbiVersion(abi: Abi):
|
|
5
|
-
export declare function isNoConstructorValid(method: string, argsCalldata: RawArgs, abiMethod?: FunctionAbi): boolean;
|
|
1
|
+
import { Abi, FunctionAbi, RawArgs } from '../../../types/index.js';
|
|
2
|
+
import { AbiParserInterface } from './interface.js';
|
|
3
|
+
export declare function createAbiParser(abi: Abi): AbiParserInterface;
|
|
4
|
+
export declare function getAbiVersion(abi: Abi): 0 | 1 | 2;
|
|
5
|
+
export declare function isNoConstructorValid(method: string, argsCalldata: RawArgs, abiMethod?: FunctionAbi): boolean;
|
package/js/test.js
CHANGED
|
@@ -4,94 +4,82 @@
|
|
|
4
4
|
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
5
|
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
async function
|
|
9
|
-
const exchange = new
|
|
10
|
-
enableRateLimit: true,
|
|
11
|
-
timeout:
|
|
12
|
-
});
|
|
13
|
-
try {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
last: otcTicker.last,
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
finally {
|
|
91
|
-
await exchange.close();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
testAsacoine().catch((error) => {
|
|
95
|
-
console.error('Asacoine test failed:', error);
|
|
96
|
-
process.exitCode = 1;
|
|
97
|
-
});
|
|
7
|
+
import raastin from './src/raastin.js';
|
|
8
|
+
async function main() {
|
|
9
|
+
const exchange = new raastin({
|
|
10
|
+
enableRateLimit: true,
|
|
11
|
+
timeout: 30000,
|
|
12
|
+
});
|
|
13
|
+
try {
|
|
14
|
+
const spotMarkets = await exchange.loadMarkets(true, { 'type': 'spot' });
|
|
15
|
+
const spotSymbols = [];
|
|
16
|
+
const preferredSymbols = ['USDT/IRT', 'BTC/IRT', 'ETH/IRT'];
|
|
17
|
+
for (let i = 0; i < preferredSymbols.length; i++) {
|
|
18
|
+
const symbol = preferredSymbols[i];
|
|
19
|
+
if (symbol in spotMarkets) {
|
|
20
|
+
spotSymbols.push(symbol);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (spotSymbols.length === 0) {
|
|
24
|
+
const marketSymbols = Object.keys(spotMarkets);
|
|
25
|
+
for (let i = 0; i < marketSymbols.length; i++) {
|
|
26
|
+
const symbol = marketSymbols[i];
|
|
27
|
+
const market = spotMarkets[symbol];
|
|
28
|
+
if (market['type'] === 'spot') {
|
|
29
|
+
spotSymbols.push(symbol);
|
|
30
|
+
}
|
|
31
|
+
if (spotSymbols.length >= 3) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
console.log('spot symbols:', spotSymbols);
|
|
37
|
+
const spotTickers = await exchange.fetchTickers(spotSymbols);
|
|
38
|
+
console.log('spot tickers:');
|
|
39
|
+
for (let i = 0; i < spotSymbols.length; i++) {
|
|
40
|
+
const symbol = spotSymbols[i];
|
|
41
|
+
const ticker = spotTickers[symbol];
|
|
42
|
+
console.log({
|
|
43
|
+
symbol: ticker['symbol'],
|
|
44
|
+
last: ticker['last'],
|
|
45
|
+
high: ticker['high'],
|
|
46
|
+
low: ticker['low'],
|
|
47
|
+
change: ticker['change'],
|
|
48
|
+
percentage: ticker['percentage'],
|
|
49
|
+
baseVolume: ticker['baseVolume'],
|
|
50
|
+
quoteVolume: ticker['quoteVolume'],
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const singleSpotSymbol = spotSymbols[0];
|
|
54
|
+
if (singleSpotSymbol !== undefined) {
|
|
55
|
+
const singleSpotTicker = await exchange.fetchTicker(singleSpotSymbol);
|
|
56
|
+
console.log('single spot ticker:', {
|
|
57
|
+
symbol: singleSpotTicker['symbol'],
|
|
58
|
+
last: singleSpotTicker['last'],
|
|
59
|
+
change: singleSpotTicker['change'],
|
|
60
|
+
percentage: singleSpotTicker['percentage'],
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
const otcMarkets = await exchange.loadMarkets(true, { 'type': 'otc' });
|
|
64
|
+
console.log('otc markets:', otcMarkets);
|
|
65
|
+
const otcSymbols = Object.keys(otcMarkets);
|
|
66
|
+
const otcSymbol = otcSymbols[0];
|
|
67
|
+
if (otcSymbol !== undefined) {
|
|
68
|
+
const otcTicker = await exchange.fetchTicker(otcSymbol, { 'type': 'otc' });
|
|
69
|
+
console.log('single otc ticker:', {
|
|
70
|
+
symbol: otcTicker['symbol'],
|
|
71
|
+
last: otcTicker['last'],
|
|
72
|
+
bid: otcTicker['bid'],
|
|
73
|
+
ask: otcTicker['ask'],
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
console.error('Raastin ticker test failed:', error);
|
|
79
|
+
process.exitCode = 1;
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
await exchange.close();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
void main();
|
package/package.json
CHANGED