ccxt 4.1.1 → 4.1.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.js +545 -159
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +6 -0
- package/dist/cjs/src/binance.js +84 -0
- package/dist/cjs/src/bingx.js +140 -124
- package/dist/cjs/src/bitget.js +1 -1
- package/dist/cjs/src/bitmart.js +176 -0
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bybit.js +27 -8
- package/dist/cjs/src/coinbasepro.js +1 -0
- package/dist/cjs/src/deribit.js +1 -1
- package/dist/cjs/src/okx.js +27 -11
- package/dist/cjs/src/pro/binance.js +11 -5
- package/dist/cjs/src/pro/coinbasepro.js +70 -8
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/coinbaseprime.d.ts +1 -0
- package/js/src/abstract/coinbasepro.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +2 -0
- package/js/src/base/Exchange.js +6 -0
- package/js/src/binance.js +84 -0
- package/js/src/bingx.js +140 -124
- package/js/src/bitget.js +1 -1
- package/js/src/bitmart.d.ts +3 -0
- package/js/src/bitmart.js +176 -0
- package/js/src/bitrue.js +1 -1
- package/js/src/bybit.js +27 -8
- package/js/src/coinbasepro.js +1 -0
- package/js/src/deribit.js +1 -1
- package/js/src/okx.js +27 -11
- package/js/src/pro/binance.js +11 -5
- package/js/src/pro/coinbasepro.d.ts +3 -24
- package/js/src/pro/coinbasepro.js +70 -8
- package/package.json +1 -1
- package/skip-tests.json +6 -1
package/js/src/binance.js
CHANGED
|
@@ -3309,6 +3309,14 @@ export default class binance extends Exchange {
|
|
|
3309
3309
|
* @method
|
|
3310
3310
|
* @name binance#fetchOHLCV
|
|
3311
3311
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3312
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
|
|
3313
|
+
* @see https://binance-docs.github.io/apidocs/voptions/en/#kline-candlestick-data
|
|
3314
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#index-price-kline-candlestick-data
|
|
3315
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#mark-price-kline-candlestick-data
|
|
3316
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
|
|
3317
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#index-price-kline-candlestick-data
|
|
3318
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#mark-price-kline-candlestick-data
|
|
3319
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
|
|
3312
3320
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3313
3321
|
* @param {string} timeframe the length of time each candle represents
|
|
3314
3322
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -4624,6 +4632,11 @@ export default class binance extends Exchange {
|
|
|
4624
4632
|
* @method
|
|
4625
4633
|
* @name binance#fetchOrder
|
|
4626
4634
|
* @description fetches information on an order made by the user
|
|
4635
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-order-user_data
|
|
4636
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#query-order-user_data
|
|
4637
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#query-order-user_data
|
|
4638
|
+
* @see https://binance-docs.github.io/apidocs/voptions/en/#query-single-order-trade
|
|
4639
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-order-user_data
|
|
4627
4640
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4628
4641
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
4629
4642
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
@@ -4675,6 +4688,11 @@ export default class binance extends Exchange {
|
|
|
4675
4688
|
* @method
|
|
4676
4689
|
* @name binance#fetchOrders
|
|
4677
4690
|
* @description fetches information on multiple orders made by the user
|
|
4691
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#all-orders-user_data
|
|
4692
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#all-orders-user_data
|
|
4693
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#all-orders-user_data
|
|
4694
|
+
* @see https://binance-docs.github.io/apidocs/voptions/en/#query-option-order-history-trade
|
|
4695
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-orders-user_data
|
|
4678
4696
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
4679
4697
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
4680
4698
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -4795,6 +4813,11 @@ export default class binance extends Exchange {
|
|
|
4795
4813
|
* @method
|
|
4796
4814
|
* @name binance#fetchOpenOrders
|
|
4797
4815
|
* @description fetch all unfilled currently open orders
|
|
4816
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#current-open-orders-user_data
|
|
4817
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data
|
|
4818
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#current-all-open-orders-user_data
|
|
4819
|
+
* @see https://binance-docs.github.io/apidocs/voptions/en/#query-current-open-option-orders-user_data
|
|
4820
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data
|
|
4798
4821
|
* @param {string} symbol unified market symbol
|
|
4799
4822
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
4800
4823
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -4862,6 +4885,11 @@ export default class binance extends Exchange {
|
|
|
4862
4885
|
* @method
|
|
4863
4886
|
* @name binance#fetchClosedOrders
|
|
4864
4887
|
* @description fetches information on multiple closed orders made by the user
|
|
4888
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#all-orders-user_data
|
|
4889
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#all-orders-user_data
|
|
4890
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#all-orders-user_data
|
|
4891
|
+
* @see https://binance-docs.github.io/apidocs/voptions/en/#query-option-order-history-trade
|
|
4892
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-orders-user_data
|
|
4865
4893
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
4866
4894
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
4867
4895
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -4901,6 +4929,11 @@ export default class binance extends Exchange {
|
|
|
4901
4929
|
* @method
|
|
4902
4930
|
* @name binance#cancelOrder
|
|
4903
4931
|
* @description cancels an open order
|
|
4932
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#cancel-order-trade
|
|
4933
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#cancel-order-trade
|
|
4934
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#cancel-order-trade
|
|
4935
|
+
* @see https://binance-docs.github.io/apidocs/voptions/en/#cancel-option-order-trade
|
|
4936
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-order-trade
|
|
4904
4937
|
* @param {string} id order id
|
|
4905
4938
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
4906
4939
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
@@ -5003,6 +5036,7 @@ export default class binance extends Exchange {
|
|
|
5003
5036
|
* @name binance#cancelOrders
|
|
5004
5037
|
* @description cancel multiple orders
|
|
5005
5038
|
* @see https://binance-docs.github.io/apidocs/futures/en/#cancel-multiple-orders-trade
|
|
5039
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#cancel-multiple-orders-trade
|
|
5006
5040
|
* @param {[string]} ids order ids
|
|
5007
5041
|
* @param {string} [symbol] unified market symbol
|
|
5008
5042
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
@@ -5071,6 +5105,10 @@ export default class binance extends Exchange {
|
|
|
5071
5105
|
* @method
|
|
5072
5106
|
* @name binance#fetchOrderTrades
|
|
5073
5107
|
* @description fetch all the trades made from a single order
|
|
5108
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data
|
|
5109
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#account-trade-list-user_data
|
|
5110
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#account-trade-list-user_data
|
|
5111
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-trade-list-user_data
|
|
5074
5112
|
* @param {string} id order id
|
|
5075
5113
|
* @param {string} symbol unified market symbol
|
|
5076
5114
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -5098,6 +5136,10 @@ export default class binance extends Exchange {
|
|
|
5098
5136
|
* @method
|
|
5099
5137
|
* @name binance#fetchMyTrades
|
|
5100
5138
|
* @description fetch all trades made by the user
|
|
5139
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data
|
|
5140
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#account-trade-list-user_data
|
|
5141
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#account-trade-list-user_data
|
|
5142
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-trade-list-user_data
|
|
5101
5143
|
* @param {string} symbol unified market symbol
|
|
5102
5144
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
5103
5145
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -5237,6 +5279,7 @@ export default class binance extends Exchange {
|
|
|
5237
5279
|
* @method
|
|
5238
5280
|
* @name binance#fetchMyDustTrades
|
|
5239
5281
|
* @description fetch all dust trades made by the user
|
|
5282
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#dustlog-user_data
|
|
5240
5283
|
* @param {string} symbol not used by binance fetchMyDustTrades ()
|
|
5241
5284
|
* @param {int} [since] the earliest time in ms to fetch my dust trades for
|
|
5242
5285
|
* @param {int} [limit] the maximum number of dust trades to retrieve
|
|
@@ -5375,6 +5418,8 @@ export default class binance extends Exchange {
|
|
|
5375
5418
|
* @method
|
|
5376
5419
|
* @name binance#fetchDeposits
|
|
5377
5420
|
* @description fetch all deposits made to an account
|
|
5421
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#get-fiat-deposit-withdraw-history-user_data
|
|
5422
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#deposit-history-supporting-network-user_data
|
|
5378
5423
|
* @param {string} code unified currency code
|
|
5379
5424
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
5380
5425
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -5479,6 +5524,8 @@ export default class binance extends Exchange {
|
|
|
5479
5524
|
* @method
|
|
5480
5525
|
* @name binance#fetchWithdrawals
|
|
5481
5526
|
* @description fetch all withdrawals made from an account
|
|
5527
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#get-fiat-deposit-withdraw-history-user_data
|
|
5528
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data
|
|
5482
5529
|
* @param {string} code unified currency code
|
|
5483
5530
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
5484
5531
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -5943,6 +5990,7 @@ export default class binance extends Exchange {
|
|
|
5943
5990
|
* @method
|
|
5944
5991
|
* @name binance#fetchTransfers
|
|
5945
5992
|
* @description fetch a history of internal transfers made on an account
|
|
5993
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
|
|
5946
5994
|
* @param {string} code unified currency code of the currency transferred
|
|
5947
5995
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
5948
5996
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
@@ -6006,6 +6054,7 @@ export default class binance extends Exchange {
|
|
|
6006
6054
|
* @method
|
|
6007
6055
|
* @name binance#fetchDepositAddress
|
|
6008
6056
|
* @description fetch the deposit address for a currency associated with this account
|
|
6057
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#deposit-address-supporting-network-user_data
|
|
6009
6058
|
* @param {string} code unified currency code
|
|
6010
6059
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6011
6060
|
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
@@ -6081,6 +6130,7 @@ export default class binance extends Exchange {
|
|
|
6081
6130
|
* @name binance#fetchTransactionFees
|
|
6082
6131
|
* @deprecated
|
|
6083
6132
|
* @description please use fetchDepositWithdrawFees instead
|
|
6133
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#all-coins-39-information-user_data
|
|
6084
6134
|
* @param {string[]|undefined} codes not used by binance fetchTransactionFees ()
|
|
6085
6135
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6086
6136
|
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -6194,6 +6244,7 @@ export default class binance extends Exchange {
|
|
|
6194
6244
|
* @method
|
|
6195
6245
|
* @name binance#fetchDepositWithdrawFees
|
|
6196
6246
|
* @description fetch deposit and withdraw fees
|
|
6247
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#all-coins-39-information-user_data
|
|
6197
6248
|
* @param {string[]|undefined} codes not used by binance fetchDepositWithdrawFees ()
|
|
6198
6249
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6199
6250
|
* @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -6317,6 +6368,7 @@ export default class binance extends Exchange {
|
|
|
6317
6368
|
* @method
|
|
6318
6369
|
* @name binance#withdraw
|
|
6319
6370
|
* @description make a withdrawal
|
|
6371
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#withdraw-user_data
|
|
6320
6372
|
* @param {string} code unified currency code
|
|
6321
6373
|
* @param {float} amount the amount to withdraw
|
|
6322
6374
|
* @param {string} address the address to withdraw to
|
|
@@ -6372,6 +6424,7 @@ export default class binance extends Exchange {
|
|
|
6372
6424
|
* @method
|
|
6373
6425
|
* @name binance#fetchTradingFee
|
|
6374
6426
|
* @description fetch the trading fees for a market
|
|
6427
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
|
|
6375
6428
|
* @param {string} symbol unified market symbol
|
|
6376
6429
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6377
6430
|
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -6399,6 +6452,9 @@ export default class binance extends Exchange {
|
|
|
6399
6452
|
* @method
|
|
6400
6453
|
* @name binance#fetchTradingFees
|
|
6401
6454
|
* @description fetch the trading fees for multiple markets
|
|
6455
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
|
|
6456
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#account-information-v2-user_data
|
|
6457
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#account-information-user_data
|
|
6402
6458
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6403
6459
|
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
6404
6460
|
*/
|
|
@@ -6576,6 +6632,7 @@ export default class binance extends Exchange {
|
|
|
6576
6632
|
* @method
|
|
6577
6633
|
* @name binance#futuresTransfer
|
|
6578
6634
|
* @description transfer between futures account
|
|
6635
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data
|
|
6579
6636
|
* @param {string} code unified currency code
|
|
6580
6637
|
* @param {float} amount the amount to transfer
|
|
6581
6638
|
* @param {string} type 1 - transfer from spot account to USDT-Ⓜ futures account, 2 - transfer from USDT-Ⓜ futures account to spot account, 3 - transfer from spot account to COIN-Ⓜ futures account, 4 - transfer from COIN-Ⓜ futures account to spot account
|
|
@@ -6606,6 +6663,8 @@ export default class binance extends Exchange {
|
|
|
6606
6663
|
* @method
|
|
6607
6664
|
* @name binance#fetchFundingRate
|
|
6608
6665
|
* @description fetch the current funding rate
|
|
6666
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
|
6667
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
|
6609
6668
|
* @param {string} symbol unified market symbol
|
|
6610
6669
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6611
6670
|
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
@@ -6648,6 +6707,8 @@ export default class binance extends Exchange {
|
|
|
6648
6707
|
* @method
|
|
6649
6708
|
* @name binance#fetchFundingRateHistory
|
|
6650
6709
|
* @description fetches historical funding rate prices
|
|
6710
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#get-funding-rate-history
|
|
6711
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#get-funding-rate-history-of-perpetual-futures
|
|
6651
6712
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
6652
6713
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
6653
6714
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
@@ -6718,6 +6779,8 @@ export default class binance extends Exchange {
|
|
|
6718
6779
|
* @method
|
|
6719
6780
|
* @name binance#fetchFundingRates
|
|
6720
6781
|
* @description fetch the funding rate for multiple markets
|
|
6782
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
|
6783
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
|
6721
6784
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
6722
6785
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6723
6786
|
* @returns {object} a dictionary of [funding rates structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rates-structure}, indexe by market symbols
|
|
@@ -7246,6 +7309,8 @@ export default class binance extends Exchange {
|
|
|
7246
7309
|
* @method
|
|
7247
7310
|
* @name binance#fetchLeverageTiers
|
|
7248
7311
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
7312
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#notional-and-leverage-brackets-user_data
|
|
7313
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#notional-bracket-for-symbol-user_data
|
|
7249
7314
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7250
7315
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7251
7316
|
* @returns {object} a dictionary of [leverage tiers structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}, indexed by market symbols
|
|
@@ -7534,6 +7599,8 @@ export default class binance extends Exchange {
|
|
|
7534
7599
|
* @method
|
|
7535
7600
|
* @name binance#fetchAccountPositions
|
|
7536
7601
|
* @description fetch account positions
|
|
7602
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#account-information-v2-user_data
|
|
7603
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#account-information-user_data
|
|
7537
7604
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7538
7605
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7539
7606
|
* @returns {object} data on account positions
|
|
@@ -7571,6 +7638,7 @@ export default class binance extends Exchange {
|
|
|
7571
7638
|
* @name binance#fetchPositionsRisk
|
|
7572
7639
|
* @description fetch positions risk
|
|
7573
7640
|
* @see https://binance-docs.github.io/apidocs/futures/en/#position-information-v2-user_data
|
|
7641
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#position-information-user_data
|
|
7574
7642
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7575
7643
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7576
7644
|
* @returns {object} data on the positions risk
|
|
@@ -7667,6 +7735,8 @@ export default class binance extends Exchange {
|
|
|
7667
7735
|
* @method
|
|
7668
7736
|
* @name binance#fetchFundingHistory
|
|
7669
7737
|
* @description fetch the history of funding payments paid and received on this account
|
|
7738
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#get-income-history-user_data
|
|
7739
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#get-income-history-user_data
|
|
7670
7740
|
* @param {string} symbol unified market symbol
|
|
7671
7741
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
7672
7742
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
@@ -7714,6 +7784,8 @@ export default class binance extends Exchange {
|
|
|
7714
7784
|
* @method
|
|
7715
7785
|
* @name binance#setLeverage
|
|
7716
7786
|
* @description set the level of leverage for a market
|
|
7787
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#change-initial-leverage-trade
|
|
7788
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#change-initial-leverage-trade
|
|
7717
7789
|
* @param {float} leverage the rate of leverage
|
|
7718
7790
|
* @param {string} symbol unified market symbol
|
|
7719
7791
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
@@ -7750,6 +7822,8 @@ export default class binance extends Exchange {
|
|
|
7750
7822
|
* @method
|
|
7751
7823
|
* @name binance#setMarginMode
|
|
7752
7824
|
* @description set margin mode to 'cross' or 'isolated'
|
|
7825
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#change-margin-type-trade
|
|
7826
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#change-margin-type-trade
|
|
7753
7827
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
7754
7828
|
* @param {string} symbol unified market symbol
|
|
7755
7829
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
@@ -7818,6 +7892,8 @@ export default class binance extends Exchange {
|
|
|
7818
7892
|
* @method
|
|
7819
7893
|
* @name binance#setPositionMode
|
|
7820
7894
|
* @description set hedged to true or false for a market
|
|
7895
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#change-position-mode-trade
|
|
7896
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#change-position-mode-trade
|
|
7821
7897
|
* @param {bool} hedged set to true to use dualSidePosition
|
|
7822
7898
|
* @param {string} symbol not used by binance setPositionMode ()
|
|
7823
7899
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
@@ -8506,6 +8582,7 @@ export default class binance extends Exchange {
|
|
|
8506
8582
|
* @method
|
|
8507
8583
|
* @name binance#fetchBorrowRate
|
|
8508
8584
|
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
8585
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-interest-rate-history-user_data
|
|
8509
8586
|
* @param {string} code unified currency code
|
|
8510
8587
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8511
8588
|
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
@@ -8535,6 +8612,7 @@ export default class binance extends Exchange {
|
|
|
8535
8612
|
* @method
|
|
8536
8613
|
* @name binance#fetchBorrowRateHistory
|
|
8537
8614
|
* @description retrieves a history of a currencies borrow interest rate at specific time slots
|
|
8615
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-interest-rate-history-user_data
|
|
8538
8616
|
* @param {string} code unified currency code
|
|
8539
8617
|
* @param {int} [since] timestamp for the earliest borrow rate
|
|
8540
8618
|
* @param {int} [limit] the maximum number of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure} to retrieve
|
|
@@ -8608,6 +8686,7 @@ export default class binance extends Exchange {
|
|
|
8608
8686
|
* @method
|
|
8609
8687
|
* @name binance#createGiftCode
|
|
8610
8688
|
* @description create gift code
|
|
8689
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#create-a-single-token-gift-card-user_data
|
|
8611
8690
|
* @param {string} code gift code
|
|
8612
8691
|
* @param {float} amount amount of currency for the gift
|
|
8613
8692
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
@@ -8645,6 +8724,7 @@ export default class binance extends Exchange {
|
|
|
8645
8724
|
* @method
|
|
8646
8725
|
* @name binance#redeemGiftCode
|
|
8647
8726
|
* @description redeem gift code
|
|
8727
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#redeem-a-binance-gift-card-user_data
|
|
8648
8728
|
* @param {string} giftcardCode
|
|
8649
8729
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8650
8730
|
* @returns {object} response from the exchange
|
|
@@ -8671,6 +8751,7 @@ export default class binance extends Exchange {
|
|
|
8671
8751
|
* @method
|
|
8672
8752
|
* @name binance#verifyGiftCode
|
|
8673
8753
|
* @description verify gift code
|
|
8754
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#verify-binance-gift-card-by-gift-card-number-user_data
|
|
8674
8755
|
* @param {string} id reference number id
|
|
8675
8756
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
8676
8757
|
* @returns {object} response from the exchange
|
|
@@ -8694,6 +8775,7 @@ export default class binance extends Exchange {
|
|
|
8694
8775
|
* @method
|
|
8695
8776
|
* @name binance#fetchBorrowInterest
|
|
8696
8777
|
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
8778
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#get-interest-history-user_data
|
|
8697
8779
|
* @param {string} code unified currency code
|
|
8698
8780
|
* @param {string} symbol unified market symbol when fetch interest in isolated markets
|
|
8699
8781
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
@@ -8846,6 +8928,8 @@ export default class binance extends Exchange {
|
|
|
8846
8928
|
* @method
|
|
8847
8929
|
* @name binance#fetchOpenInterestHistory
|
|
8848
8930
|
* @description Retrieves the open interest history of a currency
|
|
8931
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#open-interest-statistics
|
|
8932
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#open-interest-statistics
|
|
8849
8933
|
* @param {string} symbol Unified CCXT market symbol
|
|
8850
8934
|
* @param {string} timeframe "5m","15m","30m","1h","2h","4h","6h","12h", or "1d"
|
|
8851
8935
|
* @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
|