ccxt 4.3.42 → 4.3.44
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 +9 -7
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +4 -1
- package/dist/cjs/src/binance.js +169 -44
- package/dist/cjs/src/btcmarkets.js +31 -2
- package/dist/cjs/src/coinex.js +106 -107
- package/dist/cjs/src/lykke.js +10 -2
- package/dist/cjs/src/ndax.js +5 -1
- package/dist/cjs/src/phemex.js +5 -4
- package/dist/cjs/src/poloniexfutures.js +2 -2
- package/dist/cjs/src/pro/bitget.js +28 -21
- package/dist/cjs/src/pro/bitmex.js +9 -0
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/mexc.js +1 -1
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/tradeogre.js +11 -5
- package/dist/cjs/src/wavesexchange.js +2 -2
- package/dist/cjs/src/wazirx.js +38 -15
- package/dist/cjs/src/xt.js +134 -95
- package/dist/cjs/src/zonda.js +9 -1
- package/js/ccxt.d.ts +6 -3
- package/js/ccxt.js +4 -2
- package/js/src/abstract/coinex.d.ts +2 -1
- package/js/src/abstract/xt.d.ts +155 -0
- package/js/src/abstract/xt.js +11 -0
- package/js/src/binance.js +169 -44
- package/js/src/btcmarkets.d.ts +2 -2
- package/js/src/btcmarkets.js +31 -2
- package/js/src/coinex.js +106 -107
- package/js/src/lykke.d.ts +2 -2
- package/js/src/lykke.js +10 -2
- package/js/src/ndax.d.ts +1 -1
- package/js/src/ndax.js +5 -1
- package/js/src/phemex.js +6 -5
- package/js/src/poloniexfutures.js +2 -2
- package/js/src/pro/bitget.js +28 -21
- package/js/src/pro/bitmex.js +9 -0
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/mexc.js +1 -1
- package/js/src/pro/woo.js +1 -1
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/tradeogre.d.ts +1 -1
- package/js/src/tradeogre.js +12 -6
- package/js/src/wavesexchange.d.ts +1 -20
- package/js/src/wavesexchange.js +2 -2
- package/js/src/wazirx.d.ts +1 -1
- package/js/src/wazirx.js +38 -15
- package/js/src/xt.d.ts +161 -0
- package/js/src/xt.js +4761 -0
- package/js/src/zonda.d.ts +1 -1
- package/js/src/zonda.js +9 -1
- package/package.json +1 -1
|
@@ -144,6 +144,8 @@ interface Exchange {
|
|
|
144
144
|
v2PublicGetFuturesPositionLevel(params?: {}): Promise<implicitReturnType>;
|
|
145
145
|
v2PublicGetFuturesLiquidationHistory(params?: {}): Promise<implicitReturnType>;
|
|
146
146
|
v2PublicGetFuturesBasisHistory(params?: {}): Promise<implicitReturnType>;
|
|
147
|
+
v2PublicGetAssetsDepositWithdrawConfig(params?: {}): Promise<implicitReturnType>;
|
|
148
|
+
v2PublicGetAssetsAllDepositWithdrawConfig(params?: {}): Promise<implicitReturnType>;
|
|
147
149
|
v2PrivateGetAccountSubs(params?: {}): Promise<implicitReturnType>;
|
|
148
150
|
v2PrivateGetAccountSubsApiDetail(params?: {}): Promise<implicitReturnType>;
|
|
149
151
|
v2PrivateGetAccountSubsInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -162,7 +164,6 @@ interface Exchange {
|
|
|
162
164
|
v2PrivateGetAssetsDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
163
165
|
v2PrivateGetAssetsDepositHistory(params?: {}): Promise<implicitReturnType>;
|
|
164
166
|
v2PrivateGetAssetsWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
165
|
-
v2PrivateGetAssetsDepositWithdrawConfig(params?: {}): Promise<implicitReturnType>;
|
|
166
167
|
v2PrivateGetAssetsTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
167
168
|
v2PrivateGetSpotOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
168
169
|
v2PrivateGetSpotBatchOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { implicitReturnType } from '../base/types.js';
|
|
2
|
+
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
3
|
+
interface Exchange {
|
|
4
|
+
publicSpotGetCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
5
|
+
publicSpotGetDepth(params?: {}): Promise<implicitReturnType>;
|
|
6
|
+
publicSpotGetKline(params?: {}): Promise<implicitReturnType>;
|
|
7
|
+
publicSpotGetSymbol(params?: {}): Promise<implicitReturnType>;
|
|
8
|
+
publicSpotGetTicker(params?: {}): Promise<implicitReturnType>;
|
|
9
|
+
publicSpotGetTickerBook(params?: {}): Promise<implicitReturnType>;
|
|
10
|
+
publicSpotGetTickerPrice(params?: {}): Promise<implicitReturnType>;
|
|
11
|
+
publicSpotGetTicker24h(params?: {}): Promise<implicitReturnType>;
|
|
12
|
+
publicSpotGetTime(params?: {}): Promise<implicitReturnType>;
|
|
13
|
+
publicSpotGetTradeHistory(params?: {}): Promise<implicitReturnType>;
|
|
14
|
+
publicSpotGetTradeRecent(params?: {}): Promise<implicitReturnType>;
|
|
15
|
+
publicSpotGetWalletSupportCurrency(params?: {}): Promise<implicitReturnType>;
|
|
16
|
+
publicLinearGetFutureMarketV1PublicContractRiskBalance(params?: {}): Promise<implicitReturnType>;
|
|
17
|
+
publicLinearGetFutureMarketV1PublicContractOpenInterest(params?: {}): Promise<implicitReturnType>;
|
|
18
|
+
publicLinearGetFutureMarketV1PublicLeverageBracketDetail(params?: {}): Promise<implicitReturnType>;
|
|
19
|
+
publicLinearGetFutureMarketV1PublicLeverageBracketList(params?: {}): Promise<implicitReturnType>;
|
|
20
|
+
publicLinearGetFutureMarketV1PublicQAggTicker(params?: {}): Promise<implicitReturnType>;
|
|
21
|
+
publicLinearGetFutureMarketV1PublicQAggTickers(params?: {}): Promise<implicitReturnType>;
|
|
22
|
+
publicLinearGetFutureMarketV1PublicQDeal(params?: {}): Promise<implicitReturnType>;
|
|
23
|
+
publicLinearGetFutureMarketV1PublicQDepth(params?: {}): Promise<implicitReturnType>;
|
|
24
|
+
publicLinearGetFutureMarketV1PublicQFundingRate(params?: {}): Promise<implicitReturnType>;
|
|
25
|
+
publicLinearGetFutureMarketV1PublicQFundingRateRecord(params?: {}): Promise<implicitReturnType>;
|
|
26
|
+
publicLinearGetFutureMarketV1PublicQIndexPrice(params?: {}): Promise<implicitReturnType>;
|
|
27
|
+
publicLinearGetFutureMarketV1PublicQKline(params?: {}): Promise<implicitReturnType>;
|
|
28
|
+
publicLinearGetFutureMarketV1PublicQMarkPrice(params?: {}): Promise<implicitReturnType>;
|
|
29
|
+
publicLinearGetFutureMarketV1PublicQSymbolIndexPrice(params?: {}): Promise<implicitReturnType>;
|
|
30
|
+
publicLinearGetFutureMarketV1PublicQSymbolMarkPrice(params?: {}): Promise<implicitReturnType>;
|
|
31
|
+
publicLinearGetFutureMarketV1PublicQTicker(params?: {}): Promise<implicitReturnType>;
|
|
32
|
+
publicLinearGetFutureMarketV1PublicQTickers(params?: {}): Promise<implicitReturnType>;
|
|
33
|
+
publicLinearGetFutureMarketV1PublicSymbolCoins(params?: {}): Promise<implicitReturnType>;
|
|
34
|
+
publicLinearGetFutureMarketV1PublicSymbolDetail(params?: {}): Promise<implicitReturnType>;
|
|
35
|
+
publicLinearGetFutureMarketV1PublicSymbolList(params?: {}): Promise<implicitReturnType>;
|
|
36
|
+
publicInverseGetFutureMarketV1PublicContractRiskBalance(params?: {}): Promise<implicitReturnType>;
|
|
37
|
+
publicInverseGetFutureMarketV1PublicContractOpenInterest(params?: {}): Promise<implicitReturnType>;
|
|
38
|
+
publicInverseGetFutureMarketV1PublicLeverageBracketDetail(params?: {}): Promise<implicitReturnType>;
|
|
39
|
+
publicInverseGetFutureMarketV1PublicLeverageBracketList(params?: {}): Promise<implicitReturnType>;
|
|
40
|
+
publicInverseGetFutureMarketV1PublicQAggTicker(params?: {}): Promise<implicitReturnType>;
|
|
41
|
+
publicInverseGetFutureMarketV1PublicQAggTickers(params?: {}): Promise<implicitReturnType>;
|
|
42
|
+
publicInverseGetFutureMarketV1PublicQDeal(params?: {}): Promise<implicitReturnType>;
|
|
43
|
+
publicInverseGetFutureMarketV1PublicQDepth(params?: {}): Promise<implicitReturnType>;
|
|
44
|
+
publicInverseGetFutureMarketV1PublicQFundingRate(params?: {}): Promise<implicitReturnType>;
|
|
45
|
+
publicInverseGetFutureMarketV1PublicQFundingRateRecord(params?: {}): Promise<implicitReturnType>;
|
|
46
|
+
publicInverseGetFutureMarketV1PublicQIndexPrice(params?: {}): Promise<implicitReturnType>;
|
|
47
|
+
publicInverseGetFutureMarketV1PublicQKline(params?: {}): Promise<implicitReturnType>;
|
|
48
|
+
publicInverseGetFutureMarketV1PublicQMarkPrice(params?: {}): Promise<implicitReturnType>;
|
|
49
|
+
publicInverseGetFutureMarketV1PublicQSymbolIndexPrice(params?: {}): Promise<implicitReturnType>;
|
|
50
|
+
publicInverseGetFutureMarketV1PublicQSymbolMarkPrice(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
publicInverseGetFutureMarketV1PublicQTicker(params?: {}): Promise<implicitReturnType>;
|
|
52
|
+
publicInverseGetFutureMarketV1PublicQTickers(params?: {}): Promise<implicitReturnType>;
|
|
53
|
+
publicInverseGetFutureMarketV1PublicSymbolCoins(params?: {}): Promise<implicitReturnType>;
|
|
54
|
+
publicInverseGetFutureMarketV1PublicSymbolDetail(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
publicInverseGetFutureMarketV1PublicSymbolList(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
privateSpotGetBalance(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
privateSpotGetBalances(params?: {}): Promise<implicitReturnType>;
|
|
58
|
+
privateSpotGetBatchOrder(params?: {}): Promise<implicitReturnType>;
|
|
59
|
+
privateSpotGetDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
60
|
+
privateSpotGetDepositHistory(params?: {}): Promise<implicitReturnType>;
|
|
61
|
+
privateSpotGetHistoryOrder(params?: {}): Promise<implicitReturnType>;
|
|
62
|
+
privateSpotGetOpenOrder(params?: {}): Promise<implicitReturnType>;
|
|
63
|
+
privateSpotGetOrder(params?: {}): Promise<implicitReturnType>;
|
|
64
|
+
privateSpotGetOrderOrderId(params?: {}): Promise<implicitReturnType>;
|
|
65
|
+
privateSpotGetTrade(params?: {}): Promise<implicitReturnType>;
|
|
66
|
+
privateSpotGetWithdrawHistory(params?: {}): Promise<implicitReturnType>;
|
|
67
|
+
privateSpotPostOrder(params?: {}): Promise<implicitReturnType>;
|
|
68
|
+
privateSpotPostWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
69
|
+
privateSpotPostBalanceTransfer(params?: {}): Promise<implicitReturnType>;
|
|
70
|
+
privateSpotPostBalanceAccountTransfer(params?: {}): Promise<implicitReturnType>;
|
|
71
|
+
privateSpotDeleteBatchOrder(params?: {}): Promise<implicitReturnType>;
|
|
72
|
+
privateSpotDeleteOpenOrder(params?: {}): Promise<implicitReturnType>;
|
|
73
|
+
privateSpotDeleteOrderOrderId(params?: {}): Promise<implicitReturnType>;
|
|
74
|
+
privateLinearGetFutureTradeV1EntrustPlanDetail(params?: {}): Promise<implicitReturnType>;
|
|
75
|
+
privateLinearGetFutureTradeV1EntrustPlanList(params?: {}): Promise<implicitReturnType>;
|
|
76
|
+
privateLinearGetFutureTradeV1EntrustPlanListHistory(params?: {}): Promise<implicitReturnType>;
|
|
77
|
+
privateLinearGetFutureTradeV1EntrustProfitDetail(params?: {}): Promise<implicitReturnType>;
|
|
78
|
+
privateLinearGetFutureTradeV1EntrustProfitList(params?: {}): Promise<implicitReturnType>;
|
|
79
|
+
privateLinearGetFutureTradeV1OrderDetail(params?: {}): Promise<implicitReturnType>;
|
|
80
|
+
privateLinearGetFutureTradeV1OrderList(params?: {}): Promise<implicitReturnType>;
|
|
81
|
+
privateLinearGetFutureTradeV1OrderListHistory(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
privateLinearGetFutureTradeV1OrderTradeList(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
privateLinearGetFutureUserV1AccountInfo(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
privateLinearGetFutureUserV1BalanceBills(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
privateLinearGetFutureUserV1BalanceDetail(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
privateLinearGetFutureUserV1BalanceFundingRateList(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
privateLinearGetFutureUserV1BalanceList(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
privateLinearGetFutureUserV1PositionAdl(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
privateLinearGetFutureUserV1PositionList(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
privateLinearGetFutureUserV1UserCollectionList(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
privateLinearGetFutureUserV1UserListenKey(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
privateLinearPostFutureTradeV1EntrustCancelAllPlan(params?: {}): Promise<implicitReturnType>;
|
|
93
|
+
privateLinearPostFutureTradeV1EntrustCancelAllProfitStop(params?: {}): Promise<implicitReturnType>;
|
|
94
|
+
privateLinearPostFutureTradeV1EntrustCancelPlan(params?: {}): Promise<implicitReturnType>;
|
|
95
|
+
privateLinearPostFutureTradeV1EntrustCancelProfitStop(params?: {}): Promise<implicitReturnType>;
|
|
96
|
+
privateLinearPostFutureTradeV1EntrustCreatePlan(params?: {}): Promise<implicitReturnType>;
|
|
97
|
+
privateLinearPostFutureTradeV1EntrustCreateProfit(params?: {}): Promise<implicitReturnType>;
|
|
98
|
+
privateLinearPostFutureTradeV1EntrustUpdateProfitStop(params?: {}): Promise<implicitReturnType>;
|
|
99
|
+
privateLinearPostFutureTradeV1OrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
100
|
+
privateLinearPostFutureTradeV1OrderCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
101
|
+
privateLinearPostFutureTradeV1OrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
102
|
+
privateLinearPostFutureTradeV1OrderCreateBatch(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
privateLinearPostFutureUserV1AccountOpen(params?: {}): Promise<implicitReturnType>;
|
|
104
|
+
privateLinearPostFutureUserV1PositionAdjustLeverage(params?: {}): Promise<implicitReturnType>;
|
|
105
|
+
privateLinearPostFutureUserV1PositionAutoMargin(params?: {}): Promise<implicitReturnType>;
|
|
106
|
+
privateLinearPostFutureUserV1PositionCloseAll(params?: {}): Promise<implicitReturnType>;
|
|
107
|
+
privateLinearPostFutureUserV1PositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
108
|
+
privateLinearPostFutureUserV1UserCollectionAdd(params?: {}): Promise<implicitReturnType>;
|
|
109
|
+
privateLinearPostFutureUserV1UserCollectionCancel(params?: {}): Promise<implicitReturnType>;
|
|
110
|
+
privateInverseGetFutureTradeV1EntrustPlanDetail(params?: {}): Promise<implicitReturnType>;
|
|
111
|
+
privateInverseGetFutureTradeV1EntrustPlanList(params?: {}): Promise<implicitReturnType>;
|
|
112
|
+
privateInverseGetFutureTradeV1EntrustPlanListHistory(params?: {}): Promise<implicitReturnType>;
|
|
113
|
+
privateInverseGetFutureTradeV1EntrustProfitDetail(params?: {}): Promise<implicitReturnType>;
|
|
114
|
+
privateInverseGetFutureTradeV1EntrustProfitList(params?: {}): Promise<implicitReturnType>;
|
|
115
|
+
privateInverseGetFutureTradeV1OrderDetail(params?: {}): Promise<implicitReturnType>;
|
|
116
|
+
privateInverseGetFutureTradeV1OrderList(params?: {}): Promise<implicitReturnType>;
|
|
117
|
+
privateInverseGetFutureTradeV1OrderListHistory(params?: {}): Promise<implicitReturnType>;
|
|
118
|
+
privateInverseGetFutureTradeV1OrderTradeList(params?: {}): Promise<implicitReturnType>;
|
|
119
|
+
privateInverseGetFutureUserV1AccountInfo(params?: {}): Promise<implicitReturnType>;
|
|
120
|
+
privateInverseGetFutureUserV1BalanceBills(params?: {}): Promise<implicitReturnType>;
|
|
121
|
+
privateInverseGetFutureUserV1BalanceDetail(params?: {}): Promise<implicitReturnType>;
|
|
122
|
+
privateInverseGetFutureUserV1BalanceFundingRateList(params?: {}): Promise<implicitReturnType>;
|
|
123
|
+
privateInverseGetFutureUserV1BalanceList(params?: {}): Promise<implicitReturnType>;
|
|
124
|
+
privateInverseGetFutureUserV1PositionAdl(params?: {}): Promise<implicitReturnType>;
|
|
125
|
+
privateInverseGetFutureUserV1PositionList(params?: {}): Promise<implicitReturnType>;
|
|
126
|
+
privateInverseGetFutureUserV1UserCollectionList(params?: {}): Promise<implicitReturnType>;
|
|
127
|
+
privateInverseGetFutureUserV1UserListenKey(params?: {}): Promise<implicitReturnType>;
|
|
128
|
+
privateInversePostFutureTradeV1EntrustCancelAllPlan(params?: {}): Promise<implicitReturnType>;
|
|
129
|
+
privateInversePostFutureTradeV1EntrustCancelAllProfitStop(params?: {}): Promise<implicitReturnType>;
|
|
130
|
+
privateInversePostFutureTradeV1EntrustCancelPlan(params?: {}): Promise<implicitReturnType>;
|
|
131
|
+
privateInversePostFutureTradeV1EntrustCancelProfitStop(params?: {}): Promise<implicitReturnType>;
|
|
132
|
+
privateInversePostFutureTradeV1EntrustCreatePlan(params?: {}): Promise<implicitReturnType>;
|
|
133
|
+
privateInversePostFutureTradeV1EntrustCreateProfit(params?: {}): Promise<implicitReturnType>;
|
|
134
|
+
privateInversePostFutureTradeV1EntrustUpdateProfitStop(params?: {}): Promise<implicitReturnType>;
|
|
135
|
+
privateInversePostFutureTradeV1OrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
136
|
+
privateInversePostFutureTradeV1OrderCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
137
|
+
privateInversePostFutureTradeV1OrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
138
|
+
privateInversePostFutureTradeV1OrderCreateBatch(params?: {}): Promise<implicitReturnType>;
|
|
139
|
+
privateInversePostFutureUserV1AccountOpen(params?: {}): Promise<implicitReturnType>;
|
|
140
|
+
privateInversePostFutureUserV1PositionAdjustLeverage(params?: {}): Promise<implicitReturnType>;
|
|
141
|
+
privateInversePostFutureUserV1PositionAutoMargin(params?: {}): Promise<implicitReturnType>;
|
|
142
|
+
privateInversePostFutureUserV1PositionCloseAll(params?: {}): Promise<implicitReturnType>;
|
|
143
|
+
privateInversePostFutureUserV1PositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
144
|
+
privateInversePostFutureUserV1UserCollectionAdd(params?: {}): Promise<implicitReturnType>;
|
|
145
|
+
privateInversePostFutureUserV1UserCollectionCancel(params?: {}): Promise<implicitReturnType>;
|
|
146
|
+
privateUserGetUserAccount(params?: {}): Promise<implicitReturnType>;
|
|
147
|
+
privateUserGetUserAccountApiKey(params?: {}): Promise<implicitReturnType>;
|
|
148
|
+
privateUserPostUserAccount(params?: {}): Promise<implicitReturnType>;
|
|
149
|
+
privateUserPostUserAccountApiKey(params?: {}): Promise<implicitReturnType>;
|
|
150
|
+
privateUserPutUserAccountApiKey(params?: {}): Promise<implicitReturnType>;
|
|
151
|
+
privateUserDeleteUserAccountApikeyId(params?: {}): Promise<implicitReturnType>;
|
|
152
|
+
}
|
|
153
|
+
declare abstract class Exchange extends _Exchange {
|
|
154
|
+
}
|
|
155
|
+
export default Exchange;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
// -------------------------------------------------------------------------------
|
|
8
|
+
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
9
|
+
class Exchange extends _Exchange {
|
|
10
|
+
}
|
|
11
|
+
export default Exchange;
|
package/js/src/binance.js
CHANGED
|
@@ -8111,8 +8111,56 @@ export default class binance extends Exchange {
|
|
|
8111
8111
|
// "tranId": 43000126248
|
|
8112
8112
|
// }
|
|
8113
8113
|
//
|
|
8114
|
-
|
|
8115
|
-
|
|
8114
|
+
// {
|
|
8115
|
+
// "orderType": "C2C", // Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
|
|
8116
|
+
// "transactionId": "M_P_71505104267788288",
|
|
8117
|
+
// "transactionTime": 1610090460133, //trade timestamp
|
|
8118
|
+
// "amount": "23.72469206", //order amount(up to 8 decimal places), positive is income, negative is expenditure
|
|
8119
|
+
// "currency": "BNB",
|
|
8120
|
+
// "walletType": 1, //main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
|
|
8121
|
+
// "walletTypes": [1,2], //array format,there are multiple values when using combination payment
|
|
8122
|
+
// "fundsDetail": [ // details
|
|
8123
|
+
// {
|
|
8124
|
+
// "currency": "USDT", //asset
|
|
8125
|
+
// "amount": "1.2",
|
|
8126
|
+
// "walletAssetCost":[ //details of asset cost per wallet
|
|
8127
|
+
// {"1":"0.6"},
|
|
8128
|
+
// {"2":"0.6"}
|
|
8129
|
+
// ]
|
|
8130
|
+
// },
|
|
8131
|
+
// {
|
|
8132
|
+
// "currency": "ETH",
|
|
8133
|
+
// "amount": "0.0001",
|
|
8134
|
+
// "walletAssetCost":[
|
|
8135
|
+
// {"1":"0.00005"},
|
|
8136
|
+
// {"2":"0.00005"}
|
|
8137
|
+
// ]
|
|
8138
|
+
// }
|
|
8139
|
+
// ],
|
|
8140
|
+
// "payerInfo":{
|
|
8141
|
+
// "name":"Jack", //nickname or merchant name
|
|
8142
|
+
// "type":"USER", //account type,USER for personal,MERCHANT for merchant
|
|
8143
|
+
// "binanceId":"12345678", //binance uid
|
|
8144
|
+
// "accountId":"67736251" //binance pay id
|
|
8145
|
+
// },
|
|
8146
|
+
// "receiverInfo":{
|
|
8147
|
+
// "name":"Alan", //nickname or merchant name
|
|
8148
|
+
// "type":"MERCHANT", //account type,USER for personal,MERCHANT for merchant
|
|
8149
|
+
// "email":"alan@binance.com", //email
|
|
8150
|
+
// "binanceId":"34355667", //binance uid
|
|
8151
|
+
// "accountId":"21326891", //binance pay id
|
|
8152
|
+
// "countryCode":"1", //International area code
|
|
8153
|
+
// "phoneNumber":"8057651210",
|
|
8154
|
+
// "mobileCode":"US", //country code
|
|
8155
|
+
// "extend":[ //extension field
|
|
8156
|
+
// "institutionName": "",
|
|
8157
|
+
// "cardNumber": "",
|
|
8158
|
+
// "digitalWalletId": ""
|
|
8159
|
+
// ]
|
|
8160
|
+
// }
|
|
8161
|
+
// }
|
|
8162
|
+
const id = this.safeString2(transfer, 'tranId', 'transactionId');
|
|
8163
|
+
const currencyId = this.safeString2(transfer, 'asset', 'currency');
|
|
8116
8164
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
8117
8165
|
const amount = this.safeNumber(transfer, 'amount');
|
|
8118
8166
|
const type = this.safeString(transfer, 'type');
|
|
@@ -8126,7 +8174,14 @@ export default class binance extends Exchange {
|
|
|
8126
8174
|
fromAccount = this.safeString(accountsById, fromAccount, fromAccount);
|
|
8127
8175
|
toAccount = this.safeString(accountsById, toAccount, toAccount);
|
|
8128
8176
|
}
|
|
8129
|
-
const
|
|
8177
|
+
const walletType = this.safeInteger(transfer, 'walletType');
|
|
8178
|
+
if (walletType !== undefined) {
|
|
8179
|
+
const payer = this.safeDict(transfer, 'payerInfo', {});
|
|
8180
|
+
const receiver = this.safeDict(transfer, 'receiverInfo', {});
|
|
8181
|
+
fromAccount = this.safeString(payer, 'accountId');
|
|
8182
|
+
toAccount = this.safeString(receiver, 'accountId');
|
|
8183
|
+
}
|
|
8184
|
+
const timestamp = this.safeInteger2(transfer, 'timestamp', 'transactionTime');
|
|
8130
8185
|
const status = this.parseTransferStatus(this.safeString(transfer, 'status'));
|
|
8131
8186
|
return {
|
|
8132
8187
|
'info': transfer,
|
|
@@ -8278,74 +8333,144 @@ export default class binance extends Exchange {
|
|
|
8278
8333
|
* @name binance#fetchTransfers
|
|
8279
8334
|
* @description fetch a history of internal transfers made on an account
|
|
8280
8335
|
* @see https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
|
|
8336
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#pay-endpoints
|
|
8281
8337
|
* @param {string} code unified currency code of the currency transferred
|
|
8282
8338
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
8283
8339
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
8284
8340
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8285
8341
|
* @param {int} [params.until] the latest time in ms to fetch transfers for
|
|
8286
8342
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
8343
|
+
* @param {boolean} [params.internal] default false, when true will fetch pay trade history
|
|
8287
8344
|
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
8288
8345
|
*/
|
|
8289
8346
|
await this.loadMarkets();
|
|
8347
|
+
const internal = this.safeBool(params, 'internal');
|
|
8348
|
+
params = this.omit(params, 'internal');
|
|
8290
8349
|
let paginate = false;
|
|
8291
8350
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchTransfers', 'paginate');
|
|
8292
|
-
if (paginate) {
|
|
8351
|
+
if (paginate && !internal) {
|
|
8293
8352
|
return await this.fetchPaginatedCallDynamic('fetchTransfers', code, since, limit, params);
|
|
8294
8353
|
}
|
|
8295
8354
|
let currency = undefined;
|
|
8296
8355
|
if (code !== undefined) {
|
|
8297
8356
|
currency = this.currency(code);
|
|
8298
8357
|
}
|
|
8299
|
-
const
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8358
|
+
const request = {};
|
|
8359
|
+
let limitKey = 'limit';
|
|
8360
|
+
if (!internal) {
|
|
8361
|
+
const defaultType = this.safeString2(this.options, 'fetchTransfers', 'defaultType', 'spot');
|
|
8362
|
+
const fromAccount = this.safeString(params, 'fromAccount', defaultType);
|
|
8363
|
+
const defaultTo = (fromAccount === 'future') ? 'spot' : 'future';
|
|
8364
|
+
const toAccount = this.safeString(params, 'toAccount', defaultTo);
|
|
8365
|
+
let type = this.safeString(params, 'type');
|
|
8366
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
8367
|
+
const fromId = this.safeString(accountsByType, fromAccount);
|
|
8368
|
+
const toId = this.safeString(accountsByType, toAccount);
|
|
8369
|
+
if (type === undefined) {
|
|
8370
|
+
if (fromId === undefined) {
|
|
8371
|
+
const keys = Object.keys(accountsByType);
|
|
8372
|
+
throw new ExchangeError(this.id + ' fromAccount parameter must be one of ' + keys.join(', '));
|
|
8373
|
+
}
|
|
8374
|
+
if (toId === undefined) {
|
|
8375
|
+
const keys = Object.keys(accountsByType);
|
|
8376
|
+
throw new ExchangeError(this.id + ' toAccount parameter must be one of ' + keys.join(', '));
|
|
8377
|
+
}
|
|
8378
|
+
type = fromId + '_' + toId;
|
|
8315
8379
|
}
|
|
8316
|
-
type =
|
|
8380
|
+
request['type'] = type;
|
|
8381
|
+
limitKey = 'size';
|
|
8382
|
+
}
|
|
8383
|
+
if (limit !== undefined) {
|
|
8384
|
+
request[limitKey] = limit;
|
|
8317
8385
|
}
|
|
8318
|
-
const request = {
|
|
8319
|
-
'type': type,
|
|
8320
|
-
};
|
|
8321
8386
|
if (since !== undefined) {
|
|
8322
8387
|
request['startTime'] = since;
|
|
8323
8388
|
}
|
|
8324
|
-
if (limit !== undefined) {
|
|
8325
|
-
request['size'] = limit;
|
|
8326
|
-
}
|
|
8327
8389
|
const until = this.safeInteger(params, 'until');
|
|
8328
8390
|
if (until !== undefined) {
|
|
8329
8391
|
params = this.omit(params, 'until');
|
|
8330
8392
|
request['endTime'] = until;
|
|
8331
8393
|
}
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8394
|
+
let response = undefined;
|
|
8395
|
+
if (internal) {
|
|
8396
|
+
response = await this.sapiGetPayTransactions(this.extend(request, params));
|
|
8397
|
+
//
|
|
8398
|
+
// {
|
|
8399
|
+
// "code": "000000",
|
|
8400
|
+
// "message": "success",
|
|
8401
|
+
// "data": [
|
|
8402
|
+
// {
|
|
8403
|
+
// "orderType": "C2C", // Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
|
|
8404
|
+
// "transactionId": "M_P_71505104267788288",
|
|
8405
|
+
// "transactionTime": 1610090460133, //trade timestamp
|
|
8406
|
+
// "amount": "23.72469206", //order amount(up to 8 decimal places), positive is income, negative is expenditure
|
|
8407
|
+
// "currency": "BNB",
|
|
8408
|
+
// "walletType": 1, //main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
|
|
8409
|
+
// "walletTypes": [1,2], //array format,there are multiple values when using combination payment
|
|
8410
|
+
// "fundsDetail": [ // details
|
|
8411
|
+
// {
|
|
8412
|
+
// "currency": "USDT", //asset
|
|
8413
|
+
// "amount": "1.2",
|
|
8414
|
+
// "walletAssetCost":[ //details of asset cost per wallet
|
|
8415
|
+
// {"1":"0.6"},
|
|
8416
|
+
// {"2":"0.6"}
|
|
8417
|
+
// ]
|
|
8418
|
+
// },
|
|
8419
|
+
// {
|
|
8420
|
+
// "currency": "ETH",
|
|
8421
|
+
// "amount": "0.0001",
|
|
8422
|
+
// "walletAssetCost":[
|
|
8423
|
+
// {"1":"0.00005"},
|
|
8424
|
+
// {"2":"0.00005"}
|
|
8425
|
+
// ]
|
|
8426
|
+
// }
|
|
8427
|
+
// ],
|
|
8428
|
+
// "payerInfo":{
|
|
8429
|
+
// "name":"Jack", //nickname or merchant name
|
|
8430
|
+
// "type":"USER", //account type,USER for personal,MERCHANT for merchant
|
|
8431
|
+
// "binanceId":"12345678", //binance uid
|
|
8432
|
+
// "accountId":"67736251" //binance pay id
|
|
8433
|
+
// },
|
|
8434
|
+
// "receiverInfo":{
|
|
8435
|
+
// "name":"Alan", //nickname or merchant name
|
|
8436
|
+
// "type":"MERCHANT", //account type,USER for personal,MERCHANT for merchant
|
|
8437
|
+
// "email":"alan@binance.com", //email
|
|
8438
|
+
// "binanceId":"34355667", //binance uid
|
|
8439
|
+
// "accountId":"21326891", //binance pay id
|
|
8440
|
+
// "countryCode":"1", //International area code
|
|
8441
|
+
// "phoneNumber":"8057651210",
|
|
8442
|
+
// "mobileCode":"US", //country code
|
|
8443
|
+
// "extend":[ //extension field
|
|
8444
|
+
// "institutionName": "",
|
|
8445
|
+
// "cardNumber": "",
|
|
8446
|
+
// "digitalWalletId": ""
|
|
8447
|
+
// ]
|
|
8448
|
+
// }
|
|
8449
|
+
// }
|
|
8450
|
+
// ],
|
|
8451
|
+
// "success": true
|
|
8452
|
+
// }
|
|
8453
|
+
//
|
|
8454
|
+
}
|
|
8455
|
+
else {
|
|
8456
|
+
response = await this.sapiGetAssetTransfer(this.extend(request, params));
|
|
8457
|
+
//
|
|
8458
|
+
// {
|
|
8459
|
+
// "total": 3,
|
|
8460
|
+
// "rows": [
|
|
8461
|
+
// {
|
|
8462
|
+
// "timestamp": 1614640878000,
|
|
8463
|
+
// "asset": "USDT",
|
|
8464
|
+
// "amount": "25",
|
|
8465
|
+
// "type": "MAIN_UMFUTURE",
|
|
8466
|
+
// "status": "CONFIRMED",
|
|
8467
|
+
// "tranId": 43000126248
|
|
8468
|
+
// },
|
|
8469
|
+
// ]
|
|
8470
|
+
// }
|
|
8471
|
+
//
|
|
8472
|
+
}
|
|
8473
|
+
const rows = this.safeList2(response, 'rows', 'data', []);
|
|
8349
8474
|
return this.parseTransfers(rows, currency, since, limit);
|
|
8350
8475
|
}
|
|
8351
8476
|
async fetchDepositAddress(code, params = {}) {
|
package/js/src/btcmarkets.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export default class btcmarkets extends Exchange {
|
|
|
27
27
|
parseTrade(trade: Dict, market?: Market): Trade;
|
|
28
28
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
29
29
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
30
|
-
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<
|
|
31
|
-
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<
|
|
30
|
+
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
|
|
31
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
32
32
|
calculateFee(symbol: any, type: any, side: any, amount: any, price: any, takerOrMaker?: string, params?: {}): {
|
|
33
33
|
type: string;
|
|
34
34
|
currency: any;
|
package/js/src/btcmarkets.js
CHANGED
|
@@ -900,7 +900,29 @@ export default class btcmarkets extends Exchange {
|
|
|
900
900
|
const request = {
|
|
901
901
|
'ids': ids,
|
|
902
902
|
};
|
|
903
|
-
|
|
903
|
+
const response = await this.privateDeleteBatchordersIds(this.extend(request, params));
|
|
904
|
+
//
|
|
905
|
+
// {
|
|
906
|
+
// "cancelOrders": [
|
|
907
|
+
// {
|
|
908
|
+
// "orderId": "414186",
|
|
909
|
+
// "clientOrderId": "6"
|
|
910
|
+
// },
|
|
911
|
+
// ...
|
|
912
|
+
// ],
|
|
913
|
+
// "unprocessedRequests": [
|
|
914
|
+
// {
|
|
915
|
+
// "code": "OrderAlreadyCancelled",
|
|
916
|
+
// "message": "order is already cancelled.",
|
|
917
|
+
// "requestId": "1"
|
|
918
|
+
// }
|
|
919
|
+
// ]
|
|
920
|
+
// }
|
|
921
|
+
//
|
|
922
|
+
const cancelOrders = this.safeList(response, 'cancelOrders', []);
|
|
923
|
+
const unprocessedRequests = this.safeList(response, 'unprocessedRequests', []);
|
|
924
|
+
const orders = this.arrayConcat(cancelOrders, unprocessedRequests);
|
|
925
|
+
return this.parseOrders(orders);
|
|
904
926
|
}
|
|
905
927
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
906
928
|
/**
|
|
@@ -917,7 +939,14 @@ export default class btcmarkets extends Exchange {
|
|
|
917
939
|
const request = {
|
|
918
940
|
'id': id,
|
|
919
941
|
};
|
|
920
|
-
|
|
942
|
+
const response = await this.privateDeleteOrdersId(this.extend(request, params));
|
|
943
|
+
//
|
|
944
|
+
// {
|
|
945
|
+
// "orderId": "7524",
|
|
946
|
+
// "clientOrderId": "123-456"
|
|
947
|
+
// }
|
|
948
|
+
//
|
|
949
|
+
return this.parseOrder(response);
|
|
921
950
|
}
|
|
922
951
|
calculateFee(symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) {
|
|
923
952
|
/**
|