ccxt 4.3.49 → 4.3.51
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 +5 -5
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +290 -329
- package/dist/cjs/src/binancecoinm.js +1 -0
- package/dist/cjs/src/binanceusdm.js +2 -0
- package/dist/cjs/src/bitget.js +1 -0
- package/dist/cjs/src/bybit.js +34 -0
- package/dist/cjs/src/exmo.js +1 -1
- package/dist/cjs/src/htx.js +10 -10
- package/dist/cjs/src/kucoin.js +4 -4
- package/dist/cjs/src/kucoinfutures.js +1 -1
- package/dist/cjs/src/pro/binance.js +36 -36
- package/dist/cjs/src/pro/binancecoinm.js +1 -0
- package/dist/cjs/src/pro/binanceusdm.js +2 -0
- package/dist/cjs/src/pro/gate.js +2 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/bigone.js +1 -1
- package/js/src/binance.js +290 -329
- package/js/src/binancecoinm.js +1 -0
- package/js/src/binanceusdm.js +2 -0
- package/js/src/bitget.js +1 -0
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +34 -0
- package/js/src/exmo.js +1 -1
- package/js/src/htx.js +10 -10
- package/js/src/kucoin.js +4 -4
- package/js/src/kucoinfutures.js +1 -1
- package/js/src/pro/binance.js +36 -36
- package/js/src/pro/binancecoinm.js +1 -0
- package/js/src/pro/binanceusdm.js +2 -0
- package/js/src/pro/gate.js +2 -2
- package/package.json +1 -1
package/js/src/binance.js
CHANGED
|
@@ -225,7 +225,7 @@ export default class binance extends Exchange {
|
|
|
225
225
|
'discount': 0.1,
|
|
226
226
|
},
|
|
227
227
|
'doc': [
|
|
228
|
-
'https://binance
|
|
228
|
+
'https://developers.binance.com/en',
|
|
229
229
|
],
|
|
230
230
|
'api_management': 'https://www.binance.com/en/usercenter/settings/api-management',
|
|
231
231
|
'fees': 'https://www.binance.com/en/fee/schedule',
|
|
@@ -323,7 +323,6 @@ export default class binance extends Exchange {
|
|
|
323
323
|
'futures/transfer': 1,
|
|
324
324
|
'futures/histDataLink': 0.1,
|
|
325
325
|
'rebate/taxQuery': 80.004,
|
|
326
|
-
// https://binance-docs.github.io/apidocs/spot/en/#withdraw-sapi
|
|
327
326
|
'capital/config/getall': 1,
|
|
328
327
|
'capital/deposit/address': 1,
|
|
329
328
|
'capital/deposit/address/list': 1,
|
|
@@ -2599,9 +2598,9 @@ export default class binance extends Exchange {
|
|
|
2599
2598
|
* @method
|
|
2600
2599
|
* @name binance#fetchTime
|
|
2601
2600
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
2602
|
-
* @see https://binance
|
|
2603
|
-
* @see https://binance
|
|
2604
|
-
* @see https://binance
|
|
2601
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#check-server-time // spot
|
|
2602
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time // swap
|
|
2603
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Check-Server-time // future
|
|
2605
2604
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2606
2605
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
2607
2606
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
@@ -2628,7 +2627,7 @@ export default class binance extends Exchange {
|
|
|
2628
2627
|
* @method
|
|
2629
2628
|
* @name binance#fetchCurrencies
|
|
2630
2629
|
* @description fetches all available currencies on an exchange
|
|
2631
|
-
* @see https://binance
|
|
2630
|
+
* @see https://developers.binance.com/docs/wallet/capital/all-coins-info
|
|
2632
2631
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2633
2632
|
* @returns {object} an associative dictionary of currencies
|
|
2634
2633
|
*/
|
|
@@ -2823,10 +2822,10 @@ export default class binance extends Exchange {
|
|
|
2823
2822
|
* @method
|
|
2824
2823
|
* @name binance#fetchMarkets
|
|
2825
2824
|
* @description retrieves data on all markets for binance
|
|
2826
|
-
* @see https://binance
|
|
2827
|
-
* @see https://binance
|
|
2828
|
-
* @see https://binance
|
|
2829
|
-
* @see https://binance
|
|
2825
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#exchange-information // spot
|
|
2826
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information // swap
|
|
2827
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Exchange-Information // future
|
|
2828
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Exchange-Information // option
|
|
2830
2829
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2831
2830
|
* @returns {object[]} an array of objects representing market data
|
|
2832
2831
|
*/
|
|
@@ -3380,21 +3379,20 @@ export default class binance extends Exchange {
|
|
|
3380
3379
|
* @method
|
|
3381
3380
|
* @name binance#fetchBalance
|
|
3382
3381
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
3383
|
-
* @see https://binance
|
|
3384
|
-
* @see https://binance
|
|
3385
|
-
* @see https://binance
|
|
3386
|
-
* @see https://binance
|
|
3387
|
-
* @see https://binance
|
|
3388
|
-
* @see https://binance
|
|
3389
|
-
* @see https://binance
|
|
3390
|
-
* @see https://binance
|
|
3391
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#account-balance-user_data // portfolio margin
|
|
3382
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-information-user_data // spot
|
|
3383
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details // cross margin
|
|
3384
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info // isolated margin
|
|
3385
|
+
* @see https://developers.binance.com/docs/wallet/asset/funding-wallet // funding
|
|
3386
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V2 // swap
|
|
3387
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Futures-Account-Balance // future
|
|
3388
|
+
* @see https://developers.binance.com/docs/derivatives/option/account/Option-Account-Information // option
|
|
3389
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Account-Balance // portfolio margin
|
|
3392
3390
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3393
3391
|
* @param {string} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot' or 'papi'
|
|
3394
3392
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
3395
3393
|
* @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
|
|
3396
3394
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the balance for a portfolio margin account
|
|
3397
|
-
* @param {string} [params.subType]
|
|
3395
|
+
* @param {string} [params.subType] 'linear' or 'inverse'
|
|
3398
3396
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
3399
3397
|
*/
|
|
3400
3398
|
await this.loadMarkets();
|
|
@@ -3608,31 +3606,6 @@ export default class binance extends Exchange {
|
|
|
3608
3606
|
// }
|
|
3609
3607
|
// ]
|
|
3610
3608
|
//
|
|
3611
|
-
// savings
|
|
3612
|
-
//
|
|
3613
|
-
// {
|
|
3614
|
-
// "totalAmountInBTC": "0.3172",
|
|
3615
|
-
// "totalAmountInUSDT": "10000",
|
|
3616
|
-
// "totalFixedAmountInBTC": "0.3172",
|
|
3617
|
-
// "totalFixedAmountInUSDT": "10000",
|
|
3618
|
-
// "totalFlexibleInBTC": "0",
|
|
3619
|
-
// "totalFlexibleInUSDT": "0",
|
|
3620
|
-
// "positionAmountVos": [
|
|
3621
|
-
// {
|
|
3622
|
-
// "asset": "USDT",
|
|
3623
|
-
// "amount": "10000",
|
|
3624
|
-
// "amountInBTC": "0.3172",
|
|
3625
|
-
// "amountInUSDT": "10000"
|
|
3626
|
-
// },
|
|
3627
|
-
// {
|
|
3628
|
-
// "asset": "BUSD",
|
|
3629
|
-
// "amount": "0",
|
|
3630
|
-
// "amountInBTC": "0",
|
|
3631
|
-
// "amountInUSDT": "0"
|
|
3632
|
-
// }
|
|
3633
|
-
// ]
|
|
3634
|
-
// }
|
|
3635
|
-
//
|
|
3636
3609
|
// binance pay
|
|
3637
3610
|
//
|
|
3638
3611
|
// [
|
|
@@ -3672,10 +3645,10 @@ export default class binance extends Exchange {
|
|
|
3672
3645
|
* @method
|
|
3673
3646
|
* @name binance#fetchOrderBook
|
|
3674
3647
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
3675
|
-
* @see https://binance
|
|
3676
|
-
* @see https://binance
|
|
3677
|
-
* @see https://binance
|
|
3678
|
-
* @see https://binance
|
|
3648
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#order-book // spot
|
|
3649
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book // swap
|
|
3650
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Order-Book // future
|
|
3651
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Order-Book // option
|
|
3679
3652
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
3680
3653
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
3681
3654
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -3897,7 +3870,7 @@ export default class binance extends Exchange {
|
|
|
3897
3870
|
* @method
|
|
3898
3871
|
* @name binance#fetchStatus
|
|
3899
3872
|
* @description the latest known information on the availability of the exchange API
|
|
3900
|
-
* @see https://binance
|
|
3873
|
+
* @see https://developers.binance.com/docs/wallet/others/system-status
|
|
3901
3874
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3902
3875
|
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
3903
3876
|
*/
|
|
@@ -3922,11 +3895,11 @@ export default class binance extends Exchange {
|
|
|
3922
3895
|
* @method
|
|
3923
3896
|
* @name binance#fetchTicker
|
|
3924
3897
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
3925
|
-
* @see https://binance
|
|
3926
|
-
* @see https://binance
|
|
3927
|
-
* @see https://binance
|
|
3928
|
-
* @see https://binance
|
|
3929
|
-
* @see https://binance
|
|
3898
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics // spot
|
|
3899
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#rolling-window-price-change-statistics // spot
|
|
3900
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics // swap
|
|
3901
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics // future
|
|
3902
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics // option
|
|
3930
3903
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
3931
3904
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3932
3905
|
* @param {boolean} [params.rolling] (spot only) default false, if true, uses the rolling 24 hour ticker endpoint /api/v3/ticker
|
|
@@ -3968,9 +3941,9 @@ export default class binance extends Exchange {
|
|
|
3968
3941
|
* @method
|
|
3969
3942
|
* @name binance#fetchBidsAsks
|
|
3970
3943
|
* @description fetches the bid and ask price and volume for multiple markets
|
|
3971
|
-
* @see https://binance
|
|
3972
|
-
* @see https://binance
|
|
3973
|
-
* @see https://binance
|
|
3944
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-order-book-ticker // spot
|
|
3945
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker // swap
|
|
3946
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Order-Book-Ticker // future
|
|
3974
3947
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
3975
3948
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3976
3949
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -4007,9 +3980,9 @@ export default class binance extends Exchange {
|
|
|
4007
3980
|
* @method
|
|
4008
3981
|
* @name binance#fetchLastPrices
|
|
4009
3982
|
* @description fetches the last price for multiple markets
|
|
4010
|
-
* @see https://binance
|
|
4011
|
-
* @see https://binance
|
|
4012
|
-
* @see https://binance
|
|
3983
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-price-ticker // spot
|
|
3984
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker // swap
|
|
3985
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Price-Ticker // future
|
|
4013
3986
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the last prices
|
|
4014
3987
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4015
3988
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -4112,10 +4085,10 @@ export default class binance extends Exchange {
|
|
|
4112
4085
|
* @method
|
|
4113
4086
|
* @name binance#fetchTickers
|
|
4114
4087
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
4115
|
-
* @see https://binance
|
|
4116
|
-
* @see https://binance
|
|
4117
|
-
* @see https://binance
|
|
4118
|
-
* @see https://binance
|
|
4088
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics // spot
|
|
4089
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics // swap
|
|
4090
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics // future
|
|
4091
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics // option
|
|
4119
4092
|
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
4120
4093
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4121
4094
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -4219,14 +4192,16 @@ export default class binance extends Exchange {
|
|
|
4219
4192
|
* @method
|
|
4220
4193
|
* @name binance#fetchOHLCV
|
|
4221
4194
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
4222
|
-
* @see https://binance
|
|
4223
|
-
* @see https://binance
|
|
4224
|
-
* @see https://binance
|
|
4225
|
-
* @see https://binance
|
|
4226
|
-
* @see https://binance
|
|
4227
|
-
* @see https://binance
|
|
4228
|
-
* @see https://binance
|
|
4229
|
-
* @see https://binance
|
|
4195
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#klinecandlestick-data
|
|
4196
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
|
|
4197
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
|
|
4198
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
|
|
4199
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
|
|
4200
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data
|
|
4201
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Kline-Candlestick-Data
|
|
4202
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-Kline-Candlestick-Data
|
|
4203
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Mark-Price-Kline-Candlestick-Data
|
|
4204
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Premium-Index-Kline-Data
|
|
4230
4205
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
4231
4206
|
* @param {string} timeframe the length of time each candle represents
|
|
4232
4207
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -4234,7 +4209,7 @@ export default class binance extends Exchange {
|
|
|
4234
4209
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4235
4210
|
* @param {string} [params.price] "mark" or "index" for mark price and index price candles
|
|
4236
4211
|
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
4237
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
4212
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
4238
4213
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
4239
4214
|
*/
|
|
4240
4215
|
await this.loadMarkets();
|
|
@@ -4411,7 +4386,6 @@ export default class binance extends Exchange {
|
|
|
4411
4386
|
// }
|
|
4412
4387
|
//
|
|
4413
4388
|
// futures trades
|
|
4414
|
-
// https://binance-docs.github.io/apidocs/futures/en/#account-trade-list-user_data
|
|
4415
4389
|
//
|
|
4416
4390
|
// {
|
|
4417
4391
|
// "accountId": 20,
|
|
@@ -4625,18 +4599,18 @@ export default class binance extends Exchange {
|
|
|
4625
4599
|
* @name binance#fetchTrades
|
|
4626
4600
|
* @description get the list of most recent trades for a particular symbol
|
|
4627
4601
|
* Default fetchTradesMethod
|
|
4628
|
-
* @see https://binance
|
|
4629
|
-
* @see https://binance
|
|
4630
|
-
* @see https://binance
|
|
4631
|
-
* @see https://binance
|
|
4602
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#compressedaggregate-trades-list // publicGetAggTrades (spot)
|
|
4603
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List // fapiPublicGetAggTrades (swap)
|
|
4604
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Compressed-Aggregate-Trades-List // dapiPublicGetAggTrades (future)
|
|
4605
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List // eapiPublicGetTrades (option)
|
|
4632
4606
|
* Other fetchTradesMethod
|
|
4633
|
-
* @see https://binance
|
|
4634
|
-
* @see https://binance
|
|
4635
|
-
* @see https://binance
|
|
4636
|
-
* @see https://binance
|
|
4637
|
-
* @see https://binance
|
|
4638
|
-
* @see https://binance
|
|
4639
|
-
* @see https://binance
|
|
4607
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#recent-trades-list // publicGetTrades (spot)
|
|
4608
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List // fapiPublicGetTrades (swap)
|
|
4609
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Recent-Trades-List // dapiPublicGetTrades (future)
|
|
4610
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#old-trade-lookup // publicGetHistoricalTrades (spot)
|
|
4611
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup // fapiPublicGetHistoricalTrades (swap)
|
|
4612
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Old-Trades-Lookup // dapiPublicGetHistoricalTrades (future)
|
|
4613
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup // eapiPublicGetHistoricalTrades (option)
|
|
4640
4614
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
4641
4615
|
* @param {int} [since] only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'
|
|
4642
4616
|
* @param {int} [limit] default 500, max 1000
|
|
@@ -4769,7 +4743,7 @@ export default class binance extends Exchange {
|
|
|
4769
4743
|
* @name binance#editSpotOrder
|
|
4770
4744
|
* @ignore
|
|
4771
4745
|
* @description edit a trade order
|
|
4772
|
-
* @see https://binance
|
|
4746
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
|
4773
4747
|
* @param {string} id cancel order id
|
|
4774
4748
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
4775
4749
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
@@ -4992,8 +4966,8 @@ export default class binance extends Exchange {
|
|
|
4992
4966
|
* @method
|
|
4993
4967
|
* @name binance#editContractOrder
|
|
4994
4968
|
* @description edit a trade order
|
|
4995
|
-
* @see https://binance
|
|
4996
|
-
* @see https://binance
|
|
4969
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
|
4970
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
|
4997
4971
|
* @param {string} id cancel order id
|
|
4998
4972
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
4999
4973
|
* @param {string} type 'market' or 'limit'
|
|
@@ -5047,9 +5021,9 @@ export default class binance extends Exchange {
|
|
|
5047
5021
|
* @method
|
|
5048
5022
|
* @name binance#editOrder
|
|
5049
5023
|
* @description edit a trade order
|
|
5050
|
-
* @see https://binance
|
|
5051
|
-
* @see https://binance
|
|
5052
|
-
* @see https://binance
|
|
5024
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
|
5025
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
|
5026
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
|
5053
5027
|
* @param {string} id cancel order id
|
|
5054
5028
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
5055
5029
|
* @param {string} type 'market' or 'limit'
|
|
@@ -5656,7 +5630,9 @@ export default class binance extends Exchange {
|
|
|
5656
5630
|
* @method
|
|
5657
5631
|
* @name binance#createOrders
|
|
5658
5632
|
* @description *contract only* create a list of trade orders
|
|
5659
|
-
* @see https://binance
|
|
5633
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Place-Multiple-Orders
|
|
5634
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders
|
|
5635
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Place-Multiple-Orders
|
|
5660
5636
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
5661
5637
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5662
5638
|
*/
|
|
@@ -5735,18 +5711,18 @@ export default class binance extends Exchange {
|
|
|
5735
5711
|
* @method
|
|
5736
5712
|
* @name binance#createOrder
|
|
5737
5713
|
* @description create a trade order
|
|
5738
|
-
* @see https://binance
|
|
5739
|
-
* @see https://binance
|
|
5740
|
-
* @see https://binance
|
|
5741
|
-
* @see https://binance
|
|
5742
|
-
* @see https://binance
|
|
5743
|
-
* @see https://binance
|
|
5744
|
-
* @see https://binance
|
|
5745
|
-
* @see https://binance
|
|
5746
|
-
* @see https://binance
|
|
5747
|
-
* @see https://binance
|
|
5748
|
-
* @see https://binance
|
|
5749
|
-
* @see https://binance
|
|
5714
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
5715
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-trade
|
|
5716
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order
|
|
5717
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/New-Order
|
|
5718
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/New-Order
|
|
5719
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#sor
|
|
5720
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-using-sor-trade
|
|
5721
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Order
|
|
5722
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order
|
|
5723
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order
|
|
5724
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Conditional-Order
|
|
5725
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Conditional-Order
|
|
5750
5726
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
5751
5727
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
5752
5728
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -5994,7 +5970,7 @@ export default class binance extends Exchange {
|
|
|
5994
5970
|
postOnly = this.isPostOnly(isMarketOrder, initialUppercaseType === 'LIMIT_MAKER', params);
|
|
5995
5971
|
if (postOnly) {
|
|
5996
5972
|
if (!market['contract']) {
|
|
5997
|
-
uppercaseType = 'LIMIT_MAKER';
|
|
5973
|
+
uppercaseType = 'LIMIT_MAKER';
|
|
5998
5974
|
}
|
|
5999
5975
|
else {
|
|
6000
5976
|
request['timeInForce'] = 'GTX';
|
|
@@ -6152,7 +6128,7 @@ export default class binance extends Exchange {
|
|
|
6152
6128
|
* @method
|
|
6153
6129
|
* @name binance#createMarketOrderWithCost
|
|
6154
6130
|
* @description create a market order by providing the symbol, side and cost
|
|
6155
|
-
* @see https://binance
|
|
6131
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
6156
6132
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
6157
6133
|
* @param {string} side 'buy' or 'sell'
|
|
6158
6134
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
@@ -6172,7 +6148,7 @@ export default class binance extends Exchange {
|
|
|
6172
6148
|
* @method
|
|
6173
6149
|
* @name binance#createMarketBuyOrderWithCost
|
|
6174
6150
|
* @description create a market buy order by providing the symbol and cost
|
|
6175
|
-
* @see https://binance
|
|
6151
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
6176
6152
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
6177
6153
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
6178
6154
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6191,7 +6167,7 @@ export default class binance extends Exchange {
|
|
|
6191
6167
|
* @method
|
|
6192
6168
|
* @name binance#createMarketSellOrderWithCost
|
|
6193
6169
|
* @description create a market sell order by providing the symbol and cost
|
|
6194
|
-
* @see https://binance
|
|
6170
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
6195
6171
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
6196
6172
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
6197
6173
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6210,14 +6186,13 @@ export default class binance extends Exchange {
|
|
|
6210
6186
|
* @method
|
|
6211
6187
|
* @name binance#fetchOrder
|
|
6212
6188
|
* @description fetches information on an order made by the user
|
|
6213
|
-
* @see https://binance
|
|
6214
|
-
* @see https://binance
|
|
6215
|
-
* @see https://binance
|
|
6216
|
-
* @see https://binance
|
|
6217
|
-
* @see https://binance
|
|
6218
|
-
* @see https://binance
|
|
6219
|
-
* @see https://binance
|
|
6220
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-margin-account-order-user_data
|
|
6189
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-user_data
|
|
6190
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order
|
|
6191
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Order
|
|
6192
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Single-Order
|
|
6193
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order
|
|
6194
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Order
|
|
6195
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Order
|
|
6221
6196
|
* @param {string} id the order id
|
|
6222
6197
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
6223
6198
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6293,16 +6268,15 @@ export default class binance extends Exchange {
|
|
|
6293
6268
|
* @method
|
|
6294
6269
|
* @name binance#fetchOrders
|
|
6295
6270
|
* @description fetches information on multiple orders made by the user
|
|
6296
|
-
* @see https://binance
|
|
6297
|
-
* @see https://binance
|
|
6298
|
-
* @see https://binance
|
|
6299
|
-
* @see https://binance
|
|
6300
|
-
* @see https://binance
|
|
6301
|
-
* @see https://binance
|
|
6302
|
-
* @see https://binance
|
|
6303
|
-
* @see https://binance
|
|
6304
|
-
* @see https://binance
|
|
6305
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-margin-account-orders-user_data
|
|
6271
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
6272
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
6273
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
6274
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
6275
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
6276
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
6277
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
6278
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
6279
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
6306
6280
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
6307
6281
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
6308
6282
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -6573,20 +6547,15 @@ export default class binance extends Exchange {
|
|
|
6573
6547
|
* @method
|
|
6574
6548
|
* @name binance#fetchOpenOrders
|
|
6575
6549
|
* @description fetch all unfilled currently open orders
|
|
6576
|
-
* @see https://binance
|
|
6577
|
-
* @see https://binance
|
|
6578
|
-
* @see https://binance
|
|
6579
|
-
* @see https://binance
|
|
6580
|
-
* @see https://binance
|
|
6581
|
-
* @see https://binance
|
|
6582
|
-
* @see https://binance
|
|
6583
|
-
* @see https://binance
|
|
6584
|
-
* @see https://binance
|
|
6585
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-um-open-orders-user_data
|
|
6586
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-cm-open-orders-user_data
|
|
6587
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-um-open-conditional-orders-user_data
|
|
6588
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-cm-open-conditional-orders-user_data
|
|
6589
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-current-margin-open-order-user_data
|
|
6550
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-open-orders-user_data
|
|
6551
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders
|
|
6552
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Current-All-Open-Orders
|
|
6553
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Current-Open-Option-Orders
|
|
6554
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders
|
|
6555
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders
|
|
6556
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Conditional-Orders
|
|
6557
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Orders
|
|
6558
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Conditional-Orders
|
|
6590
6559
|
* @param {string} symbol unified market symbol
|
|
6591
6560
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
6592
6561
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -6686,12 +6655,12 @@ export default class binance extends Exchange {
|
|
|
6686
6655
|
* @method
|
|
6687
6656
|
* @name binance#fetchOpenOrder
|
|
6688
6657
|
* @description fetch an open order by the id
|
|
6689
|
-
* @see https://binance
|
|
6690
|
-
* @see https://binance
|
|
6691
|
-
* @see https://binance
|
|
6692
|
-
* @see https://binance
|
|
6693
|
-
* @see https://binance
|
|
6694
|
-
* @see https://binance
|
|
6658
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order
|
|
6659
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Current-Open-Order
|
|
6660
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Order
|
|
6661
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Conditional-Order
|
|
6662
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Order
|
|
6663
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Conditional-Order
|
|
6695
6664
|
* @param {string} id order id
|
|
6696
6665
|
* @param {string} symbol unified market symbol
|
|
6697
6666
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6903,16 +6872,15 @@ export default class binance extends Exchange {
|
|
|
6903
6872
|
* @method
|
|
6904
6873
|
* @name binance#fetchClosedOrders
|
|
6905
6874
|
* @description fetches information on multiple closed orders made by the user
|
|
6906
|
-
* @see https://binance
|
|
6907
|
-
* @see https://binance
|
|
6908
|
-
* @see https://binance
|
|
6909
|
-
* @see https://binance
|
|
6910
|
-
* @see https://binance
|
|
6911
|
-
* @see https://binance
|
|
6912
|
-
* @see https://binance
|
|
6913
|
-
* @see https://binance
|
|
6914
|
-
* @see https://binance
|
|
6915
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-margin-account-orders-user_data
|
|
6875
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
6876
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
6877
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
6878
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
6879
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
6880
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
6881
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
6882
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
6883
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
6916
6884
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
6917
6885
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
6918
6886
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -6934,14 +6902,15 @@ export default class binance extends Exchange {
|
|
|
6934
6902
|
* @method
|
|
6935
6903
|
* @name binance#fetchCanceledOrders
|
|
6936
6904
|
* @description fetches information on multiple canceled orders made by the user
|
|
6937
|
-
* @see https://binance
|
|
6938
|
-
* @see https://binance
|
|
6939
|
-
* @see https://binance
|
|
6940
|
-
* @see https://binance
|
|
6941
|
-
* @see https://binance
|
|
6942
|
-
* @see https://binance
|
|
6943
|
-
* @see https://binance
|
|
6944
|
-
* @see https://binance
|
|
6905
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
6906
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
6907
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
6908
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
6909
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
6910
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
6911
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
6912
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
6913
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
6945
6914
|
* @param {string} symbol unified market symbol of the market the orders were made in
|
|
6946
6915
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
6947
6916
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -6963,14 +6932,15 @@ export default class binance extends Exchange {
|
|
|
6963
6932
|
* @method
|
|
6964
6933
|
* @name binance#fetchCanceledAndClosedOrders
|
|
6965
6934
|
* @description fetches information on multiple canceled orders made by the user
|
|
6966
|
-
* @see https://binance
|
|
6967
|
-
* @see https://binance
|
|
6968
|
-
* @see https://binance
|
|
6969
|
-
* @see https://binance
|
|
6970
|
-
* @see https://binance
|
|
6971
|
-
* @see https://binance
|
|
6972
|
-
* @see https://binance
|
|
6973
|
-
* @see https://binance
|
|
6935
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
6936
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
6937
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
6938
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
6939
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
6940
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
6941
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
6942
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
6943
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
6974
6944
|
* @param {string} symbol unified market symbol of the market the orders were made in
|
|
6975
6945
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
6976
6946
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -6995,16 +6965,16 @@ export default class binance extends Exchange {
|
|
|
6995
6965
|
* @method
|
|
6996
6966
|
* @name binance#cancelOrder
|
|
6997
6967
|
* @description cancels an open order
|
|
6998
|
-
* @see https://binance
|
|
6999
|
-
* @see https://binance
|
|
7000
|
-
* @see https://binance
|
|
7001
|
-
* @see https://binance
|
|
7002
|
-
* @see https://binance
|
|
7003
|
-
* @see https://binance
|
|
7004
|
-
* @see https://binance
|
|
7005
|
-
* @see https://binance
|
|
7006
|
-
* @see https://binance
|
|
7007
|
-
* @see https://binance
|
|
6968
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-trade
|
|
6969
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order
|
|
6970
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Order
|
|
6971
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Cancel-Option-Order
|
|
6972
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order
|
|
6973
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Order
|
|
6974
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Order
|
|
6975
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Conditional-Order
|
|
6976
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Conditional-Order
|
|
6977
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-Order
|
|
7008
6978
|
* @param {string} id order id
|
|
7009
6979
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
7010
6980
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -7101,16 +7071,15 @@ export default class binance extends Exchange {
|
|
|
7101
7071
|
* @method
|
|
7102
7072
|
* @name binance#cancelAllOrders
|
|
7103
7073
|
* @description cancel all open orders in a market
|
|
7104
|
-
* @see https://binance
|
|
7105
|
-
* @see https://binance
|
|
7106
|
-
* @see https://binance
|
|
7107
|
-
* @see https://binance
|
|
7108
|
-
* @see https://binance
|
|
7109
|
-
* @see https://binance
|
|
7110
|
-
* @see https://binance
|
|
7111
|
-
* @see https://binance
|
|
7112
|
-
* @see https://binance
|
|
7113
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#cancel-margin-account-all-open-orders-on-a-symbol-trade
|
|
7074
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-all-open-orders-on-a-symbol-trade
|
|
7075
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders
|
|
7076
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Cancel-all-Option-orders-on-specific-symbol
|
|
7077
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders
|
|
7078
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Orders
|
|
7079
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Conditional-Orders
|
|
7080
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Orders
|
|
7081
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Conditional-Orders
|
|
7082
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-All-Open-Orders-on-a-Symbol
|
|
7114
7083
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
7115
7084
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7116
7085
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
@@ -7189,8 +7158,8 @@ export default class binance extends Exchange {
|
|
|
7189
7158
|
* @method
|
|
7190
7159
|
* @name binance#cancelOrders
|
|
7191
7160
|
* @description cancel multiple orders
|
|
7192
|
-
* @see https://binance
|
|
7193
|
-
* @see https://binance
|
|
7161
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders
|
|
7162
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Multiple-Orders
|
|
7194
7163
|
* @param {string[]} ids order ids
|
|
7195
7164
|
* @param {string} [symbol] unified market symbol
|
|
7196
7165
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -7261,10 +7230,10 @@ export default class binance extends Exchange {
|
|
|
7261
7230
|
* @method
|
|
7262
7231
|
* @name binance#fetchOrderTrades
|
|
7263
7232
|
* @description fetch all the trades made from a single order
|
|
7264
|
-
* @see https://binance
|
|
7265
|
-
* @see https://binance
|
|
7266
|
-
* @see https://binance
|
|
7267
|
-
* @see https://binance
|
|
7233
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
|
7234
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
|
7235
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
|
7236
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
|
7268
7237
|
* @param {string} id order id
|
|
7269
7238
|
* @param {string} symbol unified market symbol
|
|
7270
7239
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -7292,13 +7261,13 @@ export default class binance extends Exchange {
|
|
|
7292
7261
|
* @method
|
|
7293
7262
|
* @name binance#fetchMyTrades
|
|
7294
7263
|
* @description fetch all trades made by the user
|
|
7295
|
-
* @see https://binance
|
|
7296
|
-
* @see https://binance
|
|
7297
|
-
* @see https://binance
|
|
7298
|
-
* @see https://binance
|
|
7299
|
-
* @see https://binance
|
|
7300
|
-
* @see https://binance
|
|
7301
|
-
* @see https://binance
|
|
7264
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
|
7265
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
|
7266
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
|
7267
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
|
7268
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Account-Trade-List
|
|
7269
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/UM-Account-Trade-List
|
|
7270
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/CM-Account-Trade-List
|
|
7302
7271
|
* @param {string} symbol unified market symbol
|
|
7303
7272
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
7304
7273
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -7327,7 +7296,6 @@ export default class binance extends Exchange {
|
|
|
7327
7296
|
if (since !== undefined) {
|
|
7328
7297
|
const startTime = since;
|
|
7329
7298
|
request['startTime'] = startTime;
|
|
7330
|
-
// https://binance-docs.github.io/apidocs/futures/en/#account-trade-list-user_data
|
|
7331
7299
|
// If startTime and endTime are both not sent, then the last 7 days' data will be returned.
|
|
7332
7300
|
// The time between startTime and endTime cannot be longer than 7 days.
|
|
7333
7301
|
// The parameter fromId cannot be sent with startTime or endTime.
|
|
@@ -7528,7 +7496,7 @@ export default class binance extends Exchange {
|
|
|
7528
7496
|
* @method
|
|
7529
7497
|
* @name binance#fetchMyDustTrades
|
|
7530
7498
|
* @description fetch all dust trades made by the user
|
|
7531
|
-
* @see https://binance
|
|
7499
|
+
* @see https://developers.binance.com/docs/wallet/asset/dust-log
|
|
7532
7500
|
* @param {string} symbol not used by binance fetchMyDustTrades ()
|
|
7533
7501
|
* @param {int} [since] the earliest time in ms to fetch my dust trades for
|
|
7534
7502
|
* @param {int} [limit] the maximum number of dust trades to retrieve
|
|
@@ -7672,17 +7640,16 @@ export default class binance extends Exchange {
|
|
|
7672
7640
|
/**
|
|
7673
7641
|
* @method
|
|
7674
7642
|
* @name binance#fetchDeposits
|
|
7675
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#get-fiat-deposit-withdraw-history-user_data
|
|
7676
7643
|
* @description fetch all deposits made to an account
|
|
7677
|
-
* @see https://binance
|
|
7678
|
-
* @see https://binance
|
|
7644
|
+
* @see https://developers.binance.com/docs/wallet/capital/deposite-history
|
|
7645
|
+
* @see https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History
|
|
7679
7646
|
* @param {string} code unified currency code
|
|
7680
7647
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
7681
7648
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
7682
7649
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7683
7650
|
* @param {bool} [params.fiat] if true, only fiat deposits will be returned
|
|
7684
7651
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
7685
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
7652
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
7686
7653
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
7687
7654
|
*/
|
|
7688
7655
|
await this.loadMarkets();
|
|
@@ -7786,18 +7753,16 @@ export default class binance extends Exchange {
|
|
|
7786
7753
|
/**
|
|
7787
7754
|
* @method
|
|
7788
7755
|
* @name binance#fetchWithdrawals
|
|
7789
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#get-fiat-deposit-withdraw-history-user_data
|
|
7790
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data
|
|
7791
7756
|
* @description fetch all withdrawals made from an account
|
|
7792
|
-
* @see https://binance
|
|
7793
|
-
* @see https://binance
|
|
7757
|
+
* @see https://developers.binance.com/docs/wallet/capital/withdraw-history
|
|
7758
|
+
* @see https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History
|
|
7794
7759
|
* @param {string} code unified currency code
|
|
7795
7760
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
7796
7761
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
7797
7762
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7798
7763
|
* @param {bool} [params.fiat] if true, only fiat withdrawals will be returned
|
|
7799
7764
|
* @param {int} [params.until] the latest time in ms to fetch withdrawals for
|
|
7800
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
7765
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
7801
7766
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
7802
7767
|
*/
|
|
7803
7768
|
await this.loadMarkets();
|
|
@@ -8226,7 +8191,7 @@ export default class binance extends Exchange {
|
|
|
8226
8191
|
* @method
|
|
8227
8192
|
* @name binance#transfer
|
|
8228
8193
|
* @description transfer currency internally between wallets on the same account
|
|
8229
|
-
* @see https://binance
|
|
8194
|
+
* @see https://developers.binance.com/docs/wallet/asset/user-universal-transfer
|
|
8230
8195
|
* @param {string} code unified currency code
|
|
8231
8196
|
* @param {float} amount amount to transfer
|
|
8232
8197
|
* @param {string} fromAccount account to transfer from
|
|
@@ -8332,14 +8297,13 @@ export default class binance extends Exchange {
|
|
|
8332
8297
|
* @method
|
|
8333
8298
|
* @name binance#fetchTransfers
|
|
8334
8299
|
* @description fetch a history of internal transfers made on an account
|
|
8335
|
-
* @see https://binance
|
|
8336
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#pay-endpoints
|
|
8300
|
+
* @see https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer
|
|
8337
8301
|
* @param {string} code unified currency code of the currency transferred
|
|
8338
8302
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
8339
8303
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
8340
8304
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8341
8305
|
* @param {int} [params.until] the latest time in ms to fetch transfers for
|
|
8342
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
8306
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
8343
8307
|
* @param {boolean} [params.internal] default false, when true will fetch pay trade history
|
|
8344
8308
|
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
8345
8309
|
*/
|
|
@@ -8478,7 +8442,7 @@ export default class binance extends Exchange {
|
|
|
8478
8442
|
* @method
|
|
8479
8443
|
* @name binance#fetchDepositAddress
|
|
8480
8444
|
* @description fetch the deposit address for a currency associated with this account
|
|
8481
|
-
* @see https://binance
|
|
8445
|
+
* @see https://developers.binance.com/docs/wallet/capital/deposite-address
|
|
8482
8446
|
* @param {string} code unified currency code
|
|
8483
8447
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8484
8448
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -8497,7 +8461,6 @@ export default class binance extends Exchange {
|
|
|
8497
8461
|
params = this.omit(params, 'network');
|
|
8498
8462
|
}
|
|
8499
8463
|
// has support for the 'network' parameter
|
|
8500
|
-
// https://binance-docs.github.io/apidocs/spot/en/#deposit-address-supporting-network-user_data
|
|
8501
8464
|
const response = await this.sapiGetCapitalDepositAddress(this.extend(request, params));
|
|
8502
8465
|
//
|
|
8503
8466
|
// {
|
|
@@ -8554,7 +8517,7 @@ export default class binance extends Exchange {
|
|
|
8554
8517
|
* @name binance#fetchTransactionFees
|
|
8555
8518
|
* @deprecated
|
|
8556
8519
|
* @description please use fetchDepositWithdrawFees instead
|
|
8557
|
-
* @see https://binance
|
|
8520
|
+
* @see https://developers.binance.com/docs/wallet/capital/all-coins-info
|
|
8558
8521
|
* @param {string[]|undefined} codes not used by binance fetchTransactionFees ()
|
|
8559
8522
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8560
8523
|
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -8668,7 +8631,7 @@ export default class binance extends Exchange {
|
|
|
8668
8631
|
* @method
|
|
8669
8632
|
* @name binance#fetchDepositWithdrawFees
|
|
8670
8633
|
* @description fetch deposit and withdraw fees
|
|
8671
|
-
* @see https://binance
|
|
8634
|
+
* @see https://developers.binance.com/docs/wallet/capital/all-coins-info
|
|
8672
8635
|
* @param {string[]|undefined} codes not used by binance fetchDepositWithdrawFees ()
|
|
8673
8636
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8674
8637
|
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -8792,7 +8755,7 @@ export default class binance extends Exchange {
|
|
|
8792
8755
|
* @method
|
|
8793
8756
|
* @name binance#withdraw
|
|
8794
8757
|
* @description make a withdrawal
|
|
8795
|
-
* @see https://binance
|
|
8758
|
+
* @see https://developers.binance.com/docs/wallet/capital/withdraw
|
|
8796
8759
|
* @param {string} code unified currency code
|
|
8797
8760
|
* @param {float} amount the amount to withdraw
|
|
8798
8761
|
* @param {string} address the address to withdraw to
|
|
@@ -8808,7 +8771,6 @@ export default class binance extends Exchange {
|
|
|
8808
8771
|
'coin': currency['id'],
|
|
8809
8772
|
'address': address,
|
|
8810
8773
|
'amount': this.currencyToPrecision(code, amount),
|
|
8811
|
-
// https://binance-docs.github.io/apidocs/spot/en/#withdraw-sapi
|
|
8812
8774
|
// issue sapiGetCapitalConfigGetall () to get networks for withdrawing USDT ERC20 vs USDT Omni
|
|
8813
8775
|
// 'network': 'ETH', // 'BTC', 'TRX', etc, optional
|
|
8814
8776
|
};
|
|
@@ -8860,11 +8822,11 @@ export default class binance extends Exchange {
|
|
|
8860
8822
|
* @method
|
|
8861
8823
|
* @name binance#fetchTradingFee
|
|
8862
8824
|
* @description fetch the trading fees for a market
|
|
8863
|
-
* @see https://binance
|
|
8864
|
-
* @see https://binance
|
|
8865
|
-
* @see https://binance
|
|
8866
|
-
* @see https://binance
|
|
8867
|
-
* @see https://binance
|
|
8825
|
+
* @see https://developers.binance.com/docs/wallet/asset/trade-fee
|
|
8826
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate
|
|
8827
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/User-Commission-Rate
|
|
8828
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-UM
|
|
8829
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-CM
|
|
8868
8830
|
* @param {string} symbol unified market symbol
|
|
8869
8831
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8870
8832
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch trading fees in a portfolio margin account
|
|
@@ -8933,9 +8895,9 @@ export default class binance extends Exchange {
|
|
|
8933
8895
|
* @method
|
|
8934
8896
|
* @name binance#fetchTradingFees
|
|
8935
8897
|
* @description fetch the trading fees for multiple markets
|
|
8936
|
-
* @see https://binance
|
|
8937
|
-
* @see https://binance
|
|
8938
|
-
* @see https://binance
|
|
8898
|
+
* @see https://developers.binance.com/docs/wallet/asset/trade-fee
|
|
8899
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
8900
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
8939
8901
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8940
8902
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
8941
8903
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
@@ -9113,7 +9075,7 @@ export default class binance extends Exchange {
|
|
|
9113
9075
|
* @name binance#futuresTransfer
|
|
9114
9076
|
* @ignore
|
|
9115
9077
|
* @description transfer between futures account
|
|
9116
|
-
* @see https://binance
|
|
9078
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/New-Future-Account-Transfer
|
|
9117
9079
|
* @param {string} code unified currency code
|
|
9118
9080
|
* @param {float} amount the amount to transfer
|
|
9119
9081
|
* @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
|
|
@@ -9144,8 +9106,8 @@ export default class binance extends Exchange {
|
|
|
9144
9106
|
* @method
|
|
9145
9107
|
* @name binance#fetchFundingRate
|
|
9146
9108
|
* @description fetch the current funding rate
|
|
9147
|
-
* @see https://binance
|
|
9148
|
-
* @see https://binance
|
|
9109
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price
|
|
9110
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-and-Mark-Price
|
|
9149
9111
|
* @param {string} symbol unified market symbol
|
|
9150
9112
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
9151
9113
|
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
@@ -9187,8 +9149,8 @@ export default class binance extends Exchange {
|
|
|
9187
9149
|
* @method
|
|
9188
9150
|
* @name binance#fetchFundingRateHistory
|
|
9189
9151
|
* @description fetches historical funding rate prices
|
|
9190
|
-
* @see https://binance
|
|
9191
|
-
* @see https://binance
|
|
9152
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History
|
|
9153
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Get-Funding-Rate-History-of-Perpetual-Futures
|
|
9192
9154
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
9193
9155
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
9194
9156
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
@@ -9265,8 +9227,8 @@ export default class binance extends Exchange {
|
|
|
9265
9227
|
* @method
|
|
9266
9228
|
* @name binance#fetchFundingRates
|
|
9267
9229
|
* @description fetch the funding rate for multiple markets
|
|
9268
|
-
* @see https://binance
|
|
9269
|
-
* @see https://binance
|
|
9230
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price
|
|
9231
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-and-Mark-Price
|
|
9270
9232
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
9271
9233
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
9272
9234
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -9886,10 +9848,10 @@ export default class binance extends Exchange {
|
|
|
9886
9848
|
* @method
|
|
9887
9849
|
* @name binance#fetchLeverageTiers
|
|
9888
9850
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
9889
|
-
* @see https://binance
|
|
9890
|
-
* @see https://binance
|
|
9891
|
-
* @see https://binance
|
|
9892
|
-
* @see https://binance
|
|
9851
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets
|
|
9852
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Notional-Bracket-for-Symbol
|
|
9853
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/UM-Notional-and-Leverage-Brackets
|
|
9854
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/CM-Notional-and-Leverage-Brackets
|
|
9893
9855
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
9894
9856
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
9895
9857
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the leverage tiers for a portfolio margin account
|
|
@@ -10008,8 +9970,8 @@ export default class binance extends Exchange {
|
|
|
10008
9970
|
/**
|
|
10009
9971
|
* @method
|
|
10010
9972
|
* @name binance#fetchPosition
|
|
10011
|
-
* @see https://binance-docs.github.io/apidocs/voptions/en/#option-position-information-user_data
|
|
10012
9973
|
* @description fetch data on an open position
|
|
9974
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
|
10013
9975
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
10014
9976
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10015
9977
|
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
@@ -10052,8 +10014,8 @@ export default class binance extends Exchange {
|
|
|
10052
10014
|
/**
|
|
10053
10015
|
* @method
|
|
10054
10016
|
* @name binance#fetchOptionPositions
|
|
10055
|
-
* @see https://binance-docs.github.io/apidocs/voptions/en/#option-position-information-user_data
|
|
10056
10017
|
* @description fetch data on open options positions
|
|
10018
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
|
10057
10019
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
10058
10020
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10059
10021
|
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
@@ -10169,11 +10131,11 @@ export default class binance extends Exchange {
|
|
|
10169
10131
|
* @method
|
|
10170
10132
|
* @name binance#fetchPositions
|
|
10171
10133
|
* @description fetch all open positions
|
|
10172
|
-
* @see https://binance
|
|
10173
|
-
* @see https://binance
|
|
10174
|
-
* @see https://binance
|
|
10175
|
-
* @see https://binance
|
|
10176
|
-
* @see https://binance
|
|
10134
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
10135
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
10136
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
|
10137
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
|
10138
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
|
10177
10139
|
* @param {string[]} [symbols] list of unified market symbols
|
|
10178
10140
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10179
10141
|
* @param {string} [method] method name to call, "positionRisk", "account" or "option", default is "positionRisk"
|
|
@@ -10201,10 +10163,10 @@ export default class binance extends Exchange {
|
|
|
10201
10163
|
* @name binance#fetchAccountPositions
|
|
10202
10164
|
* @ignore
|
|
10203
10165
|
* @description fetch account positions
|
|
10204
|
-
* @see https://binance
|
|
10205
|
-
* @see https://binance
|
|
10206
|
-
* @see https://binance
|
|
10207
|
-
* @see https://binance
|
|
10166
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
10167
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
10168
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
|
10169
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
|
10208
10170
|
* @param {string[]} [symbols] list of unified market symbols
|
|
10209
10171
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10210
10172
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch positions in a portfolio margin account
|
|
@@ -10258,10 +10220,10 @@ export default class binance extends Exchange {
|
|
|
10258
10220
|
* @name binance#fetchPositionsRisk
|
|
10259
10221
|
* @ignore
|
|
10260
10222
|
* @description fetch positions risk
|
|
10261
|
-
* @see https://binance
|
|
10262
|
-
* @see https://binance
|
|
10263
|
-
* @see https://binance
|
|
10264
|
-
* @see https://binance
|
|
10223
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
|
10224
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
|
10225
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-UM-Position-Information
|
|
10226
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-CM-Position-Information
|
|
10265
10227
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
10266
10228
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10267
10229
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch positions for a portfolio margin account
|
|
@@ -10415,10 +10377,10 @@ export default class binance extends Exchange {
|
|
|
10415
10377
|
* @method
|
|
10416
10378
|
* @name binance#fetchFundingHistory
|
|
10417
10379
|
* @description fetch the history of funding payments paid and received on this account
|
|
10418
|
-
* @see https://binance
|
|
10419
|
-
* @see https://binance
|
|
10420
|
-
* @see https://binance
|
|
10421
|
-
* @see https://binance
|
|
10380
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History
|
|
10381
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Income-History
|
|
10382
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History
|
|
10383
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History
|
|
10422
10384
|
* @param {string} symbol unified market symbol
|
|
10423
10385
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
10424
10386
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
@@ -10481,10 +10443,10 @@ export default class binance extends Exchange {
|
|
|
10481
10443
|
* @method
|
|
10482
10444
|
* @name binance#setLeverage
|
|
10483
10445
|
* @description set the level of leverage for a market
|
|
10484
|
-
* @see https://binance
|
|
10485
|
-
* @see https://binance
|
|
10486
|
-
* @see https://binance
|
|
10487
|
-
* @see https://binance
|
|
10446
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage
|
|
10447
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Initial-Leverage
|
|
10448
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-UM-Initial-Leverage
|
|
10449
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-CM-Initial-Leverage
|
|
10488
10450
|
* @param {float} leverage the rate of leverage
|
|
10489
10451
|
* @param {string} symbol unified market symbol
|
|
10490
10452
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -10534,8 +10496,8 @@ export default class binance extends Exchange {
|
|
|
10534
10496
|
* @method
|
|
10535
10497
|
* @name binance#setMarginMode
|
|
10536
10498
|
* @description set margin mode to 'cross' or 'isolated'
|
|
10537
|
-
* @see https://binance
|
|
10538
|
-
* @see https://binance
|
|
10499
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type
|
|
10500
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Margin-Type
|
|
10539
10501
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
10540
10502
|
* @param {string} symbol unified market symbol
|
|
10541
10503
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -10602,10 +10564,10 @@ export default class binance extends Exchange {
|
|
|
10602
10564
|
* @method
|
|
10603
10565
|
* @name binance#setPositionMode
|
|
10604
10566
|
* @description set hedged to true or false for a market
|
|
10605
|
-
* @see https://binance
|
|
10606
|
-
* @see https://binance
|
|
10607
|
-
* @see https://binance
|
|
10608
|
-
* @see https://binance
|
|
10567
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode
|
|
10568
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Position-Mode
|
|
10569
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Current-Position-Mode
|
|
10570
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Current-Position-Mode
|
|
10609
10571
|
* @param {bool} hedged set to true to use dualSidePosition
|
|
10610
10572
|
* @param {string} symbol not used by binance setPositionMode ()
|
|
10611
10573
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -10663,10 +10625,10 @@ export default class binance extends Exchange {
|
|
|
10663
10625
|
* @method
|
|
10664
10626
|
* @name binance#fetchLeverages
|
|
10665
10627
|
* @description fetch the set leverage for all markets
|
|
10666
|
-
* @see https://binance
|
|
10667
|
-
* @see https://binance
|
|
10668
|
-
* @see https://binance
|
|
10669
|
-
* @see https://binance
|
|
10628
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
10629
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
10630
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Account-Detail
|
|
10631
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Account-Detail
|
|
10670
10632
|
* @param {string[]} [symbols] a list of unified market symbols
|
|
10671
10633
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
10672
10634
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -10737,7 +10699,7 @@ export default class binance extends Exchange {
|
|
|
10737
10699
|
* @method
|
|
10738
10700
|
* @name binance#fetchSettlementHistory
|
|
10739
10701
|
* @description fetches historical settlement records
|
|
10740
|
-
* @see https://binance
|
|
10702
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Historical-Exercise-Records
|
|
10741
10703
|
* @param {string} symbol unified market symbol of the settlement history
|
|
10742
10704
|
* @param {int} [since] timestamp in ms
|
|
10743
10705
|
* @param {int} [limit] number of records, default 100, max 100
|
|
@@ -10783,7 +10745,7 @@ export default class binance extends Exchange {
|
|
|
10783
10745
|
* @method
|
|
10784
10746
|
* @name binance#fetchMySettlementHistory
|
|
10785
10747
|
* @description fetches historical settlement records of the user
|
|
10786
|
-
* @see https://binance
|
|
10748
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/User-Exercise-Record
|
|
10787
10749
|
* @param {string} symbol unified market symbol of the settlement history
|
|
10788
10750
|
* @param {int} [since] timestamp in ms
|
|
10789
10751
|
* @param {int} [limit] number of records
|
|
@@ -10932,11 +10894,11 @@ export default class binance extends Exchange {
|
|
|
10932
10894
|
* @method
|
|
10933
10895
|
* @name binance#fetchLedger
|
|
10934
10896
|
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
10935
|
-
* @see https://binance
|
|
10936
|
-
* @see https://binance
|
|
10937
|
-
* @see https://binance
|
|
10938
|
-
* @see https://binance
|
|
10939
|
-
* @see https://binance
|
|
10897
|
+
* @see https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow
|
|
10898
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History
|
|
10899
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Income-History
|
|
10900
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History
|
|
10901
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History
|
|
10940
10902
|
* @param {string} code unified currency code
|
|
10941
10903
|
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
10942
10904
|
* @param {int} [limit] max number of ledger entrys to return
|
|
@@ -11462,9 +11424,9 @@ export default class binance extends Exchange {
|
|
|
11462
11424
|
/**
|
|
11463
11425
|
* @method
|
|
11464
11426
|
* @name binance#reduceMargin
|
|
11465
|
-
* @see https://binance-docs.github.io/apidocs/delivery/en/#modify-isolated-position-margin-trade
|
|
11466
|
-
* @see https://binance-docs.github.io/apidocs/futures/en/#modify-isolated-position-margin-trade
|
|
11467
11427
|
* @description remove margin from a position
|
|
11428
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin
|
|
11429
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Isolated-Position-Margin
|
|
11468
11430
|
* @param {string} symbol unified market symbol
|
|
11469
11431
|
* @param {float} amount the amount of margin to remove
|
|
11470
11432
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -11476,9 +11438,9 @@ export default class binance extends Exchange {
|
|
|
11476
11438
|
/**
|
|
11477
11439
|
* @method
|
|
11478
11440
|
* @name binance#addMargin
|
|
11479
|
-
* @see https://binance-docs.github.io/apidocs/delivery/en/#modify-isolated-position-margin-trade
|
|
11480
|
-
* @see https://binance-docs.github.io/apidocs/futures/en/#modify-isolated-position-margin-trade
|
|
11481
11441
|
* @description add margin
|
|
11442
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin
|
|
11443
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Isolated-Position-Margin
|
|
11482
11444
|
* @param {string} symbol unified market symbol
|
|
11483
11445
|
* @param {float} amount amount of margin to add
|
|
11484
11446
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -11491,7 +11453,7 @@ export default class binance extends Exchange {
|
|
|
11491
11453
|
* @method
|
|
11492
11454
|
* @name binance#fetchCrossBorrowRate
|
|
11493
11455
|
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
11494
|
-
* @see https://binance
|
|
11456
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
|
11495
11457
|
* @param {string} code unified currency code
|
|
11496
11458
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
11497
11459
|
* @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
@@ -11521,7 +11483,7 @@ export default class binance extends Exchange {
|
|
|
11521
11483
|
* @method
|
|
11522
11484
|
* @name binance#fetchIsolatedBorrowRate
|
|
11523
11485
|
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
11524
|
-
* @see https://binance
|
|
11486
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data
|
|
11525
11487
|
* @param {string} symbol unified market symbol
|
|
11526
11488
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
11527
11489
|
*
|
|
@@ -11540,7 +11502,7 @@ export default class binance extends Exchange {
|
|
|
11540
11502
|
* @method
|
|
11541
11503
|
* @name binance#fetchIsolatedBorrowRates
|
|
11542
11504
|
* @description fetch the borrow interest rates of all currencies
|
|
11543
|
-
* @see https://binance
|
|
11505
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data
|
|
11544
11506
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
11545
11507
|
* @param {object} [params.symbol] unified market symbol
|
|
11546
11508
|
*
|
|
@@ -11585,7 +11547,7 @@ export default class binance extends Exchange {
|
|
|
11585
11547
|
* @method
|
|
11586
11548
|
* @name binance#fetchBorrowRateHistory
|
|
11587
11549
|
* @description retrieves a history of a currencies borrow interest rate at specific time slots
|
|
11588
|
-
* @see https://binance
|
|
11550
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
|
11589
11551
|
* @param {string} code unified currency code
|
|
11590
11552
|
* @param {int} [since] timestamp for the earliest borrow rate
|
|
11591
11553
|
* @param {int} [limit] the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} to retrieve
|
|
@@ -11696,7 +11658,7 @@ export default class binance extends Exchange {
|
|
|
11696
11658
|
* @method
|
|
11697
11659
|
* @name binance#createGiftCode
|
|
11698
11660
|
* @description create gift code
|
|
11699
|
-
* @see https://binance
|
|
11661
|
+
* @see https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card
|
|
11700
11662
|
* @param {string} code gift code
|
|
11701
11663
|
* @param {float} amount amount of currency for the gift
|
|
11702
11664
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -11734,7 +11696,7 @@ export default class binance extends Exchange {
|
|
|
11734
11696
|
* @method
|
|
11735
11697
|
* @name binance#redeemGiftCode
|
|
11736
11698
|
* @description redeem gift code
|
|
11737
|
-
* @see https://binance
|
|
11699
|
+
* @see https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card
|
|
11738
11700
|
* @param {string} giftcardCode
|
|
11739
11701
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
11740
11702
|
* @returns {object} response from the exchange
|
|
@@ -11761,7 +11723,7 @@ export default class binance extends Exchange {
|
|
|
11761
11723
|
* @method
|
|
11762
11724
|
* @name binance#verifyGiftCode
|
|
11763
11725
|
* @description verify gift code
|
|
11764
|
-
* @see https://binance
|
|
11726
|
+
* @see https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number
|
|
11765
11727
|
* @param {string} id reference number id
|
|
11766
11728
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
11767
11729
|
* @returns {object} response from the exchange
|
|
@@ -11785,8 +11747,8 @@ export default class binance extends Exchange {
|
|
|
11785
11747
|
* @method
|
|
11786
11748
|
* @name binance#fetchBorrowInterest
|
|
11787
11749
|
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
11788
|
-
* @see https://binance
|
|
11789
|
-
* @see https://binance
|
|
11750
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History
|
|
11751
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Margin-BorrowLoan-Interest-History
|
|
11790
11752
|
* @param {string} [code] unified currency code
|
|
11791
11753
|
* @param {string} [symbol] unified market symbol when fetch interest in isolated markets
|
|
11792
11754
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
@@ -11884,8 +11846,8 @@ export default class binance extends Exchange {
|
|
|
11884
11846
|
* @method
|
|
11885
11847
|
* @name binance#repayCrossMargin
|
|
11886
11848
|
* @description repay borrowed margin and interest
|
|
11887
|
-
* @see https://binance
|
|
11888
|
-
* @see https://binance
|
|
11849
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay
|
|
11850
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
11889
11851
|
* @param {string} code unified currency code of the currency to repay
|
|
11890
11852
|
* @param {float} amount the amount to repay
|
|
11891
11853
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -11922,7 +11884,7 @@ export default class binance extends Exchange {
|
|
|
11922
11884
|
* @method
|
|
11923
11885
|
* @name binance#repayIsolatedMargin
|
|
11924
11886
|
* @description repay borrowed margin and interest
|
|
11925
|
-
* @see https://binance
|
|
11887
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
11926
11888
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
11927
11889
|
* @param {string} code unified currency code of the currency to repay
|
|
11928
11890
|
* @param {float} amount the amount to repay
|
|
@@ -11953,8 +11915,8 @@ export default class binance extends Exchange {
|
|
|
11953
11915
|
* @method
|
|
11954
11916
|
* @name binance#borrowCrossMargin
|
|
11955
11917
|
* @description create a loan to borrow margin
|
|
11956
|
-
* @see https://binance
|
|
11957
|
-
* @see https://binance
|
|
11918
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
11919
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Borrow
|
|
11958
11920
|
* @param {string} code unified currency code of the currency to borrow
|
|
11959
11921
|
* @param {float} amount the amount to borrow
|
|
11960
11922
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -11991,7 +11953,7 @@ export default class binance extends Exchange {
|
|
|
11991
11953
|
* @method
|
|
11992
11954
|
* @name binance#borrowIsolatedMargin
|
|
11993
11955
|
* @description create a loan to borrow margin
|
|
11994
|
-
* @see https://binance
|
|
11956
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
11995
11957
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
11996
11958
|
* @param {string} code unified currency code of the currency to borrow
|
|
11997
11959
|
* @param {float} amount the amount to borrow
|
|
@@ -12039,8 +12001,8 @@ export default class binance extends Exchange {
|
|
|
12039
12001
|
* @method
|
|
12040
12002
|
* @name binance#fetchOpenInterestHistory
|
|
12041
12003
|
* @description Retrieves the open interest history of a currency
|
|
12042
|
-
* @see https://binance
|
|
12043
|
-
* @see https://binance
|
|
12004
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics
|
|
12005
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Open-Interest-Statistics
|
|
12044
12006
|
* @param {string} symbol Unified CCXT market symbol
|
|
12045
12007
|
* @param {string} timeframe "5m","15m","30m","1h","2h","4h","6h","12h", or "1d"
|
|
12046
12008
|
* @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
|
|
@@ -12112,9 +12074,9 @@ export default class binance extends Exchange {
|
|
|
12112
12074
|
* @method
|
|
12113
12075
|
* @name binance#fetchOpenInterest
|
|
12114
12076
|
* @description retrieves the open interest of a contract trading pair
|
|
12115
|
-
* @see https://binance
|
|
12116
|
-
* @see https://binance
|
|
12117
|
-
* @see https://binance
|
|
12077
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest
|
|
12078
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Open-Interest
|
|
12079
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Open-Interest
|
|
12118
12080
|
* @param {string} symbol unified CCXT market symbol
|
|
12119
12081
|
* @param {object} [params] exchange specific parameters
|
|
12120
12082
|
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
@@ -12206,12 +12168,11 @@ export default class binance extends Exchange {
|
|
|
12206
12168
|
* @method
|
|
12207
12169
|
* @name binance#fetchMyLiquidations
|
|
12208
12170
|
* @description retrieves the users liquidated positions
|
|
12209
|
-
* @see https://binance
|
|
12210
|
-
* @see https://binance
|
|
12211
|
-
* @see https://binance
|
|
12212
|
-
* @see https://binance
|
|
12213
|
-
* @see https://binance
|
|
12214
|
-
* @see https://binance-docs.github.io/apidocs/pm/en/#query-user-39-s-cm-force-orders-user_data
|
|
12171
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Get-Force-Liquidation-Record
|
|
12172
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders
|
|
12173
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Users-Force-Orders
|
|
12174
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-UM-Force-Orders
|
|
12175
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-CM-Force-Orders
|
|
12215
12176
|
* @param {string} [symbol] unified CCXT market symbol
|
|
12216
12177
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
12217
12178
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -12457,7 +12418,7 @@ export default class binance extends Exchange {
|
|
|
12457
12418
|
* @method
|
|
12458
12419
|
* @name binance#fetchGreeks
|
|
12459
12420
|
* @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
|
12460
|
-
* @see https://binance
|
|
12421
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Option-Mark-Price
|
|
12461
12422
|
* @param {string} symbol unified symbol of the market to fetch greeks for
|
|
12462
12423
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
12463
12424
|
* @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
|
|
@@ -12545,6 +12506,8 @@ export default class binance extends Exchange {
|
|
|
12545
12506
|
* @method
|
|
12546
12507
|
* @name binance#fetchPositionMode
|
|
12547
12508
|
* @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
|
|
12509
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode
|
|
12510
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Current-Position-Mode
|
|
12548
12511
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
12549
12512
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
12550
12513
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -12582,7 +12545,8 @@ export default class binance extends Exchange {
|
|
|
12582
12545
|
* @method
|
|
12583
12546
|
* @name binance#fetchMarginMode
|
|
12584
12547
|
* @description fetches margin modes ("isolated" or "cross") that the market for the symbol in in, with symbol=undefined all markets for a subType (linear/inverse) are returned
|
|
12585
|
-
* @see https://binance
|
|
12548
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
12549
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
12586
12550
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
12587
12551
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
12588
12552
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
@@ -12736,7 +12700,7 @@ export default class binance extends Exchange {
|
|
|
12736
12700
|
* @method
|
|
12737
12701
|
* @name binance#fetchOption
|
|
12738
12702
|
* @description fetches option data that is commonly found in an option chain
|
|
12739
|
-
* @see https://binance
|
|
12703
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics
|
|
12740
12704
|
* @param {string} symbol unified market symbol
|
|
12741
12705
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
12742
12706
|
* @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
@@ -12823,8 +12787,8 @@ export default class binance extends Exchange {
|
|
|
12823
12787
|
/**
|
|
12824
12788
|
* @method
|
|
12825
12789
|
* @description fetches the history of margin added or reduced from contract isolated positions
|
|
12826
|
-
* @see https://binance
|
|
12827
|
-
* @see https://binance
|
|
12790
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History
|
|
12791
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Get-Position-Margin-Change-History
|
|
12828
12792
|
* @param {string} symbol unified market symbol
|
|
12829
12793
|
* @param {string} [type] "add" or "reduce"
|
|
12830
12794
|
* @param {int} [since] timestamp in ms of the earliest change to fetch
|
|
@@ -12888,7 +12852,7 @@ export default class binance extends Exchange {
|
|
|
12888
12852
|
* @method
|
|
12889
12853
|
* @name binance#fetchConvertCurrencies
|
|
12890
12854
|
* @description fetches all available currencies that can be converted
|
|
12891
|
-
* @see https://binance
|
|
12855
|
+
* @see https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset
|
|
12892
12856
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
12893
12857
|
* @returns {object} an associative dictionary of currencies
|
|
12894
12858
|
*/
|
|
@@ -12943,7 +12907,7 @@ export default class binance extends Exchange {
|
|
|
12943
12907
|
* @method
|
|
12944
12908
|
* @name binance#fetchConvertQuote
|
|
12945
12909
|
* @description fetch a quote for converting from one currency to another
|
|
12946
|
-
* @see https://binance
|
|
12910
|
+
* @see https://developers.binance.com/docs/convert/trade/Send-quote-request
|
|
12947
12911
|
* @param {string} fromCode the currency that you want to sell and convert from
|
|
12948
12912
|
* @param {string} toCode the currency that you want to buy and convert into
|
|
12949
12913
|
* @param {float} amount how much you want to trade in units of the from currency
|
|
@@ -12980,8 +12944,7 @@ export default class binance extends Exchange {
|
|
|
12980
12944
|
* @method
|
|
12981
12945
|
* @name binance#createConvertTrade
|
|
12982
12946
|
* @description convert from one currency to another
|
|
12983
|
-
* @see https://binance
|
|
12984
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#accept-quote-trade
|
|
12947
|
+
* @see https://developers.binance.com/docs/convert/trade/Accept-Quote
|
|
12985
12948
|
* @param {string} id the id of the trade that you want to make
|
|
12986
12949
|
* @param {string} fromCode the currency that you want to sell and convert from
|
|
12987
12950
|
* @param {string} toCode the currency that you want to buy and convert into
|
|
@@ -13028,8 +12991,7 @@ export default class binance extends Exchange {
|
|
|
13028
12991
|
* @method
|
|
13029
12992
|
* @name binance#fetchConvertTrade
|
|
13030
12993
|
* @description fetch the data for a conversion trade
|
|
13031
|
-
* @see https://binance
|
|
13032
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#order-status-user_data
|
|
12994
|
+
* @see https://developers.binance.com/docs/convert/trade/Order-Status
|
|
13033
12995
|
* @param {string} id the id of the trade that you want to fetch
|
|
13034
12996
|
* @param {string} [code] the unified currency code of the conversion trade
|
|
13035
12997
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -13107,8 +13069,7 @@ export default class binance extends Exchange {
|
|
|
13107
13069
|
* @method
|
|
13108
13070
|
* @name binance#fetchConvertTradeHistory
|
|
13109
13071
|
* @description fetch the users history of conversion trades
|
|
13110
|
-
* @see https://binance
|
|
13111
|
-
* @see https://binance-docs.github.io/apidocs/spot/en/#get-convert-trade-history-user_data
|
|
13072
|
+
* @see https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History
|
|
13112
13073
|
* @param {string} [code] the unified currency code
|
|
13113
13074
|
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
13114
13075
|
* @param {int} [limit] the maximum number of conversion structures to retrieve
|