bitget-api 3.1.6 → 3.1.8
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/cjs/index.d.ts +8 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/rest-client-v2.d.ts +45 -6
- package/dist/cjs/rest-client-v2.js +73 -0
- package/dist/cjs/rest-client-v2.js.map +1 -1
- package/dist/cjs/rest-client-v3.d.ts +110 -5
- package/dist/cjs/rest-client-v3.js +176 -1
- package/dist/cjs/rest-client-v3.js.map +1 -1
- package/dist/cjs/types/request/v2/broker.d.ts +68 -0
- package/dist/cjs/types/request/v2/common.d.ts +7 -0
- package/dist/cjs/types/request/v2/earn.d.ts +38 -0
- package/dist/cjs/types/request/v3/account.d.ts +16 -0
- package/dist/cjs/types/request/v3/broker.d.ts +2 -2
- package/dist/cjs/types/request/v3/copytrading.d.ts +15 -0
- package/dist/cjs/types/request/v3/copytrading.js +3 -0
- package/dist/cjs/types/request/v3/copytrading.js.map +1 -0
- package/dist/cjs/types/request/v3/earn.d.ts +38 -0
- package/dist/cjs/types/request/v3/earn.js +10 -0
- package/dist/cjs/types/request/v3/earn.js.map +1 -0
- package/dist/cjs/types/request/v3/p2p.d.ts +105 -0
- package/dist/cjs/types/request/v3/p2p.js +3 -0
- package/dist/cjs/types/request/v3/p2p.js.map +1 -0
- package/dist/cjs/types/request/v3/public.d.ts +4 -0
- package/dist/cjs/types/request/v3/strategy.d.ts +28 -13
- package/dist/cjs/types/request/v3/trade.d.ts +3 -0
- package/dist/cjs/types/response/v2/broker.d.ts +98 -0
- package/dist/cjs/types/response/v2/common.d.ts +8 -0
- package/dist/cjs/types/response/v2/earn.d.ts +115 -0
- package/dist/cjs/types/response/v2/spot.d.ts +2 -0
- package/dist/cjs/types/response/v3/account.d.ts +45 -1
- package/dist/cjs/types/response/v3/broker.d.ts +3 -3
- package/dist/cjs/types/response/v3/copytrading.d.ts +54 -0
- package/dist/cjs/types/response/v3/copytrading.js +10 -0
- package/dist/cjs/types/response/v3/copytrading.js.map +1 -0
- package/dist/cjs/types/response/v3/earn.d.ts +114 -0
- package/dist/cjs/types/response/v3/earn.js +10 -0
- package/dist/cjs/types/response/v3/earn.js.map +1 -0
- package/dist/cjs/types/response/v3/p2p.d.ts +202 -0
- package/dist/cjs/types/response/v3/p2p.js +3 -0
- package/dist/cjs/types/response/v3/p2p.js.map +1 -0
- package/dist/cjs/types/response/v3/public.d.ts +19 -0
- package/dist/cjs/types/response/v3/strategy.d.ts +15 -8
- package/dist/cjs/types/response/v3/trade.d.ts +2 -1
- package/dist/cjs/types/websockets/ws-api-request.d.ts +3 -0
- package/dist/cjs/types/websockets/ws-api.d.ts +2 -0
- package/dist/cjs/types/websockets/ws-general.d.ts +1 -1
- package/dist/cjs/util/websocket-util.js +1 -0
- package/dist/cjs/util/websocket-util.js.map +1 -1
- package/dist/mjs/index.d.ts +8 -0
- package/dist/mjs/index.js +8 -0
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/rest-client-v2.d.ts +45 -6
- package/dist/mjs/rest-client-v2.js +73 -0
- package/dist/mjs/rest-client-v2.js.map +1 -1
- package/dist/mjs/rest-client-v3.d.ts +110 -5
- package/dist/mjs/rest-client-v3.js +176 -1
- package/dist/mjs/rest-client-v3.js.map +1 -1
- package/dist/mjs/types/request/v2/broker.d.ts +68 -0
- package/dist/mjs/types/request/v2/common.d.ts +7 -0
- package/dist/mjs/types/request/v2/earn.d.ts +38 -0
- package/dist/mjs/types/request/v3/account.d.ts +16 -0
- package/dist/mjs/types/request/v3/broker.d.ts +2 -2
- package/dist/mjs/types/request/v3/copytrading.d.ts +15 -0
- package/dist/mjs/types/request/v3/copytrading.js +2 -0
- package/dist/mjs/types/request/v3/copytrading.js.map +1 -0
- package/dist/mjs/types/request/v3/earn.d.ts +38 -0
- package/dist/mjs/types/request/v3/earn.js +9 -0
- package/dist/mjs/types/request/v3/earn.js.map +1 -0
- package/dist/mjs/types/request/v3/p2p.d.ts +105 -0
- package/dist/mjs/types/request/v3/p2p.js +2 -0
- package/dist/mjs/types/request/v3/p2p.js.map +1 -0
- package/dist/mjs/types/request/v3/public.d.ts +4 -0
- package/dist/mjs/types/request/v3/strategy.d.ts +28 -13
- package/dist/mjs/types/request/v3/trade.d.ts +3 -0
- package/dist/mjs/types/response/v2/broker.d.ts +98 -0
- package/dist/mjs/types/response/v2/common.d.ts +8 -0
- package/dist/mjs/types/response/v2/earn.d.ts +115 -0
- package/dist/mjs/types/response/v2/spot.d.ts +2 -0
- package/dist/mjs/types/response/v3/account.d.ts +45 -1
- package/dist/mjs/types/response/v3/broker.d.ts +3 -3
- package/dist/mjs/types/response/v3/copytrading.d.ts +54 -0
- package/dist/mjs/types/response/v3/copytrading.js +9 -0
- package/dist/mjs/types/response/v3/copytrading.js.map +1 -0
- package/dist/mjs/types/response/v3/earn.d.ts +114 -0
- package/dist/mjs/types/response/v3/earn.js +9 -0
- package/dist/mjs/types/response/v3/earn.js.map +1 -0
- package/dist/mjs/types/response/v3/p2p.d.ts +202 -0
- package/dist/mjs/types/response/v3/p2p.js +2 -0
- package/dist/mjs/types/response/v3/p2p.js.map +1 -0
- package/dist/mjs/types/response/v3/public.d.ts +19 -0
- package/dist/mjs/types/response/v3/strategy.d.ts +15 -8
- package/dist/mjs/types/response/v3/trade.d.ts +2 -1
- package/dist/mjs/types/websockets/ws-api-request.d.ts +3 -0
- package/dist/mjs/types/websockets/ws-api.d.ts +2 -0
- package/dist/mjs/types/websockets/ws-general.d.ts +1 -1
- package/dist/mjs/util/websocket-util.js +1 -0
- package/dist/mjs/util/websocket-util.js.map +1 -1
- package/llms.txt +7178 -5570
- package/package.json +1 -1
|
@@ -144,3 +144,71 @@ export interface GetBrokerOrderCommissionRequestV2 {
|
|
|
144
144
|
export interface GetBrokerRebateInfoRequestV2 {
|
|
145
145
|
uid: string;
|
|
146
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* * Broker | Agent (affiliate) customer APIs
|
|
150
|
+
*
|
|
151
|
+
*/
|
|
152
|
+
export interface GetAgentCustomerCommissionsRequestV2 {
|
|
153
|
+
startTime?: string;
|
|
154
|
+
endTime?: string;
|
|
155
|
+
idLessThan?: string;
|
|
156
|
+
limit?: string;
|
|
157
|
+
uid?: string;
|
|
158
|
+
coin?: string;
|
|
159
|
+
symbol?: string;
|
|
160
|
+
showSub?: 'yes' | 'no';
|
|
161
|
+
}
|
|
162
|
+
export interface GetAgentSubCustomerListRequestV2 {
|
|
163
|
+
startTime?: string;
|
|
164
|
+
endTime?: string;
|
|
165
|
+
idLessThan?: string;
|
|
166
|
+
limit?: string;
|
|
167
|
+
uid?: string;
|
|
168
|
+
showSub?: 'yes' | 'no';
|
|
169
|
+
}
|
|
170
|
+
export interface AgentCustomerTradeVolumeRequestV2 {
|
|
171
|
+
startTime?: string;
|
|
172
|
+
endTime?: string;
|
|
173
|
+
pageNo?: string;
|
|
174
|
+
pageSize?: string;
|
|
175
|
+
uid?: string;
|
|
176
|
+
showSub?: 'yes' | 'no';
|
|
177
|
+
}
|
|
178
|
+
export interface AgentCustomerListRequestV2 {
|
|
179
|
+
startTime?: string;
|
|
180
|
+
endTime?: string;
|
|
181
|
+
pageNo?: string;
|
|
182
|
+
pageSize?: string;
|
|
183
|
+
uid?: string;
|
|
184
|
+
referralCode?: string;
|
|
185
|
+
showSub?: 'yes' | 'no';
|
|
186
|
+
}
|
|
187
|
+
export interface GetAgentCustomerKycResultRequestV2 {
|
|
188
|
+
startTime?: string;
|
|
189
|
+
endTime?: string;
|
|
190
|
+
idLessThan?: string;
|
|
191
|
+
limit?: string;
|
|
192
|
+
uid?: string;
|
|
193
|
+
showSub?: 'yes' | 'no';
|
|
194
|
+
}
|
|
195
|
+
export interface AgentCustomerDepositRequestV2 {
|
|
196
|
+
startTime?: string;
|
|
197
|
+
endTime?: string;
|
|
198
|
+
pageNo?: string;
|
|
199
|
+
pageSize?: string;
|
|
200
|
+
uid?: string;
|
|
201
|
+
showSub?: 'yes' | 'no';
|
|
202
|
+
}
|
|
203
|
+
export interface AgentCustomerAssetRequestV2 {
|
|
204
|
+
pageNo?: string;
|
|
205
|
+
pageSize?: string;
|
|
206
|
+
uid?: string;
|
|
207
|
+
showSub?: 'yes' | 'no';
|
|
208
|
+
}
|
|
209
|
+
export interface GetAgentCommissionDetailRequestV2 {
|
|
210
|
+
startTime?: string;
|
|
211
|
+
endTime?: string;
|
|
212
|
+
limit?: string;
|
|
213
|
+
idLessThan?: string;
|
|
214
|
+
}
|
|
@@ -124,6 +124,13 @@ export interface ModifyVirtualSubApiKeyRequestV2 {
|
|
|
124
124
|
ipList?: string[];
|
|
125
125
|
permList?: string[];
|
|
126
126
|
}
|
|
127
|
+
export interface CreateAgentSubaccountRequestV2 {
|
|
128
|
+
/** Lowercase letters only; max 20 characters */
|
|
129
|
+
username: string;
|
|
130
|
+
/** 8–32 characters, letters and numbers */
|
|
131
|
+
passphrase: string;
|
|
132
|
+
note?: string;
|
|
133
|
+
}
|
|
127
134
|
/**
|
|
128
135
|
*
|
|
129
136
|
* * Common | Convert
|
|
@@ -119,3 +119,41 @@ export interface GetLiquidationRecordsRequestV2 {
|
|
|
119
119
|
pageNo?: string;
|
|
120
120
|
pageSize?: string;
|
|
121
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
*
|
|
125
|
+
* Earn | On-Chain Elite
|
|
126
|
+
*
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
export interface GetEarnEliteRecordsRequestV2 {
|
|
130
|
+
type: 'subscribe' | 'redeem' | 'interest';
|
|
131
|
+
startTime?: string;
|
|
132
|
+
endTime?: string;
|
|
133
|
+
limit?: string;
|
|
134
|
+
cursor?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface GetEarnEliteSubscribeInfoRequestV2 {
|
|
137
|
+
productId: string;
|
|
138
|
+
}
|
|
139
|
+
export interface EarnEliteSubscribeRequestV2 {
|
|
140
|
+
productSubId: string;
|
|
141
|
+
amount: string;
|
|
142
|
+
coin?: string;
|
|
143
|
+
paymentAccount?: 'spot' | 'unified';
|
|
144
|
+
}
|
|
145
|
+
export interface GetEarnEliteSubscribeResultRequestV2 {
|
|
146
|
+
orderId: string;
|
|
147
|
+
}
|
|
148
|
+
export interface GetEarnEliteRedeemInfoRequestV2 {
|
|
149
|
+
productId: string;
|
|
150
|
+
}
|
|
151
|
+
export interface RedeemEarnEliteRequestV2 {
|
|
152
|
+
productId: string;
|
|
153
|
+
productSubId: string;
|
|
154
|
+
redeemType: 'fast' | 'standard';
|
|
155
|
+
amount: string;
|
|
156
|
+
receiveAccount: 'spot' | 'unified';
|
|
157
|
+
advancedSettle?: 'yes' | 'no';
|
|
158
|
+
coin?: string;
|
|
159
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export type AccountAdjustModeV3 = 'basic' | 'advanced' | 'delta' | 'isolated';
|
|
2
|
+
export interface AdjustAccountModeRequestV3 {
|
|
3
|
+
mode: AccountAdjustModeV3;
|
|
4
|
+
/** Sub-account UID when the master account switches mode for a sub-account */
|
|
5
|
+
targetUid?: string;
|
|
6
|
+
}
|
|
1
7
|
export interface SetLeverageRequestV3 {
|
|
2
8
|
category: 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
3
9
|
symbol?: string;
|
|
@@ -164,6 +170,16 @@ export interface GetWithdrawRecordsRequestV3 {
|
|
|
164
170
|
limit?: string;
|
|
165
171
|
cursor?: string;
|
|
166
172
|
}
|
|
173
|
+
export interface GetWithdrawAddressBookRequestV3 {
|
|
174
|
+
coin?: string;
|
|
175
|
+
type?: 'EVM' | 'regular' | 'universal' | 'internal';
|
|
176
|
+
limit?: string;
|
|
177
|
+
cursor?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface CancelWithdrawalRequestV3 {
|
|
180
|
+
orderId?: string;
|
|
181
|
+
clientOid?: string;
|
|
182
|
+
}
|
|
167
183
|
export interface SetDepositAccountRequestV3 {
|
|
168
184
|
coin: string;
|
|
169
185
|
accountType: 'funding' | 'unified' | 'otc';
|
|
@@ -47,7 +47,7 @@ export interface CreateBrokerSubApiKeyRequestV3 {
|
|
|
47
47
|
passphrase: string;
|
|
48
48
|
label: string;
|
|
49
49
|
ipList?: string[];
|
|
50
|
-
permType: '
|
|
50
|
+
permType: 'read_write' | 'read_only';
|
|
51
51
|
permList: string[];
|
|
52
52
|
}
|
|
53
53
|
export interface ModifyBrokerSubApiKeyRequestV3 {
|
|
@@ -56,7 +56,7 @@ export interface ModifyBrokerSubApiKeyRequestV3 {
|
|
|
56
56
|
apiKey: string;
|
|
57
57
|
label?: string;
|
|
58
58
|
ipList?: string[];
|
|
59
|
-
permType?: '
|
|
59
|
+
permType?: 'read_write' | 'read_only';
|
|
60
60
|
permList?: string[];
|
|
61
61
|
}
|
|
62
62
|
export interface DeleteBrokerSubApiKeyRequestV3 {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface GetCopyFuturesMaxTransferableRequestV3 {
|
|
2
|
+
coin: string;
|
|
3
|
+
}
|
|
4
|
+
export interface CopyFuturesTransferRequestV3 {
|
|
5
|
+
type: 'in' | 'out';
|
|
6
|
+
coin: string;
|
|
7
|
+
amount: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetCopyFuturesTransferRecordRequestV3 {
|
|
10
|
+
startTime?: string;
|
|
11
|
+
endTime?: string;
|
|
12
|
+
limit?: string;
|
|
13
|
+
/** Pass transferId from the previous page to paginate forward */
|
|
14
|
+
cursor?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copytrading.js","sourceRoot":"","sources":["../../../../../src/types/request/v3/copytrading.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
* Earn | On-Chain Elite (UTA)
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export interface GetEarnEliteRecordsRequestV3 {
|
|
9
|
+
type: 'subscribe' | 'redeem' | 'interest';
|
|
10
|
+
startTime?: string;
|
|
11
|
+
endTime?: string;
|
|
12
|
+
limit?: string;
|
|
13
|
+
cursor?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface GetEarnEliteSubscribeInfoRequestV3 {
|
|
16
|
+
productId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EarnEliteSubscribeRequestV3 {
|
|
19
|
+
productSubId: string;
|
|
20
|
+
amount: string;
|
|
21
|
+
coin?: string;
|
|
22
|
+
paymentAccount?: 'spot' | 'unified';
|
|
23
|
+
}
|
|
24
|
+
export interface GetEarnEliteSubscribeResultRequestV3 {
|
|
25
|
+
orderId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetEarnEliteRedeemInfoRequestV3 {
|
|
28
|
+
productId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RedeemEarnEliteRequestV3 {
|
|
31
|
+
productId: string;
|
|
32
|
+
productSubId: string;
|
|
33
|
+
redeemType: 'fast' | 'standard';
|
|
34
|
+
amount: string;
|
|
35
|
+
receiveAccount: 'spot' | 'unified';
|
|
36
|
+
advancedSettle?: 'yes' | 'no';
|
|
37
|
+
coin?: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"earn.js","sourceRoot":"","sources":["../../../../../src/types/request/v3/earn.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export type P2pSideV3 = 'buy' | 'sell';
|
|
2
|
+
export type P2pPriceTypeV3 = 'fixed' | 'floating';
|
|
3
|
+
export type P2pMarketTypeV3 = 'public' | 'private';
|
|
4
|
+
export type P2pAdStatusV3 = 'publish' | 'delist' | 'remove';
|
|
5
|
+
export type P2pAdOperationV3 = 'publish' | 'delist' | 'remove';
|
|
6
|
+
export type P2pOrderStatusV3 = 'pending_payment' | 'pending_release' | 'completed' | 'cancelled' | 'in_appeal';
|
|
7
|
+
export interface P2pPayMethodIdRefV3 {
|
|
8
|
+
payMethodId: string;
|
|
9
|
+
userPayMethodId?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GetP2pAdListRequestV3 {
|
|
12
|
+
token: string;
|
|
13
|
+
fiat: string;
|
|
14
|
+
side: P2pSideV3;
|
|
15
|
+
amount?: string;
|
|
16
|
+
pageNum: string;
|
|
17
|
+
limit: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GetP2pExchangeRateRequestV3 {
|
|
20
|
+
token: string;
|
|
21
|
+
fiat: string;
|
|
22
|
+
}
|
|
23
|
+
export interface P2pFeeSimulateRequestV3 {
|
|
24
|
+
token: string;
|
|
25
|
+
fiat: string;
|
|
26
|
+
side: P2pSideV3;
|
|
27
|
+
marketType: P2pMarketTypeV3;
|
|
28
|
+
amount: string;
|
|
29
|
+
}
|
|
30
|
+
export interface GetP2pAdLimitRequestV3 {
|
|
31
|
+
token: string;
|
|
32
|
+
fiat: string;
|
|
33
|
+
side: P2pSideV3;
|
|
34
|
+
}
|
|
35
|
+
export interface CreateP2pAdRequestV3 {
|
|
36
|
+
token: string;
|
|
37
|
+
fiat: string;
|
|
38
|
+
side: P2pSideV3;
|
|
39
|
+
priceType: P2pPriceTypeV3;
|
|
40
|
+
price?: string;
|
|
41
|
+
premium?: string;
|
|
42
|
+
minAmount: string;
|
|
43
|
+
maxAmount: string;
|
|
44
|
+
quantity: string;
|
|
45
|
+
payMethodIds: P2pPayMethodIdRefV3[];
|
|
46
|
+
remark?: string;
|
|
47
|
+
tradeTerms?: string;
|
|
48
|
+
payTimeLimit: string;
|
|
49
|
+
}
|
|
50
|
+
export interface UpdateP2pAdRequestV3 {
|
|
51
|
+
advId: string;
|
|
52
|
+
priceType?: P2pPriceTypeV3;
|
|
53
|
+
price?: string;
|
|
54
|
+
premium?: string;
|
|
55
|
+
minAmount?: string;
|
|
56
|
+
maxAmount?: string;
|
|
57
|
+
quantity?: string;
|
|
58
|
+
payMethodIds?: P2pPayMethodIdRefV3[];
|
|
59
|
+
payTimeLimit?: string;
|
|
60
|
+
remark?: string;
|
|
61
|
+
tradeTerms?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface OperateP2pAdRequestV3 {
|
|
64
|
+
advId: string;
|
|
65
|
+
operation: P2pAdOperationV3;
|
|
66
|
+
}
|
|
67
|
+
export interface GetP2pAdInfoRequestV3 {
|
|
68
|
+
advId: string;
|
|
69
|
+
}
|
|
70
|
+
export interface GetP2pMyAdsRequestV3 {
|
|
71
|
+
startTime?: string;
|
|
72
|
+
endTime?: string;
|
|
73
|
+
limit?: string;
|
|
74
|
+
cursor?: string;
|
|
75
|
+
advId?: string;
|
|
76
|
+
token?: string;
|
|
77
|
+
fiat?: string;
|
|
78
|
+
status?: P2pAdStatusV3;
|
|
79
|
+
}
|
|
80
|
+
export interface GetP2pPendingOrdersRequestV3 {
|
|
81
|
+
orderId?: string;
|
|
82
|
+
side?: P2pSideV3;
|
|
83
|
+
startTime?: string;
|
|
84
|
+
endTime?: string;
|
|
85
|
+
cursor?: string;
|
|
86
|
+
limit?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface GetP2pAllOrdersRequestV3 {
|
|
89
|
+
startTime?: string;
|
|
90
|
+
endTime?: string;
|
|
91
|
+
limit?: string;
|
|
92
|
+
cursor?: string;
|
|
93
|
+
orderId?: string;
|
|
94
|
+
side?: P2pSideV3;
|
|
95
|
+
status?: P2pOrderStatusV3;
|
|
96
|
+
}
|
|
97
|
+
export interface GetP2pOrderInfoRequestV3 {
|
|
98
|
+
orderId: string;
|
|
99
|
+
}
|
|
100
|
+
export interface P2pOrderActionRequestV3 {
|
|
101
|
+
orderId: string;
|
|
102
|
+
}
|
|
103
|
+
export interface GetP2pBalanceRequestV3 {
|
|
104
|
+
token: string;
|
|
105
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"p2p.js","sourceRoot":"","sources":["../../../../../src/types/request/v3/p2p.ts"],"names":[],"mappings":""}
|
|
@@ -49,6 +49,10 @@ export interface GetPositionTierRequestV3 {
|
|
|
49
49
|
export interface GetRiskReserveRequestV3 {
|
|
50
50
|
category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
51
51
|
symbol: string;
|
|
52
|
+
marginCoin?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface GetRiskReserveAllRequestV3 {
|
|
55
|
+
category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
52
56
|
}
|
|
53
57
|
export interface GetInstrumentsRequestV3 {
|
|
54
58
|
category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
@@ -1,32 +1,47 @@
|
|
|
1
|
+
export type StrategyOrderTypeV3 = 'tpsl' | 'trigger';
|
|
2
|
+
export type StrategyOrderStatusV3 = 'pending' | 'success' | 'failed' | 'cancelled' | 'submitting';
|
|
3
|
+
export type StrategyTriggerByV3 = 'market' | 'mark';
|
|
4
|
+
export type StrategyTriggerOrderTypeV3 = 'limit' | 'market';
|
|
1
5
|
export interface PlaceStrategyOrderRequestV3 {
|
|
2
6
|
category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
3
7
|
symbol: string;
|
|
4
8
|
clientOid?: string;
|
|
5
|
-
type?:
|
|
9
|
+
type?: StrategyOrderTypeV3;
|
|
6
10
|
tpslMode?: 'full' | 'partial';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
/** Required when tpslMode=partial or for trigger orders */
|
|
12
|
+
qty?: string;
|
|
13
|
+
side?: 'buy' | 'sell';
|
|
14
|
+
posSide?: 'long' | 'short';
|
|
15
|
+
reduceOnly?: 'yes' | 'no';
|
|
16
|
+
tpTriggerBy?: StrategyTriggerByV3;
|
|
17
|
+
slTriggerBy?: StrategyTriggerByV3;
|
|
11
18
|
takeProfit?: string;
|
|
12
19
|
stopLoss?: string;
|
|
13
|
-
tpOrderType?:
|
|
14
|
-
slOrderType?:
|
|
20
|
+
tpOrderType?: StrategyTriggerOrderTypeV3;
|
|
21
|
+
slOrderType?: StrategyTriggerOrderTypeV3;
|
|
15
22
|
tpLimitPrice?: string;
|
|
16
23
|
slLimitPrice?: string;
|
|
24
|
+
triggerBy?: StrategyTriggerByV3;
|
|
25
|
+
triggerPrice?: string;
|
|
26
|
+
triggerOrderType?: StrategyTriggerOrderTypeV3;
|
|
27
|
+
triggerOrderPrice?: string;
|
|
17
28
|
}
|
|
18
29
|
export interface ModifyStrategyOrderRequestV3 {
|
|
19
30
|
orderId?: string;
|
|
20
31
|
clientOid?: string;
|
|
21
32
|
qty: string;
|
|
22
|
-
tpTriggerBy?:
|
|
23
|
-
slTriggerBy?:
|
|
33
|
+
tpTriggerBy?: StrategyTriggerByV3;
|
|
34
|
+
slTriggerBy?: StrategyTriggerByV3;
|
|
24
35
|
takeProfit?: string;
|
|
25
36
|
stopLoss?: string;
|
|
26
|
-
tpOrderType?:
|
|
27
|
-
slOrderType?:
|
|
37
|
+
tpOrderType?: StrategyTriggerOrderTypeV3;
|
|
38
|
+
slOrderType?: StrategyTriggerOrderTypeV3;
|
|
28
39
|
tpLimitPrice?: string;
|
|
29
40
|
slLimitPrice?: string;
|
|
41
|
+
triggerBy?: StrategyTriggerByV3;
|
|
42
|
+
triggerPrice?: string;
|
|
43
|
+
triggerOrderType?: StrategyTriggerOrderTypeV3;
|
|
44
|
+
triggerOrderPrice?: string;
|
|
30
45
|
}
|
|
31
46
|
export interface CancelStrategyOrderRequestV3 {
|
|
32
47
|
orderId?: string;
|
|
@@ -34,11 +49,11 @@ export interface CancelStrategyOrderRequestV3 {
|
|
|
34
49
|
}
|
|
35
50
|
export interface GetUnfilledStrategyOrdersRequestV3 {
|
|
36
51
|
category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
37
|
-
type?:
|
|
52
|
+
type?: StrategyOrderTypeV3;
|
|
38
53
|
}
|
|
39
54
|
export interface GetHistoryStrategyOrdersRequestV3 {
|
|
40
55
|
category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
41
|
-
type?:
|
|
56
|
+
type?: StrategyOrderTypeV3;
|
|
42
57
|
startTime?: string;
|
|
43
58
|
endTime?: string;
|
|
44
59
|
limit?: string;
|
|
@@ -90,6 +90,7 @@ export interface PlaceBatchOrdersRequestV3 {
|
|
|
90
90
|
clientOid?: string;
|
|
91
91
|
reduceOnly?: 'yes' | 'no';
|
|
92
92
|
}
|
|
93
|
+
export type FuturesMarginModeV3 = 'crossed' | 'isolated';
|
|
93
94
|
export interface PlaceOrderRequestV3 {
|
|
94
95
|
category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
|
|
95
96
|
symbol: string;
|
|
@@ -101,6 +102,8 @@ export interface PlaceOrderRequestV3 {
|
|
|
101
102
|
posSide?: 'long' | 'short';
|
|
102
103
|
clientOid?: string;
|
|
103
104
|
reduceOnly?: 'yes' | 'no';
|
|
105
|
+
/** Futures only. Defaults to crossed */
|
|
106
|
+
marginMode?: FuturesMarginModeV3;
|
|
104
107
|
stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both';
|
|
105
108
|
takeProfitPrice?: string;
|
|
106
109
|
stopLossPrice?: string;
|
|
@@ -243,3 +243,101 @@ export interface BrokerRebateInfoV2 {
|
|
|
243
243
|
clientSpotRebateRatio: string;
|
|
244
244
|
clientFuturesRebateRatio: string;
|
|
245
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
*
|
|
248
|
+
* * Broker | Agent (affiliate) customer APIs
|
|
249
|
+
*
|
|
250
|
+
*/
|
|
251
|
+
export interface AgentCustomerCommissionItemV2 {
|
|
252
|
+
uid: string;
|
|
253
|
+
date: string;
|
|
254
|
+
coin: string;
|
|
255
|
+
symbol: string;
|
|
256
|
+
productType: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES' | string;
|
|
257
|
+
dealAmount: string;
|
|
258
|
+
fee: string;
|
|
259
|
+
feeDeduction: string;
|
|
260
|
+
activityBonusDeduct: string;
|
|
261
|
+
spotCouponDeduct: string;
|
|
262
|
+
futuresCouponDeduct: string;
|
|
263
|
+
spotFeeDiscountDeduct: string;
|
|
264
|
+
negativeMakerFeeDeduct: string;
|
|
265
|
+
feePaid: string;
|
|
266
|
+
rebateAmount: string;
|
|
267
|
+
userTotalRebateAmount: string;
|
|
268
|
+
dayTotalRebateAmount: string;
|
|
269
|
+
totalRebateAmount: string;
|
|
270
|
+
}
|
|
271
|
+
export interface AgentCustomerCommissionsV2 {
|
|
272
|
+
endId: string;
|
|
273
|
+
commissionList: AgentCustomerCommissionItemV2[];
|
|
274
|
+
}
|
|
275
|
+
export interface AgentSubCustomerItemV2 {
|
|
276
|
+
uid: string;
|
|
277
|
+
registerTime: string;
|
|
278
|
+
}
|
|
279
|
+
export interface AgentSubCustomerListV2 {
|
|
280
|
+
list: AgentSubCustomerItemV2[];
|
|
281
|
+
minId: string;
|
|
282
|
+
}
|
|
283
|
+
export interface AgentCustomerTradeVolumeItemV2 {
|
|
284
|
+
uid: string;
|
|
285
|
+
/** API field name (Bitget spelling). */
|
|
286
|
+
volumn: string;
|
|
287
|
+
spotVolume: string;
|
|
288
|
+
futuresVolume: string;
|
|
289
|
+
time: string;
|
|
290
|
+
}
|
|
291
|
+
export interface AgentCustomerListItemV2 {
|
|
292
|
+
uid: string;
|
|
293
|
+
registerTime: string;
|
|
294
|
+
}
|
|
295
|
+
export interface AgentCustomerKycItemV2 {
|
|
296
|
+
uid: string;
|
|
297
|
+
kycResult: 'passed' | 'not_passed' | string;
|
|
298
|
+
}
|
|
299
|
+
export interface AgentCustomerKycResultV2 {
|
|
300
|
+
userList: AgentCustomerKycItemV2[];
|
|
301
|
+
endId: string;
|
|
302
|
+
}
|
|
303
|
+
export interface AgentCustomerDepositItemV2 {
|
|
304
|
+
orderId: string;
|
|
305
|
+
uid: string;
|
|
306
|
+
depositTime: string;
|
|
307
|
+
depositCoin: string;
|
|
308
|
+
depositAmount: string;
|
|
309
|
+
}
|
|
310
|
+
export interface AgentCustomerAssetItemV2 {
|
|
311
|
+
balance: string;
|
|
312
|
+
uid: string;
|
|
313
|
+
uTime: string;
|
|
314
|
+
remark: string;
|
|
315
|
+
}
|
|
316
|
+
export interface AgentCommissionDetailItemV2 {
|
|
317
|
+
uid: string;
|
|
318
|
+
bizType: 'spot' | 'futures' | string;
|
|
319
|
+
subBizType: string;
|
|
320
|
+
symbol: string;
|
|
321
|
+
coin: string;
|
|
322
|
+
fee: string;
|
|
323
|
+
volume: string;
|
|
324
|
+
activityBonusDeduct: string;
|
|
325
|
+
spotCouponDeduct: string;
|
|
326
|
+
futuresCouponDeduct: string;
|
|
327
|
+
spotFeeDiscountDeduct: string;
|
|
328
|
+
negativeMakerFeeDeduct: string;
|
|
329
|
+
feePaid: string;
|
|
330
|
+
directCommission: string;
|
|
331
|
+
subCommission: string;
|
|
332
|
+
partnerCommission: string;
|
|
333
|
+
partnerActualCommission: string;
|
|
334
|
+
traderType: string;
|
|
335
|
+
apiType: string;
|
|
336
|
+
status: 'settled' | 'unsettled' | 'notIssued' | string;
|
|
337
|
+
startCalculationTime: string;
|
|
338
|
+
endCalculationTime: string;
|
|
339
|
+
}
|
|
340
|
+
export interface AgentCommissionDetailV2 {
|
|
341
|
+
endId: string;
|
|
342
|
+
commissionList: AgentCommissionDetailItemV2[];
|
|
343
|
+
}
|
|
@@ -283,6 +283,14 @@ export interface ModifyVirtualSubAccountApiKeyV2 {
|
|
|
283
283
|
permList: string[];
|
|
284
284
|
ipList: string[];
|
|
285
285
|
}
|
|
286
|
+
export interface CreateAgentSubaccountV2 {
|
|
287
|
+
username: string;
|
|
288
|
+
subUid: string;
|
|
289
|
+
apiKey: string;
|
|
290
|
+
secret: string;
|
|
291
|
+
note: string;
|
|
292
|
+
createdTime: string;
|
|
293
|
+
}
|
|
286
294
|
export interface SubAccountApiKeyItemV2 {
|
|
287
295
|
subAccountUid: string;
|
|
288
296
|
label: string;
|