ccxt 4.4.28 → 4.4.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/alpaca.js +59 -7
- package/dist/cjs/src/base/Exchange.js +3 -0
- package/dist/cjs/src/binance.js +9 -0
- package/dist/cjs/src/bitbns.js +12 -12
- package/dist/cjs/src/bitfinex.js +9 -9
- package/dist/cjs/src/bitget.js +99 -6
- package/dist/cjs/src/bitmart.js +53 -53
- package/dist/cjs/src/bitopro.js +21 -21
- package/dist/cjs/src/bitrue.js +28 -28
- package/dist/cjs/src/bitvavo.js +4 -0
- package/dist/cjs/src/bybit.js +51 -646
- package/dist/cjs/src/coincatch.js +24 -4
- package/dist/cjs/src/deribit.js +7 -3
- package/dist/cjs/src/hyperliquid.js +108 -4
- package/dist/cjs/src/lbank.js +7 -1
- package/dist/cjs/src/pro/bitvavo.js +2 -1
- package/dist/cjs/src/pro/blofin.js +2 -1
- package/dist/cjs/src/pro/mexc.js +198 -30
- package/dist/cjs/src/vertex.js +51 -6
- package/examples/README.md +0 -2
- package/examples/js/cli.js +7 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/alpaca.d.ts +1 -0
- package/js/src/abstract/binance.d.ts +9 -0
- package/js/src/abstract/binancecoinm.d.ts +9 -0
- package/js/src/abstract/binanceus.d.ts +9 -0
- package/js/src/abstract/binanceusdm.d.ts +9 -0
- package/js/src/abstract/bybit.d.ts +0 -13
- package/js/src/alpaca.d.ts +2 -0
- package/js/src/alpaca.js +59 -7
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +3 -0
- package/js/src/binance.js +9 -0
- package/js/src/bitbns.js +12 -12
- package/js/src/bitfinex.js +9 -9
- package/js/src/bitfinex2.d.ts +1 -1
- package/js/src/bitget.d.ts +2 -1
- package/js/src/bitget.js +99 -6
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +53 -53
- package/js/src/bitopro.js +21 -21
- package/js/src/bitrue.js +28 -28
- package/js/src/bitvavo.js +4 -0
- package/js/src/bybit.d.ts +0 -8
- package/js/src/bybit.js +51 -646
- package/js/src/coincatch.d.ts +1 -1
- package/js/src/coincatch.js +24 -4
- package/js/src/deribit.js +7 -3
- package/js/src/hyperliquid.d.ts +3 -1
- package/js/src/hyperliquid.js +108 -4
- package/js/src/lbank.js +7 -1
- package/js/src/pro/bitvavo.js +2 -1
- package/js/src/pro/blofin.js +2 -1
- package/js/src/pro/mexc.js +198 -30
- package/js/src/vertex.d.ts +4 -2
- package/js/src/vertex.js +51 -6
- package/js/src/whitebit.d.ts +1 -1
- package/package.json +1 -1
package/examples/README.md
CHANGED
|
@@ -106,8 +106,6 @@ python path/to/example.py # substitute for actual filename here
|
|
|
106
106
|
|
|
107
107
|
[CC Power Analytics Part 1: How to get the data of the exchanges](https://www.linkedin.com/pulse/part-1-cc-power-analytics-how-get-data-exchanges-steve-rein/) – The first part of a series of articles on cryptocurrency analytics.
|
|
108
108
|
|
|
109
|
-
[tv2bt: Kraken Example, without leverage](https://backtest-rookies.com/2020/04/18/tv2bt-kraken-example-without-leverage/) – an article on using CCXT for backtesting.
|
|
110
|
-
|
|
111
109
|
[Looking for arbitrage opportunies with ccxt](https://steemit.com/steemdev/@codewithcheese/looking-for-arbitrage-opportunies-with-javascript-library-cctx-supporting-70-exchanges) – An article @steemit on getting arbitrage started with ccxt for crypto-arbitrage.
|
|
112
110
|
|
|
113
111
|
[Use CCXT to calculate Cryptocurrency trade indicators](https://itnext.io/use-ccxt-to-calculate-cryptocurrency-trade-indicators-102a3ac1428e) – an article @ Medium on building basic indicators using CCXT.
|
package/examples/js/cli.js
CHANGED
|
@@ -48,6 +48,13 @@ let foundDescription = undefined;
|
|
|
48
48
|
for (let i = 0; i < process.argv.length; i++) {
|
|
49
49
|
if (process.argv[i] === '--name') {
|
|
50
50
|
foundDescription = process.argv[i + 1];
|
|
51
|
+
// search that string in `params` and remove it
|
|
52
|
+
for (let j = 0; j < params.length; j++) {
|
|
53
|
+
if (params[j] === foundDescription) {
|
|
54
|
+
params.splice(j, 1);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
51
58
|
break;
|
|
52
59
|
}
|
|
53
60
|
}
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.4.
|
|
7
|
+
declare const version = "4.4.29";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.4.
|
|
41
|
+
const version = '4.4.30';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -26,6 +26,7 @@ interface Exchange {
|
|
|
26
26
|
traderPrivatePostV2WatchlistsWatchlistId(params?: {}): Promise<implicitReturnType>;
|
|
27
27
|
traderPrivatePostV2WatchlistsByName(params?: {}): Promise<implicitReturnType>;
|
|
28
28
|
traderPrivatePostV2WalletsTransfers(params?: {}): Promise<implicitReturnType>;
|
|
29
|
+
traderPrivatePutV2OrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
29
30
|
traderPrivatePutV2WatchlistsWatchlistId(params?: {}): Promise<implicitReturnType>;
|
|
30
31
|
traderPrivatePutV2WatchlistsByName(params?: {}): Promise<implicitReturnType>;
|
|
31
32
|
traderPrivatePatchV2OrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
@@ -143,6 +143,12 @@ interface Exchange {
|
|
|
143
143
|
sapiGetEthStakingWbethHistoryWrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
144
144
|
sapiGetEthStakingWbethHistoryUnwrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
145
145
|
sapiGetEthStakingEthHistoryWbethRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
146
|
+
sapiGetSolStakingSolHistoryStakingHistory(params?: {}): Promise<implicitReturnType>;
|
|
147
|
+
sapiGetSolStakingSolHistoryRedemptionHistory(params?: {}): Promise<implicitReturnType>;
|
|
148
|
+
sapiGetSolStakingSolHistoryBnsolRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
149
|
+
sapiGetSolStakingSolHistoryRateHistory(params?: {}): Promise<implicitReturnType>;
|
|
150
|
+
sapiGetSolStakingAccount(params?: {}): Promise<implicitReturnType>;
|
|
151
|
+
sapiGetSolStakingSolQuota(params?: {}): Promise<implicitReturnType>;
|
|
146
152
|
sapiGetMiningPubAlgoList(params?: {}): Promise<implicitReturnType>;
|
|
147
153
|
sapiGetMiningPubCoinList(params?: {}): Promise<implicitReturnType>;
|
|
148
154
|
sapiGetMiningWorkerDetail(params?: {}): Promise<implicitReturnType>;
|
|
@@ -330,6 +336,8 @@ interface Exchange {
|
|
|
330
336
|
sapiPostEthStakingEthStake(params?: {}): Promise<implicitReturnType>;
|
|
331
337
|
sapiPostEthStakingEthRedeem(params?: {}): Promise<implicitReturnType>;
|
|
332
338
|
sapiPostEthStakingWbethWrap(params?: {}): Promise<implicitReturnType>;
|
|
339
|
+
sapiPostSolStakingSolStake(params?: {}): Promise<implicitReturnType>;
|
|
340
|
+
sapiPostSolStakingSolRedeem(params?: {}): Promise<implicitReturnType>;
|
|
333
341
|
sapiPostMiningHashTransferConfig(params?: {}): Promise<implicitReturnType>;
|
|
334
342
|
sapiPostMiningHashTransferConfigCancel(params?: {}): Promise<implicitReturnType>;
|
|
335
343
|
sapiPostPortfolioRepay(params?: {}): Promise<implicitReturnType>;
|
|
@@ -362,6 +370,7 @@ interface Exchange {
|
|
|
362
370
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
363
371
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
364
372
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
373
|
+
sapiPostSimpleEarnLockedSetRedeemOption(params?: {}): Promise<implicitReturnType>;
|
|
365
374
|
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
366
375
|
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
367
376
|
sapiPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
@@ -143,6 +143,12 @@ interface binance {
|
|
|
143
143
|
sapiGetEthStakingWbethHistoryWrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
144
144
|
sapiGetEthStakingWbethHistoryUnwrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
145
145
|
sapiGetEthStakingEthHistoryWbethRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
146
|
+
sapiGetSolStakingSolHistoryStakingHistory(params?: {}): Promise<implicitReturnType>;
|
|
147
|
+
sapiGetSolStakingSolHistoryRedemptionHistory(params?: {}): Promise<implicitReturnType>;
|
|
148
|
+
sapiGetSolStakingSolHistoryBnsolRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
149
|
+
sapiGetSolStakingSolHistoryRateHistory(params?: {}): Promise<implicitReturnType>;
|
|
150
|
+
sapiGetSolStakingAccount(params?: {}): Promise<implicitReturnType>;
|
|
151
|
+
sapiGetSolStakingSolQuota(params?: {}): Promise<implicitReturnType>;
|
|
146
152
|
sapiGetMiningPubAlgoList(params?: {}): Promise<implicitReturnType>;
|
|
147
153
|
sapiGetMiningPubCoinList(params?: {}): Promise<implicitReturnType>;
|
|
148
154
|
sapiGetMiningWorkerDetail(params?: {}): Promise<implicitReturnType>;
|
|
@@ -330,6 +336,8 @@ interface binance {
|
|
|
330
336
|
sapiPostEthStakingEthStake(params?: {}): Promise<implicitReturnType>;
|
|
331
337
|
sapiPostEthStakingEthRedeem(params?: {}): Promise<implicitReturnType>;
|
|
332
338
|
sapiPostEthStakingWbethWrap(params?: {}): Promise<implicitReturnType>;
|
|
339
|
+
sapiPostSolStakingSolStake(params?: {}): Promise<implicitReturnType>;
|
|
340
|
+
sapiPostSolStakingSolRedeem(params?: {}): Promise<implicitReturnType>;
|
|
333
341
|
sapiPostMiningHashTransferConfig(params?: {}): Promise<implicitReturnType>;
|
|
334
342
|
sapiPostMiningHashTransferConfigCancel(params?: {}): Promise<implicitReturnType>;
|
|
335
343
|
sapiPostPortfolioRepay(params?: {}): Promise<implicitReturnType>;
|
|
@@ -362,6 +370,7 @@ interface binance {
|
|
|
362
370
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
363
371
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
364
372
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
373
|
+
sapiPostSimpleEarnLockedSetRedeemOption(params?: {}): Promise<implicitReturnType>;
|
|
365
374
|
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
366
375
|
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
367
376
|
sapiPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
@@ -143,6 +143,12 @@ interface binance {
|
|
|
143
143
|
sapiGetEthStakingWbethHistoryWrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
144
144
|
sapiGetEthStakingWbethHistoryUnwrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
145
145
|
sapiGetEthStakingEthHistoryWbethRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
146
|
+
sapiGetSolStakingSolHistoryStakingHistory(params?: {}): Promise<implicitReturnType>;
|
|
147
|
+
sapiGetSolStakingSolHistoryRedemptionHistory(params?: {}): Promise<implicitReturnType>;
|
|
148
|
+
sapiGetSolStakingSolHistoryBnsolRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
149
|
+
sapiGetSolStakingSolHistoryRateHistory(params?: {}): Promise<implicitReturnType>;
|
|
150
|
+
sapiGetSolStakingAccount(params?: {}): Promise<implicitReturnType>;
|
|
151
|
+
sapiGetSolStakingSolQuota(params?: {}): Promise<implicitReturnType>;
|
|
146
152
|
sapiGetMiningPubAlgoList(params?: {}): Promise<implicitReturnType>;
|
|
147
153
|
sapiGetMiningPubCoinList(params?: {}): Promise<implicitReturnType>;
|
|
148
154
|
sapiGetMiningWorkerDetail(params?: {}): Promise<implicitReturnType>;
|
|
@@ -361,6 +367,8 @@ interface binance {
|
|
|
361
367
|
sapiPostEthStakingEthStake(params?: {}): Promise<implicitReturnType>;
|
|
362
368
|
sapiPostEthStakingEthRedeem(params?: {}): Promise<implicitReturnType>;
|
|
363
369
|
sapiPostEthStakingWbethWrap(params?: {}): Promise<implicitReturnType>;
|
|
370
|
+
sapiPostSolStakingSolStake(params?: {}): Promise<implicitReturnType>;
|
|
371
|
+
sapiPostSolStakingSolRedeem(params?: {}): Promise<implicitReturnType>;
|
|
364
372
|
sapiPostMiningHashTransferConfig(params?: {}): Promise<implicitReturnType>;
|
|
365
373
|
sapiPostMiningHashTransferConfigCancel(params?: {}): Promise<implicitReturnType>;
|
|
366
374
|
sapiPostPortfolioRepay(params?: {}): Promise<implicitReturnType>;
|
|
@@ -393,6 +401,7 @@ interface binance {
|
|
|
393
401
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
394
402
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
395
403
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
404
|
+
sapiPostSimpleEarnLockedSetRedeemOption(params?: {}): Promise<implicitReturnType>;
|
|
396
405
|
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
397
406
|
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
398
407
|
sapiPostOtcQuotes(params?: {}): Promise<implicitReturnType>;
|
|
@@ -143,6 +143,12 @@ interface binance {
|
|
|
143
143
|
sapiGetEthStakingWbethHistoryWrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
144
144
|
sapiGetEthStakingWbethHistoryUnwrapHistory(params?: {}): Promise<implicitReturnType>;
|
|
145
145
|
sapiGetEthStakingEthHistoryWbethRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
146
|
+
sapiGetSolStakingSolHistoryStakingHistory(params?: {}): Promise<implicitReturnType>;
|
|
147
|
+
sapiGetSolStakingSolHistoryRedemptionHistory(params?: {}): Promise<implicitReturnType>;
|
|
148
|
+
sapiGetSolStakingSolHistoryBnsolRewardsHistory(params?: {}): Promise<implicitReturnType>;
|
|
149
|
+
sapiGetSolStakingSolHistoryRateHistory(params?: {}): Promise<implicitReturnType>;
|
|
150
|
+
sapiGetSolStakingAccount(params?: {}): Promise<implicitReturnType>;
|
|
151
|
+
sapiGetSolStakingSolQuota(params?: {}): Promise<implicitReturnType>;
|
|
146
152
|
sapiGetMiningPubAlgoList(params?: {}): Promise<implicitReturnType>;
|
|
147
153
|
sapiGetMiningPubCoinList(params?: {}): Promise<implicitReturnType>;
|
|
148
154
|
sapiGetMiningWorkerDetail(params?: {}): Promise<implicitReturnType>;
|
|
@@ -330,6 +336,8 @@ interface binance {
|
|
|
330
336
|
sapiPostEthStakingEthStake(params?: {}): Promise<implicitReturnType>;
|
|
331
337
|
sapiPostEthStakingEthRedeem(params?: {}): Promise<implicitReturnType>;
|
|
332
338
|
sapiPostEthStakingWbethWrap(params?: {}): Promise<implicitReturnType>;
|
|
339
|
+
sapiPostSolStakingSolStake(params?: {}): Promise<implicitReturnType>;
|
|
340
|
+
sapiPostSolStakingSolRedeem(params?: {}): Promise<implicitReturnType>;
|
|
333
341
|
sapiPostMiningHashTransferConfig(params?: {}): Promise<implicitReturnType>;
|
|
334
342
|
sapiPostMiningHashTransferConfigCancel(params?: {}): Promise<implicitReturnType>;
|
|
335
343
|
sapiPostPortfolioRepay(params?: {}): Promise<implicitReturnType>;
|
|
@@ -362,6 +370,7 @@ interface binance {
|
|
|
362
370
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
363
371
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
364
372
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
373
|
+
sapiPostSimpleEarnLockedSetRedeemOption(params?: {}): Promise<implicitReturnType>;
|
|
365
374
|
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
366
375
|
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
367
376
|
sapiPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
@@ -180,19 +180,6 @@ interface Exchange {
|
|
|
180
180
|
privateGetV5BrokerEarningsInfo(params?: {}): Promise<implicitReturnType>;
|
|
181
181
|
privateGetV5BrokerAccountInfo(params?: {}): Promise<implicitReturnType>;
|
|
182
182
|
privateGetV5BrokerAssetQuerySubMemberDepositRecord(params?: {}): Promise<implicitReturnType>;
|
|
183
|
-
privatePostOptionUsdcOpenapiPrivateV1PlaceOrder(params?: {}): Promise<implicitReturnType>;
|
|
184
|
-
privatePostOptionUsdcOpenapiPrivateV1ReplaceOrder(params?: {}): Promise<implicitReturnType>;
|
|
185
|
-
privatePostOptionUsdcOpenapiPrivateV1CancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
186
|
-
privatePostOptionUsdcOpenapiPrivateV1CancelAll(params?: {}): Promise<implicitReturnType>;
|
|
187
|
-
privatePostOptionUsdcOpenapiPrivateV1QueryActiveOrders(params?: {}): Promise<implicitReturnType>;
|
|
188
|
-
privatePostOptionUsdcOpenapiPrivateV1QueryOrderHistory(params?: {}): Promise<implicitReturnType>;
|
|
189
|
-
privatePostOptionUsdcOpenapiPrivateV1ExecutionList(params?: {}): Promise<implicitReturnType>;
|
|
190
|
-
privatePostOptionUsdcOpenapiPrivateV1QueryPosition(params?: {}): Promise<implicitReturnType>;
|
|
191
|
-
privatePostPerpetualUsdcOpenapiPrivateV1PlaceOrder(params?: {}): Promise<implicitReturnType>;
|
|
192
|
-
privatePostPerpetualUsdcOpenapiPrivateV1ReplaceOrder(params?: {}): Promise<implicitReturnType>;
|
|
193
|
-
privatePostPerpetualUsdcOpenapiPrivateV1CancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
194
|
-
privatePostPerpetualUsdcOpenapiPrivateV1CancelAll(params?: {}): Promise<implicitReturnType>;
|
|
195
|
-
privatePostPerpetualUsdcOpenapiPrivateV1PositionLeverageSave(params?: {}): Promise<implicitReturnType>;
|
|
196
183
|
privatePostSpotV3PrivateOrder(params?: {}): Promise<implicitReturnType>;
|
|
197
184
|
privatePostSpotV3PrivateCancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
198
185
|
privatePostSpotV3PrivateCancelOrders(params?: {}): Promise<implicitReturnType>;
|
package/js/src/alpaca.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export default class alpaca extends Exchange {
|
|
|
15
15
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
16
16
|
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
17
17
|
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
18
|
+
generateClientOrderId(params: any): string;
|
|
18
19
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
19
20
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
20
21
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
@@ -22,6 +23,7 @@ export default class alpaca extends Exchange {
|
|
|
22
23
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
23
24
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
24
25
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
26
|
+
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
25
27
|
parseOrder(order: Dict, market?: Market): Order;
|
|
26
28
|
parseOrderStatus(status: Str): string;
|
|
27
29
|
parseTimeInForce(timeInForce: Str): string;
|
package/js/src/alpaca.js
CHANGED
|
@@ -54,6 +54,7 @@ export default class alpaca extends Exchange {
|
|
|
54
54
|
'closeAllPositions': false,
|
|
55
55
|
'closePosition': false,
|
|
56
56
|
'createOrder': true,
|
|
57
|
+
'editOrder': true,
|
|
57
58
|
'fetchBalance': false,
|
|
58
59
|
'fetchBidsAsks': false,
|
|
59
60
|
'fetchClosedOrders': true,
|
|
@@ -134,6 +135,7 @@ export default class alpaca extends Exchange {
|
|
|
134
135
|
'v2/wallets/transfers',
|
|
135
136
|
],
|
|
136
137
|
'put': [
|
|
138
|
+
'v2/orders/{order_id}',
|
|
137
139
|
'v2/watchlists/{watchlist_id}',
|
|
138
140
|
'v2/watchlists:by_name',
|
|
139
141
|
],
|
|
@@ -819,6 +821,15 @@ export default class alpaca extends Exchange {
|
|
|
819
821
|
}
|
|
820
822
|
return this.filterByArray(results, 'symbol', symbols);
|
|
821
823
|
}
|
|
824
|
+
generateClientOrderId(params) {
|
|
825
|
+
const clientOrderIdprefix = this.safeString(this.options, 'clientOrderId');
|
|
826
|
+
const uuid = this.uuid();
|
|
827
|
+
const parts = uuid.split('-');
|
|
828
|
+
const random_id = parts.join('');
|
|
829
|
+
const defaultClientId = this.implodeParams(clientOrderIdprefix, { 'id': random_id });
|
|
830
|
+
const clientOrderId = this.safeString(params, 'clientOrderId', defaultClientId);
|
|
831
|
+
return clientOrderId;
|
|
832
|
+
}
|
|
822
833
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
823
834
|
/**
|
|
824
835
|
* @method
|
|
@@ -861,13 +872,7 @@ export default class alpaca extends Exchange {
|
|
|
861
872
|
const defaultTIF = this.safeString(this.options, 'defaultTimeInForce');
|
|
862
873
|
request['time_in_force'] = this.safeString(params, 'timeInForce', defaultTIF);
|
|
863
874
|
params = this.omit(params, ['timeInForce', 'triggerPrice']);
|
|
864
|
-
|
|
865
|
-
const uuid = this.uuid();
|
|
866
|
-
const parts = uuid.split('-');
|
|
867
|
-
const random_id = parts.join('');
|
|
868
|
-
const defaultClientId = this.implodeParams(clientOrderIdprefix, { 'id': random_id });
|
|
869
|
-
const clientOrderId = this.safeString(params, 'clientOrderId', defaultClientId);
|
|
870
|
-
request['client_order_id'] = clientOrderId;
|
|
875
|
+
request['client_order_id'] = this.generateClientOrderId(params);
|
|
871
876
|
params = this.omit(params, ['clientOrderId']);
|
|
872
877
|
const order = await this.traderPrivatePostV2Orders(this.extend(request, params));
|
|
873
878
|
//
|
|
@@ -1086,6 +1091,53 @@ export default class alpaca extends Exchange {
|
|
|
1086
1091
|
};
|
|
1087
1092
|
return await this.fetchOrders(symbol, since, limit, this.extend(request, params));
|
|
1088
1093
|
}
|
|
1094
|
+
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1095
|
+
/**
|
|
1096
|
+
* @method
|
|
1097
|
+
* @name alpaca#editOrder
|
|
1098
|
+
* @description edit a trade order
|
|
1099
|
+
* @see https://docs.alpaca.markets/reference/patchorderbyorderid-1
|
|
1100
|
+
* @param {string} id order id
|
|
1101
|
+
* @param {string} [symbol] unified symbol of the market to create an order in
|
|
1102
|
+
* @param {string} [type] 'market', 'limit' or 'stop_limit'
|
|
1103
|
+
* @param {string} [side] 'buy' or 'sell'
|
|
1104
|
+
* @param {float} [amount] how much of the currency you want to trade in units of the base currency
|
|
1105
|
+
* @param {float} [price] the price for the order, in units of the quote currency, ignored in market orders
|
|
1106
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1107
|
+
* @param {string} [params.triggerPrice] the price to trigger a stop order
|
|
1108
|
+
* @param {string} [params.timeInForce] for crypto trading either 'gtc' or 'ioc' can be used
|
|
1109
|
+
* @param {string} [params.clientOrderId] a unique identifier for the order, automatically generated if not sent
|
|
1110
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1111
|
+
*/
|
|
1112
|
+
await this.loadMarkets();
|
|
1113
|
+
const request = {
|
|
1114
|
+
'order_id': id,
|
|
1115
|
+
};
|
|
1116
|
+
let market = undefined;
|
|
1117
|
+
if (symbol !== undefined) {
|
|
1118
|
+
market = this.market(symbol);
|
|
1119
|
+
}
|
|
1120
|
+
if (amount !== undefined) {
|
|
1121
|
+
request['qty'] = this.amountToPrecision(symbol, amount);
|
|
1122
|
+
}
|
|
1123
|
+
const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stop_price']);
|
|
1124
|
+
if (triggerPrice !== undefined) {
|
|
1125
|
+
request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1126
|
+
params = this.omit(params, 'triggerPrice');
|
|
1127
|
+
}
|
|
1128
|
+
if (price !== undefined) {
|
|
1129
|
+
request['limit_price'] = this.priceToPrecision(symbol, price);
|
|
1130
|
+
}
|
|
1131
|
+
let timeInForce = undefined;
|
|
1132
|
+
[timeInForce, params] = this.handleOptionAndParams2(params, 'editOrder', 'timeInForce', 'defaultTimeInForce');
|
|
1133
|
+
if (timeInForce !== undefined) {
|
|
1134
|
+
request['time_in_force'] = timeInForce;
|
|
1135
|
+
}
|
|
1136
|
+
request['client_order_id'] = this.generateClientOrderId(params);
|
|
1137
|
+
params = this.omit(params, ['clientOrderId']);
|
|
1138
|
+
const response = await this.traderPrivatePatchV2OrdersOrderId(this.extend(request, params));
|
|
1139
|
+
return this.parseOrder(response, market);
|
|
1140
|
+
}
|
|
1089
1141
|
parseOrder(order, market = undefined) {
|
|
1090
1142
|
//
|
|
1091
1143
|
// {
|
|
@@ -754,6 +754,7 @@ export default class Exchange {
|
|
|
754
754
|
unWatchOrderBookForSymbols(symbols: string[], params?: {}): Promise<any>;
|
|
755
755
|
fetchDepositAddresses(codes?: Strings, params?: {}): Promise<DepositAddress[]>;
|
|
756
756
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
757
|
+
fetchOrderBookWs(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
757
758
|
fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
|
|
758
759
|
fetchMarginModes(symbols?: Strings, params?: {}): Promise<MarginModes>;
|
|
759
760
|
fetchRestOrderBookSafe(symbol: any, limit?: any, params?: {}): Promise<OrderBook>;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -2052,6 +2052,9 @@ export default class Exchange {
|
|
|
2052
2052
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
2053
2053
|
throw new NotSupported(this.id + ' fetchOrderBook() is not supported yet');
|
|
2054
2054
|
}
|
|
2055
|
+
async fetchOrderBookWs(symbol, limit = undefined, params = {}) {
|
|
2056
|
+
throw new NotSupported(this.id + ' fetchOrderBookWs() is not supported yet');
|
|
2057
|
+
}
|
|
2055
2058
|
async fetchMarginMode(symbol, params = {}) {
|
|
2056
2059
|
if (this.has['fetchMarginModes']) {
|
|
2057
2060
|
const marginModes = await this.fetchMarginModes([symbol], params);
|
package/js/src/binance.js
CHANGED
|
@@ -396,6 +396,12 @@ export default class binance extends Exchange {
|
|
|
396
396
|
'eth-staking/wbeth/history/wrapHistory': 15,
|
|
397
397
|
'eth-staking/wbeth/history/unwrapHistory': 15,
|
|
398
398
|
'eth-staking/eth/history/wbethRewardsHistory': 15,
|
|
399
|
+
'sol-staking/sol/history/stakingHistory': 15,
|
|
400
|
+
'sol-staking/sol/history/redemptionHistory': 15,
|
|
401
|
+
'sol-staking/sol/history/bnsolRewardsHistory': 15,
|
|
402
|
+
'sol-staking/sol/history/rateHistory': 15,
|
|
403
|
+
'sol-staking/account': 15,
|
|
404
|
+
'sol-staking/sol/quota': 15,
|
|
399
405
|
// mining endpoints
|
|
400
406
|
'mining/pub/algoList': 0.1,
|
|
401
407
|
'mining/pub/coinList': 0.1,
|
|
@@ -607,6 +613,8 @@ export default class binance extends Exchange {
|
|
|
607
613
|
'eth-staking/eth/stake': 15,
|
|
608
614
|
'eth-staking/eth/redeem': 15,
|
|
609
615
|
'eth-staking/wbeth/wrap': 15,
|
|
616
|
+
'sol-staking/sol/stake': 15,
|
|
617
|
+
'sol-staking/sol/redeem': 15,
|
|
610
618
|
// mining endpoints
|
|
611
619
|
'mining/hash-transfer/config': 0.5,
|
|
612
620
|
'mining/hash-transfer/config/cancel': 0.5,
|
|
@@ -641,6 +649,7 @@ export default class binance extends Exchange {
|
|
|
641
649
|
'simple-earn/locked/redeem': 0.1,
|
|
642
650
|
'simple-earn/flexible/setAutoSubscribe': 15,
|
|
643
651
|
'simple-earn/locked/setAutoSubscribe': 15,
|
|
652
|
+
'simple-earn/locked/setRedeemOption': 5,
|
|
644
653
|
// convert
|
|
645
654
|
'dci/product/subscribe': 0.1,
|
|
646
655
|
'dci/product/auto_compound/edit': 0.1,
|
package/js/src/bitbns.js
CHANGED
|
@@ -226,11 +226,11 @@ export default class bitbns extends Exchange {
|
|
|
226
226
|
const quoteId = this.safeString(market, 'quote');
|
|
227
227
|
const base = this.safeCurrencyCode(baseId);
|
|
228
228
|
const quote = this.safeCurrencyCode(quoteId);
|
|
229
|
-
const marketPrecision = this.
|
|
230
|
-
const marketLimits = this.
|
|
231
|
-
const amountLimits = this.
|
|
232
|
-
const priceLimits = this.
|
|
233
|
-
const costLimits = this.
|
|
229
|
+
const marketPrecision = this.safeDict(market, 'precision', {});
|
|
230
|
+
const marketLimits = this.safeDict(market, 'limits', {});
|
|
231
|
+
const amountLimits = this.safeDict(marketLimits, 'amount', {});
|
|
232
|
+
const priceLimits = this.safeDict(marketLimits, 'price', {});
|
|
233
|
+
const costLimits = this.safeDict(marketLimits, 'cost', {});
|
|
234
234
|
const usdt = (quoteId === 'USDT');
|
|
235
235
|
// INR markets don't need a _INR prefix
|
|
236
236
|
const uppercaseId = usdt ? (baseId + '_' + quoteId) : baseId;
|
|
@@ -436,7 +436,7 @@ export default class bitbns extends Exchange {
|
|
|
436
436
|
'timestamp': timestamp,
|
|
437
437
|
'datetime': this.iso8601(timestamp),
|
|
438
438
|
};
|
|
439
|
-
const data = this.
|
|
439
|
+
const data = this.safeDict(response, 'data', {});
|
|
440
440
|
const keys = Object.keys(data);
|
|
441
441
|
for (let i = 0; i < keys.length; i++) {
|
|
442
442
|
const key = keys[i];
|
|
@@ -662,7 +662,7 @@ export default class bitbns extends Exchange {
|
|
|
662
662
|
}
|
|
663
663
|
await this.loadMarkets();
|
|
664
664
|
const market = this.market(symbol);
|
|
665
|
-
const isTrigger = this.
|
|
665
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
666
666
|
params = this.omit(params, ['trigger', 'stop']);
|
|
667
667
|
const request = {
|
|
668
668
|
'entry_id': id,
|
|
@@ -696,7 +696,7 @@ export default class bitbns extends Exchange {
|
|
|
696
696
|
'symbol': market['id'],
|
|
697
697
|
'entry_id': id,
|
|
698
698
|
};
|
|
699
|
-
const trigger = this.
|
|
699
|
+
const trigger = this.safeBool2(params, 'trigger', 'stop');
|
|
700
700
|
if (trigger) {
|
|
701
701
|
throw new BadRequest(this.id + ' fetchOrder cannot fetch stop orders');
|
|
702
702
|
}
|
|
@@ -726,7 +726,7 @@ export default class bitbns extends Exchange {
|
|
|
726
726
|
// "code":200
|
|
727
727
|
// }
|
|
728
728
|
//
|
|
729
|
-
const data = this.
|
|
729
|
+
const data = this.safeList(response, 'data', []);
|
|
730
730
|
const first = this.safeDict(data, 0);
|
|
731
731
|
return this.parseOrder(first, market);
|
|
732
732
|
}
|
|
@@ -749,7 +749,7 @@ export default class bitbns extends Exchange {
|
|
|
749
749
|
}
|
|
750
750
|
await this.loadMarkets();
|
|
751
751
|
const market = this.market(symbol);
|
|
752
|
-
const isTrigger = this.
|
|
752
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
753
753
|
params = this.omit(params, ['trigger', 'stop']);
|
|
754
754
|
const quoteSide = (market['quoteId'] === 'USDT') ? 'usdtListOpen' : 'listOpen';
|
|
755
755
|
const request = {
|
|
@@ -1051,7 +1051,7 @@ export default class bitbns extends Exchange {
|
|
|
1051
1051
|
'6': 'ok', // Completed
|
|
1052
1052
|
},
|
|
1053
1053
|
};
|
|
1054
|
-
const statuses = this.
|
|
1054
|
+
const statuses = this.safeDict(statusesByType, type, {});
|
|
1055
1055
|
return this.safeString(statuses, status, status);
|
|
1056
1056
|
}
|
|
1057
1057
|
parseTransaction(transaction, currency = undefined) {
|
|
@@ -1147,7 +1147,7 @@ export default class bitbns extends Exchange {
|
|
|
1147
1147
|
// "error":null
|
|
1148
1148
|
// }
|
|
1149
1149
|
//
|
|
1150
|
-
const data = this.
|
|
1150
|
+
const data = this.safeDict(response, 'data', {});
|
|
1151
1151
|
const address = this.safeString(data, 'token');
|
|
1152
1152
|
const tag = this.safeString(data, 'tag');
|
|
1153
1153
|
this.checkAddress(address);
|
package/js/src/bitfinex.js
CHANGED
|
@@ -423,7 +423,7 @@ export default class bitfinex extends Exchange {
|
|
|
423
423
|
// }
|
|
424
424
|
// }
|
|
425
425
|
//
|
|
426
|
-
const fees = this.
|
|
426
|
+
const fees = this.safeDict(response, 'withdraw', {});
|
|
427
427
|
const ids = Object.keys(fees);
|
|
428
428
|
for (let i = 0; i < ids.length; i++) {
|
|
429
429
|
const id = ids[i];
|
|
@@ -530,7 +530,7 @@ export default class bitfinex extends Exchange {
|
|
|
530
530
|
// }
|
|
531
531
|
//
|
|
532
532
|
const result = {};
|
|
533
|
-
const fiat = this.
|
|
533
|
+
const fiat = this.safeDict(this.options, 'fiat', {});
|
|
534
534
|
const makerFee = this.safeNumber(response, 'maker_fee');
|
|
535
535
|
const takerFee = this.safeNumber(response, 'taker_fee');
|
|
536
536
|
const makerFee2Fiat = this.safeNumber(response, 'maker_fee_2fiat');
|
|
@@ -629,7 +629,7 @@ export default class bitfinex extends Exchange {
|
|
|
629
629
|
'settleId': undefined,
|
|
630
630
|
'type': type,
|
|
631
631
|
'spot': (type === 'spot'),
|
|
632
|
-
'margin': this.
|
|
632
|
+
'margin': this.safeBool(market, 'margin'),
|
|
633
633
|
'swap': (type === 'swap'),
|
|
634
634
|
'future': false,
|
|
635
635
|
'option': false,
|
|
@@ -699,7 +699,7 @@ export default class bitfinex extends Exchange {
|
|
|
699
699
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
700
700
|
*/
|
|
701
701
|
await this.loadMarkets();
|
|
702
|
-
const accountsByType = this.
|
|
702
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
703
703
|
const requestedType = this.safeString(params, 'type', 'exchange');
|
|
704
704
|
const accountType = this.safeString(accountsByType, requestedType, requestedType);
|
|
705
705
|
if (accountType === undefined) {
|
|
@@ -763,7 +763,7 @@ export default class bitfinex extends Exchange {
|
|
|
763
763
|
// transferring between derivatives wallet and regular wallet is not documented in their API
|
|
764
764
|
// however we support it in CCXT (from just looking at web inspector)
|
|
765
765
|
await this.loadMarkets();
|
|
766
|
-
const accountsByType = this.
|
|
766
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
767
767
|
const fromId = this.safeString(accountsByType, fromAccount, fromAccount);
|
|
768
768
|
const toId = this.safeString(accountsByType, toAccount, toAccount);
|
|
769
769
|
const currency = this.currency(code);
|
|
@@ -1239,8 +1239,8 @@ export default class bitfinex extends Exchange {
|
|
|
1239
1239
|
// }
|
|
1240
1240
|
//
|
|
1241
1241
|
const side = this.safeString(order, 'side');
|
|
1242
|
-
const open = this.
|
|
1243
|
-
const canceled = this.
|
|
1242
|
+
const open = this.safeBool(order, 'is_live');
|
|
1243
|
+
const canceled = this.safeBool(order, 'is_cancelled');
|
|
1244
1244
|
let status = undefined;
|
|
1245
1245
|
if (open) {
|
|
1246
1246
|
status = 'open';
|
|
@@ -1648,7 +1648,7 @@ export default class bitfinex extends Exchange {
|
|
|
1648
1648
|
// }
|
|
1649
1649
|
// ]
|
|
1650
1650
|
//
|
|
1651
|
-
const response = this.
|
|
1651
|
+
const response = this.safeDict(responses, 0, {});
|
|
1652
1652
|
const id = this.safeInteger(response, 'withdrawal_id');
|
|
1653
1653
|
const message = this.safeString(response, 'message');
|
|
1654
1654
|
const errorMessage = this.findBroadlyMatchedKey(this.exceptions['broad'], message);
|
|
@@ -1743,7 +1743,7 @@ export default class bitfinex extends Exchange {
|
|
|
1743
1743
|
else {
|
|
1744
1744
|
// json response with error, i.e:
|
|
1745
1745
|
// [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}]
|
|
1746
|
-
const responseObject = this.
|
|
1746
|
+
const responseObject = this.safeDict(response, 0, {});
|
|
1747
1747
|
const status = this.safeString(responseObject, 'status', '');
|
|
1748
1748
|
if (status === 'error') {
|
|
1749
1749
|
throwError = true;
|
package/js/src/bitfinex2.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export default class bitfinex2 extends Exchange {
|
|
|
55
55
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
56
56
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
57
57
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
58
|
-
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<
|
|
58
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
59
59
|
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
60
60
|
parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
|
|
61
61
|
nonce(): number;
|
package/js/src/bitget.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/bitget.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, LeverageTier, int, LedgerEntry, FundingRate, DepositAddress, LongShortRatio, BorrowInterest } from './base/types.js';
|
|
2
|
+
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, LeverageTier, int, LedgerEntry, FundingRate, DepositAddress, LongShortRatio, BorrowInterest, FundingRates } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class bitget
|
|
5
5
|
* @augments Exchange
|
|
@@ -67,6 +67,7 @@ export default class bitget extends Exchange {
|
|
|
67
67
|
parsePosition(position: Dict, market?: Market): Position;
|
|
68
68
|
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
69
69
|
fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
|
|
70
|
+
fetchFundingRates(symbols?: Strings, params?: {}): Promise<FundingRates>;
|
|
70
71
|
parseFundingRate(contract: any, market?: Market): FundingRate;
|
|
71
72
|
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingHistory[]>;
|
|
72
73
|
parseFundingHistory(contract: any, market?: Market): {
|