bitget-api 3.2.1 → 3.2.3
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 +23 -22
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/rest-client-v3.d.ts +44 -4
- package/dist/cjs/rest-client-v3.js +104 -0
- package/dist/cjs/rest-client-v3.js.map +1 -1
- package/dist/cjs/types/request/v3/account.d.ts +20 -0
- package/dist/cjs/types/request/v3/copytrading.d.ts +12 -0
- package/dist/cjs/types/request/v3/stockplus.d.ts +141 -0
- package/dist/cjs/types/request/v3/stockplus.js +10 -0
- package/dist/cjs/types/request/v3/stockplus.js.map +1 -0
- package/dist/cjs/types/request/v3/trade.d.ts +2 -0
- package/dist/cjs/types/response/v2/futures.d.ts +4 -0
- package/dist/cjs/types/response/v3/account.d.ts +53 -0
- package/dist/cjs/types/response/v3/copytrading.d.ts +46 -1
- package/dist/cjs/types/response/v3/public.d.ts +5 -0
- package/dist/cjs/types/response/v3/stockplus.d.ts +302 -0
- package/dist/cjs/types/response/v3/stockplus.js +10 -0
- package/dist/cjs/types/response/v3/stockplus.js.map +1 -0
- package/dist/cjs/types/response/v3/trade.d.ts +4 -0
- package/dist/cjs/types/websockets/ws-api-request.d.ts +2 -0
- package/dist/cjs/types/websockets/ws-api.d.ts +11 -0
- package/dist/cjs/types/websockets/ws-events.d.ts +7 -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 +2 -0
- package/dist/mjs/index.js +2 -0
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/rest-client-v3.d.ts +44 -4
- package/dist/mjs/rest-client-v3.js +104 -0
- package/dist/mjs/rest-client-v3.js.map +1 -1
- package/dist/mjs/types/request/v3/account.d.ts +20 -0
- package/dist/mjs/types/request/v3/copytrading.d.ts +12 -0
- package/dist/mjs/types/request/v3/stockplus.d.ts +141 -0
- package/dist/mjs/types/request/v3/stockplus.js +9 -0
- package/dist/mjs/types/request/v3/stockplus.js.map +1 -0
- package/dist/mjs/types/request/v3/trade.d.ts +2 -0
- package/dist/mjs/types/response/v2/futures.d.ts +4 -0
- package/dist/mjs/types/response/v3/account.d.ts +53 -0
- package/dist/mjs/types/response/v3/copytrading.d.ts +46 -1
- package/dist/mjs/types/response/v3/public.d.ts +5 -0
- package/dist/mjs/types/response/v3/stockplus.d.ts +302 -0
- package/dist/mjs/types/response/v3/stockplus.js +9 -0
- package/dist/mjs/types/response/v3/stockplus.js.map +1 -0
- package/dist/mjs/types/response/v3/trade.d.ts +4 -0
- package/dist/mjs/types/websockets/ws-api-request.d.ts +2 -0
- package/dist/mjs/types/websockets/ws-api.d.ts +11 -0
- package/dist/mjs/types/websockets/ws-events.d.ts +7 -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 +12538 -9685
- package/package.json +15 -7
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
* Stock+ (UTA)
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export interface GetStockPlusOptionQuoteRequestV3 {
|
|
9
|
+
symbol: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GetStockPlusOptionChainInfoRequestV3 {
|
|
12
|
+
symbol: string;
|
|
13
|
+
expiryDate: string;
|
|
14
|
+
}
|
|
15
|
+
export interface GetStockPlusOptionExpiryDateRequestV3 {
|
|
16
|
+
symbol: string;
|
|
17
|
+
}
|
|
18
|
+
export interface GetStockPlusOptionVolumeRequestV3 {
|
|
19
|
+
symbol: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GetStockPlusStaticInfoRequestV3 {
|
|
22
|
+
symbol: string;
|
|
23
|
+
}
|
|
24
|
+
export interface GetStockPlusQuoteRequestV3 {
|
|
25
|
+
symbol: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetStockPlusTradeDetailRequestV3 {
|
|
28
|
+
symbol: string;
|
|
29
|
+
count?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetStockPlusIntradayRequestV3 {
|
|
32
|
+
symbol: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetStockPlusHistoryCandlestickRequestV3 {
|
|
35
|
+
symbol: string;
|
|
36
|
+
period: string;
|
|
37
|
+
count?: string;
|
|
38
|
+
adjustType?: string;
|
|
39
|
+
forward?: boolean;
|
|
40
|
+
time?: string;
|
|
41
|
+
tradeSessions?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface GetStockPlusCandlestickRequestV3 {
|
|
44
|
+
symbol: string;
|
|
45
|
+
period: string;
|
|
46
|
+
count?: string;
|
|
47
|
+
adjustType?: string;
|
|
48
|
+
tradeSessions?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface GetStockPlusDepthRequestV3 {
|
|
51
|
+
symbol: string;
|
|
52
|
+
}
|
|
53
|
+
export interface PlaceStockPlusOrderRequestV3 {
|
|
54
|
+
symbol: string;
|
|
55
|
+
orderType: 'LO' | 'MO' | 'LIT' | 'MIT' | 'TSLPAMT' | 'TSLPPCT';
|
|
56
|
+
side: 'Buy' | 'Sell';
|
|
57
|
+
submittedQuantity: string;
|
|
58
|
+
timeInForce: 'Day' | 'GoodTilCanceled' | 'GoodTilDate';
|
|
59
|
+
submittedPrice?: string;
|
|
60
|
+
triggerPrice?: string;
|
|
61
|
+
limitOffset?: string;
|
|
62
|
+
trailingAmount?: string;
|
|
63
|
+
trailingPercent?: string;
|
|
64
|
+
expireDate?: string;
|
|
65
|
+
outsideRth?: 'RTHOnly' | 'AnyTime' | 'Overnight';
|
|
66
|
+
limitDepthLevel?: number;
|
|
67
|
+
triggerCount?: number;
|
|
68
|
+
monitorPrice?: string;
|
|
69
|
+
remark?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface CancelStockPlusOrderRequestV3 {
|
|
72
|
+
symbol: string;
|
|
73
|
+
orderId?: string;
|
|
74
|
+
clientOid?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ModifyStockPlusOrderRequestV3 {
|
|
77
|
+
orderId: string;
|
|
78
|
+
quantity: string;
|
|
79
|
+
price?: string;
|
|
80
|
+
triggerPrice?: string;
|
|
81
|
+
limitOffset?: string;
|
|
82
|
+
trailingAmount?: string;
|
|
83
|
+
trailingPercent?: string;
|
|
84
|
+
limitDepthLevel?: number;
|
|
85
|
+
triggerCount?: number;
|
|
86
|
+
monitorPrice?: string;
|
|
87
|
+
remark?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface GetStockPlusTodayOrdersRequestV3 {
|
|
90
|
+
symbol?: string;
|
|
91
|
+
status?: string | string[];
|
|
92
|
+
side?: string;
|
|
93
|
+
market?: string;
|
|
94
|
+
orderId?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface GetStockPlusHistoryOrdersRequestV3 {
|
|
97
|
+
symbol?: string;
|
|
98
|
+
status?: string | string[];
|
|
99
|
+
side?: string;
|
|
100
|
+
market?: string;
|
|
101
|
+
startAt?: string;
|
|
102
|
+
endAt?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface GetStockPlusOrderDetailRequestV3 {
|
|
105
|
+
orderId: string;
|
|
106
|
+
}
|
|
107
|
+
export interface GetStockPlusTodayExecutionsRequestV3 {
|
|
108
|
+
symbol?: string;
|
|
109
|
+
orderId?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface GetStockPlusHistoryExecutionsRequestV3 {
|
|
112
|
+
symbol?: string;
|
|
113
|
+
startAt?: string;
|
|
114
|
+
endAt?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface GetStockPlusAccountRequestV3 {
|
|
117
|
+
currency?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface GetStockPlusCashFlowRequestV3 {
|
|
120
|
+
startTime: string;
|
|
121
|
+
endTime: string;
|
|
122
|
+
businessType?: string;
|
|
123
|
+
symbol?: string;
|
|
124
|
+
page?: string;
|
|
125
|
+
size?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface GetStockPlusStockPositionRequestV3 {
|
|
128
|
+
symbol?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface StockPlusTransferRequestV3 {
|
|
131
|
+
coin?: string;
|
|
132
|
+
amount?: string;
|
|
133
|
+
direction?: 'in' | 'out';
|
|
134
|
+
}
|
|
135
|
+
export interface GetStockPlusTransferRecordsRequestV3 {
|
|
136
|
+
transferId?: string;
|
|
137
|
+
startTime?: string;
|
|
138
|
+
endTime?: string;
|
|
139
|
+
limit?: string;
|
|
140
|
+
cursor?: string;
|
|
141
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stockplus.js","sourceRoot":"","sources":["../../../../../src/types/request/v3/stockplus.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -92,6 +92,7 @@ export interface ModifyOrderRequestV3 {
|
|
|
92
92
|
slLimitPrice?: string;
|
|
93
93
|
}
|
|
94
94
|
export interface PlaceRealityOrderRequestV3 {
|
|
95
|
+
category?: 'SPOT' | 'MARGIN';
|
|
95
96
|
symbol: string;
|
|
96
97
|
side: 'buy' | 'sell';
|
|
97
98
|
orderType: 'limit' | 'market';
|
|
@@ -100,6 +101,7 @@ export interface PlaceRealityOrderRequestV3 {
|
|
|
100
101
|
clientOid?: string;
|
|
101
102
|
}
|
|
102
103
|
export interface CancelRealityOrderRequestV3 {
|
|
104
|
+
category?: 'SPOT' | 'MARGIN';
|
|
103
105
|
symbol: string;
|
|
104
106
|
orderId?: string;
|
|
105
107
|
clientOid?: string;
|
|
@@ -285,6 +285,8 @@ export interface FuturesPositionV2 {
|
|
|
285
285
|
deductedFee: string;
|
|
286
286
|
marginRatio: string;
|
|
287
287
|
assetMode: string;
|
|
288
|
+
/** Cash dividend, USDT */
|
|
289
|
+
cashDividend?: string;
|
|
288
290
|
uTime: string;
|
|
289
291
|
autoMargin: string;
|
|
290
292
|
cTime: string;
|
|
@@ -311,6 +313,8 @@ export interface FuturesHistoryPositionV2 {
|
|
|
311
313
|
totalFunding: string;
|
|
312
314
|
openFee: string;
|
|
313
315
|
closeFee: string;
|
|
316
|
+
/** Cash dividend, USDT */
|
|
317
|
+
cashDividend?: string;
|
|
314
318
|
cTime: string;
|
|
315
319
|
uTime: string;
|
|
316
320
|
}
|
|
@@ -56,6 +56,8 @@ export interface AccountAssetV3 {
|
|
|
56
56
|
positionValue?: string;
|
|
57
57
|
/** Account leverage (non-negative) */
|
|
58
58
|
leverage?: string;
|
|
59
|
+
/** USDT bonus amount */
|
|
60
|
+
bonus?: string;
|
|
59
61
|
}
|
|
60
62
|
export interface AccountAssetsV3 {
|
|
61
63
|
accountEquity: string;
|
|
@@ -328,3 +330,54 @@ export interface MovePositionHistoryV3 {
|
|
|
328
330
|
createdTime: string;
|
|
329
331
|
updatedTime: string;
|
|
330
332
|
}
|
|
333
|
+
export interface EligibleSymbolV3 {
|
|
334
|
+
symbol: string;
|
|
335
|
+
category: string;
|
|
336
|
+
baseCoin: string;
|
|
337
|
+
quoteCoin: string;
|
|
338
|
+
symbolType?: string;
|
|
339
|
+
buyLimitPriceRatio: string;
|
|
340
|
+
sellLimitPriceRatio: string;
|
|
341
|
+
minOrderQty: string;
|
|
342
|
+
maxOrderQty: string;
|
|
343
|
+
pricePrecision: string;
|
|
344
|
+
quantityPrecision: string;
|
|
345
|
+
quotePrecision: string;
|
|
346
|
+
minOrderAmount: string;
|
|
347
|
+
maxSymbolOrderNum: string;
|
|
348
|
+
maxProductOrderNum: string;
|
|
349
|
+
status: string;
|
|
350
|
+
maintainTime: string;
|
|
351
|
+
areaSymbol?: string;
|
|
352
|
+
maxPositionNum?: string;
|
|
353
|
+
isReality?: string;
|
|
354
|
+
launchTime?: string;
|
|
355
|
+
}
|
|
356
|
+
export interface EligibleMarginTierItemV3 {
|
|
357
|
+
tier: string;
|
|
358
|
+
minTierValue: string;
|
|
359
|
+
maxTierValue: string;
|
|
360
|
+
leverage: string;
|
|
361
|
+
mmr: string;
|
|
362
|
+
}
|
|
363
|
+
export interface EligibleMarginTierV3 {
|
|
364
|
+
coin: string;
|
|
365
|
+
tiers: EligibleMarginTierItemV3[];
|
|
366
|
+
}
|
|
367
|
+
export interface EligibleLoanInfoV3 {
|
|
368
|
+
limit: string;
|
|
369
|
+
masterSubLimit: string;
|
|
370
|
+
/** Bitget spelling */
|
|
371
|
+
platformRemaingQuota: string;
|
|
372
|
+
}
|
|
373
|
+
export interface RateLimitQuotaItemV3 {
|
|
374
|
+
uid: string;
|
|
375
|
+
quota: string;
|
|
376
|
+
}
|
|
377
|
+
export interface RateLimitQuotaV3 {
|
|
378
|
+
category: 'spot' | 'futures' | string;
|
|
379
|
+
quotaList: RateLimitQuotaItemV3[];
|
|
380
|
+
masterSubQuota: string;
|
|
381
|
+
masterSubCap: string;
|
|
382
|
+
cursor: string;
|
|
383
|
+
}
|
|
@@ -39,7 +39,8 @@ export interface CopyFuturesMaxTransferableV3 {
|
|
|
39
39
|
export interface CopyFuturesTransferResponseV3 {
|
|
40
40
|
transferId: string;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
/** May be a single value or comma-separated values */
|
|
43
|
+
export type CopyFuturesTransferAccountTypeV3 = 'spot' | 'uta' | 'lead' | 'otc' | string;
|
|
43
44
|
export interface CopyFuturesTransferRecordV3 {
|
|
44
45
|
transferId: string;
|
|
45
46
|
fromType: CopyFuturesTransferAccountTypeV3;
|
|
@@ -52,3 +53,47 @@ export interface CopyFuturesTransferRecordV3 {
|
|
|
52
53
|
export interface CopyFuturesTransferRecordListV3 {
|
|
53
54
|
list: CopyFuturesTransferRecordV3[];
|
|
54
55
|
}
|
|
56
|
+
export interface CopyFuturesCurrentFollowerV3 {
|
|
57
|
+
followerName: string;
|
|
58
|
+
estimateAssets: string;
|
|
59
|
+
totalProfit: string;
|
|
60
|
+
totalShareProfit: string;
|
|
61
|
+
totalInvestment: string;
|
|
62
|
+
canRemove: 'yes' | 'no';
|
|
63
|
+
followDays: string;
|
|
64
|
+
totalAssets: string;
|
|
65
|
+
startTime: string;
|
|
66
|
+
}
|
|
67
|
+
export interface CopyFuturesCurrentFollowersV3 {
|
|
68
|
+
list: CopyFuturesCurrentFollowerV3[];
|
|
69
|
+
}
|
|
70
|
+
export interface CopyFuturesHistoryFollowerV3 {
|
|
71
|
+
followerName: string;
|
|
72
|
+
totalProfit: string;
|
|
73
|
+
totalShareProfit: string;
|
|
74
|
+
totalInvestment: string;
|
|
75
|
+
startTime: string;
|
|
76
|
+
endTime: string;
|
|
77
|
+
}
|
|
78
|
+
export interface CopyFuturesHistoryFollowersV3 {
|
|
79
|
+
list: CopyFuturesHistoryFollowerV3[];
|
|
80
|
+
}
|
|
81
|
+
export interface CopyFuturesProfitSummaryV3 {
|
|
82
|
+
totalProfit: string;
|
|
83
|
+
totalAllocatedProfit: string;
|
|
84
|
+
totalPendingProfit: string;
|
|
85
|
+
}
|
|
86
|
+
export interface CopyFuturesProfitDetailV3 {
|
|
87
|
+
followerName: string;
|
|
88
|
+
profit: string;
|
|
89
|
+
allocatedPnl: string;
|
|
90
|
+
pendingPnl: string;
|
|
91
|
+
shareRatio: string;
|
|
92
|
+
shareProfit: string;
|
|
93
|
+
reason: 'period' | 'unfollow' | string;
|
|
94
|
+
settleTime: string;
|
|
95
|
+
}
|
|
96
|
+
export interface CopyFuturesProfitDetailsV3 {
|
|
97
|
+
list: CopyFuturesProfitDetailV3[];
|
|
98
|
+
nextCursor: string;
|
|
99
|
+
}
|
|
@@ -46,6 +46,9 @@ export interface MarginLoanV3 {
|
|
|
46
46
|
dailyInterest: string;
|
|
47
47
|
annualInterest: string;
|
|
48
48
|
limit: string;
|
|
49
|
+
masterSubLimit?: string;
|
|
50
|
+
/** Bitget spelling */
|
|
51
|
+
platformRemaingQuota?: string;
|
|
49
52
|
}
|
|
50
53
|
export interface OpenInterestItemV3 {
|
|
51
54
|
symbol: string;
|
|
@@ -207,6 +210,8 @@ export interface TickerV3 {
|
|
|
207
210
|
price24hPcnt: string;
|
|
208
211
|
volume24h: string;
|
|
209
212
|
turnover24h: string;
|
|
213
|
+
/** 24h platform turnover; only available for rtoken */
|
|
214
|
+
platformTurnover24h?: string;
|
|
210
215
|
indexPrice?: string;
|
|
211
216
|
markPrice?: string;
|
|
212
217
|
fundingRate?: string;
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
* Stock+ (UTA)
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export interface StockPlusOptionQuoteItemV3 {
|
|
9
|
+
symbol: string;
|
|
10
|
+
lastDone: string;
|
|
11
|
+
prevClose: string;
|
|
12
|
+
open: string;
|
|
13
|
+
high: string;
|
|
14
|
+
low: string;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
volume: string;
|
|
17
|
+
turnover: string;
|
|
18
|
+
tradeStatus: string;
|
|
19
|
+
impliedVolatility: string;
|
|
20
|
+
openInterest: string;
|
|
21
|
+
expiryDate: string;
|
|
22
|
+
strikePrice: string;
|
|
23
|
+
contractMultipier: string;
|
|
24
|
+
contractType: string;
|
|
25
|
+
contractSize: string;
|
|
26
|
+
direction: string;
|
|
27
|
+
historicalVolatility: string;
|
|
28
|
+
underlyingSymbol: string;
|
|
29
|
+
}
|
|
30
|
+
export interface StockPlusOptionQuoteV3 {
|
|
31
|
+
secuQuote: StockPlusOptionQuoteItemV3[];
|
|
32
|
+
}
|
|
33
|
+
export interface StockPlusOptionStrikePriceInfoV3 {
|
|
34
|
+
price: string;
|
|
35
|
+
callSymbol: string;
|
|
36
|
+
putSymbol: string;
|
|
37
|
+
standard: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface StockPlusOptionChainInfoV3 {
|
|
40
|
+
strikePriceInfo: StockPlusOptionStrikePriceInfoV3[];
|
|
41
|
+
}
|
|
42
|
+
export interface StockPlusOptionExpiryDateV3 {
|
|
43
|
+
expiryDate: string[];
|
|
44
|
+
}
|
|
45
|
+
export interface StockPlusOptionVolumeV3 {
|
|
46
|
+
c: string;
|
|
47
|
+
p: string;
|
|
48
|
+
}
|
|
49
|
+
export interface StockPlusStaticInfoItemV3 {
|
|
50
|
+
symbol: string;
|
|
51
|
+
nameCn: string;
|
|
52
|
+
nameEn: string;
|
|
53
|
+
exchange: string;
|
|
54
|
+
currency: string;
|
|
55
|
+
lotSize: number | string;
|
|
56
|
+
totalShares: string | number;
|
|
57
|
+
circulatingShares: string | number;
|
|
58
|
+
eps: string | number;
|
|
59
|
+
epsTtm: string | number;
|
|
60
|
+
bps: string | number;
|
|
61
|
+
dividendYield: string | number;
|
|
62
|
+
stockDerivatives: string[];
|
|
63
|
+
board: string;
|
|
64
|
+
}
|
|
65
|
+
export interface StockPlusStaticInfoV3 {
|
|
66
|
+
list: StockPlusStaticInfoItemV3[];
|
|
67
|
+
}
|
|
68
|
+
export interface StockPlusSessionQuoteV3 {
|
|
69
|
+
lastDone: string | number;
|
|
70
|
+
timestamp: string;
|
|
71
|
+
volume: string | number;
|
|
72
|
+
turnover: string | number;
|
|
73
|
+
high: string | number;
|
|
74
|
+
low: string | number;
|
|
75
|
+
prevClose: string | number;
|
|
76
|
+
}
|
|
77
|
+
export interface StockPlusQuoteItemV3 {
|
|
78
|
+
symbol: string;
|
|
79
|
+
lastDone: string | number;
|
|
80
|
+
prevClose: string | number;
|
|
81
|
+
open: string | number;
|
|
82
|
+
high: string | number;
|
|
83
|
+
low: string | number;
|
|
84
|
+
timestamp: string;
|
|
85
|
+
volume: string | number;
|
|
86
|
+
turnover: string | number;
|
|
87
|
+
tradeStatus: string;
|
|
88
|
+
preMarketQuote?: StockPlusSessionQuoteV3 | null;
|
|
89
|
+
postMarketQuote?: StockPlusSessionQuoteV3 | null;
|
|
90
|
+
overnightQuote?: StockPlusSessionQuoteV3 | null;
|
|
91
|
+
}
|
|
92
|
+
export interface StockPlusQuoteV3 {
|
|
93
|
+
list: StockPlusQuoteItemV3[];
|
|
94
|
+
}
|
|
95
|
+
export interface StockPlusTradeDetailItemV3 {
|
|
96
|
+
price: string | number;
|
|
97
|
+
volume: string | number;
|
|
98
|
+
timestamp: string;
|
|
99
|
+
tradeType: string;
|
|
100
|
+
direction: string;
|
|
101
|
+
tradeSession: string;
|
|
102
|
+
}
|
|
103
|
+
export type StockPlusTradeDetailV3 = StockPlusTradeDetailItemV3[];
|
|
104
|
+
export interface StockPlusIntradayItemV3 {
|
|
105
|
+
price: string | number;
|
|
106
|
+
timestamp: string;
|
|
107
|
+
volume: string | number;
|
|
108
|
+
turnover: string | number;
|
|
109
|
+
avgPrice: string | number;
|
|
110
|
+
}
|
|
111
|
+
export interface StockPlusIntradayV3 {
|
|
112
|
+
list: StockPlusIntradayItemV3[];
|
|
113
|
+
}
|
|
114
|
+
export interface StockPlusCandlestickItemV3 {
|
|
115
|
+
close: string;
|
|
116
|
+
open: string;
|
|
117
|
+
low: string;
|
|
118
|
+
high: string;
|
|
119
|
+
volume: string;
|
|
120
|
+
turnover: string;
|
|
121
|
+
timestamp: string;
|
|
122
|
+
tradeSession: string;
|
|
123
|
+
}
|
|
124
|
+
export interface StockPlusCandlestickV3 {
|
|
125
|
+
list: StockPlusCandlestickItemV3[];
|
|
126
|
+
}
|
|
127
|
+
export type StockPlusHistoryCandlestickV3 = StockPlusCandlestickV3;
|
|
128
|
+
export interface StockPlusDepthLevelV3 {
|
|
129
|
+
position: number;
|
|
130
|
+
price: string;
|
|
131
|
+
volume: string;
|
|
132
|
+
orderNum: number;
|
|
133
|
+
}
|
|
134
|
+
export interface StockPlusDepthV3 {
|
|
135
|
+
asks: StockPlusDepthLevelV3[];
|
|
136
|
+
bids: StockPlusDepthLevelV3[];
|
|
137
|
+
}
|
|
138
|
+
export interface StockPlusPlaceOrderResponseV3 {
|
|
139
|
+
orderId: string;
|
|
140
|
+
clientOid: string;
|
|
141
|
+
symbol: string;
|
|
142
|
+
}
|
|
143
|
+
export type StockPlusCancelOrderResponseV3 = StockPlusPlaceOrderResponseV3;
|
|
144
|
+
export type StockPlusModifyOrderResponseV3 = StockPlusPlaceOrderResponseV3;
|
|
145
|
+
export interface StockPlusOrderV3 {
|
|
146
|
+
orderId: string;
|
|
147
|
+
status: string;
|
|
148
|
+
stockName: string;
|
|
149
|
+
quantity: string | number;
|
|
150
|
+
executedQuantity: string | number;
|
|
151
|
+
price: string | number | null;
|
|
152
|
+
executedPrice: string | number | null;
|
|
153
|
+
submittedAt: string;
|
|
154
|
+
side: string;
|
|
155
|
+
symbol: string;
|
|
156
|
+
orderType: string;
|
|
157
|
+
lastDone: string | number | null;
|
|
158
|
+
triggerPrice: string | number | null;
|
|
159
|
+
msg: string;
|
|
160
|
+
tag: string;
|
|
161
|
+
timeInForce: string;
|
|
162
|
+
expireDate: string | null;
|
|
163
|
+
updatedAt: string | null;
|
|
164
|
+
triggerAt: string | null;
|
|
165
|
+
trailingAmount: string | number | null;
|
|
166
|
+
trailingPercent: string | number | null;
|
|
167
|
+
limitOffset: string | number | null;
|
|
168
|
+
triggerStatus: string | null;
|
|
169
|
+
currency: string;
|
|
170
|
+
outsideRth: string;
|
|
171
|
+
remark?: string;
|
|
172
|
+
limitDepthLevel: number | null;
|
|
173
|
+
triggerCount: number | null;
|
|
174
|
+
monitorPrice: string | null;
|
|
175
|
+
}
|
|
176
|
+
export interface StockPlusOrdersV3 {
|
|
177
|
+
orders: StockPlusOrderV3[];
|
|
178
|
+
}
|
|
179
|
+
export interface StockPlusHistoryOrdersV3 {
|
|
180
|
+
hasMore: boolean;
|
|
181
|
+
orders: StockPlusOrderV3[];
|
|
182
|
+
}
|
|
183
|
+
export interface StockPlusOrderHistoryItemV3 {
|
|
184
|
+
price: string | number;
|
|
185
|
+
quantity: string | number;
|
|
186
|
+
status: string;
|
|
187
|
+
msg: string;
|
|
188
|
+
time: string;
|
|
189
|
+
}
|
|
190
|
+
export interface StockPlusChargeFeeItemV3 {
|
|
191
|
+
code: string;
|
|
192
|
+
name: string;
|
|
193
|
+
amount: number | string;
|
|
194
|
+
currency: string;
|
|
195
|
+
}
|
|
196
|
+
export interface StockPlusChargeCategoryV3 {
|
|
197
|
+
code: string;
|
|
198
|
+
name: string;
|
|
199
|
+
fees: StockPlusChargeFeeItemV3[];
|
|
200
|
+
}
|
|
201
|
+
export interface StockPlusChargeDetailV3 {
|
|
202
|
+
totalAmount: number | string;
|
|
203
|
+
currency: string;
|
|
204
|
+
items: StockPlusChargeCategoryV3[];
|
|
205
|
+
}
|
|
206
|
+
export interface StockPlusOrderDetailV3 extends StockPlusOrderV3 {
|
|
207
|
+
freeStatus?: string;
|
|
208
|
+
freeAmount?: string | null;
|
|
209
|
+
freeCurrency?: string | null;
|
|
210
|
+
deductionsStatus?: string;
|
|
211
|
+
deductionsAmount?: string | null;
|
|
212
|
+
deductionsCurrency?: string | null;
|
|
213
|
+
platformDeductedStatus?: string;
|
|
214
|
+
platformDeductedAmount?: string | null;
|
|
215
|
+
platformDeductedCurrency?: string | null;
|
|
216
|
+
history?: StockPlusOrderHistoryItemV3[];
|
|
217
|
+
chargeDetail?: StockPlusChargeDetailV3;
|
|
218
|
+
}
|
|
219
|
+
export interface StockPlusExecutionV3 {
|
|
220
|
+
orderId: string;
|
|
221
|
+
tradeId: string;
|
|
222
|
+
symbol: string;
|
|
223
|
+
tradeDoneAt: string;
|
|
224
|
+
quantity: number | string;
|
|
225
|
+
price: number | string;
|
|
226
|
+
}
|
|
227
|
+
export interface StockPlusTodayExecutionsV3 {
|
|
228
|
+
trades: StockPlusExecutionV3[];
|
|
229
|
+
}
|
|
230
|
+
export interface StockPlusHistoryExecutionsV3 {
|
|
231
|
+
hasMore: boolean;
|
|
232
|
+
trades: StockPlusExecutionV3[];
|
|
233
|
+
}
|
|
234
|
+
export interface StockPlusCashInfoV3 {
|
|
235
|
+
withdrawCash: number | string;
|
|
236
|
+
availableCash: number | string;
|
|
237
|
+
frozenCash: number | string;
|
|
238
|
+
settlingCash: number | string;
|
|
239
|
+
currency: string;
|
|
240
|
+
}
|
|
241
|
+
export interface StockPlusFrozenTransactionFeeV3 {
|
|
242
|
+
currency?: string;
|
|
243
|
+
amount?: number | string;
|
|
244
|
+
[key: string]: unknown;
|
|
245
|
+
}
|
|
246
|
+
export interface StockPlusAccountItemV3 {
|
|
247
|
+
totalCash: number | string;
|
|
248
|
+
maxFinanceAmount: number | string;
|
|
249
|
+
remainingFinanceAmount: number | string;
|
|
250
|
+
riskLevel: number | string;
|
|
251
|
+
marginCall: number | string;
|
|
252
|
+
netAssets: number | string;
|
|
253
|
+
initMargin: number | string;
|
|
254
|
+
maintenanceMargin: number | string;
|
|
255
|
+
currency: string;
|
|
256
|
+
buyPower: number | string;
|
|
257
|
+
cashInfos: StockPlusCashInfoV3[];
|
|
258
|
+
frozenTransactionFees: StockPlusFrozenTransactionFeeV3[];
|
|
259
|
+
}
|
|
260
|
+
export interface StockPlusAccountV3 {
|
|
261
|
+
list: StockPlusAccountItemV3[];
|
|
262
|
+
}
|
|
263
|
+
export interface StockPlusCashFlowItemV3 {
|
|
264
|
+
transactionFlowName: string;
|
|
265
|
+
direction: string;
|
|
266
|
+
businessType: string;
|
|
267
|
+
balance: number | string;
|
|
268
|
+
currency: string;
|
|
269
|
+
businessTime: string;
|
|
270
|
+
symbol: string | null;
|
|
271
|
+
description: string;
|
|
272
|
+
}
|
|
273
|
+
export interface StockPlusCashFlowV3 {
|
|
274
|
+
list: StockPlusCashFlowItemV3[];
|
|
275
|
+
}
|
|
276
|
+
export interface StockPlusPositionItemV3 {
|
|
277
|
+
symbol: string;
|
|
278
|
+
symbolName: string;
|
|
279
|
+
quantity: number | string;
|
|
280
|
+
availableQuantity: number | string;
|
|
281
|
+
currency: string;
|
|
282
|
+
costPrice: number | string;
|
|
283
|
+
market: string;
|
|
284
|
+
initQuantity: number | string;
|
|
285
|
+
}
|
|
286
|
+
export interface StockPlusPositionChannelV3 {
|
|
287
|
+
accountChannel: string;
|
|
288
|
+
positions: StockPlusPositionItemV3[];
|
|
289
|
+
}
|
|
290
|
+
export interface StockPlusStockPositionV3 {
|
|
291
|
+
channels: StockPlusPositionChannelV3[];
|
|
292
|
+
}
|
|
293
|
+
export interface StockPlusTransferResponseV3 {
|
|
294
|
+
transferId: string;
|
|
295
|
+
}
|
|
296
|
+
export interface StockPlusTransferRecordsV3 {
|
|
297
|
+
transferId: string;
|
|
298
|
+
coin: string;
|
|
299
|
+
amount: string;
|
|
300
|
+
direction: string;
|
|
301
|
+
cursor: string;
|
|
302
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stockplus.js","sourceRoot":"","sources":["../../../../../src/types/response/v3/stockplus.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -151,6 +151,8 @@ export interface PositionHistoryV3 {
|
|
|
151
151
|
totalFunding: string;
|
|
152
152
|
openFeeTotal: string;
|
|
153
153
|
closeFeeTotal: string;
|
|
154
|
+
/** Cash dividend, USDT */
|
|
155
|
+
cashDividend?: string;
|
|
154
156
|
createdTime: string;
|
|
155
157
|
updatedTime: string;
|
|
156
158
|
}
|
|
@@ -178,6 +180,8 @@ export interface CurrentPositionV3 {
|
|
|
178
180
|
totalFunding: string;
|
|
179
181
|
openFeeTotal: string;
|
|
180
182
|
closeFeeTotal: string;
|
|
183
|
+
/** Cash dividend, USDT */
|
|
184
|
+
cashDividend?: string;
|
|
181
185
|
createdTime: string;
|
|
182
186
|
updatedTime: string;
|
|
183
187
|
}
|
|
@@ -19,6 +19,8 @@ export interface WSAPIRequestBitgetV3<TWSParams> {
|
|
|
19
19
|
category: BitgetInstTypeV3;
|
|
20
20
|
topic: WSAPIOperation;
|
|
21
21
|
args: TWSParams | TWSParams[];
|
|
22
|
+
/** Client-side request timestamp; required for receiveWindow on place-order */
|
|
23
|
+
requestTime?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface WSAPIRequestFlags {
|
|
24
26
|
/** If true, will skip auth requirement for WS API connection */
|
|
@@ -53,6 +55,10 @@ export interface WsRequestOperationBitget<TWSRequestArg> {
|
|
|
53
55
|
op: WSOperation;
|
|
54
56
|
args?: (TWSRequestArg | string | number)[];
|
|
55
57
|
}
|
|
58
|
+
export interface WSAPIRateLimitV3 {
|
|
59
|
+
limit: string;
|
|
60
|
+
remaining: string;
|
|
61
|
+
}
|
|
56
62
|
export interface WSAPIResponse<TResponseData extends object = object, TOperation extends WSAPIOperation = WSAPIOperation> {
|
|
57
63
|
wsKey: WsKey;
|
|
58
64
|
/** Auto-generated */
|
|
@@ -66,6 +72,11 @@ export interface WSAPIResponse<TResponseData extends object = object, TOperation
|
|
|
66
72
|
ts: string;
|
|
67
73
|
/** Connection ID (trade operation responses, May 2026+) */
|
|
68
74
|
connId?: string;
|
|
75
|
+
/** Gateway receive time, Unix microseconds */
|
|
76
|
+
receiveTime?: string;
|
|
77
|
+
/** Gateway push time, Unix microseconds */
|
|
78
|
+
pushTime?: string;
|
|
79
|
+
rateLimit?: WSAPIRateLimitV3[];
|
|
69
80
|
}
|
|
70
81
|
/**
|
|
71
82
|
* List of operations supported for this WsKey (connection)
|