@yuants/vendor-binance 0.7.8 → 0.8.1
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/dist/api/client.js +70 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/private-api.js +162 -0
- package/dist/api/private-api.js.map +1 -0
- package/dist/api/public-api.js +52 -0
- package/dist/api/public-api.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interest_rate.js +2 -2
- package/dist/interest_rate.js.map +1 -1
- package/dist/legacy_index.js +270 -237
- package/dist/legacy_index.js.map +1 -1
- package/dist/product.js +2 -2
- package/dist/product.js.map +1 -1
- package/dist/quote.js +4 -4
- package/dist/quote.js.map +1 -1
- package/dist/services/account-actions-with-credential.js +34 -0
- package/dist/services/account-actions-with-credential.js.map +1 -0
- package/dist/services/accounts/profile.js +22 -0
- package/dist/services/accounts/profile.js.map +1 -0
- package/dist/services/accounts/spot.js +44 -0
- package/dist/services/accounts/spot.js.map +1 -0
- package/dist/services/accounts/unified.js +56 -0
- package/dist/services/accounts/unified.js.map +1 -0
- package/dist/services/order-actions-with-credential.js +19 -0
- package/dist/services/order-actions-with-credential.js.map +1 -0
- package/dist/services/orders/cancelOrder.js +39 -0
- package/dist/services/orders/cancelOrder.js.map +1 -0
- package/dist/services/orders/listOrders.js +49 -0
- package/dist/services/orders/listOrders.js.map +1 -0
- package/dist/services/orders/order-utils.js +118 -0
- package/dist/services/orders/order-utils.js.map +1 -0
- package/dist/services/orders/submitOrder.js +70 -0
- package/dist/services/orders/submitOrder.js.map +1 -0
- package/lib/api/client.d.ts +16 -0
- package/lib/api/client.d.ts.map +1 -0
- package/lib/api/client.js +80 -0
- package/lib/api/client.js.map +1 -0
- package/lib/api/private-api.d.ts +477 -0
- package/lib/api/private-api.d.ts.map +1 -0
- package/lib/api/private-api.js +183 -0
- package/lib/api/private-api.js.map +1 -0
- package/lib/api/public-api.d.ts +150 -0
- package/lib/api/public-api.d.ts.map +1 -0
- package/lib/api/public-api.js +61 -0
- package/lib/api/public-api.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/interest_rate.js +2 -2
- package/lib/interest_rate.js.map +1 -1
- package/lib/legacy_index.js +270 -237
- package/lib/legacy_index.js.map +1 -1
- package/lib/product.js +2 -2
- package/lib/product.js.map +1 -1
- package/lib/quote.js +4 -4
- package/lib/quote.js.map +1 -1
- package/lib/services/account-actions-with-credential.d.ts +2 -0
- package/lib/services/account-actions-with-credential.d.ts.map +1 -0
- package/lib/services/account-actions-with-credential.js +36 -0
- package/lib/services/account-actions-with-credential.js.map +1 -0
- package/lib/services/accounts/profile.d.ts +7 -0
- package/lib/services/accounts/profile.d.ts.map +1 -0
- package/lib/services/accounts/profile.js +26 -0
- package/lib/services/accounts/profile.js.map +1 -0
- package/lib/services/accounts/spot.d.ts +4 -0
- package/lib/services/accounts/spot.d.ts.map +1 -0
- package/lib/services/accounts/spot.js +48 -0
- package/lib/services/accounts/spot.js.map +1 -0
- package/lib/services/accounts/unified.d.ts +4 -0
- package/lib/services/accounts/unified.d.ts.map +1 -0
- package/lib/services/accounts/unified.js +60 -0
- package/lib/services/accounts/unified.js.map +1 -0
- package/lib/services/order-actions-with-credential.d.ts +2 -0
- package/lib/services/order-actions-with-credential.d.ts.map +1 -0
- package/lib/services/order-actions-with-credential.js +21 -0
- package/lib/services/order-actions-with-credential.js.map +1 -0
- package/lib/services/orders/cancelOrder.d.ts +4 -0
- package/lib/services/orders/cancelOrder.d.ts.map +1 -0
- package/lib/services/orders/cancelOrder.js +43 -0
- package/lib/services/orders/cancelOrder.js.map +1 -0
- package/lib/services/orders/listOrders.d.ts +4 -0
- package/lib/services/orders/listOrders.d.ts.map +1 -0
- package/lib/services/orders/listOrders.js +53 -0
- package/lib/services/orders/listOrders.js.map +1 -0
- package/lib/services/orders/order-utils.d.ts +12 -0
- package/lib/services/orders/order-utils.d.ts.map +1 -0
- package/lib/services/orders/order-utils.js +131 -0
- package/lib/services/orders/order-utils.js.map +1 -0
- package/lib/services/orders/submitOrder.d.ts +4 -0
- package/lib/services/orders/submitOrder.d.ts.map +1 -0
- package/lib/services/orders/submitOrder.js +74 -0
- package/lib/services/orders/submitOrder.js.map +1 -0
- package/package.json +11 -19
- package/temp/package-deps.json +32 -19
- package/dist/api.js +0 -248
- package/dist/api.js.map +0 -1
- package/lib/api.d.ts +0 -576
- package/lib/api.d.ts.map +0 -1
- package/lib/api.js +0 -256
- package/lib/api.js.map +0 -1
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import { IApiError, ICredential } from './client';
|
|
2
|
+
export type { ICredential };
|
|
3
|
+
export interface IUnifiedAccountInfo {
|
|
4
|
+
uniMMR: string;
|
|
5
|
+
accountEquity: string;
|
|
6
|
+
actualEquity: string;
|
|
7
|
+
accountInitialMargin: string;
|
|
8
|
+
accountMaintMargin: string;
|
|
9
|
+
accountStatus: string;
|
|
10
|
+
virtualMaxWithdrawAmount: string;
|
|
11
|
+
totalAvailableBalance: string;
|
|
12
|
+
totalMarginOpenLoss: string;
|
|
13
|
+
updateTime: number;
|
|
14
|
+
}
|
|
15
|
+
export interface IUnifiedUmAsset {
|
|
16
|
+
asset: string;
|
|
17
|
+
crossWalletBalance: string;
|
|
18
|
+
crossUnPnl: string;
|
|
19
|
+
maintMargin: string;
|
|
20
|
+
initialMargin: string;
|
|
21
|
+
positionInitialMargin: string;
|
|
22
|
+
openOrderInitialMargin: string;
|
|
23
|
+
updateTime: number;
|
|
24
|
+
}
|
|
25
|
+
export interface IUnifiedUmPosition {
|
|
26
|
+
symbol: string;
|
|
27
|
+
initialMargin: string;
|
|
28
|
+
maintMargin: string;
|
|
29
|
+
unrealizedProfit: string;
|
|
30
|
+
positionInitialMargin: string;
|
|
31
|
+
openOrderInitialMargin: string;
|
|
32
|
+
leverage: string;
|
|
33
|
+
entryPrice: string;
|
|
34
|
+
maxNotional: string;
|
|
35
|
+
bidNotional: string;
|
|
36
|
+
askNotional: string;
|
|
37
|
+
positionSide: string;
|
|
38
|
+
positionAmt: string;
|
|
39
|
+
updateTime: number;
|
|
40
|
+
}
|
|
41
|
+
export interface IUnifiedUmAccount {
|
|
42
|
+
assets: IUnifiedUmAsset[];
|
|
43
|
+
positions: IUnifiedUmPosition[];
|
|
44
|
+
}
|
|
45
|
+
export interface IUnifiedUmOpenOrder {
|
|
46
|
+
avgPrice: string;
|
|
47
|
+
clientOrderId: string;
|
|
48
|
+
cumQuote: string;
|
|
49
|
+
executedQty: string;
|
|
50
|
+
orderId: number;
|
|
51
|
+
origQty: string;
|
|
52
|
+
origType: string;
|
|
53
|
+
price: string;
|
|
54
|
+
reduceOnly: boolean;
|
|
55
|
+
side: string;
|
|
56
|
+
positionSide: string;
|
|
57
|
+
status: string;
|
|
58
|
+
symbol: string;
|
|
59
|
+
time: number;
|
|
60
|
+
timeInForce: string;
|
|
61
|
+
type: string;
|
|
62
|
+
updateTime: number;
|
|
63
|
+
selfTradePreventionMode: string;
|
|
64
|
+
goodTillDate: number;
|
|
65
|
+
}
|
|
66
|
+
export interface IUnifiedAccountBalanceEntry {
|
|
67
|
+
asset: string;
|
|
68
|
+
totalWalletBalance: string;
|
|
69
|
+
crossMarginAsset: string;
|
|
70
|
+
crossMarginBorrowed: string;
|
|
71
|
+
crossMarginFree: string;
|
|
72
|
+
crossMarginInterest: string;
|
|
73
|
+
crossMarginLocked: string;
|
|
74
|
+
umWalletBalance: string;
|
|
75
|
+
umUnrealizedPNL: string;
|
|
76
|
+
cmWalletBalance: string;
|
|
77
|
+
cmUnrealizedPNL: string;
|
|
78
|
+
updateTime: number;
|
|
79
|
+
}
|
|
80
|
+
export interface ISpotAccountInfo {
|
|
81
|
+
makerCommission: number;
|
|
82
|
+
takerCommission: number;
|
|
83
|
+
buyerCommission: number;
|
|
84
|
+
sellerCommission: number;
|
|
85
|
+
commissionRates: {
|
|
86
|
+
maker: string;
|
|
87
|
+
taker: string;
|
|
88
|
+
buyer: string;
|
|
89
|
+
seller: string;
|
|
90
|
+
};
|
|
91
|
+
canTrade: boolean;
|
|
92
|
+
canWithdraw: boolean;
|
|
93
|
+
canDeposit: boolean;
|
|
94
|
+
brokered: boolean;
|
|
95
|
+
requireSelfTradePrevention: boolean;
|
|
96
|
+
preventSor: boolean;
|
|
97
|
+
updateTime: number;
|
|
98
|
+
balances: {
|
|
99
|
+
asset: string;
|
|
100
|
+
free: string;
|
|
101
|
+
locked: string;
|
|
102
|
+
}[];
|
|
103
|
+
permissions: string[];
|
|
104
|
+
uid: number;
|
|
105
|
+
}
|
|
106
|
+
export interface ISpotOrder {
|
|
107
|
+
symbol: string;
|
|
108
|
+
orderId: number;
|
|
109
|
+
orderListId: number;
|
|
110
|
+
clientOrderId: string;
|
|
111
|
+
price: string;
|
|
112
|
+
origQty: string;
|
|
113
|
+
executedQty: string;
|
|
114
|
+
origQuoteOrderQty: string;
|
|
115
|
+
cummulativeQuoteQty: string;
|
|
116
|
+
status: string;
|
|
117
|
+
timeInForce: string;
|
|
118
|
+
type: string;
|
|
119
|
+
side: string;
|
|
120
|
+
stopPrice: string;
|
|
121
|
+
icebergQty: string;
|
|
122
|
+
time: number;
|
|
123
|
+
updateTime: number;
|
|
124
|
+
isWorking: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface ISpotNewOrderResponse {
|
|
127
|
+
symbol: string;
|
|
128
|
+
orderId: number;
|
|
129
|
+
clientOrderId: string;
|
|
130
|
+
transactTime: number;
|
|
131
|
+
}
|
|
132
|
+
export interface IAssetTransferResponse {
|
|
133
|
+
tranId: number;
|
|
134
|
+
}
|
|
135
|
+
export interface IDepositAddress {
|
|
136
|
+
address: string;
|
|
137
|
+
coin: string;
|
|
138
|
+
tag: string;
|
|
139
|
+
url: string;
|
|
140
|
+
}
|
|
141
|
+
export interface ISubAccountSummary {
|
|
142
|
+
email: string;
|
|
143
|
+
isFreeze: boolean;
|
|
144
|
+
createTime: number;
|
|
145
|
+
isManagedSubAccount: boolean;
|
|
146
|
+
isAssetManagementSubAccount: boolean;
|
|
147
|
+
}
|
|
148
|
+
export interface ISubAccountListResponse {
|
|
149
|
+
subAccounts: ISubAccountSummary[];
|
|
150
|
+
}
|
|
151
|
+
export interface IWithdrawRecord {
|
|
152
|
+
id: string;
|
|
153
|
+
amount: string;
|
|
154
|
+
transactionFee: string;
|
|
155
|
+
coin: string;
|
|
156
|
+
status: number;
|
|
157
|
+
address: string;
|
|
158
|
+
txId: string;
|
|
159
|
+
applyTime: Date;
|
|
160
|
+
network: string;
|
|
161
|
+
transferType: number;
|
|
162
|
+
info: string;
|
|
163
|
+
confirmNo: number;
|
|
164
|
+
walletType: number;
|
|
165
|
+
txKey: string;
|
|
166
|
+
completeTime: Date;
|
|
167
|
+
}
|
|
168
|
+
export interface IDepositRecord {
|
|
169
|
+
id: string;
|
|
170
|
+
amount: string;
|
|
171
|
+
coin: string;
|
|
172
|
+
network: string;
|
|
173
|
+
status: number;
|
|
174
|
+
address: string;
|
|
175
|
+
addressTag: string;
|
|
176
|
+
txId: string;
|
|
177
|
+
insertTime: number;
|
|
178
|
+
transferType: number;
|
|
179
|
+
confirmTimes: string;
|
|
180
|
+
unlockConfirm: number;
|
|
181
|
+
walletType: number;
|
|
182
|
+
}
|
|
183
|
+
export interface IUnifiedUmOrderResponse {
|
|
184
|
+
clientOrderId: string;
|
|
185
|
+
cumQty: string;
|
|
186
|
+
cumQuote: string;
|
|
187
|
+
executedQty: string;
|
|
188
|
+
orderId: number;
|
|
189
|
+
avgPrice: string;
|
|
190
|
+
origQty: string;
|
|
191
|
+
price: string;
|
|
192
|
+
reduceOnly: boolean;
|
|
193
|
+
side: string;
|
|
194
|
+
positionSide: string;
|
|
195
|
+
status: string;
|
|
196
|
+
symbol: string;
|
|
197
|
+
timeInForce: string;
|
|
198
|
+
type: string;
|
|
199
|
+
selfTradePreventionMode: string;
|
|
200
|
+
goodTillDate: number;
|
|
201
|
+
updateTime: number;
|
|
202
|
+
}
|
|
203
|
+
export interface IUMIncomeRecord {
|
|
204
|
+
symbol: string;
|
|
205
|
+
incomeType: string;
|
|
206
|
+
income: string;
|
|
207
|
+
asset: string;
|
|
208
|
+
info: string;
|
|
209
|
+
time: number;
|
|
210
|
+
tranId: string;
|
|
211
|
+
tradeId: string;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* 查询账户信息(USER_DATA)
|
|
215
|
+
*
|
|
216
|
+
* 查询账户信息
|
|
217
|
+
*
|
|
218
|
+
* 权重: 20
|
|
219
|
+
*
|
|
220
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Information
|
|
221
|
+
*/
|
|
222
|
+
export declare const getUnifiedAccountInfo: (credential: ICredential) => Promise<IUnifiedAccountInfo | IApiError>;
|
|
223
|
+
/**
|
|
224
|
+
* 获取UM账户信息
|
|
225
|
+
*
|
|
226
|
+
* 现有UM账户资产和仓位信息
|
|
227
|
+
*
|
|
228
|
+
* 权重: 5
|
|
229
|
+
*
|
|
230
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Account-Detail
|
|
231
|
+
*/
|
|
232
|
+
export declare const getUnifiedUmAccount: (credential: ICredential) => Promise<IUnifiedUmAccount | IApiError>;
|
|
233
|
+
/**
|
|
234
|
+
* 查看当前全部UM挂单(USER_DATA)
|
|
235
|
+
*
|
|
236
|
+
* 查看当前全部UM挂单,请小心使用不带symbol参数的调用
|
|
237
|
+
*
|
|
238
|
+
* 权重: 带symbol 1 - 不带 40
|
|
239
|
+
*
|
|
240
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders
|
|
241
|
+
*/
|
|
242
|
+
export declare const getUnifiedUmOpenOrders: (credential: ICredential, params?: {
|
|
243
|
+
symbol?: string;
|
|
244
|
+
}) => Promise<IUnifiedUmOpenOrder[]>;
|
|
245
|
+
/**
|
|
246
|
+
* 查询账户余额(USER_DATA)
|
|
247
|
+
*
|
|
248
|
+
* 查询账户余额
|
|
249
|
+
*
|
|
250
|
+
* 权重: 20
|
|
251
|
+
*
|
|
252
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Balance
|
|
253
|
+
*/
|
|
254
|
+
export declare const getUnifiedAccountBalance: (credential: ICredential, params?: {
|
|
255
|
+
assets?: string;
|
|
256
|
+
}) => Promise<IUnifiedAccountBalanceEntry[] | IApiError>;
|
|
257
|
+
/**
|
|
258
|
+
* 账户信息 (USER_DATA)
|
|
259
|
+
*
|
|
260
|
+
* 权重: 20
|
|
261
|
+
*
|
|
262
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api#%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data
|
|
263
|
+
*/
|
|
264
|
+
export declare const getSpotAccountInfo: (credential: ICredential, params?: {
|
|
265
|
+
omitZeroBalances?: boolean;
|
|
266
|
+
}) => Promise<ISpotAccountInfo | IApiError>;
|
|
267
|
+
/**
|
|
268
|
+
* Current open orders (USER_DATA)
|
|
269
|
+
*
|
|
270
|
+
* 权重: 带symbol: 6 不带: 80
|
|
271
|
+
*
|
|
272
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/account-endpoints#%E6%9F%A5%E7%9C%8B%E8%B4%A6%E6%88%B7%E5%BD%93%E5%89%8D%E6%8C%82%E5%8D%95-user_data
|
|
273
|
+
*/
|
|
274
|
+
export declare const getSpotOpenOrders: (credential: ICredential, params?: {
|
|
275
|
+
symbol?: string;
|
|
276
|
+
}) => Promise<ISpotOrder[] | IApiError>;
|
|
277
|
+
/**
|
|
278
|
+
* New order (TRADE)
|
|
279
|
+
*
|
|
280
|
+
* 权重: 1
|
|
281
|
+
*
|
|
282
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E4%B8%8B%E5%8D%95-trade
|
|
283
|
+
*/
|
|
284
|
+
export declare const postSpotOrder: (credential: ICredential, params: {
|
|
285
|
+
symbol: string;
|
|
286
|
+
side: string;
|
|
287
|
+
type: string;
|
|
288
|
+
timeInForce?: string;
|
|
289
|
+
quantity?: number;
|
|
290
|
+
quoteOrderQty?: number;
|
|
291
|
+
price?: number;
|
|
292
|
+
newClientOrderId?: string;
|
|
293
|
+
strategyId?: number;
|
|
294
|
+
strategyType?: number;
|
|
295
|
+
stopPrice?: number;
|
|
296
|
+
trailingDelta?: number;
|
|
297
|
+
icebergQty?: number;
|
|
298
|
+
newOrderRespType?: string;
|
|
299
|
+
selfTradePreventionMode?: string;
|
|
300
|
+
pegPriceType?: string;
|
|
301
|
+
pegOffsetValue?: number;
|
|
302
|
+
pegOffsetType?: string;
|
|
303
|
+
}) => Promise<ISpotNewOrderResponse | IApiError>;
|
|
304
|
+
/**
|
|
305
|
+
* Cancel order (TRADE)
|
|
306
|
+
*
|
|
307
|
+
* 权重: 1
|
|
308
|
+
*
|
|
309
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E6%92%A4%E9%94%80%E8%AE%A2%E5%8D%95-trade
|
|
310
|
+
*/
|
|
311
|
+
export declare const deleteSpotOrder: (credential: ICredential, params: {
|
|
312
|
+
symbol: string;
|
|
313
|
+
orderId?: string | number;
|
|
314
|
+
origClientOrderId?: string;
|
|
315
|
+
newClientOrderId?: string;
|
|
316
|
+
cancelRestrictions?: string;
|
|
317
|
+
}) => Promise<ISpotOrder | IApiError>;
|
|
318
|
+
/**
|
|
319
|
+
* 用户万向划转(USER_DATA)
|
|
320
|
+
*
|
|
321
|
+
* 用户万向划转
|
|
322
|
+
*
|
|
323
|
+
* 您需要开通api key 允许万向划转权限来调用此接口。
|
|
324
|
+
*
|
|
325
|
+
* 权重: 900
|
|
326
|
+
*
|
|
327
|
+
* https://developers.binance.com/docs/zh-CN/wallet/asset/user-universal-transfer
|
|
328
|
+
*/
|
|
329
|
+
export declare const postAssetTransfer: (credential: ICredential, params: {
|
|
330
|
+
type: string;
|
|
331
|
+
asset: string;
|
|
332
|
+
amount: number;
|
|
333
|
+
fromSymbol?: string;
|
|
334
|
+
toSymbol?: string;
|
|
335
|
+
}) => Promise<IAssetTransferResponse | IApiError>;
|
|
336
|
+
/**
|
|
337
|
+
* 统一账户资金归集(TRADE)
|
|
338
|
+
*
|
|
339
|
+
* 资金归集到统一账户钱包
|
|
340
|
+
*
|
|
341
|
+
* 权重: 750
|
|
342
|
+
*
|
|
343
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Fund-Auto-collection
|
|
344
|
+
*
|
|
345
|
+
* ISSUE(2024-07-18): 目前这是唯一能够将资金从原 U 本位合约账户转入统一账户的接口。
|
|
346
|
+
*/
|
|
347
|
+
export declare const postUnifiedAccountAutoCollection: (credential: ICredential) => Promise<{
|
|
348
|
+
msg: string;
|
|
349
|
+
}>;
|
|
350
|
+
/**
|
|
351
|
+
* 获取充值地址(支持多网络)(USER_DATA)
|
|
352
|
+
*
|
|
353
|
+
* 获取充值地址
|
|
354
|
+
*
|
|
355
|
+
* 权重: 10
|
|
356
|
+
*
|
|
357
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-address
|
|
358
|
+
*/
|
|
359
|
+
export declare const getDepositAddress: (credential: ICredential, params: {
|
|
360
|
+
coin: string;
|
|
361
|
+
network?: string;
|
|
362
|
+
amount?: number;
|
|
363
|
+
}) => Promise<IDepositAddress>;
|
|
364
|
+
/**
|
|
365
|
+
* 查询子账户列表(适用主账户)
|
|
366
|
+
*
|
|
367
|
+
* 权重: 1
|
|
368
|
+
*
|
|
369
|
+
* https://developers.binance.com/docs/zh-CN/sub_account/account-management/Query-Sub-account-List
|
|
370
|
+
*/
|
|
371
|
+
export declare const getSubAccountList: (credential: ICredential, params?: {
|
|
372
|
+
email?: string;
|
|
373
|
+
isFreeze?: number;
|
|
374
|
+
page?: number;
|
|
375
|
+
limit?: number;
|
|
376
|
+
}) => Promise<ISubAccountListResponse | IApiError>;
|
|
377
|
+
/**
|
|
378
|
+
* 提币(USER_DATA)
|
|
379
|
+
*
|
|
380
|
+
* 权重: 600
|
|
381
|
+
*
|
|
382
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw
|
|
383
|
+
*/
|
|
384
|
+
export declare const postWithdraw: (credential: ICredential, params: {
|
|
385
|
+
coin: string;
|
|
386
|
+
withdrawOrderId?: string;
|
|
387
|
+
network?: string;
|
|
388
|
+
address: string;
|
|
389
|
+
addressTag?: string;
|
|
390
|
+
amount: number;
|
|
391
|
+
transactionFeeFlag?: boolean;
|
|
392
|
+
name?: string;
|
|
393
|
+
walletType?: number;
|
|
394
|
+
}) => Promise<{
|
|
395
|
+
id: string;
|
|
396
|
+
} | IApiError>;
|
|
397
|
+
/**
|
|
398
|
+
* 获取提币历史(支持多网络)(USER_DATA)
|
|
399
|
+
*
|
|
400
|
+
* 获取提币历史 (支持多网络)
|
|
401
|
+
*
|
|
402
|
+
* 请求权重(IP)#
|
|
403
|
+
* 18000 请求限制: 每秒10次
|
|
404
|
+
*
|
|
405
|
+
* 本接口特别采用每秒UID速率限制,用户的总秒级 UID 速率限制为180000/秒。从该接口收到的响应包含key X-SAPI-USED-UID-WEIGHT-1S,该key定义了当前 UID 使用的权重
|
|
406
|
+
*
|
|
407
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw-history
|
|
408
|
+
*/
|
|
409
|
+
export declare const getWithdrawHistory: (credential: ICredential, params?: {
|
|
410
|
+
coin?: string;
|
|
411
|
+
withdrawOrderId?: string;
|
|
412
|
+
status?: number;
|
|
413
|
+
offset?: number;
|
|
414
|
+
limit?: number;
|
|
415
|
+
startTime?: number;
|
|
416
|
+
endTime?: number;
|
|
417
|
+
}) => Promise<IWithdrawRecord[]>;
|
|
418
|
+
/**
|
|
419
|
+
* 获取充值历史(支持多网络)
|
|
420
|
+
*
|
|
421
|
+
* 权重: 1
|
|
422
|
+
*
|
|
423
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-history
|
|
424
|
+
*/
|
|
425
|
+
export declare const getDepositHistory: (credential: ICredential, params?: {
|
|
426
|
+
includeSource?: boolean;
|
|
427
|
+
coin?: string;
|
|
428
|
+
status?: number;
|
|
429
|
+
startTime?: number;
|
|
430
|
+
endTime?: number;
|
|
431
|
+
offset?: number;
|
|
432
|
+
limit?: number;
|
|
433
|
+
txId?: string;
|
|
434
|
+
}) => Promise<IDepositRecord[]>;
|
|
435
|
+
/**
|
|
436
|
+
* UM下单(TRADE)
|
|
437
|
+
*
|
|
438
|
+
* 权重: 1
|
|
439
|
+
*
|
|
440
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/New-UM-Order
|
|
441
|
+
*/
|
|
442
|
+
export declare const postUmOrder: (credential: ICredential, params: {
|
|
443
|
+
symbol: string;
|
|
444
|
+
side: string;
|
|
445
|
+
positionSide?: string;
|
|
446
|
+
type: string;
|
|
447
|
+
timeInForce?: string;
|
|
448
|
+
quantity: number;
|
|
449
|
+
reduceOnly?: string;
|
|
450
|
+
price?: number;
|
|
451
|
+
newClientOrderId?: string;
|
|
452
|
+
newOrderRespType?: string;
|
|
453
|
+
selfTradePreventionMode?: string;
|
|
454
|
+
goodTillDate?: number;
|
|
455
|
+
}) => Promise<IUnifiedUmOrderResponse | IApiError>;
|
|
456
|
+
export declare const deleteUmOrder: (credential: ICredential, params: {
|
|
457
|
+
symbol: string;
|
|
458
|
+
orderId?: string | number;
|
|
459
|
+
origClientOrderId?: string;
|
|
460
|
+
}) => Promise<IUnifiedUmOrderResponse | IApiError>;
|
|
461
|
+
/**
|
|
462
|
+
* 获取UM损益资金流水(USER_DATA)
|
|
463
|
+
*
|
|
464
|
+
* 权重: 30
|
|
465
|
+
*
|
|
466
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Income-History
|
|
467
|
+
*/
|
|
468
|
+
export declare const getUMIncome: (credential: ICredential, params?: {
|
|
469
|
+
symbol?: string;
|
|
470
|
+
incomeType?: string;
|
|
471
|
+
startTime?: number;
|
|
472
|
+
endTime?: number;
|
|
473
|
+
recvWindow?: number;
|
|
474
|
+
limit?: number;
|
|
475
|
+
timestamp?: number;
|
|
476
|
+
}) => Promise<IUMIncomeRecord[]>;
|
|
477
|
+
//# sourceMappingURL=private-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-api.d.ts","sourceRoot":"","sources":["../../src/api/private-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,MAAM,CAAC;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;IAC9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IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,KACA,QAAQ,eAAe,EAAE,CAC+E,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUMIncome = exports.deleteUmOrder = exports.postUmOrder = exports.getDepositHistory = exports.getWithdrawHistory = exports.postWithdraw = exports.getSubAccountList = exports.getDepositAddress = exports.postUnifiedAccountAutoCollection = exports.postAssetTransfer = exports.deleteSpotOrder = exports.postSpotOrder = exports.getSpotOpenOrders = exports.getSpotAccountInfo = exports.getUnifiedAccountBalance = exports.getUnifiedUmOpenOrders = exports.getUnifiedUmAccount = exports.getUnifiedAccountInfo = void 0;
|
|
4
|
+
const client_1 = require("./client");
|
|
5
|
+
/**
|
|
6
|
+
* 查询账户信息(USER_DATA)
|
|
7
|
+
*
|
|
8
|
+
* 查询账户信息
|
|
9
|
+
*
|
|
10
|
+
* 权重: 20
|
|
11
|
+
*
|
|
12
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Information
|
|
13
|
+
*/
|
|
14
|
+
const getUnifiedAccountInfo = (credential) => (0, client_1.requestPrivate)(credential, 'GET', 'https://papi.binance.com/papi/v1/account');
|
|
15
|
+
exports.getUnifiedAccountInfo = getUnifiedAccountInfo;
|
|
16
|
+
/**
|
|
17
|
+
* 获取UM账户信息
|
|
18
|
+
*
|
|
19
|
+
* 现有UM账户资产和仓位信息
|
|
20
|
+
*
|
|
21
|
+
* 权重: 5
|
|
22
|
+
*
|
|
23
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Account-Detail
|
|
24
|
+
*/
|
|
25
|
+
const getUnifiedUmAccount = (credential) => (0, client_1.requestPrivate)(credential, 'GET', 'https://papi.binance.com/papi/v1/um/account');
|
|
26
|
+
exports.getUnifiedUmAccount = getUnifiedUmAccount;
|
|
27
|
+
/**
|
|
28
|
+
* 查看当前全部UM挂单(USER_DATA)
|
|
29
|
+
*
|
|
30
|
+
* 查看当前全部UM挂单,请小心使用不带symbol参数的调用
|
|
31
|
+
*
|
|
32
|
+
* 权重: 带symbol 1 - 不带 40
|
|
33
|
+
*
|
|
34
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders
|
|
35
|
+
*/
|
|
36
|
+
const getUnifiedUmOpenOrders = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://papi.binance.com/papi/v1/um/openOrders', params);
|
|
37
|
+
exports.getUnifiedUmOpenOrders = getUnifiedUmOpenOrders;
|
|
38
|
+
/**
|
|
39
|
+
* 查询账户余额(USER_DATA)
|
|
40
|
+
*
|
|
41
|
+
* 查询账户余额
|
|
42
|
+
*
|
|
43
|
+
* 权重: 20
|
|
44
|
+
*
|
|
45
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Balance
|
|
46
|
+
*/
|
|
47
|
+
const getUnifiedAccountBalance = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://papi.binance.com/papi/v1/balance', params);
|
|
48
|
+
exports.getUnifiedAccountBalance = getUnifiedAccountBalance;
|
|
49
|
+
/**
|
|
50
|
+
* 账户信息 (USER_DATA)
|
|
51
|
+
*
|
|
52
|
+
* 权重: 20
|
|
53
|
+
*
|
|
54
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api#%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data
|
|
55
|
+
*/
|
|
56
|
+
const getSpotAccountInfo = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/api/v3/account', params);
|
|
57
|
+
exports.getSpotAccountInfo = getSpotAccountInfo;
|
|
58
|
+
/**
|
|
59
|
+
* Current open orders (USER_DATA)
|
|
60
|
+
*
|
|
61
|
+
* 权重: 带symbol: 6 不带: 80
|
|
62
|
+
*
|
|
63
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/account-endpoints#%E6%9F%A5%E7%9C%8B%E8%B4%A6%E6%88%B7%E5%BD%93%E5%89%8D%E6%8C%82%E5%8D%95-user_data
|
|
64
|
+
*/
|
|
65
|
+
const getSpotOpenOrders = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/api/v3/openOrders', params);
|
|
66
|
+
exports.getSpotOpenOrders = getSpotOpenOrders;
|
|
67
|
+
/**
|
|
68
|
+
* New order (TRADE)
|
|
69
|
+
*
|
|
70
|
+
* 权重: 1
|
|
71
|
+
*
|
|
72
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E4%B8%8B%E5%8D%95-trade
|
|
73
|
+
*/
|
|
74
|
+
const postSpotOrder = (credential, params) => (0, client_1.requestPrivate)(credential, 'POST', 'https://api.binance.com/api/v3/order', params);
|
|
75
|
+
exports.postSpotOrder = postSpotOrder;
|
|
76
|
+
/**
|
|
77
|
+
* Cancel order (TRADE)
|
|
78
|
+
*
|
|
79
|
+
* 权重: 1
|
|
80
|
+
*
|
|
81
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E6%92%A4%E9%94%80%E8%AE%A2%E5%8D%95-trade
|
|
82
|
+
*/
|
|
83
|
+
const deleteSpotOrder = (credential, params) => (0, client_1.requestPrivate)(credential, 'DELETE', 'https://api.binance.com/api/v3/order', params);
|
|
84
|
+
exports.deleteSpotOrder = deleteSpotOrder;
|
|
85
|
+
/**
|
|
86
|
+
* 用户万向划转(USER_DATA)
|
|
87
|
+
*
|
|
88
|
+
* 用户万向划转
|
|
89
|
+
*
|
|
90
|
+
* 您需要开通api key 允许万向划转权限来调用此接口。
|
|
91
|
+
*
|
|
92
|
+
* 权重: 900
|
|
93
|
+
*
|
|
94
|
+
* https://developers.binance.com/docs/zh-CN/wallet/asset/user-universal-transfer
|
|
95
|
+
*/
|
|
96
|
+
const postAssetTransfer = (credential, params) => (0, client_1.requestPrivate)(credential, 'POST', 'https://api.binance.com/sapi/v1/asset/transfer', params);
|
|
97
|
+
exports.postAssetTransfer = postAssetTransfer;
|
|
98
|
+
/**
|
|
99
|
+
* 统一账户资金归集(TRADE)
|
|
100
|
+
*
|
|
101
|
+
* 资金归集到统一账户钱包
|
|
102
|
+
*
|
|
103
|
+
* 权重: 750
|
|
104
|
+
*
|
|
105
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Fund-Auto-collection
|
|
106
|
+
*
|
|
107
|
+
* ISSUE(2024-07-18): 目前这是唯一能够将资金从原 U 本位合约账户转入统一账户的接口。
|
|
108
|
+
*/
|
|
109
|
+
const postUnifiedAccountAutoCollection = (credential) => (0, client_1.requestPrivate)(credential, 'POST', 'https://papi.binance.com/papi/v1/auto-collection');
|
|
110
|
+
exports.postUnifiedAccountAutoCollection = postUnifiedAccountAutoCollection;
|
|
111
|
+
/**
|
|
112
|
+
* 获取充值地址(支持多网络)(USER_DATA)
|
|
113
|
+
*
|
|
114
|
+
* 获取充值地址
|
|
115
|
+
*
|
|
116
|
+
* 权重: 10
|
|
117
|
+
*
|
|
118
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-address
|
|
119
|
+
*/
|
|
120
|
+
const getDepositAddress = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/sapi/v1/capital/deposit/address', params);
|
|
121
|
+
exports.getDepositAddress = getDepositAddress;
|
|
122
|
+
/**
|
|
123
|
+
* 查询子账户列表(适用主账户)
|
|
124
|
+
*
|
|
125
|
+
* 权重: 1
|
|
126
|
+
*
|
|
127
|
+
* https://developers.binance.com/docs/zh-CN/sub_account/account-management/Query-Sub-account-List
|
|
128
|
+
*/
|
|
129
|
+
const getSubAccountList = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/sapi/v1/sub-account/list', params);
|
|
130
|
+
exports.getSubAccountList = getSubAccountList;
|
|
131
|
+
/**
|
|
132
|
+
* 提币(USER_DATA)
|
|
133
|
+
*
|
|
134
|
+
* 权重: 600
|
|
135
|
+
*
|
|
136
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw
|
|
137
|
+
*/
|
|
138
|
+
const postWithdraw = (credential, params) => (0, client_1.requestPrivate)(credential, 'POST', 'https://api.binance.com/sapi/v1/capital/withdraw/apply', params);
|
|
139
|
+
exports.postWithdraw = postWithdraw;
|
|
140
|
+
/**
|
|
141
|
+
* 获取提币历史(支持多网络)(USER_DATA)
|
|
142
|
+
*
|
|
143
|
+
* 获取提币历史 (支持多网络)
|
|
144
|
+
*
|
|
145
|
+
* 请求权重(IP)#
|
|
146
|
+
* 18000 请求限制: 每秒10次
|
|
147
|
+
*
|
|
148
|
+
* 本接口特别采用每秒UID速率限制,用户的总秒级 UID 速率限制为180000/秒。从该接口收到的响应包含key X-SAPI-USED-UID-WEIGHT-1S,该key定义了当前 UID 使用的权重
|
|
149
|
+
*
|
|
150
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw-history
|
|
151
|
+
*/
|
|
152
|
+
const getWithdrawHistory = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/sapi/v1/capital/withdraw/history', params);
|
|
153
|
+
exports.getWithdrawHistory = getWithdrawHistory;
|
|
154
|
+
/**
|
|
155
|
+
* 获取充值历史(支持多网络)
|
|
156
|
+
*
|
|
157
|
+
* 权重: 1
|
|
158
|
+
*
|
|
159
|
+
* https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-history
|
|
160
|
+
*/
|
|
161
|
+
const getDepositHistory = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/sapi/v1/capital/deposit/hisrec', params);
|
|
162
|
+
exports.getDepositHistory = getDepositHistory;
|
|
163
|
+
/**
|
|
164
|
+
* UM下单(TRADE)
|
|
165
|
+
*
|
|
166
|
+
* 权重: 1
|
|
167
|
+
*
|
|
168
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/New-UM-Order
|
|
169
|
+
*/
|
|
170
|
+
const postUmOrder = (credential, params) => (0, client_1.requestPrivate)(credential, 'POST', 'https://papi.binance.com/papi/v1/um/order', params);
|
|
171
|
+
exports.postUmOrder = postUmOrder;
|
|
172
|
+
const deleteUmOrder = (credential, params) => (0, client_1.requestPrivate)(credential, 'DELETE', 'https://papi.binance.com/papi/v1/um/order', params);
|
|
173
|
+
exports.deleteUmOrder = deleteUmOrder;
|
|
174
|
+
/**
|
|
175
|
+
* 获取UM损益资金流水(USER_DATA)
|
|
176
|
+
*
|
|
177
|
+
* 权重: 30
|
|
178
|
+
*
|
|
179
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Income-History
|
|
180
|
+
*/
|
|
181
|
+
const getUMIncome = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/papi/v1/um/income', params);
|
|
182
|
+
exports.getUMIncome = getUMIncome;
|
|
183
|
+
//# sourceMappingURL=private-api.js.map
|