ccxt-ir 4.9.13 → 4.9.14
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 +229 -229
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/abantether.js +344 -344
- package/dist/cjs/src/abstract/bitbarg.js +1 -1
- package/dist/cjs/src/abstract/bydfi.js +1 -1
- package/dist/cjs/src/abstract/cafearz.js +1 -1
- package/dist/cjs/src/abstract/hamtapay.js +1 -1
- package/dist/cjs/src/abstract/kifpoolme.js +1 -1
- package/dist/cjs/src/abstract/mazdax.js +1 -1
- package/dist/cjs/src/abstract/pingi.js +1 -1
- package/dist/cjs/src/abstract/pooleno.js +1 -1
- package/dist/cjs/src/afratether.js +347 -347
- package/dist/cjs/src/arzplus.js +572 -572
- package/dist/cjs/src/bitbarg.js +303 -303
- package/dist/cjs/src/bydfi.js +425 -425
- package/dist/cjs/src/cafearz.js +337 -337
- package/dist/cjs/src/hamtapay.js +291 -291
- package/dist/cjs/src/kifpoolme.js +401 -401
- package/dist/cjs/src/mazdax.js +525 -526
- package/dist/cjs/src/pingi.js +437 -438
- package/dist/cjs/src/pooleno.js +338 -338
- package/dist/cjs/src/tetherland.js +358 -358
- package/dist/cjs/src/twox.js +362 -362
- package/js/ccxt.d.ts +673 -673
- package/js/ccxt.js +491 -491
- package/js/src/abantether.js +347 -347
- package/js/src/abstract/abantether.d.ts +8 -8
- package/js/src/abstract/arzplus.d.ts +11 -11
- package/js/src/abstract/bitbarg.d.ts +8 -8
- package/js/src/abstract/bitbarg.js +5 -5
- package/js/src/abstract/bydfi.d.ts +11 -11
- package/js/src/abstract/bydfi.js +5 -5
- package/js/src/abstract/cafearz.d.ts +8 -8
- package/js/src/abstract/cafearz.js +5 -5
- package/js/src/abstract/hamtapay.d.ts +9 -9
- package/js/src/abstract/hamtapay.js +5 -5
- package/js/src/abstract/kifpoolme.d.ts +9 -9
- package/js/src/abstract/kifpoolme.js +5 -5
- package/js/src/abstract/mazdax.d.ts +11 -11
- package/js/src/abstract/mazdax.js +5 -5
- package/js/src/abstract/pingi.d.ts +9 -9
- package/js/src/abstract/pingi.js +5 -5
- package/js/src/abstract/pooleno.d.ts +8 -8
- package/js/src/abstract/pooleno.js +5 -5
- package/js/src/afratether.js +350 -350
- package/js/src/arzplus.d.ts +26 -26
- package/js/src/arzplus.js +575 -575
- package/js/src/base/Exchange.d.ts +926 -926
- package/js/src/base/types.d.ts +586 -586
- package/js/src/bitbarg.d.ts +21 -21
- package/js/src/bitbarg.js +306 -306
- package/js/src/bydfi.d.ts +23 -23
- package/js/src/bydfi.js +428 -428
- package/js/src/cafearz.d.ts +21 -21
- package/js/src/cafearz.js +340 -340
- package/js/src/coinbaseexchange.d.ts +334 -334
- package/js/src/hamtapay.d.ts +21 -21
- package/js/src/hamtapay.js +294 -294
- package/js/src/kifpoolme.d.ts +23 -23
- package/js/src/kifpoolme.js +404 -404
- package/js/src/mazdax.d.ts +23 -23
- package/js/src/mazdax.js +528 -529
- package/js/src/pingi.d.ts +22 -22
- package/js/src/pingi.js +440 -441
- package/js/src/pooleno.d.ts +21 -21
- package/js/src/pooleno.js +341 -341
- package/js/src/protobuf/mexc/compiled.d.cts +2 -2
- package/js/src/static_dependencies/fflake/browser.d.ts +222 -222
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.d.ts +51 -51
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +101 -101
- package/js/src/static_dependencies/noble-curves/abstract/weierstrass.d.ts +204 -204
- package/js/src/static_dependencies/qs/formats.d.cts +8 -8
- package/js/src/static_dependencies/qs/index.d.cts +4 -4
- package/js/src/static_dependencies/qs/parse.d.cts +2 -2
- package/js/src/static_dependencies/qs/stringify.d.cts +2 -2
- package/js/src/static_dependencies/qs/utils.d.cts +9 -9
- package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +5 -5
- package/js/src/tetherland.js +361 -361
- package/js/src/twox.js +365 -365
- package/package.json +1 -1
package/dist/cjs/src/pingi.js
CHANGED
|
@@ -5,444 +5,443 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var pingi$1 = require('./abstract/pingi.js');
|
|
6
6
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
/**
|
|
10
|
-
* @class pingi
|
|
11
|
-
* @augments Exchange
|
|
12
|
-
* @description Pingi
|
|
13
|
-
*/
|
|
14
|
-
class pingi extends pingi$1["default"] {
|
|
15
|
-
describe() {
|
|
16
|
-
return this.deepExtend(super.describe(), {
|
|
17
|
-
'id': 'pingi',
|
|
18
|
-
'name': 'Pingi',
|
|
19
|
-
'countries': ['IR'],
|
|
20
|
-
'rateLimit': 1000,
|
|
21
|
-
'version': '1',
|
|
22
|
-
'certified': false,
|
|
23
|
-
'pro': false,
|
|
24
|
-
'has': {
|
|
25
|
-
'CORS': undefined,
|
|
26
|
-
'spot': false,
|
|
27
|
-
'margin': false,
|
|
28
|
-
'swap': false,
|
|
29
|
-
'future': false,
|
|
30
|
-
'option': false,
|
|
31
|
-
'addMargin': false,
|
|
32
|
-
'cancelAllOrders': false,
|
|
33
|
-
'cancelOrder': false,
|
|
34
|
-
'cancelOrders': false,
|
|
35
|
-
'createDepositAddress': false,
|
|
36
|
-
'createOrder': false,
|
|
37
|
-
'createStopLimitOrder': false,
|
|
38
|
-
'createStopMarketOrder': false,
|
|
39
|
-
'createStopOrder': false,
|
|
40
|
-
'editOrder': false,
|
|
41
|
-
'fetchBalance': false,
|
|
42
|
-
'fetchBorrowInterest': false,
|
|
43
|
-
'fetchBorrowRateHistories': false,
|
|
44
|
-
'fetchBorrowRateHistory': false,
|
|
45
|
-
'fetchClosedOrders': false,
|
|
46
|
-
'fetchCrossBorrowRate': false,
|
|
47
|
-
'fetchCrossBorrowRates': false,
|
|
48
|
-
'fetchCurrencies': false,
|
|
49
|
-
'fetchDepositAddress': false,
|
|
50
|
-
'fetchDeposits': false,
|
|
51
|
-
'fetchFundingHistory': false,
|
|
52
|
-
'fetchFundingRate': false,
|
|
53
|
-
'fetchFundingRateHistory': false,
|
|
54
|
-
'fetchFundingRates': false,
|
|
55
|
-
'fetchIndexOHLCV': false,
|
|
56
|
-
'fetchIsolatedBorrowRate': false,
|
|
57
|
-
'fetchIsolatedBorrowRates': false,
|
|
58
|
-
'fetchL2OrderBook': false,
|
|
59
|
-
'fetchL3OrderBook': false,
|
|
60
|
-
'fetchLedger': false,
|
|
61
|
-
'fetchLedgerEntry': false,
|
|
62
|
-
'fetchLeverageTiers': false,
|
|
63
|
-
'fetchMarkets': true,
|
|
64
|
-
'fetchMarkOHLCV': false,
|
|
65
|
-
'fetchMyTrades': false,
|
|
66
|
-
'fetchOHLCV': true,
|
|
67
|
-
'fetchOpenInterestHistory': false,
|
|
68
|
-
'fetchOpenOrders': false,
|
|
69
|
-
'fetchOrder': false,
|
|
70
|
-
'fetchOrderBook': false,
|
|
71
|
-
'fetchOrders': false,
|
|
72
|
-
'fetchOrderTrades': 'emulated',
|
|
73
|
-
'fetchPositions': false,
|
|
74
|
-
'fetchPremiumIndexOHLCV': false,
|
|
75
|
-
'fetchTicker': true,
|
|
76
|
-
'fetchTickers': true,
|
|
77
|
-
'fetchTime': false,
|
|
78
|
-
'fetchTrades': false,
|
|
79
|
-
'fetchTradingFee': false,
|
|
80
|
-
'fetchTradingFees': false,
|
|
81
|
-
'fetchWithdrawals': false,
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
'
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
'
|
|
89
|
-
|
|
90
|
-
'
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
'
|
|
101
|
-
'
|
|
102
|
-
'
|
|
103
|
-
'
|
|
104
|
-
'
|
|
105
|
-
'
|
|
106
|
-
'
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
'
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
* @
|
|
130
|
-
* @
|
|
131
|
-
* @
|
|
132
|
-
* @
|
|
133
|
-
* @
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
// "
|
|
140
|
-
// "
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
// "
|
|
144
|
-
// "
|
|
145
|
-
// "
|
|
146
|
-
// "
|
|
147
|
-
// "
|
|
148
|
-
// "
|
|
149
|
-
// "
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
// "
|
|
154
|
-
// "
|
|
155
|
-
// "
|
|
156
|
-
// "
|
|
157
|
-
// "
|
|
158
|
-
// "
|
|
159
|
-
// "
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
//
|
|
178
|
-
// "
|
|
179
|
-
// "
|
|
180
|
-
// "
|
|
181
|
-
// "
|
|
182
|
-
// "
|
|
183
|
-
// "
|
|
184
|
-
// "
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
let
|
|
190
|
-
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
'
|
|
197
|
-
'
|
|
198
|
-
'
|
|
199
|
-
'
|
|
200
|
-
'
|
|
201
|
-
'
|
|
202
|
-
'
|
|
203
|
-
'
|
|
204
|
-
'
|
|
205
|
-
'
|
|
206
|
-
'
|
|
207
|
-
'
|
|
208
|
-
'
|
|
209
|
-
'
|
|
210
|
-
'
|
|
211
|
-
'
|
|
212
|
-
'
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
'
|
|
216
|
-
'
|
|
217
|
-
'
|
|
218
|
-
'
|
|
219
|
-
|
|
220
|
-
'
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
'
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
'
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
'
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
'
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
'
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
* @
|
|
248
|
-
* @
|
|
249
|
-
* @
|
|
250
|
-
* @
|
|
251
|
-
* @param {
|
|
252
|
-
* @
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
//
|
|
261
|
-
//
|
|
262
|
-
// "
|
|
263
|
-
// "
|
|
264
|
-
//
|
|
265
|
-
//
|
|
266
|
-
// "
|
|
267
|
-
// "
|
|
268
|
-
// "
|
|
269
|
-
// "
|
|
270
|
-
// "
|
|
271
|
-
// "
|
|
272
|
-
// "
|
|
273
|
-
//
|
|
274
|
-
//
|
|
275
|
-
//
|
|
276
|
-
//
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
const
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
* @
|
|
293
|
-
* @
|
|
294
|
-
* @
|
|
295
|
-
* @
|
|
296
|
-
* @param {
|
|
297
|
-
* @
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
//
|
|
304
|
-
//
|
|
305
|
-
// "
|
|
306
|
-
// "
|
|
307
|
-
//
|
|
308
|
-
//
|
|
309
|
-
// "
|
|
310
|
-
// "
|
|
311
|
-
// "
|
|
312
|
-
// "
|
|
313
|
-
// "
|
|
314
|
-
// "
|
|
315
|
-
// "
|
|
316
|
-
//
|
|
317
|
-
//
|
|
318
|
-
//
|
|
319
|
-
//
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
//
|
|
327
|
-
// "
|
|
328
|
-
// "
|
|
329
|
-
// "
|
|
330
|
-
// "
|
|
331
|
-
// "
|
|
332
|
-
// "
|
|
333
|
-
// "
|
|
334
|
-
//
|
|
335
|
-
|
|
336
|
-
const
|
|
337
|
-
const
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
let
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
'
|
|
357
|
-
'
|
|
358
|
-
'
|
|
359
|
-
'
|
|
360
|
-
'
|
|
361
|
-
'
|
|
362
|
-
'
|
|
363
|
-
'
|
|
364
|
-
'
|
|
365
|
-
'
|
|
366
|
-
'
|
|
367
|
-
'
|
|
368
|
-
'
|
|
369
|
-
'
|
|
370
|
-
'
|
|
371
|
-
'
|
|
372
|
-
'
|
|
373
|
-
'
|
|
374
|
-
'
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
* @
|
|
381
|
-
* @
|
|
382
|
-
* @
|
|
383
|
-
* @
|
|
384
|
-
* @param {string}
|
|
385
|
-
* @param {
|
|
386
|
-
* @param {int} [
|
|
387
|
-
* @param {
|
|
388
|
-
* @
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
const
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
'
|
|
396
|
-
'
|
|
397
|
-
'
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
request['
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
// "
|
|
409
|
-
// "
|
|
410
|
-
// "
|
|
411
|
-
// "
|
|
412
|
-
// "
|
|
413
|
-
//
|
|
414
|
-
|
|
415
|
-
const
|
|
416
|
-
const
|
|
417
|
-
const
|
|
418
|
-
const
|
|
419
|
-
const
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
this.
|
|
425
|
-
this.safeNumber(
|
|
426
|
-
this.safeNumber(
|
|
427
|
-
this.safeNumber(
|
|
428
|
-
this.safeNumber(
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
/**
|
|
10
|
+
* @class pingi
|
|
11
|
+
* @augments Exchange
|
|
12
|
+
* @description Pingi SPOT exchange implementation
|
|
13
|
+
*/
|
|
14
|
+
class pingi extends pingi$1["default"] {
|
|
15
|
+
describe() {
|
|
16
|
+
return this.deepExtend(super.describe(), {
|
|
17
|
+
'id': 'pingi',
|
|
18
|
+
'name': 'Pingi',
|
|
19
|
+
'countries': ['IR'],
|
|
20
|
+
'rateLimit': 1000,
|
|
21
|
+
'version': '1',
|
|
22
|
+
'certified': false,
|
|
23
|
+
'pro': false,
|
|
24
|
+
'has': {
|
|
25
|
+
'CORS': undefined,
|
|
26
|
+
'spot': false,
|
|
27
|
+
'margin': false,
|
|
28
|
+
'swap': false,
|
|
29
|
+
'future': false,
|
|
30
|
+
'option': false,
|
|
31
|
+
'addMargin': false,
|
|
32
|
+
'cancelAllOrders': false,
|
|
33
|
+
'cancelOrder': false,
|
|
34
|
+
'cancelOrders': false,
|
|
35
|
+
'createDepositAddress': false,
|
|
36
|
+
'createOrder': false,
|
|
37
|
+
'createStopLimitOrder': false,
|
|
38
|
+
'createStopMarketOrder': false,
|
|
39
|
+
'createStopOrder': false,
|
|
40
|
+
'editOrder': false,
|
|
41
|
+
'fetchBalance': false,
|
|
42
|
+
'fetchBorrowInterest': false,
|
|
43
|
+
'fetchBorrowRateHistories': false,
|
|
44
|
+
'fetchBorrowRateHistory': false,
|
|
45
|
+
'fetchClosedOrders': false,
|
|
46
|
+
'fetchCrossBorrowRate': false,
|
|
47
|
+
'fetchCrossBorrowRates': false,
|
|
48
|
+
'fetchCurrencies': false,
|
|
49
|
+
'fetchDepositAddress': false,
|
|
50
|
+
'fetchDeposits': false,
|
|
51
|
+
'fetchFundingHistory': false,
|
|
52
|
+
'fetchFundingRate': false,
|
|
53
|
+
'fetchFundingRateHistory': false,
|
|
54
|
+
'fetchFundingRates': false,
|
|
55
|
+
'fetchIndexOHLCV': false,
|
|
56
|
+
'fetchIsolatedBorrowRate': false,
|
|
57
|
+
'fetchIsolatedBorrowRates': false,
|
|
58
|
+
'fetchL2OrderBook': false,
|
|
59
|
+
'fetchL3OrderBook': false,
|
|
60
|
+
'fetchLedger': false,
|
|
61
|
+
'fetchLedgerEntry': false,
|
|
62
|
+
'fetchLeverageTiers': false,
|
|
63
|
+
'fetchMarkets': true,
|
|
64
|
+
'fetchMarkOHLCV': false,
|
|
65
|
+
'fetchMyTrades': false,
|
|
66
|
+
'fetchOHLCV': true,
|
|
67
|
+
'fetchOpenInterestHistory': false,
|
|
68
|
+
'fetchOpenOrders': false,
|
|
69
|
+
'fetchOrder': false,
|
|
70
|
+
'fetchOrderBook': false,
|
|
71
|
+
'fetchOrders': false,
|
|
72
|
+
'fetchOrderTrades': 'emulated',
|
|
73
|
+
'fetchPositions': false,
|
|
74
|
+
'fetchPremiumIndexOHLCV': false,
|
|
75
|
+
'fetchTicker': true,
|
|
76
|
+
'fetchTickers': true,
|
|
77
|
+
'fetchTime': false,
|
|
78
|
+
'fetchTrades': false,
|
|
79
|
+
'fetchTradingFee': false,
|
|
80
|
+
'fetchTradingFees': false,
|
|
81
|
+
'fetchWithdrawals': false,
|
|
82
|
+
'setLeverage': false,
|
|
83
|
+
'setMarginMode': false,
|
|
84
|
+
'transfer': false,
|
|
85
|
+
'withdraw': false,
|
|
86
|
+
},
|
|
87
|
+
'comment': 'Pingi SPOT Exchange',
|
|
88
|
+
'urls': {
|
|
89
|
+
'logo': 'https://cdn.arz.digital/cr-odin/img/exchanges/pingi/64x64.png',
|
|
90
|
+
'api': {
|
|
91
|
+
'public': 'https://api5.pingi.co/trading',
|
|
92
|
+
},
|
|
93
|
+
'www': 'https://pingi.co',
|
|
94
|
+
'doc': [
|
|
95
|
+
'https://pingi.co',
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
'timeframes': {
|
|
99
|
+
'1m': '1',
|
|
100
|
+
'5m': '5',
|
|
101
|
+
'15m': '15',
|
|
102
|
+
'30m': '30',
|
|
103
|
+
'1h': '60',
|
|
104
|
+
'4h': '240',
|
|
105
|
+
'1d': '1D',
|
|
106
|
+
'1w': '1W',
|
|
107
|
+
},
|
|
108
|
+
'api': {
|
|
109
|
+
'public': {
|
|
110
|
+
'get': {
|
|
111
|
+
'market/prices': 1,
|
|
112
|
+
'udf/history': 1,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
'fees': {
|
|
117
|
+
'trading': {
|
|
118
|
+
'tierBased': false,
|
|
119
|
+
'percentage': true,
|
|
120
|
+
'maker': this.parseNumber('0.001'),
|
|
121
|
+
'taker': this.parseNumber('0.001'),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
async fetchMarkets(params = {}) {
|
|
127
|
+
/**
|
|
128
|
+
* @method
|
|
129
|
+
* @name pingi#fetchMarkets
|
|
130
|
+
* @description retrieves data on all markets for pingi
|
|
131
|
+
* @see https://api5.pingi.co/trading/market/prices/
|
|
132
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
133
|
+
* @returns {object[]} an array of objects representing market data
|
|
134
|
+
*/
|
|
135
|
+
const response = await this.publicGetMarketPrices(params);
|
|
136
|
+
// Response structure:
|
|
137
|
+
// {
|
|
138
|
+
// "statusCode": 200,
|
|
139
|
+
// "ok": true,
|
|
140
|
+
// "data": {
|
|
141
|
+
// "ETH_USDT": {
|
|
142
|
+
// "market": "ETH_USDT",
|
|
143
|
+
// "marketId": 6,
|
|
144
|
+
// "marketVolume": "128889.02937760774364521500000000",
|
|
145
|
+
// "currentPrice": "4083.7744580000000",
|
|
146
|
+
// "maxPrice": "4218.0241700000000",
|
|
147
|
+
// "minPrice": "3786.9124050000000",
|
|
148
|
+
// "startPrice": "3830.5800220000000",
|
|
149
|
+
// "marketPlatform": 0
|
|
150
|
+
// },
|
|
151
|
+
// "BTC_IRT": {
|
|
152
|
+
// "market": "BTC_IRT",
|
|
153
|
+
// "marketId": 8,
|
|
154
|
+
// "marketVolume": "27140908320.17800246693400000000000000",
|
|
155
|
+
// "currentPrice": "12909088630.0000000000000",
|
|
156
|
+
// "maxPrice": "13213902170.0000000000000",
|
|
157
|
+
// "minPrice": "12000000000.0000000000000",
|
|
158
|
+
// "startPrice": "12752332240.0000000000000",
|
|
159
|
+
// "marketPlatform": 0
|
|
160
|
+
// },
|
|
161
|
+
// ...
|
|
162
|
+
// }
|
|
163
|
+
// }
|
|
164
|
+
const data = this.safeDict(response, 'data', {});
|
|
165
|
+
const marketKeys = Object.keys(data);
|
|
166
|
+
const result = [];
|
|
167
|
+
for (let i = 0; i < marketKeys.length; i++) {
|
|
168
|
+
const marketId = marketKeys[i];
|
|
169
|
+
const marketData = data[marketId];
|
|
170
|
+
const market = this.parseMarket(marketData);
|
|
171
|
+
result.push(market);
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
parseMarket(market) {
|
|
176
|
+
// {
|
|
177
|
+
// "market": "BTC_IRT",
|
|
178
|
+
// "marketId": 8,
|
|
179
|
+
// "marketVolume": "27140908320.17800246693400000000000000",
|
|
180
|
+
// "currentPrice": "12909088630.0000000000000",
|
|
181
|
+
// "maxPrice": "13213902170.0000000000000",
|
|
182
|
+
// "minPrice": "12000000000.0000000000000",
|
|
183
|
+
// "startPrice": "12752332240.0000000000000",
|
|
184
|
+
// "marketPlatform": 0
|
|
185
|
+
// }
|
|
186
|
+
const id = this.safeString(market, 'market');
|
|
187
|
+
const parts = id.split('_');
|
|
188
|
+
let baseId = this.safeString(parts, 0);
|
|
189
|
+
let quoteId = this.safeString(parts, 1);
|
|
190
|
+
const base = this.safeCurrencyCode(baseId);
|
|
191
|
+
const quote = this.safeCurrencyCode(quoteId);
|
|
192
|
+
baseId = baseId.toLowerCase();
|
|
193
|
+
quoteId = quoteId.toLowerCase();
|
|
194
|
+
return {
|
|
195
|
+
'id': id,
|
|
196
|
+
'symbol': base + '/' + quote,
|
|
197
|
+
'base': base,
|
|
198
|
+
'quote': quote,
|
|
199
|
+
'settle': undefined,
|
|
200
|
+
'baseId': baseId,
|
|
201
|
+
'quoteId': quoteId,
|
|
202
|
+
'settleId': undefined,
|
|
203
|
+
'type': 'spot',
|
|
204
|
+
'spot': false,
|
|
205
|
+
'margin': false,
|
|
206
|
+
'swap': false,
|
|
207
|
+
'future': false,
|
|
208
|
+
'option': false,
|
|
209
|
+
'active': true,
|
|
210
|
+
'contract': false,
|
|
211
|
+
'linear': undefined,
|
|
212
|
+
'inverse': undefined,
|
|
213
|
+
'contractSize': undefined,
|
|
214
|
+
'expiry': undefined,
|
|
215
|
+
'expiryDatetime': undefined,
|
|
216
|
+
'strike': undefined,
|
|
217
|
+
'optionType': undefined,
|
|
218
|
+
'precision': {
|
|
219
|
+
'amount': undefined,
|
|
220
|
+
'price': undefined,
|
|
221
|
+
},
|
|
222
|
+
'limits': {
|
|
223
|
+
'leverage': {
|
|
224
|
+
'min': undefined,
|
|
225
|
+
'max': undefined,
|
|
226
|
+
},
|
|
227
|
+
'amount': {
|
|
228
|
+
'min': undefined,
|
|
229
|
+
'max': undefined,
|
|
230
|
+
},
|
|
231
|
+
'price': {
|
|
232
|
+
'min': undefined,
|
|
233
|
+
'max': undefined,
|
|
234
|
+
},
|
|
235
|
+
'cost': {
|
|
236
|
+
'min': undefined,
|
|
237
|
+
'max': undefined,
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
'created': undefined,
|
|
241
|
+
'info': market,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
async fetchTickers(symbols = undefined, params = {}) {
|
|
245
|
+
/**
|
|
246
|
+
* @method
|
|
247
|
+
* @name pingi#fetchTickers
|
|
248
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
249
|
+
* @see https://api5.pingi.co/trading/market/prices/
|
|
250
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
251
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
252
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
253
|
+
*/
|
|
254
|
+
await this.loadMarkets();
|
|
255
|
+
if (symbols !== undefined) {
|
|
256
|
+
symbols = this.marketSymbols(symbols);
|
|
257
|
+
}
|
|
258
|
+
const response = await this.publicGetMarketPrices(params);
|
|
259
|
+
// Response structure:
|
|
260
|
+
// {
|
|
261
|
+
// "statusCode": 200,
|
|
262
|
+
// "ok": true,
|
|
263
|
+
// "data": {
|
|
264
|
+
// "ETH_USDT": {
|
|
265
|
+
// "market": "ETH_USDT",
|
|
266
|
+
// "marketId": 6,
|
|
267
|
+
// "marketVolume": "128889.02937760774364521500000000",
|
|
268
|
+
// "currentPrice": "4083.7744580000000",
|
|
269
|
+
// "maxPrice": "4218.0241700000000",
|
|
270
|
+
// "minPrice": "3786.9124050000000",
|
|
271
|
+
// "startPrice": "3830.5800220000000",
|
|
272
|
+
// "marketPlatform": 0
|
|
273
|
+
// },
|
|
274
|
+
// ...
|
|
275
|
+
// }
|
|
276
|
+
// }
|
|
277
|
+
const data = this.safeDict(response, 'data', {});
|
|
278
|
+
const marketKeys = Object.keys(data);
|
|
279
|
+
const result = {};
|
|
280
|
+
for (let i = 0; i < marketKeys.length; i++) {
|
|
281
|
+
const marketId = marketKeys[i];
|
|
282
|
+
const marketData = data[marketId];
|
|
283
|
+
const ticker = this.parseTicker(marketData);
|
|
284
|
+
const symbol = ticker['symbol'];
|
|
285
|
+
result[symbol] = ticker;
|
|
286
|
+
}
|
|
287
|
+
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
288
|
+
}
|
|
289
|
+
async fetchTicker(symbol, params = {}) {
|
|
290
|
+
/**
|
|
291
|
+
* @method
|
|
292
|
+
* @name pingi#fetchTicker
|
|
293
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
294
|
+
* @see https://api5.pingi.co/trading/market/prices/
|
|
295
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
296
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
297
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
298
|
+
*/
|
|
299
|
+
await this.loadMarkets();
|
|
300
|
+
const market = this.market(symbol);
|
|
301
|
+
const response = await this.publicGetMarketPrices(params);
|
|
302
|
+
// Response structure:
|
|
303
|
+
// {
|
|
304
|
+
// "statusCode": 200,
|
|
305
|
+
// "ok": true,
|
|
306
|
+
// "data": {
|
|
307
|
+
// "BTC_IRT": {
|
|
308
|
+
// "market": "BTC_IRT",
|
|
309
|
+
// "marketId": 8,
|
|
310
|
+
// "marketVolume": "27140908320.17800246693400000000000000",
|
|
311
|
+
// "currentPrice": "12909088630.0000000000000",
|
|
312
|
+
// "maxPrice": "13213902170.0000000000000",
|
|
313
|
+
// "minPrice": "12000000000.0000000000000",
|
|
314
|
+
// "startPrice": "12752332240.0000000000000",
|
|
315
|
+
// "marketPlatform": 0
|
|
316
|
+
// },
|
|
317
|
+
// ...
|
|
318
|
+
// }
|
|
319
|
+
// }
|
|
320
|
+
const data = this.safeDict(response, 'data', {});
|
|
321
|
+
const tickerData = this.safeDict(data, market['id']);
|
|
322
|
+
return this.parseTicker(tickerData, market);
|
|
323
|
+
}
|
|
324
|
+
parseTicker(ticker, market = undefined) {
|
|
325
|
+
// {
|
|
326
|
+
// "market": "BTC_IRT",
|
|
327
|
+
// "marketId": 8,
|
|
328
|
+
// "marketVolume": "27140908320.17800246693400000000000000",
|
|
329
|
+
// "currentPrice": "12909088630.0000000000000",
|
|
330
|
+
// "maxPrice": "13213902170.0000000000000",
|
|
331
|
+
// "minPrice": "12000000000.0000000000000",
|
|
332
|
+
// "startPrice": "12752332240.0000000000000",
|
|
333
|
+
// "marketPlatform": 0
|
|
334
|
+
// }
|
|
335
|
+
const marketType = 'spot';
|
|
336
|
+
const marketId = this.safeString(ticker, 'market');
|
|
337
|
+
const symbol = this.safeSymbol(marketId, market, '_', marketType);
|
|
338
|
+
const last = this.safeString(ticker, 'currentPrice');
|
|
339
|
+
const high = this.safeString(ticker, 'maxPrice');
|
|
340
|
+
const low = this.safeString(ticker, 'minPrice');
|
|
341
|
+
const open = this.safeString(ticker, 'startPrice');
|
|
342
|
+
const baseVolume = this.safeString(ticker, 'marketVolume');
|
|
343
|
+
// Calculate change and percentage
|
|
344
|
+
let change = undefined;
|
|
345
|
+
let percentage = undefined;
|
|
346
|
+
if (open !== undefined && last !== undefined) {
|
|
347
|
+
const openNum = this.parseNumber(open);
|
|
348
|
+
const lastNum = this.parseNumber(last);
|
|
349
|
+
if (openNum !== undefined && lastNum !== undefined && openNum > 0) {
|
|
350
|
+
change = this.parseNumber(this.numberToString(lastNum - openNum));
|
|
351
|
+
percentage = this.parseNumber(this.numberToString((lastNum - openNum) / openNum * 100));
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return this.safeTicker({
|
|
355
|
+
'symbol': symbol,
|
|
356
|
+
'timestamp': undefined,
|
|
357
|
+
'datetime': undefined,
|
|
358
|
+
'high': high,
|
|
359
|
+
'low': low,
|
|
360
|
+
'bid': undefined,
|
|
361
|
+
'bidVolume': undefined,
|
|
362
|
+
'ask': undefined,
|
|
363
|
+
'askVolume': undefined,
|
|
364
|
+
'vwap': undefined,
|
|
365
|
+
'open': open,
|
|
366
|
+
'close': last,
|
|
367
|
+
'last': last,
|
|
368
|
+
'previousClose': undefined,
|
|
369
|
+
'change': change,
|
|
370
|
+
'percentage': percentage,
|
|
371
|
+
'average': undefined,
|
|
372
|
+
'baseVolume': baseVolume,
|
|
373
|
+
'quoteVolume': undefined,
|
|
374
|
+
'info': ticker,
|
|
375
|
+
}, market);
|
|
376
|
+
}
|
|
377
|
+
async fetchOHLCV(symbol, timeframe = '1d', since = undefined, limit = undefined, params = {}) {
|
|
378
|
+
/**
|
|
379
|
+
* @method
|
|
380
|
+
* @name pingi#fetchOHLCV
|
|
381
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
382
|
+
* @see https://api5.pingi.co/trading/udf/history/
|
|
383
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
384
|
+
* @param {string} timeframe the length of time each candle represents
|
|
385
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
386
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
387
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
388
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
389
|
+
*/
|
|
390
|
+
await this.loadMarkets();
|
|
391
|
+
const market = this.market(symbol);
|
|
392
|
+
const endTime = Date.now();
|
|
393
|
+
const request = {
|
|
394
|
+
'symbol': market['base'] + '/' + market['quote'],
|
|
395
|
+
'resolution': this.safeString(this.timeframes, timeframe, timeframe),
|
|
396
|
+
'from': (endTime / 1000) - (30 * 24 * 60 * 60),
|
|
397
|
+
'to': endTime / 1000,
|
|
398
|
+
};
|
|
399
|
+
if (since !== undefined) {
|
|
400
|
+
request['from'] = since / 1000;
|
|
401
|
+
}
|
|
402
|
+
request['from'] = this.safeInteger(request, 'from');
|
|
403
|
+
request['to'] = this.safeInteger(request, 'to');
|
|
404
|
+
const response = await this.publicGetUdfHistory(request);
|
|
405
|
+
// Response structure:
|
|
406
|
+
// {
|
|
407
|
+
// "c": [12710726290.0, 12732737270.0, ...], // close prices
|
|
408
|
+
// "v": [0.015461630724, 0.024055443184, ...], // volumes
|
|
409
|
+
// "l": [12702815580.0, 12689256670.0, ...], // low prices
|
|
410
|
+
// "h": [12723701120.0, 12752332240.0, ...], // high prices
|
|
411
|
+
// "o": [12752332240.0, 12710726290.0, ...], // open prices
|
|
412
|
+
// "t": [1760271600, 1760272500, ...] // timestamps
|
|
413
|
+
// }
|
|
414
|
+
const closeList = this.safeList(response, 'c', []);
|
|
415
|
+
const volumeList = this.safeList(response, 'v', []);
|
|
416
|
+
const lowList = this.safeList(response, 'l', []);
|
|
417
|
+
const highList = this.safeList(response, 'h', []);
|
|
418
|
+
const openList = this.safeList(response, 'o', []);
|
|
419
|
+
const timestampList = this.safeList(response, 't', []);
|
|
420
|
+
const ohlcvs = [];
|
|
421
|
+
for (let i = 0; i < openList.length; i++) {
|
|
422
|
+
ohlcvs.push([
|
|
423
|
+
this.safeTimestamp(timestampList, i),
|
|
424
|
+
this.safeNumber(openList, i),
|
|
425
|
+
this.safeNumber(highList, i),
|
|
426
|
+
this.safeNumber(lowList, i),
|
|
427
|
+
this.safeNumber(closeList, i),
|
|
428
|
+
this.safeNumber(volumeList, i),
|
|
429
|
+
]);
|
|
430
|
+
}
|
|
431
|
+
return this.parseOHLCVs(ohlcvs, market, timeframe, since, limit);
|
|
432
|
+
}
|
|
433
|
+
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
434
|
+
const query = this.omit(params, this.extractParams(path));
|
|
435
|
+
let url = this.urls['api']['public'] + '/' + path;
|
|
436
|
+
if (path === 'market/prices') {
|
|
437
|
+
url = url + '/';
|
|
438
|
+
}
|
|
439
|
+
if (path === 'udf/history') {
|
|
440
|
+
url = url + '/?' + this.urlencode(query);
|
|
441
|
+
}
|
|
442
|
+
headers = { 'Content-Type': 'application/json' };
|
|
443
|
+
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
444
|
+
}
|
|
446
445
|
}
|
|
447
446
|
|
|
448
447
|
exports["default"] = pingi;
|