ccxt 4.4.82 → 4.4.86
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 +6 -9
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +6 -17
- package/dist/cjs/src/abstract/bittrade.js +9 -0
- package/dist/cjs/src/apex.js +2 -1
- package/dist/cjs/src/ascendex.js +189 -155
- package/dist/cjs/src/base/Exchange.js +15 -2
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/bitget.js +6 -7
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitrue.js +14 -35
- package/dist/cjs/src/bitso.js +33 -0
- package/dist/cjs/src/bitstamp.js +33 -0
- package/dist/cjs/src/bittrade.js +2049 -0
- package/dist/cjs/src/blofin.js +154 -13
- package/dist/cjs/src/btcbox.js +25 -5
- package/dist/cjs/src/bybit.js +16 -40
- package/dist/cjs/src/cex.js +2 -4
- package/dist/cjs/src/coinbase.js +58 -46
- package/dist/cjs/src/coinbaseexchange.js +142 -32
- package/dist/cjs/src/coincatch.js +14 -67
- package/dist/cjs/src/coinex.js +29 -32
- package/dist/cjs/src/coinlist.js +16 -15
- package/dist/cjs/src/coinmetro.js +22 -11
- package/dist/cjs/src/coinone.js +8 -10
- package/dist/cjs/src/coinsph.js +126 -1
- package/dist/cjs/src/cryptocom.js +111 -1
- package/dist/cjs/src/cryptomus.js +43 -89
- package/dist/cjs/src/delta.js +76 -36
- package/dist/cjs/src/deribit.js +4 -5
- package/dist/cjs/src/derive.js +46 -10
- package/dist/cjs/src/ellipx.js +175 -79
- package/dist/cjs/src/gate.js +1 -1
- package/dist/cjs/src/gemini.js +3 -5
- package/dist/cjs/src/hitbtc.js +56 -69
- package/dist/cjs/src/hollaex.js +107 -49
- package/dist/cjs/src/htx.js +20 -44
- package/dist/cjs/src/hyperliquid.js +6 -6
- package/dist/cjs/src/kraken.js +29 -24
- package/dist/cjs/src/kucoinfutures.js +6 -0
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/mexc.js +2 -2
- package/dist/cjs/src/ndax.js +25 -24
- package/dist/cjs/src/okcoin.js +12 -31
- package/dist/cjs/src/okx.js +9 -0
- package/dist/cjs/src/onetrading.js +9 -6
- package/dist/cjs/src/oxfun.js +42 -114
- package/dist/cjs/src/paradex.js +124 -4
- package/dist/cjs/src/pro/binance.js +32 -33
- package/dist/cjs/src/pro/bithumb.js +5 -3
- package/dist/cjs/src/pro/bittrade.js +605 -0
- package/dist/cjs/src/pro/kraken.js +289 -79
- package/dist/cjs/src/pro/luno.js +6 -5
- package/dist/cjs/src/pro/mexc.js +304 -7
- package/dist/cjs/src/pro/poloniex.js +6 -2
- package/examples/js/cli.js +127 -13
- package/js/ccxt.d.ts +8 -20
- package/js/ccxt.js +6 -14
- package/js/src/abstract/blofin.d.ts +8 -0
- package/js/src/abstract/btcbox.d.ts +1 -0
- package/js/src/abstract/myokx.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +2 -0
- package/js/src/apex.js +2 -1
- package/js/src/ascendex.d.ts +2 -0
- package/js/src/ascendex.js +189 -155
- package/js/src/base/Exchange.d.ts +15 -1
- package/js/src/base/Exchange.js +15 -2
- package/js/src/base/types.d.ts +3 -0
- package/js/src/bequant.js +1 -1
- package/js/src/bitget.js +6 -7
- package/js/src/bitmart.js +1 -1
- package/js/src/bitrue.js +14 -35
- package/js/src/bitso.js +33 -0
- package/js/src/bitstamp.js +33 -0
- package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
- package/js/src/{huobijp.js → bittrade.js} +35 -35
- package/js/src/blofin.d.ts +42 -2
- package/js/src/blofin.js +154 -13
- package/js/src/btcbox.js +25 -5
- package/js/src/bybit.js +16 -40
- package/js/src/cex.js +2 -4
- package/js/src/coinbase.js +58 -46
- package/js/src/coinbaseexchange.js +142 -32
- package/js/src/coincatch.js +14 -67
- package/js/src/coinex.js +28 -29
- package/js/src/coinlist.js +16 -15
- package/js/src/coinmetro.js +22 -11
- package/js/src/coinone.js +8 -10
- package/js/src/coinsph.d.ts +10 -1
- package/js/src/coinsph.js +126 -1
- package/js/src/cryptocom.d.ts +10 -1
- package/js/src/cryptocom.js +111 -1
- package/js/src/cryptomus.js +43 -89
- package/js/src/delta.js +76 -36
- package/js/src/deribit.js +4 -5
- package/js/src/derive.js +46 -10
- package/js/src/ellipx.d.ts +2 -3
- package/js/src/ellipx.js +175 -80
- package/js/src/gate.js +1 -1
- package/js/src/gemini.js +3 -5
- package/js/src/hitbtc.js +56 -69
- package/js/src/hollaex.js +107 -49
- package/js/src/htx.js +20 -44
- package/js/src/hyperliquid.js +6 -6
- package/js/src/kraken.js +29 -24
- package/js/src/kucoinfutures.d.ts +1 -0
- package/js/src/kucoinfutures.js +6 -0
- package/js/src/lbank.js +1 -1
- package/js/src/mexc.js +2 -2
- package/js/src/ndax.js +25 -24
- package/js/src/okcoin.js +12 -31
- package/js/src/okx.js +9 -0
- package/js/src/onetrading.js +9 -6
- package/js/src/oxfun.js +42 -114
- package/js/src/paradex.d.ts +12 -1
- package/js/src/paradex.js +124 -4
- package/js/src/pro/binance.d.ts +26 -26
- package/js/src/pro/binance.js +32 -33
- package/js/src/pro/bithumb.js +5 -3
- package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
- package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
- package/js/src/pro/kraken.d.ts +7 -6
- package/js/src/pro/kraken.js +290 -80
- package/js/src/pro/luno.js +6 -5
- package/js/src/pro/mexc.d.ts +58 -0
- package/js/src/pro/mexc.js +304 -7
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +6 -2
- package/package.json +1 -1
- package/js/src/abstract/bl3p.d.ts +0 -22
- package/js/src/abstract/huobijp.js +0 -11
- package/js/src/abstract/idex.d.ts +0 -29
- package/js/src/abstract/idex.js +0 -11
- package/js/src/abstract/kuna.d.ts +0 -185
- package/js/src/abstract/kuna.js +0 -11
- package/js/src/bl3p.d.ts +0 -116
- package/js/src/bl3p.js +0 -552
- package/js/src/idex.d.ts +0 -312
- package/js/src/idex.js +0 -1961
- package/js/src/kuna.d.ts +0 -335
- package/js/src/kuna.js +0 -2006
- package/js/src/pro/idex.d.ts +0 -81
- package/js/src/pro/idex.js +0 -720
- /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
- /package/js/src/abstract/{bl3p.js → bittrade.js} +0 -0
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
|
-
import Exchange from './abstract/
|
|
8
|
+
import Exchange from './abstract/bittrade.js';
|
|
9
9
|
import { AuthenticationError, ExchangeError, PermissionDenied, ExchangeNotAvailable, OnMaintenance, InvalidOrder, OrderNotFound, InsufficientFunds, BadSymbol, BadRequest, RequestTimeout, NetworkError, ArgumentsRequired, NotSupported } from './base/errors.js';
|
|
10
10
|
import { Precise } from './base/Precise.js';
|
|
11
11
|
import { TRUNCATE, TICK_SIZE } from './base/functions/number.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
/**
|
|
15
|
-
* @class
|
|
15
|
+
* @class bittrade
|
|
16
16
|
* @augments Exchange
|
|
17
17
|
*/
|
|
18
|
-
export default class
|
|
18
|
+
export default class bittrade extends Exchange {
|
|
19
19
|
describe() {
|
|
20
20
|
return this.deepExtend(super.describe(), {
|
|
21
|
-
'id': '
|
|
22
|
-
'name': '
|
|
21
|
+
'id': 'bittrade',
|
|
22
|
+
'name': 'BitTrade',
|
|
23
23
|
'countries': ['JP'],
|
|
24
24
|
'rateLimit': 100,
|
|
25
25
|
'userAgent': this.userAgents['chrome39'],
|
|
@@ -95,10 +95,10 @@ export default class huobijp extends Exchange {
|
|
|
95
95
|
'v2Public': 'https://{hostname}',
|
|
96
96
|
'v2Private': 'https://{hostname}',
|
|
97
97
|
},
|
|
98
|
-
'www': 'https://www.
|
|
99
|
-
'referral': 'https://www.
|
|
100
|
-
'doc': 'https://api-doc.
|
|
101
|
-
'fees': 'https://www.
|
|
98
|
+
'www': 'https://www.bittrade.co.jp',
|
|
99
|
+
'referral': 'https://www.bittrade.co.jp/register/?invite_code=znnq3',
|
|
100
|
+
'doc': 'https://api-doc.bittrade.co.jp',
|
|
101
|
+
'fees': 'https://www.bittrade.co.jp/ja-jp/support/fee',
|
|
102
102
|
},
|
|
103
103
|
'api': {
|
|
104
104
|
'v2Public': {
|
|
@@ -413,7 +413,7 @@ export default class huobijp extends Exchange {
|
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* @method
|
|
416
|
-
* @name
|
|
416
|
+
* @name bittrade#fetchTime
|
|
417
417
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
418
418
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
419
419
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
@@ -491,7 +491,7 @@ export default class huobijp extends Exchange {
|
|
|
491
491
|
}
|
|
492
492
|
/**
|
|
493
493
|
* @method
|
|
494
|
-
* @name
|
|
494
|
+
* @name bittrade#fetchMarkets
|
|
495
495
|
* @description retrieves data on all markets for huobijp
|
|
496
496
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
497
497
|
* @returns {object[]} an array of objects representing market data
|
|
@@ -693,7 +693,7 @@ export default class huobijp extends Exchange {
|
|
|
693
693
|
}
|
|
694
694
|
/**
|
|
695
695
|
* @method
|
|
696
|
-
* @name
|
|
696
|
+
* @name bittrade#fetchOrderBook
|
|
697
697
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
698
698
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
699
699
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -743,7 +743,7 @@ export default class huobijp extends Exchange {
|
|
|
743
743
|
}
|
|
744
744
|
/**
|
|
745
745
|
* @method
|
|
746
|
-
* @name
|
|
746
|
+
* @name bittrade#fetchTicker
|
|
747
747
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
748
748
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
749
749
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -784,7 +784,7 @@ export default class huobijp extends Exchange {
|
|
|
784
784
|
}
|
|
785
785
|
/**
|
|
786
786
|
* @method
|
|
787
|
-
* @name
|
|
787
|
+
* @name bittrade#fetchTickers
|
|
788
788
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
789
789
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
790
790
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -892,7 +892,7 @@ export default class huobijp extends Exchange {
|
|
|
892
892
|
}
|
|
893
893
|
/**
|
|
894
894
|
* @method
|
|
895
|
-
* @name
|
|
895
|
+
* @name bittrade#fetchOrderTrades
|
|
896
896
|
* @description fetch all the trades made from a single order
|
|
897
897
|
* @param {string} id order id
|
|
898
898
|
* @param {string} symbol unified market symbol
|
|
@@ -911,7 +911,7 @@ export default class huobijp extends Exchange {
|
|
|
911
911
|
}
|
|
912
912
|
/**
|
|
913
913
|
* @method
|
|
914
|
-
* @name
|
|
914
|
+
* @name bittrade#fetchMyTrades
|
|
915
915
|
* @description fetch all trades made by the user
|
|
916
916
|
* @param {string} symbol unified market symbol
|
|
917
917
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -939,7 +939,7 @@ export default class huobijp extends Exchange {
|
|
|
939
939
|
}
|
|
940
940
|
/**
|
|
941
941
|
* @method
|
|
942
|
-
* @name
|
|
942
|
+
* @name bittrade#fetchTrades
|
|
943
943
|
* @description get the list of most recent trades for a particular symbol
|
|
944
944
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
945
945
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
@@ -1017,7 +1017,7 @@ export default class huobijp extends Exchange {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
/**
|
|
1019
1019
|
* @method
|
|
1020
|
-
* @name
|
|
1020
|
+
* @name bittrade#fetchOHLCV
|
|
1021
1021
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1022
1022
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1023
1023
|
* @param {string} timeframe the length of time each candle represents
|
|
@@ -1054,7 +1054,7 @@ export default class huobijp extends Exchange {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* @method
|
|
1057
|
-
* @name
|
|
1057
|
+
* @name bittrade#fetchAccounts
|
|
1058
1058
|
* @description fetch all the accounts associated with a profile
|
|
1059
1059
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1060
1060
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
@@ -1066,7 +1066,7 @@ export default class huobijp extends Exchange {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
/**
|
|
1068
1068
|
* @method
|
|
1069
|
-
* @name
|
|
1069
|
+
* @name bittrade#fetchCurrencies
|
|
1070
1070
|
* @description fetches all available currencies on an exchange
|
|
1071
1071
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1072
1072
|
* @returns {object} an associative dictionary of currencies
|
|
@@ -1189,7 +1189,7 @@ export default class huobijp extends Exchange {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
/**
|
|
1191
1191
|
* @method
|
|
1192
|
-
* @name
|
|
1192
|
+
* @name bittrade#fetchBalance
|
|
1193
1193
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1194
1194
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1195
1195
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
@@ -1237,7 +1237,7 @@ export default class huobijp extends Exchange {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
/**
|
|
1239
1239
|
* @method
|
|
1240
|
-
* @name
|
|
1240
|
+
* @name bittrade#fetchOrder
|
|
1241
1241
|
* @description fetches information on an order made by the user
|
|
1242
1242
|
* @param {string} id order id
|
|
1243
1243
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
@@ -1255,7 +1255,7 @@ export default class huobijp extends Exchange {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
/**
|
|
1257
1257
|
* @method
|
|
1258
|
-
* @name
|
|
1258
|
+
* @name bittrade#fetchOrders
|
|
1259
1259
|
* @description fetches information on multiple orders made by the user
|
|
1260
1260
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1261
1261
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -1268,7 +1268,7 @@ export default class huobijp extends Exchange {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
/**
|
|
1270
1270
|
* @method
|
|
1271
|
-
* @name
|
|
1271
|
+
* @name bittrade#fetchOpenOrders
|
|
1272
1272
|
* @description fetch all unfilled currently open orders
|
|
1273
1273
|
* @param {string} symbol unified market symbol
|
|
1274
1274
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
@@ -1288,7 +1288,7 @@ export default class huobijp extends Exchange {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
/**
|
|
1290
1290
|
* @method
|
|
1291
|
-
* @name
|
|
1291
|
+
* @name bittrade#fetchClosedOrders
|
|
1292
1292
|
* @description fetches information on multiple closed orders made by the user
|
|
1293
1293
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1294
1294
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -1446,7 +1446,7 @@ export default class huobijp extends Exchange {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
/**
|
|
1448
1448
|
* @method
|
|
1449
|
-
* @name
|
|
1449
|
+
* @name bittrade#createMarketBuyOrderWithCost
|
|
1450
1450
|
* @description create a market buy order by providing the symbol and cost
|
|
1451
1451
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1452
1452
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
@@ -1464,7 +1464,7 @@ export default class huobijp extends Exchange {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
/**
|
|
1466
1466
|
* @method
|
|
1467
|
-
* @name
|
|
1467
|
+
* @name bittrade#createOrder
|
|
1468
1468
|
* @description create a trade order
|
|
1469
1469
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1470
1470
|
* @param {string} type 'market' or 'limit'
|
|
@@ -1555,10 +1555,10 @@ export default class huobijp extends Exchange {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
/**
|
|
1557
1557
|
* @method
|
|
1558
|
-
* @name
|
|
1558
|
+
* @name bittrade#cancelOrder
|
|
1559
1559
|
* @description cancels an open order
|
|
1560
1560
|
* @param {string} id order id
|
|
1561
|
-
* @param {string} symbol not used by
|
|
1561
|
+
* @param {string} symbol not used by bittrade cancelOrder ()
|
|
1562
1562
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1563
1563
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1564
1564
|
*/
|
|
@@ -1577,10 +1577,10 @@ export default class huobijp extends Exchange {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
/**
|
|
1579
1579
|
* @method
|
|
1580
|
-
* @name
|
|
1580
|
+
* @name bittrade#cancelOrders
|
|
1581
1581
|
* @description cancel multiple orders
|
|
1582
1582
|
* @param {string[]} ids order ids
|
|
1583
|
-
* @param {string} symbol not used by
|
|
1583
|
+
* @param {string} symbol not used by bittrade cancelOrders ()
|
|
1584
1584
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1585
1585
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1586
1586
|
*/
|
|
@@ -1690,7 +1690,7 @@ export default class huobijp extends Exchange {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
/**
|
|
1692
1692
|
* @method
|
|
1693
|
-
* @name
|
|
1693
|
+
* @name bittrade#cancelAllOrders
|
|
1694
1694
|
* @description cancel all open orders
|
|
1695
1695
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1696
1696
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1758,7 +1758,7 @@ export default class huobijp extends Exchange {
|
|
|
1758
1758
|
}
|
|
1759
1759
|
/**
|
|
1760
1760
|
* @method
|
|
1761
|
-
* @name
|
|
1761
|
+
* @name bittrade#fetchDeposits
|
|
1762
1762
|
* @description fetch all deposits made to an account
|
|
1763
1763
|
* @param {string} code unified currency code
|
|
1764
1764
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
@@ -1791,7 +1791,7 @@ export default class huobijp extends Exchange {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
/**
|
|
1793
1793
|
* @method
|
|
1794
|
-
* @name
|
|
1794
|
+
* @name bittrade#fetchWithdrawals
|
|
1795
1795
|
* @description fetch all withdrawals made from an account
|
|
1796
1796
|
* @param {string} code unified currency code
|
|
1797
1797
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
@@ -1927,7 +1927,7 @@ export default class huobijp extends Exchange {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
/**
|
|
1929
1929
|
* @method
|
|
1930
|
-
* @name
|
|
1930
|
+
* @name bittrade#withdraw
|
|
1931
1931
|
* @description make a withdrawal
|
|
1932
1932
|
* @param {string} code unified currency code
|
|
1933
1933
|
* @param {float} amount the amount to withdraw
|
package/js/src/blofin.d.ts
CHANGED
|
@@ -143,12 +143,14 @@ export default class blofin extends Exchange {
|
|
|
143
143
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
144
144
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
145
145
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
146
|
+
* @param {string} [params.triggerPrice] the trigger price for a trigger order
|
|
146
147
|
* @param {bool} [params.reduceOnly] a mark to reduce the position size for margin, swap and future orders
|
|
147
148
|
* @param {bool} [params.postOnly] true to place a post only order
|
|
148
149
|
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
149
150
|
* @param {float} [params.stopLossPrice] stop loss trigger price (will use privatePostTradeOrderTpsl)
|
|
150
151
|
* @param {float} [params.takeProfitPrice] take profit trigger price (will use privatePostTradeOrderTpsl)
|
|
151
152
|
* @param {string} [params.positionSide] *stopLossPrice/takeProfitPrice orders only* 'long' or 'short' or 'net' default is 'net'
|
|
153
|
+
* @param {boolean} [params.hedged] if true, the positionSide will be set to long/short instead of net, default is false
|
|
152
154
|
* @param {string} [params.clientOrderId] a unique id for the order
|
|
153
155
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
154
156
|
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
@@ -169,7 +171,8 @@ export default class blofin extends Exchange {
|
|
|
169
171
|
* @param {string} id order id
|
|
170
172
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
171
173
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
172
|
-
* @param {boolean} [params.trigger] True if cancelling a trigger/conditional
|
|
174
|
+
* @param {boolean} [params.trigger] True if cancelling a trigger/conditional
|
|
175
|
+
* @param {boolean} [params.tpsl] True if cancelling a tpsl order
|
|
173
176
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
174
177
|
*/
|
|
175
178
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
@@ -189,6 +192,7 @@ export default class blofin extends Exchange {
|
|
|
189
192
|
* @description Fetch orders that are still open
|
|
190
193
|
* @see https://blofin.com/docs#get-active-orders
|
|
191
194
|
* @see https://blofin.com/docs#get-active-tpsl-orders
|
|
195
|
+
* @see https://docs.blofin.com/index.html#get-active-algo-orders
|
|
192
196
|
* @param {string} symbol unified market symbol
|
|
193
197
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
194
198
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -341,6 +345,7 @@ export default class blofin extends Exchange {
|
|
|
341
345
|
* @param {string} symbol unified market symbol
|
|
342
346
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
343
347
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
348
|
+
* @param {string} [params.positionSide] 'long' or 'short' - required for hedged mode in isolated margin
|
|
344
349
|
* @returns {object} response from the exchange
|
|
345
350
|
*/
|
|
346
351
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
@@ -387,7 +392,42 @@ export default class blofin extends Exchange {
|
|
|
387
392
|
* @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
388
393
|
*/
|
|
389
394
|
fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
|
|
390
|
-
parseMarginMode(marginMode: Dict, market?:
|
|
395
|
+
parseMarginMode(marginMode: Dict, market?: Market): MarginMode;
|
|
396
|
+
/**
|
|
397
|
+
* @method
|
|
398
|
+
* @name blofin#setMarginMode
|
|
399
|
+
* @description set margin mode to 'cross' or 'isolated'
|
|
400
|
+
* @see https://docs.blofin.com/index.html#set-margin-mode
|
|
401
|
+
* @param {string} marginMode 'cross' or 'isolated'
|
|
402
|
+
* @param {string} [symbol] unified market symbol (not used in blofin setMarginMode)
|
|
403
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
404
|
+
* @returns {object} response from the exchange
|
|
405
|
+
*/
|
|
406
|
+
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<MarginMode>;
|
|
407
|
+
/**
|
|
408
|
+
* @method
|
|
409
|
+
* @name blofin#fetchPositionMode
|
|
410
|
+
* @description fetchs the position mode, hedged or one way
|
|
411
|
+
* @see https://docs.blofin.com/index.html#get-position-mode
|
|
412
|
+
* @param {string} [symbol] unified symbol of the market to fetch the position mode for (not used in blofin fetchPositionMode)
|
|
413
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
414
|
+
* @returns {object} an object detailing whether the market is in hedged or one-way mode
|
|
415
|
+
*/
|
|
416
|
+
fetchPositionMode(symbol?: Str, params?: {}): Promise<{
|
|
417
|
+
info: import("./base/types.js").Dictionary<any>;
|
|
418
|
+
hedged: boolean;
|
|
419
|
+
}>;
|
|
420
|
+
/**
|
|
421
|
+
* @method
|
|
422
|
+
* @name blofin#setPositionMode
|
|
423
|
+
* @description set hedged to true or false for a market
|
|
424
|
+
* @see https://docs.blofin.com/index.html#set-position-mode
|
|
425
|
+
* @param {bool} hedged set to true to use hedged mode, false for one-way mode
|
|
426
|
+
* @param {string} [symbol] not used by blofin setPositionMode ()
|
|
427
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
428
|
+
* @returns {object} response from the exchange
|
|
429
|
+
*/
|
|
430
|
+
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
|
|
391
431
|
handleErrors(httpCode: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): any;
|
|
392
432
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
393
433
|
url: string;
|