ccxt 4.2.46 → 4.2.47
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/CHANGELOG.md +2307 -0
- package/README.md +3 -3
- package/change.sh +1 -1
- package/dist/ccxt.browser.js +444 -7
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bybit.js +185 -2
- package/dist/cjs/src/coinsph.js +32 -1
- package/dist/cjs/src/currencycom.js +22 -0
- package/dist/cjs/src/deribit.js +34 -1
- package/dist/cjs/src/exmo.js +22 -0
- package/dist/cjs/src/gemini.js +15 -0
- package/dist/cjs/src/hollaex.js +27 -1
- package/dist/cjs/src/indodax.js +106 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/hollaex.d.ts +3 -0
- package/js/src/bybit.d.ts +2 -0
- package/js/src/bybit.js +185 -2
- package/js/src/coinsph.js +32 -1
- package/js/src/currencycom.js +22 -0
- package/js/src/deribit.js +34 -1
- package/js/src/exmo.js +22 -0
- package/js/src/gemini.js +15 -0
- package/js/src/hollaex.js +27 -1
- package/js/src/indodax.d.ts +3 -0
- package/js/src/indodax.js +106 -1
- package/package.json +1 -1
- package/skip-tests.json +1 -1
package/js/src/coinsph.js
CHANGED
|
@@ -446,6 +446,7 @@ export default class coinsph extends Exchange {
|
|
|
446
446
|
* @method
|
|
447
447
|
* @name coinsph#fetchStatus
|
|
448
448
|
* @description the latest known information on the availability of the exchange API
|
|
449
|
+
* @see https://coins-docs.github.io/rest-api/#test-connectivity
|
|
449
450
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
450
451
|
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
451
452
|
*/
|
|
@@ -463,6 +464,7 @@ export default class coinsph extends Exchange {
|
|
|
463
464
|
* @method
|
|
464
465
|
* @name coinsph#fetchTime
|
|
465
466
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
467
|
+
* @see https://coins-docs.github.io/rest-api/#check-server-time
|
|
466
468
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
467
469
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
468
470
|
*/
|
|
@@ -477,6 +479,7 @@ export default class coinsph extends Exchange {
|
|
|
477
479
|
* @method
|
|
478
480
|
* @name coinsph#fetchMarkets
|
|
479
481
|
* @description retrieves data on all markets for coinsph
|
|
482
|
+
* @see https://coins-docs.github.io/rest-api/#exchange-information
|
|
480
483
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
481
484
|
* @returns {object[]} an array of objects representing market data
|
|
482
485
|
*/
|
|
@@ -613,6 +616,9 @@ export default class coinsph extends Exchange {
|
|
|
613
616
|
* @method
|
|
614
617
|
* @name coinsph#fetchTickers
|
|
615
618
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
619
|
+
* @see https://coins-docs.github.io/rest-api/#24hr-ticker-price-change-statistics
|
|
620
|
+
* @see https://coins-docs.github.io/rest-api/#symbol-price-ticker
|
|
621
|
+
* @see https://coins-docs.github.io/rest-api/#symbol-order-book-ticker
|
|
616
622
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
617
623
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
618
624
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -648,6 +654,9 @@ export default class coinsph extends Exchange {
|
|
|
648
654
|
* @method
|
|
649
655
|
* @name coinsph#fetchTicker
|
|
650
656
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
657
|
+
* @see https://coins-docs.github.io/rest-api/#24hr-ticker-price-change-statistics
|
|
658
|
+
* @see https://coins-docs.github.io/rest-api/#symbol-price-ticker
|
|
659
|
+
* @see https://coins-docs.github.io/rest-api/#symbol-order-book-ticker
|
|
651
660
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
652
661
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
653
662
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -755,6 +764,7 @@ export default class coinsph extends Exchange {
|
|
|
755
764
|
* @method
|
|
756
765
|
* @name coinsph#fetchOrderBook
|
|
757
766
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
767
|
+
* @see https://coins-docs.github.io/rest-api/#order-book
|
|
758
768
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
759
769
|
* @param {int} [limit] the maximum amount of order book entries to return (default 100, max 200)
|
|
760
770
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -791,6 +801,7 @@ export default class coinsph extends Exchange {
|
|
|
791
801
|
* @method
|
|
792
802
|
* @name coinsph#fetchOHLCV
|
|
793
803
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
804
|
+
* @see https://coins-docs.github.io/rest-api/#klinecandlestick-data
|
|
794
805
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
795
806
|
* @param {string} timeframe the length of time each candle represents
|
|
796
807
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -857,6 +868,7 @@ export default class coinsph extends Exchange {
|
|
|
857
868
|
* @method
|
|
858
869
|
* @name coinsph#fetchTrades
|
|
859
870
|
* @description get the list of most recent trades for a particular symbol
|
|
871
|
+
* @see https://coins-docs.github.io/rest-api/#recent-trades-list
|
|
860
872
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
861
873
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
862
874
|
* @param {int} [limit] the maximum amount of trades to fetch (default 500, max 1000)
|
|
@@ -898,6 +910,7 @@ export default class coinsph extends Exchange {
|
|
|
898
910
|
* @method
|
|
899
911
|
* @name coinsph#fetchMyTrades
|
|
900
912
|
* @description fetch all trades made by the user
|
|
913
|
+
* @see https://coins-docs.github.io/rest-api/#account-trade-list-user_data
|
|
901
914
|
* @param {string} symbol unified market symbol
|
|
902
915
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
903
916
|
* @param {int} [limit] the maximum number of trades structures to retrieve (default 500, max 1000)
|
|
@@ -928,6 +941,7 @@ export default class coinsph extends Exchange {
|
|
|
928
941
|
* @method
|
|
929
942
|
* @name coinsph#fetchOrderTrades
|
|
930
943
|
* @description fetch all the trades made from a single order
|
|
944
|
+
* @see https://coins-docs.github.io/rest-api/#account-trade-list-user_data
|
|
931
945
|
* @param {string} id order id
|
|
932
946
|
* @param {string} symbol unified market symbol
|
|
933
947
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -1034,6 +1048,7 @@ export default class coinsph extends Exchange {
|
|
|
1034
1048
|
* @method
|
|
1035
1049
|
* @name coinsph#fetchBalance
|
|
1036
1050
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1051
|
+
* @see https://coins-docs.github.io/rest-api/#accept-the-quote
|
|
1037
1052
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1038
1053
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1039
1054
|
*/
|
|
@@ -1093,11 +1108,14 @@ export default class coinsph extends Exchange {
|
|
|
1093
1108
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1094
1109
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1095
1110
|
* @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount for market buy orders
|
|
1111
|
+
* @param {bool} [params.test] set to true to test an order, no order will be created but the request will be validated
|
|
1096
1112
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1097
1113
|
*/
|
|
1098
1114
|
// todo: add test order low priority
|
|
1099
1115
|
await this.loadMarkets();
|
|
1100
1116
|
const market = this.market(symbol);
|
|
1117
|
+
const testOrder = this.safeBool(params, 'test', false);
|
|
1118
|
+
params = this.omit(params, 'test');
|
|
1101
1119
|
let orderType = this.safeString(params, 'type', type);
|
|
1102
1120
|
orderType = this.encodeOrderType(orderType);
|
|
1103
1121
|
params = this.omit(params, 'type');
|
|
@@ -1162,7 +1180,13 @@ export default class coinsph extends Exchange {
|
|
|
1162
1180
|
}
|
|
1163
1181
|
request['newOrderRespType'] = newOrderRespType;
|
|
1164
1182
|
params = this.omit(params, 'price', 'stopPrice', 'triggerPrice', 'quantity', 'quoteOrderQty');
|
|
1165
|
-
|
|
1183
|
+
let response = undefined;
|
|
1184
|
+
if (testOrder) {
|
|
1185
|
+
response = await this.privatePostOpenapiV1OrderTest(this.extend(request, params));
|
|
1186
|
+
}
|
|
1187
|
+
else {
|
|
1188
|
+
response = await this.privatePostOpenapiV1Order(this.extend(request, params));
|
|
1189
|
+
}
|
|
1166
1190
|
//
|
|
1167
1191
|
// {
|
|
1168
1192
|
// "symbol": "ETHUSDT",
|
|
@@ -1197,6 +1221,7 @@ export default class coinsph extends Exchange {
|
|
|
1197
1221
|
* @method
|
|
1198
1222
|
* @name coinsph#fetchOrder
|
|
1199
1223
|
* @description fetches information on an order made by the user
|
|
1224
|
+
* @see https://coins-docs.github.io/rest-api/#query-order-user_data
|
|
1200
1225
|
* @param {int|string} id order id
|
|
1201
1226
|
* @param {string} symbol not used by coinsph fetchOrder ()
|
|
1202
1227
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1220,6 +1245,7 @@ export default class coinsph extends Exchange {
|
|
|
1220
1245
|
* @method
|
|
1221
1246
|
* @name coinsph#fetchOpenOrders
|
|
1222
1247
|
* @description fetch all unfilled currently open orders
|
|
1248
|
+
* @see https://coins-docs.github.io/rest-api/#query-order-user_data
|
|
1223
1249
|
* @param {string} symbol unified market symbol
|
|
1224
1250
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1225
1251
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -1241,6 +1267,7 @@ export default class coinsph extends Exchange {
|
|
|
1241
1267
|
* @method
|
|
1242
1268
|
* @name coinsph#fetchClosedOrders
|
|
1243
1269
|
* @description fetches information on multiple closed orders made by the user
|
|
1270
|
+
* @see https://coins-docs.github.io/rest-api/#history-orders-user_data
|
|
1244
1271
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1245
1272
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1246
1273
|
* @param {int} [limit] the maximum number of order structures to retrieve (default 500, max 1000)
|
|
@@ -1271,6 +1298,7 @@ export default class coinsph extends Exchange {
|
|
|
1271
1298
|
* @method
|
|
1272
1299
|
* @name coinsph#cancelOrder
|
|
1273
1300
|
* @description cancels an open order
|
|
1301
|
+
* @see https://coins-docs.github.io/rest-api/#cancel-order-trade
|
|
1274
1302
|
* @param {string} id order id
|
|
1275
1303
|
* @param {string} symbol not used by coinsph cancelOrder ()
|
|
1276
1304
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1294,6 +1322,7 @@ export default class coinsph extends Exchange {
|
|
|
1294
1322
|
* @method
|
|
1295
1323
|
* @name coinsph#cancelAllOrders
|
|
1296
1324
|
* @description cancel open orders of market
|
|
1325
|
+
* @see https://coins-docs.github.io/rest-api/#cancel-all-open-orders-on-a-symbol-trade
|
|
1297
1326
|
* @param {string} symbol unified market symbol
|
|
1298
1327
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1299
1328
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -1476,6 +1505,7 @@ export default class coinsph extends Exchange {
|
|
|
1476
1505
|
* @method
|
|
1477
1506
|
* @name coinsph#fetchTradingFee
|
|
1478
1507
|
* @description fetch the trading fees for a market
|
|
1508
|
+
* @see https://coins-docs.github.io/rest-api/#trade-fee-user_data
|
|
1479
1509
|
* @param {string} symbol unified market symbol
|
|
1480
1510
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1481
1511
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -1503,6 +1533,7 @@ export default class coinsph extends Exchange {
|
|
|
1503
1533
|
* @method
|
|
1504
1534
|
* @name coinsph#fetchTradingFees
|
|
1505
1535
|
* @description fetch the trading fees for multiple markets
|
|
1536
|
+
* @see https://coins-docs.github.io/rest-api/#trade-fee-user_data
|
|
1506
1537
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1507
1538
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1508
1539
|
*/
|
package/js/src/currencycom.js
CHANGED
|
@@ -306,6 +306,7 @@ export default class currencycom extends Exchange {
|
|
|
306
306
|
* @method
|
|
307
307
|
* @name currencycom#fetchTime
|
|
308
308
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
309
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/timeUsingGET
|
|
309
310
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
310
311
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
311
312
|
*/
|
|
@@ -322,6 +323,7 @@ export default class currencycom extends Exchange {
|
|
|
322
323
|
* @method
|
|
323
324
|
* @name currencycom#fetchCurrencies
|
|
324
325
|
* @description fetches all available currencies on an exchange
|
|
326
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getCurrenciesUsingGET
|
|
325
327
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
326
328
|
* @returns {object} an associative dictionary of currencies
|
|
327
329
|
*/
|
|
@@ -394,6 +396,7 @@ export default class currencycom extends Exchange {
|
|
|
394
396
|
* @method
|
|
395
397
|
* @name currencycom#fetchMarkets
|
|
396
398
|
* @description retrieves data on all markets for currencycom
|
|
399
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/exchangeInfoUsingGET
|
|
397
400
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
398
401
|
* @returns {object[]} an array of objects representing market data
|
|
399
402
|
*/
|
|
@@ -582,6 +585,7 @@ export default class currencycom extends Exchange {
|
|
|
582
585
|
* @method
|
|
583
586
|
* @name currencycom#fetchAccounts
|
|
584
587
|
* @description fetch all the accounts associated with a profile
|
|
588
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/accountUsingGET
|
|
585
589
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
586
590
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
587
591
|
*/
|
|
@@ -638,6 +642,7 @@ export default class currencycom extends Exchange {
|
|
|
638
642
|
* @method
|
|
639
643
|
* @name currencycom#fetchTradingFees
|
|
640
644
|
* @description fetch the trading fees for multiple markets
|
|
645
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/accountUsingGET
|
|
641
646
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
642
647
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
643
648
|
*/
|
|
@@ -714,6 +719,7 @@ export default class currencycom extends Exchange {
|
|
|
714
719
|
* @method
|
|
715
720
|
* @name currencycom#fetchBalance
|
|
716
721
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
722
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/accountUsingGET
|
|
717
723
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
718
724
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
719
725
|
*/
|
|
@@ -757,6 +763,7 @@ export default class currencycom extends Exchange {
|
|
|
757
763
|
* @method
|
|
758
764
|
* @name currencycom#fetchOrderBook
|
|
759
765
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
766
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/depthUsingGET
|
|
760
767
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
761
768
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
762
769
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -873,6 +880,7 @@ export default class currencycom extends Exchange {
|
|
|
873
880
|
* @method
|
|
874
881
|
* @name currencycom#fetchTicker
|
|
875
882
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
883
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/ticker_24hrUsingGET
|
|
876
884
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
877
885
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
878
886
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -910,6 +918,7 @@ export default class currencycom extends Exchange {
|
|
|
910
918
|
* @method
|
|
911
919
|
* @name currencycom#fetchTickers
|
|
912
920
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
921
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/ticker_24hrUsingGET
|
|
913
922
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
914
923
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
915
924
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -961,6 +970,7 @@ export default class currencycom extends Exchange {
|
|
|
961
970
|
* @method
|
|
962
971
|
* @name currencycom#fetchOHLCV
|
|
963
972
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
973
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/klinesUsingGET
|
|
964
974
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
965
975
|
* @param {string} timeframe the length of time each candle represents
|
|
966
976
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -1073,6 +1083,7 @@ export default class currencycom extends Exchange {
|
|
|
1073
1083
|
* @method
|
|
1074
1084
|
* @name currencycom#fetchTrades
|
|
1075
1085
|
* @description get the list of most recent trades for a particular symbol
|
|
1086
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/aggTradesUsingGET
|
|
1076
1087
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1077
1088
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1078
1089
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -1257,6 +1268,7 @@ export default class currencycom extends Exchange {
|
|
|
1257
1268
|
* @method
|
|
1258
1269
|
* @name currencycom#createOrder
|
|
1259
1270
|
* @description create a trade order
|
|
1271
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/orderUsingPOST
|
|
1260
1272
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1261
1273
|
* @param {string} type 'market' or 'limit'
|
|
1262
1274
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -1397,6 +1409,7 @@ export default class currencycom extends Exchange {
|
|
|
1397
1409
|
* @method
|
|
1398
1410
|
* @name currencycom#fetchOpenOrders
|
|
1399
1411
|
* @description fetch all unfilled currently open orders
|
|
1412
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/openOrdersUsingGET
|
|
1400
1413
|
* @param {string} symbol unified market symbol
|
|
1401
1414
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1402
1415
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -1443,6 +1456,7 @@ export default class currencycom extends Exchange {
|
|
|
1443
1456
|
* @method
|
|
1444
1457
|
* @name currencycom#cancelOrder
|
|
1445
1458
|
* @description cancels an open order
|
|
1459
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/cancelOrderUsingDELETE
|
|
1446
1460
|
* @param {string} id order id
|
|
1447
1461
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1448
1462
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1486,6 +1500,7 @@ export default class currencycom extends Exchange {
|
|
|
1486
1500
|
* @method
|
|
1487
1501
|
* @name currencycom#fetchMyTrades
|
|
1488
1502
|
* @description fetch all trades made by the user
|
|
1503
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/myTradesUsingGET
|
|
1489
1504
|
* @param {string} symbol unified market symbol
|
|
1490
1505
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1491
1506
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -1529,6 +1544,7 @@ export default class currencycom extends Exchange {
|
|
|
1529
1544
|
* @method
|
|
1530
1545
|
* @name currencycom#fetchDeposits
|
|
1531
1546
|
* @description fetch all deposits made to an account
|
|
1547
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getDepositsUsingGET
|
|
1532
1548
|
* @param {string} code unified currency code
|
|
1533
1549
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1534
1550
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -1542,6 +1558,7 @@ export default class currencycom extends Exchange {
|
|
|
1542
1558
|
* @method
|
|
1543
1559
|
* @name currencycom#fetchWithdrawals
|
|
1544
1560
|
* @description fetch all withdrawals made from an account
|
|
1561
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getWithdrawalsUsingGET
|
|
1545
1562
|
* @param {string} code unified currency code
|
|
1546
1563
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1547
1564
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -1555,6 +1572,7 @@ export default class currencycom extends Exchange {
|
|
|
1555
1572
|
* @method
|
|
1556
1573
|
* @name currencycom#fetchDepositsWithdrawals
|
|
1557
1574
|
* @description fetch history of deposits and withdrawals
|
|
1575
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getTransactionsUsingGET
|
|
1558
1576
|
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
1559
1577
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1560
1578
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
@@ -1677,6 +1695,7 @@ export default class currencycom extends Exchange {
|
|
|
1677
1695
|
* @method
|
|
1678
1696
|
* @name currencycom#fetchLedger
|
|
1679
1697
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
1698
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getLedgerUsingGET
|
|
1680
1699
|
* @param {string} code unified currency code, default is undefined
|
|
1681
1700
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1682
1701
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
@@ -1778,6 +1797,7 @@ export default class currencycom extends Exchange {
|
|
|
1778
1797
|
* @method
|
|
1779
1798
|
* @name currencycom#fetchLeverage
|
|
1780
1799
|
* @description fetch the set leverage for a market
|
|
1800
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/leverageSettingsUsingGET
|
|
1781
1801
|
* @param {string} symbol unified market symbol
|
|
1782
1802
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1783
1803
|
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
@@ -1801,6 +1821,7 @@ export default class currencycom extends Exchange {
|
|
|
1801
1821
|
* @method
|
|
1802
1822
|
* @name currencycom#fetchDepositAddress
|
|
1803
1823
|
* @description fetch the deposit address for a currency associated with this account
|
|
1824
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getDepositAddressUsingGET
|
|
1804
1825
|
* @param {string} code unified currency code
|
|
1805
1826
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1806
1827
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -1867,6 +1888,7 @@ export default class currencycom extends Exchange {
|
|
|
1867
1888
|
* @method
|
|
1868
1889
|
* @name currencycom#fetchPositions
|
|
1869
1890
|
* @description fetch all open positions
|
|
1891
|
+
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/tradingPositionsUsingGET
|
|
1870
1892
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
1871
1893
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1872
1894
|
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
package/js/src/deribit.js
CHANGED
|
@@ -574,6 +574,7 @@ export default class deribit extends Exchange {
|
|
|
574
574
|
* @method
|
|
575
575
|
* @name deribit#fetchTime
|
|
576
576
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
577
|
+
* @see https://docs.deribit.com/#public-get_time
|
|
577
578
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
578
579
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
579
580
|
*/
|
|
@@ -669,6 +670,7 @@ export default class deribit extends Exchange {
|
|
|
669
670
|
* @method
|
|
670
671
|
* @name deribit#fetchStatus
|
|
671
672
|
* @description the latest known information on the availability of the exchange API
|
|
673
|
+
* @see https://docs.deribit.com/#public-status
|
|
672
674
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
673
675
|
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
674
676
|
*/
|
|
@@ -701,6 +703,7 @@ export default class deribit extends Exchange {
|
|
|
701
703
|
* @method
|
|
702
704
|
* @name deribit#fetchAccounts
|
|
703
705
|
* @description fetch all the accounts associated with a profile
|
|
706
|
+
* @see https://docs.deribit.com/#private-get_subaccounts
|
|
704
707
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
705
708
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
706
709
|
*/
|
|
@@ -770,6 +773,7 @@ export default class deribit extends Exchange {
|
|
|
770
773
|
* @method
|
|
771
774
|
* @name deribit#fetchMarkets
|
|
772
775
|
* @description retrieves data on all markets for deribit
|
|
776
|
+
* @see https://docs.deribit.com/#public-get_currencies
|
|
773
777
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
774
778
|
* @returns {object[]} an array of objects representing market data
|
|
775
779
|
*/
|
|
@@ -1006,6 +1010,7 @@ export default class deribit extends Exchange {
|
|
|
1006
1010
|
* @method
|
|
1007
1011
|
* @name deribit#fetchBalance
|
|
1008
1012
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1013
|
+
* @see https://docs.deribit.com/#private-get_account_summary
|
|
1009
1014
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1010
1015
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1011
1016
|
*/
|
|
@@ -1066,6 +1071,7 @@ export default class deribit extends Exchange {
|
|
|
1066
1071
|
* @method
|
|
1067
1072
|
* @name deribit#createDepositAddress
|
|
1068
1073
|
* @description create a currency deposit address
|
|
1074
|
+
* @see https://docs.deribit.com/#private-create_deposit_address
|
|
1069
1075
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
1070
1076
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1071
1077
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -1103,6 +1109,7 @@ export default class deribit extends Exchange {
|
|
|
1103
1109
|
* @method
|
|
1104
1110
|
* @name deribit#fetchDepositAddress
|
|
1105
1111
|
* @description fetch the deposit address for a currency associated with this account
|
|
1112
|
+
* @see https://docs.deribit.com/#private-get_current_deposit_address
|
|
1106
1113
|
* @param {string} code unified currency code
|
|
1107
1114
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1108
1115
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -1221,6 +1228,7 @@ export default class deribit extends Exchange {
|
|
|
1221
1228
|
* @method
|
|
1222
1229
|
* @name deribit#fetchTicker
|
|
1223
1230
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1231
|
+
* @see https://docs.deribit.com/#public-ticker
|
|
1224
1232
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1225
1233
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1226
1234
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -1267,6 +1275,7 @@ export default class deribit extends Exchange {
|
|
|
1267
1275
|
* @method
|
|
1268
1276
|
* @name deribit#fetchTickers
|
|
1269
1277
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1278
|
+
* @see https://docs.deribit.com/#public-get_book_summary_by_currency
|
|
1270
1279
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1271
1280
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1272
1281
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -1323,6 +1332,7 @@ export default class deribit extends Exchange {
|
|
|
1323
1332
|
* @method
|
|
1324
1333
|
* @name deribit#fetchOHLCV
|
|
1325
1334
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1335
|
+
* @see https://docs.deribit.com/#public-get_tradingview_chart_data
|
|
1326
1336
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1327
1337
|
* @param {string} timeframe the length of time each candle represents
|
|
1328
1338
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -1472,7 +1482,8 @@ export default class deribit extends Exchange {
|
|
|
1472
1482
|
/**
|
|
1473
1483
|
* @method
|
|
1474
1484
|
* @name deribit#fetchTrades
|
|
1475
|
-
* @see https://docs.deribit.com/#
|
|
1485
|
+
* @see https://docs.deribit.com/#public-get_last_trades_by_instrument
|
|
1486
|
+
* @see https://docs.deribit.com/#public-get_last_trades_by_instrument_and_time
|
|
1476
1487
|
* @description get the list of most recent trades for a particular symbol.
|
|
1477
1488
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1478
1489
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -1533,6 +1544,7 @@ export default class deribit extends Exchange {
|
|
|
1533
1544
|
* @method
|
|
1534
1545
|
* @name deribit#fetchTradingFees
|
|
1535
1546
|
* @description fetch the trading fees for multiple markets
|
|
1547
|
+
* @see https://docs.deribit.com/#private-get_account_summary
|
|
1536
1548
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1537
1549
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1538
1550
|
*/
|
|
@@ -1653,6 +1665,7 @@ export default class deribit extends Exchange {
|
|
|
1653
1665
|
* @method
|
|
1654
1666
|
* @name deribit#fetchOrderBook
|
|
1655
1667
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1668
|
+
* @see https://docs.deribit.com/#public-get_order_book
|
|
1656
1669
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1657
1670
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1658
1671
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1843,6 +1856,7 @@ export default class deribit extends Exchange {
|
|
|
1843
1856
|
* @method
|
|
1844
1857
|
* @name deribit#fetchOrder
|
|
1845
1858
|
* @description fetches information on an order made by the user
|
|
1859
|
+
* @see https://docs.deribit.com/#private-get_order_state
|
|
1846
1860
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1847
1861
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1848
1862
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -1893,6 +1907,7 @@ export default class deribit extends Exchange {
|
|
|
1893
1907
|
* @name deribit#createOrder
|
|
1894
1908
|
* @description create a trade order
|
|
1895
1909
|
* @see https://docs.deribit.com/#private-buy
|
|
1910
|
+
* @see https://docs.deribit.com/#private-sell
|
|
1896
1911
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1897
1912
|
* @param {string} type 'market' or 'limit'
|
|
1898
1913
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -2114,6 +2129,7 @@ export default class deribit extends Exchange {
|
|
|
2114
2129
|
* @method
|
|
2115
2130
|
* @name deribit#cancelOrder
|
|
2116
2131
|
* @description cancels an open order
|
|
2132
|
+
* @see https://docs.deribit.com/#private-cancel
|
|
2117
2133
|
* @param {string} id order id
|
|
2118
2134
|
* @param {string} symbol not used by deribit cancelOrder ()
|
|
2119
2135
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2132,6 +2148,8 @@ export default class deribit extends Exchange {
|
|
|
2132
2148
|
* @method
|
|
2133
2149
|
* @name deribit#cancelAllOrders
|
|
2134
2150
|
* @description cancel all open orders
|
|
2151
|
+
* @see https://docs.deribit.com/#private-cancel_all
|
|
2152
|
+
* @see https://docs.deribit.com/#private-cancel_all_by_instrument
|
|
2135
2153
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2136
2154
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2137
2155
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -2154,6 +2172,8 @@ export default class deribit extends Exchange {
|
|
|
2154
2172
|
* @method
|
|
2155
2173
|
* @name deribit#fetchOpenOrders
|
|
2156
2174
|
* @description fetch all unfilled currently open orders
|
|
2175
|
+
* @see https://docs.deribit.com/#private-get_open_orders_by_currency
|
|
2176
|
+
* @see https://docs.deribit.com/#private-get_open_orders_by_instrument
|
|
2157
2177
|
* @param {string} symbol unified market symbol
|
|
2158
2178
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2159
2179
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -2183,6 +2203,8 @@ export default class deribit extends Exchange {
|
|
|
2183
2203
|
* @method
|
|
2184
2204
|
* @name deribit#fetchClosedOrders
|
|
2185
2205
|
* @description fetches information on multiple closed orders made by the user
|
|
2206
|
+
* @see https://docs.deribit.com/#private-get_order_history_by_currency
|
|
2207
|
+
* @see https://docs.deribit.com/#private-get_order_history_by_instrument
|
|
2186
2208
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2187
2209
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2188
2210
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -2212,6 +2234,7 @@ export default class deribit extends Exchange {
|
|
|
2212
2234
|
* @method
|
|
2213
2235
|
* @name deribit#fetchOrderTrades
|
|
2214
2236
|
* @description fetch all the trades made from a single order
|
|
2237
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_order
|
|
2215
2238
|
* @param {string} id order id
|
|
2216
2239
|
* @param {string} symbol unified market symbol
|
|
2217
2240
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -2265,6 +2288,10 @@ export default class deribit extends Exchange {
|
|
|
2265
2288
|
* @method
|
|
2266
2289
|
* @name deribit#fetchMyTrades
|
|
2267
2290
|
* @description fetch all trades made by the user
|
|
2291
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_currency
|
|
2292
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_currency_and_time
|
|
2293
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_instrument
|
|
2294
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_instrument_and_time
|
|
2268
2295
|
* @param {string} symbol unified market symbol
|
|
2269
2296
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2270
2297
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -2345,6 +2372,7 @@ export default class deribit extends Exchange {
|
|
|
2345
2372
|
* @method
|
|
2346
2373
|
* @name deribit#fetchDeposits
|
|
2347
2374
|
* @description fetch all deposits made to an account
|
|
2375
|
+
* @see https://docs.deribit.com/#private-get_deposits
|
|
2348
2376
|
* @param {string} code unified currency code
|
|
2349
2377
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2350
2378
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -2392,6 +2420,7 @@ export default class deribit extends Exchange {
|
|
|
2392
2420
|
* @method
|
|
2393
2421
|
* @name deribit#fetchWithdrawals
|
|
2394
2422
|
* @description fetch all withdrawals made from an account
|
|
2423
|
+
* @see https://docs.deribit.com/#private-get_withdrawals
|
|
2395
2424
|
* @param {string} code unified currency code
|
|
2396
2425
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2397
2426
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -2764,6 +2793,7 @@ export default class deribit extends Exchange {
|
|
|
2764
2793
|
* @method
|
|
2765
2794
|
* @name deribit#fetchTransfers
|
|
2766
2795
|
* @description fetch a history of internal transfers made on an account
|
|
2796
|
+
* @see https://docs.deribit.com/#private-get_transfers
|
|
2767
2797
|
* @param {string} code unified currency code of the currency transferred
|
|
2768
2798
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2769
2799
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
@@ -2824,6 +2854,8 @@ export default class deribit extends Exchange {
|
|
|
2824
2854
|
* @method
|
|
2825
2855
|
* @name deribit#transfer
|
|
2826
2856
|
* @description transfer currency internally between wallets on the same account
|
|
2857
|
+
* @see https://docs.deribit.com/#private-submit_transfer_to_user
|
|
2858
|
+
* @see https://docs.deribit.com/#private-submit_transfer_to_subaccount
|
|
2827
2859
|
* @param {string} code unified currency code
|
|
2828
2860
|
* @param {float} amount amount to transfer
|
|
2829
2861
|
* @param {string} fromAccount account to transfer from
|
|
@@ -2916,6 +2948,7 @@ export default class deribit extends Exchange {
|
|
|
2916
2948
|
* @method
|
|
2917
2949
|
* @name deribit#withdraw
|
|
2918
2950
|
* @description make a withdrawal
|
|
2951
|
+
* @see https://docs.deribit.com/#private-withdraw
|
|
2919
2952
|
* @param {string} code unified currency code
|
|
2920
2953
|
* @param {float} amount the amount to withdraw
|
|
2921
2954
|
* @param {string} address the address to withdraw to
|