@anrmk/str-package 0.2.10 → 0.2.12
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 +0 -1
- package/dist/IBybitSignRequest-cA1RCbDS.d.cts +13 -0
- package/dist/IBybitSignRequest-cA1RCbDS.d.ts +13 -0
- package/dist/chunk-36QZINNQ.js +39 -0
- package/dist/chunk-36QZINNQ.js.map +1 -0
- package/dist/{chunk-F66ICNBF.js → chunk-A26C5LUZ.js} +3 -3
- package/dist/{chunk-F66ICNBF.js.map → chunk-A26C5LUZ.js.map} +1 -1
- package/dist/{chunk-UBUM5Z2U.js → chunk-T23XINGG.js} +48 -10
- package/dist/chunk-T23XINGG.js.map +1 -0
- package/dist/{chunk-AV3OIAHZ.js → chunk-V45RVFQE.js} +16 -3
- package/dist/chunk-V45RVFQE.js.map +1 -0
- package/dist/clients/index.cjs +5 -7
- package/dist/clients/index.cjs.map +1 -1
- package/dist/clients/index.d.cts +3 -2
- package/dist/clients/index.d.ts +3 -2
- package/dist/clients/index.js +3 -2
- package/dist/{enums-Dmg2vIi2.d.ts → enums-CFM0khJf.d.cts} +16 -1
- package/dist/{enums-Dmg2vIi2.d.cts → enums-CFM0khJf.d.ts} +16 -1
- package/dist/index.cjs +46 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -4
- package/dist/providers/bybit/index.cjs +46 -7
- package/dist/providers/bybit/index.cjs.map +1 -1
- package/dist/providers/bybit/index.d.cts +6 -3
- package/dist/providers/bybit/index.d.ts +6 -3
- package/dist/providers/bybit/index.js +2 -1
- package/dist/types/bybit/index.cjs +15 -0
- package/dist/types/bybit/index.cjs.map +1 -1
- package/dist/types/bybit/index.d.cts +137 -112
- package/dist/types/bybit/index.d.ts +137 -112
- package/dist/types/bybit/index.js +1 -1
- package/dist/types/challenge/index.d.cts +94 -46
- package/dist/types/challenge/index.d.ts +94 -46
- package/dist/utils/index.cjs +0 -98
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -18
- package/dist/utils/index.d.ts +2 -18
- package/dist/utils/index.js +3 -3
- package/package.json +1 -6
- package/dist/TChallengeProgress-Cg8bg3uq.d.cts +0 -63
- package/dist/TChallengeProgress-DWLlui_L.d.ts +0 -63
- package/dist/chunk-6R5UUXX4.js +0 -133
- package/dist/chunk-6R5UUXX4.js.map +0 -1
- package/dist/chunk-AV3OIAHZ.js.map +0 -1
- package/dist/chunk-UBUM5Z2U.js.map +0 -1
|
@@ -1,4 +1,61 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as IBybitUnifiedMarginStatus, d as IBybitMarginMode, a as IBybitApiKeyVipLevel, I as IBybitAccountType, c as IBybitCoinType, b as IBybitCategory, f as IBybitPositionSide, g as IBybitOrderType } from '../../enums-CFM0khJf.js';
|
|
2
|
+
export { I as IBybitCredentials, a as IBybitSignRequest } from '../../IBybitSignRequest-cA1RCbDS.js';
|
|
3
|
+
|
|
4
|
+
type IBybitAccountInfo = {
|
|
5
|
+
unifiedMarginStatus: IBybitUnifiedMarginStatus | number;
|
|
6
|
+
marginMode: IBybitMarginMode;
|
|
7
|
+
isMasterTrader: boolean;
|
|
8
|
+
spotHedgingStatus: "ON" | "OFF";
|
|
9
|
+
updatedTime: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type IBybitServerTime = {
|
|
13
|
+
timeSecond: string;
|
|
14
|
+
timeNano: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type IBybitApiKeyInfo = {
|
|
18
|
+
id: string;
|
|
19
|
+
note: string;
|
|
20
|
+
apiKey: string;
|
|
21
|
+
readOnly: number;
|
|
22
|
+
permissions: IBybitApiKeyPermissions;
|
|
23
|
+
ips: string[];
|
|
24
|
+
type: number;
|
|
25
|
+
deadlineDay: number;
|
|
26
|
+
expiredAt: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
uta: number;
|
|
29
|
+
userID: number;
|
|
30
|
+
inviterID: number;
|
|
31
|
+
vipLevel: IBybitApiKeyVipLevel;
|
|
32
|
+
mktMakerLevel: string;
|
|
33
|
+
affiliateID: number;
|
|
34
|
+
rsaPublicKey: string;
|
|
35
|
+
isMaster: boolean;
|
|
36
|
+
parentUid: string;
|
|
37
|
+
kycLevel: string;
|
|
38
|
+
kycRegion: string;
|
|
39
|
+
};
|
|
40
|
+
type IBybitApiKeyPermissions = {
|
|
41
|
+
ContractTrade?: string[];
|
|
42
|
+
Spot?: string[];
|
|
43
|
+
Wallet?: string[];
|
|
44
|
+
Options?: string[];
|
|
45
|
+
Derivatives?: string[];
|
|
46
|
+
Exchange?: string[];
|
|
47
|
+
Earn?: string[];
|
|
48
|
+
FiatP2P?: string[];
|
|
49
|
+
FiatBitPay?: string[];
|
|
50
|
+
FiatConvertBroker?: string[];
|
|
51
|
+
BitCard?: string[];
|
|
52
|
+
ByXPost?: string[];
|
|
53
|
+
Affiliate?: string[];
|
|
54
|
+
BlockTrade?: string[];
|
|
55
|
+
FiatBybitPay?: string[];
|
|
56
|
+
NFT?: string[];
|
|
57
|
+
CopyTrading?: string[];
|
|
58
|
+
};
|
|
2
59
|
|
|
3
60
|
type IBybitWalletAccount = {
|
|
4
61
|
accountIMRate: string;
|
|
@@ -40,6 +97,21 @@ type IBybitCoinBalance = {
|
|
|
40
97
|
spotBorrow: string;
|
|
41
98
|
};
|
|
42
99
|
|
|
100
|
+
type IBybitDemoApplyMoneyItem = {
|
|
101
|
+
coin: IBybitCoinType;
|
|
102
|
+
amountStr: string;
|
|
103
|
+
};
|
|
104
|
+
type IBybitDemoApplyMoneyRequest = {
|
|
105
|
+
adjustType?: 0 | 1;
|
|
106
|
+
utaDemoApplyMoney: IBybitDemoApplyMoneyItem[];
|
|
107
|
+
};
|
|
108
|
+
type IBybitDemoApplyMoney = {
|
|
109
|
+
resultCode: string;
|
|
110
|
+
utaDemoApplyMoneyConfig: IBybitDemoApplyMoneyItem[];
|
|
111
|
+
orderStatus: string;
|
|
112
|
+
retMsg: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
43
115
|
type IBybitClosedPnl = {
|
|
44
116
|
symbol: string;
|
|
45
117
|
orderId: string;
|
|
@@ -61,10 +133,13 @@ type IBybitClosedPnl = {
|
|
|
61
133
|
openFee: string;
|
|
62
134
|
closeFee: string;
|
|
63
135
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
136
|
+
type IBybitClosedPnlRequest = {
|
|
137
|
+
category?: IBybitCategory.LINEAR | IBybitCategory.INVERSE;
|
|
138
|
+
symbol?: string;
|
|
139
|
+
startTime?: number;
|
|
140
|
+
endTime?: number;
|
|
141
|
+
limit?: number;
|
|
142
|
+
cursor?: string;
|
|
68
143
|
};
|
|
69
144
|
|
|
70
145
|
type IBybitPositionInfo = {
|
|
@@ -102,82 +177,69 @@ type IBybitPositionInfo = {
|
|
|
102
177
|
mmrSysUpdatedTime: string;
|
|
103
178
|
leverageSysUpdatedTime: string;
|
|
104
179
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
ips: string[];
|
|
113
|
-
type: number;
|
|
114
|
-
deadlineDay: number;
|
|
115
|
-
expiredAt: string;
|
|
116
|
-
createdAt: string;
|
|
117
|
-
uta: number;
|
|
118
|
-
userID: number;
|
|
119
|
-
inviterID: number;
|
|
120
|
-
vipLevel: IBybitApiKeyVipLevel;
|
|
121
|
-
mktMakerLevel: string;
|
|
122
|
-
affiliateID: number;
|
|
123
|
-
rsaPublicKey: string;
|
|
124
|
-
isMaster: boolean;
|
|
125
|
-
parentUid: string;
|
|
126
|
-
kycLevel: string;
|
|
127
|
-
kycRegion: string;
|
|
128
|
-
};
|
|
129
|
-
type IBybitApiKeyPermissions = {
|
|
130
|
-
ContractTrade?: string[];
|
|
131
|
-
Spot?: string[];
|
|
132
|
-
Wallet?: string[];
|
|
133
|
-
Options?: string[];
|
|
134
|
-
Derivatives?: string[];
|
|
135
|
-
Exchange?: string[];
|
|
136
|
-
Earn?: string[];
|
|
137
|
-
FiatP2P?: string[];
|
|
138
|
-
FiatBitPay?: string[];
|
|
139
|
-
FiatConvertBroker?: string[];
|
|
140
|
-
BitCard?: string[];
|
|
141
|
-
ByXPost?: string[];
|
|
142
|
-
Affiliate?: string[];
|
|
143
|
-
BlockTrade?: string[];
|
|
144
|
-
FiatBybitPay?: string[];
|
|
145
|
-
NFT?: string[];
|
|
146
|
-
CopyTrading?: string[];
|
|
180
|
+
type IBybitPositionInfoRequest = {
|
|
181
|
+
category: IBybitCategory.LINEAR | IBybitCategory.INVERSE | IBybitCategory.OPTION;
|
|
182
|
+
symbol?: string;
|
|
183
|
+
baseCoin?: string;
|
|
184
|
+
settleCoin?: string;
|
|
185
|
+
limit?: number;
|
|
186
|
+
cursor?: string;
|
|
147
187
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
isMasterTrader: boolean;
|
|
153
|
-
spotHedgingStatus: "ON" | "OFF";
|
|
154
|
-
updatedTime: string;
|
|
155
|
-
dcpStatus?: "ON" | "OFF";
|
|
156
|
-
timeWindow?: number;
|
|
157
|
-
smpGroup?: number;
|
|
188
|
+
type IBybitPositionInfoResponse = {
|
|
189
|
+
category: IBybitCategory;
|
|
190
|
+
list?: IBybitPositionInfo[];
|
|
191
|
+
nextPageCursor?: string;
|
|
158
192
|
};
|
|
159
193
|
|
|
160
|
-
type
|
|
161
|
-
|
|
162
|
-
|
|
194
|
+
type IBybitOrderCreateBatchPayload = {
|
|
195
|
+
symbol: string;
|
|
196
|
+
isLeverage?: 0 | 1;
|
|
197
|
+
side: IBybitPositionSide.BUY | IBybitPositionSide.SELL;
|
|
198
|
+
orderType: IBybitOrderType;
|
|
199
|
+
qty: string;
|
|
200
|
+
marketUnit?: "baseCoin" | "quoteCoin";
|
|
201
|
+
price?: string;
|
|
202
|
+
triggerDirection?: 1 | 2;
|
|
203
|
+
orderFilter?: "Order" | "tpslOrder" | "StopOrder";
|
|
204
|
+
triggerPrice?: string;
|
|
205
|
+
triggerBy?: "LastPrice" | "IndexPrice" | "MarkPrice";
|
|
206
|
+
orderIv?: string;
|
|
207
|
+
timeInForce?: "GTC" | "IOC" | "FOK" | "PostOnly";
|
|
208
|
+
positionIdx?: 0 | 1 | 2;
|
|
209
|
+
orderLinkId?: string;
|
|
210
|
+
takeProfit?: string;
|
|
211
|
+
stopLoss?: string;
|
|
212
|
+
tpTriggerBy?: "LastPrice" | "IndexPrice" | "MarkPrice";
|
|
213
|
+
slTriggerBy?: "LastPrice" | "IndexPrice" | "MarkPrice";
|
|
214
|
+
reduceOnly?: boolean;
|
|
215
|
+
closeOnTrigger?: boolean;
|
|
216
|
+
smpType?: string;
|
|
217
|
+
mmp?: boolean;
|
|
218
|
+
tpslMode?: "Full" | "Partial";
|
|
219
|
+
tpLimitPrice?: string;
|
|
220
|
+
slLimitPrice?: string;
|
|
221
|
+
tpOrderType?: IBybitOrderType;
|
|
222
|
+
slOrderType?: IBybitOrderType;
|
|
163
223
|
};
|
|
164
|
-
type
|
|
165
|
-
|
|
166
|
-
|
|
224
|
+
type IBybitOrderCreateBatch = {
|
|
225
|
+
category: IBybitCategory;
|
|
226
|
+
symbol: string;
|
|
227
|
+
orderId: string;
|
|
228
|
+
orderLinkId: string;
|
|
229
|
+
createAt: string;
|
|
167
230
|
};
|
|
168
|
-
type
|
|
169
|
-
|
|
231
|
+
type IBybitOrderCreateBatchExtInfo = {
|
|
232
|
+
code: number;
|
|
233
|
+
msg: string;
|
|
170
234
|
};
|
|
171
|
-
type
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
orderStatus: string;
|
|
175
|
-
retMsg: string;
|
|
235
|
+
type IBybitOrderCreateBatchRequest = {
|
|
236
|
+
category: IBybitCategory;
|
|
237
|
+
request: IBybitOrderCreateBatchPayload[];
|
|
176
238
|
};
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
239
|
+
type IBybitOrderCreateBatchResponse = IBybitApiResponse<IBybitApiResponseList<IBybitOrderCreateBatch>> & {
|
|
240
|
+
retExtInfo: {
|
|
241
|
+
list: IBybitOrderCreateBatchExtInfo[];
|
|
242
|
+
};
|
|
181
243
|
};
|
|
182
244
|
|
|
183
245
|
type IBybitApiResponse<T> = {
|
|
@@ -190,42 +252,5 @@ type IBybitApiResponseList<T> = {
|
|
|
190
252
|
nextPageCursor?: string;
|
|
191
253
|
list?: T[];
|
|
192
254
|
};
|
|
193
|
-
type IBybitResponse = {
|
|
194
|
-
updatedAt: number;
|
|
195
|
-
};
|
|
196
|
-
type IBybitWalletResponse = IBybitResponse & {
|
|
197
|
-
topic: string;
|
|
198
|
-
list?: IBybitWalletAccount[];
|
|
199
|
-
};
|
|
200
|
-
type IBybitClosedPnlRequest = {
|
|
201
|
-
category: string;
|
|
202
|
-
symbol?: string;
|
|
203
|
-
startTime?: number;
|
|
204
|
-
endTime?: number;
|
|
205
|
-
limit?: number;
|
|
206
|
-
cursor?: string;
|
|
207
|
-
};
|
|
208
|
-
type IBybitClosedPnlResponse = {
|
|
209
|
-
category: string;
|
|
210
|
-
list?: IBybitClosedPnl[];
|
|
211
|
-
nextPageCursor?: string;
|
|
212
|
-
};
|
|
213
|
-
type IBybitSignRequest = {
|
|
214
|
-
credentials: IBybitCredentials;
|
|
215
|
-
recvWindow?: string;
|
|
216
|
-
queryString?: string;
|
|
217
|
-
timeOffset?: number;
|
|
218
|
-
};
|
|
219
|
-
type IBybitPositionInfoRequest = {
|
|
220
|
-
category?: string;
|
|
221
|
-
symbol?: string;
|
|
222
|
-
settleCoin?: string;
|
|
223
|
-
cursor?: string;
|
|
224
|
-
};
|
|
225
|
-
type IBybitPositionInfoResponse = {
|
|
226
|
-
category: string;
|
|
227
|
-
list?: IBybitPositionInfo[];
|
|
228
|
-
nextPageCursor?: string;
|
|
229
|
-
};
|
|
230
255
|
|
|
231
|
-
export { type IBybitAccountInfo, IBybitAccountType, type IBybitApiKeyInfo, IBybitApiKeyVipLevel, type IBybitApiResponse, type IBybitApiResponseList, type IBybitClosedPnl, type IBybitClosedPnlRequest, type
|
|
256
|
+
export { type IBybitAccountInfo, IBybitAccountType, type IBybitApiKeyInfo, type IBybitApiKeyPermissions, IBybitApiKeyVipLevel, type IBybitApiResponse, type IBybitApiResponseList, IBybitCategory, type IBybitClosedPnl, type IBybitClosedPnlRequest, type IBybitCoinBalance, IBybitCoinType, type IBybitDemoApplyMoney, type IBybitDemoApplyMoneyItem, type IBybitDemoApplyMoneyRequest, IBybitMarginMode, type IBybitOrderCreateBatchPayload, type IBybitOrderCreateBatchRequest, type IBybitOrderCreateBatchResponse, type IBybitPositionInfo, type IBybitPositionInfoRequest, type IBybitPositionInfoResponse, type IBybitServerTime, type IBybitWalletAccount };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { IBybitAccountType, IBybitApiKeyVipLevel, IBybitCoinType } from '../../chunk-
|
|
1
|
+
export { IBybitAccountType, IBybitApiKeyVipLevel, IBybitCategory, IBybitCoinType, IBybitMarginMode } from '../../chunk-V45RVFQE.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { a as IBybitApiKeyVipLevel,
|
|
2
|
-
import { a as TChallengeProgress, b as TChallengeWalletBalance } from '../../TChallengeProgress-Cg8bg3uq.cjs';
|
|
3
|
-
export { T as TChallengeClosedPnl } from '../../TChallengeProgress-Cg8bg3uq.cjs';
|
|
1
|
+
import { a as IBybitApiKeyVipLevel, I as IBybitAccountType, c as IBybitCoinType } from '../../enums-CFM0khJf.cjs';
|
|
4
2
|
export { TSyncResponse } from '../index.cjs';
|
|
5
3
|
|
|
6
4
|
type TChallengeType = "ONE_STEP" | "TWO_STEPS" | "THREE_STEPS";
|
|
@@ -12,22 +10,23 @@ type TChallengeProvider = "BYBIT" | "CLEO" | "TEALSTREET" | "TIGER";
|
|
|
12
10
|
type TChallengeStatus = "ACTIVE" | "EXPIRED" | "COMPLETED" | "FAILED";
|
|
13
11
|
type TChallengeRule = {
|
|
14
12
|
readonly id: string;
|
|
13
|
+
readonly nextRuleId: string | null;
|
|
15
14
|
name: string;
|
|
16
15
|
type: TChallengeType;
|
|
17
16
|
mode: TChallengeMode;
|
|
18
17
|
tradingPeriod: string;
|
|
19
18
|
minTradingDays: number;
|
|
20
|
-
|
|
19
|
+
positionDrawdownPct: number;
|
|
21
20
|
maxLossPct: number;
|
|
22
21
|
minLossPct: number;
|
|
23
22
|
dailyDrawdownPct: number;
|
|
24
23
|
profitTargetPct: number;
|
|
25
24
|
feePolicy: string;
|
|
26
25
|
prohibitedActions: string[];
|
|
27
|
-
|
|
26
|
+
tiers?: TChallengeTier[];
|
|
27
|
+
readonly isActive: boolean;
|
|
28
28
|
readonly createdAt: string;
|
|
29
29
|
readonly updatedAt: string;
|
|
30
|
-
tiers?: TChallengeTier[];
|
|
31
30
|
};
|
|
32
31
|
interface TChallengeRuleGroup {
|
|
33
32
|
label: string;
|
|
@@ -36,16 +35,16 @@ interface TChallengeRuleGroup {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
type TChallengeAccountInfo = {
|
|
39
|
-
challengeId: string;
|
|
38
|
+
readonly challengeId: string;
|
|
40
39
|
unifiedMarginStatus: number;
|
|
41
40
|
marginMode: string;
|
|
42
41
|
isMasterTrader: boolean;
|
|
43
42
|
spotHedgingStatus: "ON" | "OFF";
|
|
44
|
-
updatedAt: string;
|
|
43
|
+
readonly updatedAt: string;
|
|
45
44
|
};
|
|
46
45
|
|
|
47
46
|
type TChallengeApiKeyInfo = {
|
|
48
|
-
challengeId: string;
|
|
47
|
+
readonly challengeId: string;
|
|
49
48
|
bybitApiKeyId: string;
|
|
50
49
|
note: string;
|
|
51
50
|
apiKey: string;
|
|
@@ -55,8 +54,6 @@ type TChallengeApiKeyInfo = {
|
|
|
55
54
|
ips: string[];
|
|
56
55
|
type: number;
|
|
57
56
|
deadlineDay: number;
|
|
58
|
-
expiredAt: string;
|
|
59
|
-
createdAt: string;
|
|
60
57
|
uta: string;
|
|
61
58
|
userId: string;
|
|
62
59
|
inviterId: string;
|
|
@@ -69,11 +66,78 @@ type TChallengeApiKeyInfo = {
|
|
|
69
66
|
kycLevel: number;
|
|
70
67
|
kycRegion: string;
|
|
71
68
|
hasCredentials: boolean;
|
|
69
|
+
readonly expiredAt: string;
|
|
70
|
+
readonly createdAt: string;
|
|
71
|
+
readonly updatedAt: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
type TChallengeClosedPnl = {
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly challengeId: string;
|
|
77
|
+
symbol: string;
|
|
78
|
+
orderId: string;
|
|
79
|
+
side: string;
|
|
80
|
+
qty: number;
|
|
81
|
+
orderPrice: string;
|
|
82
|
+
orderType: string;
|
|
83
|
+
execType: string;
|
|
84
|
+
closedSize: number;
|
|
85
|
+
cumEntryValue: number;
|
|
86
|
+
avgEntryPrice: number;
|
|
87
|
+
cumExitValue: number;
|
|
88
|
+
avgExitPrice: number;
|
|
89
|
+
closedPnl: number;
|
|
90
|
+
fillCount: number;
|
|
91
|
+
leverage: number;
|
|
92
|
+
createdTime: string;
|
|
93
|
+
updatedTime: string;
|
|
94
|
+
readonly isTradingDayRecord: boolean;
|
|
95
|
+
readonly createdAt: string;
|
|
96
|
+
readonly updatedAt: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
type TChallengeWalletBalance = {
|
|
100
|
+
readonly challengeId: string;
|
|
101
|
+
accountType: IBybitAccountType;
|
|
102
|
+
totalEquity: number;
|
|
103
|
+
totalPerpUpl: number;
|
|
104
|
+
totalWalletBalance: number;
|
|
105
|
+
totalAvailableBalance: number;
|
|
106
|
+
capital: number;
|
|
107
|
+
/** Coin-specific balance details */
|
|
108
|
+
equity: number;
|
|
109
|
+
totalPositionMm?: number;
|
|
110
|
+
totalPositionIm?: number;
|
|
111
|
+
usdValue: number;
|
|
112
|
+
unrealisedPnl: number;
|
|
113
|
+
walletBalance: number;
|
|
114
|
+
availableToWithdraw: number;
|
|
115
|
+
cumRealisedPnl?: number;
|
|
116
|
+
bonus?: number;
|
|
117
|
+
coin: string;
|
|
118
|
+
readonly createdAt: string;
|
|
119
|
+
readonly updatedAt: string;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
type TChallengeProgress = {
|
|
123
|
+
readonly challengeId: string;
|
|
124
|
+
totalLoss: number;
|
|
125
|
+
tradingDays: number;
|
|
126
|
+
dailyDrawdown: number;
|
|
127
|
+
profitTarget: number;
|
|
128
|
+
dailyStartingEquity: number;
|
|
129
|
+
dailyStartingUpdatedAt: string;
|
|
130
|
+
dailyMaxEquity: number;
|
|
131
|
+
dailyMinEquity: number;
|
|
132
|
+
dailyMaxUpdatedAt: string;
|
|
133
|
+
dailyMinUpdatedAt: string;
|
|
134
|
+
readonly createdAt: string;
|
|
72
135
|
readonly updatedAt: string;
|
|
73
136
|
};
|
|
74
137
|
|
|
75
138
|
type TChallengePositionInfo = {
|
|
76
|
-
|
|
139
|
+
readonly id: string;
|
|
140
|
+
readonly challengeId: string;
|
|
77
141
|
positionIdx: number;
|
|
78
142
|
riskId: number;
|
|
79
143
|
riskLimitValue: number;
|
|
@@ -107,57 +171,40 @@ type TChallengePositionInfo = {
|
|
|
107
171
|
isReduceOnly: boolean;
|
|
108
172
|
mmrSysUpdatedTime: string | null;
|
|
109
173
|
leverageSysUpdatedTime: string | null;
|
|
110
|
-
updatedAt: string;
|
|
174
|
+
readonly updatedAt: string;
|
|
111
175
|
};
|
|
112
176
|
|
|
113
|
-
type
|
|
114
|
-
id
|
|
115
|
-
challengeId: string;
|
|
116
|
-
ctype: TChallengeType;
|
|
117
|
-
capital: number;
|
|
118
|
-
currency: string;
|
|
119
|
-
ttype: TTradingType;
|
|
120
|
-
ddtype: TDrawdownType;
|
|
177
|
+
type TChallengeBase = {
|
|
178
|
+
readonly id: string;
|
|
121
179
|
readonly status: TChallengeStatus;
|
|
122
180
|
readonly statusDescription: string;
|
|
123
181
|
provider: string;
|
|
182
|
+
capital: number;
|
|
183
|
+
currency: string;
|
|
124
184
|
startDate: string;
|
|
125
185
|
endDate: string;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
hasCredentials: boolean;
|
|
131
|
-
apiKeyHint?: string;
|
|
186
|
+
readonly createdAt: string;
|
|
187
|
+
readonly updatedAt: string;
|
|
188
|
+
};
|
|
189
|
+
type TChallengeItem = TChallengeBase & {
|
|
132
190
|
apiKeyInfo?: TChallengeApiKeyInfo;
|
|
133
191
|
statistics?: TChallengeStatistics;
|
|
134
192
|
progress?: TChallengeProgress;
|
|
135
193
|
rule?: TChallengeRule;
|
|
136
194
|
wallet?: TChallengeWalletBalance;
|
|
137
195
|
};
|
|
138
|
-
type TChallengeListItem = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
ddtype: TDrawdownType | null;
|
|
144
|
-
readonly status: TChallengeStatus;
|
|
145
|
-
readonly statusDescription: string;
|
|
146
|
-
provider: string;
|
|
147
|
-
startDate: string;
|
|
148
|
-
endDate: string | null;
|
|
196
|
+
type TChallengeListItem = TChallengeBase & {
|
|
197
|
+
statistics?: TChallengeStatistics;
|
|
198
|
+
progress?: TChallengeProgress;
|
|
199
|
+
rule?: TChallengeRule;
|
|
200
|
+
wallet?: TChallengeWalletBalance;
|
|
149
201
|
daysActive: number | null;
|
|
150
202
|
daysRemaining: number | null;
|
|
151
203
|
apiKeyHint?: string;
|
|
152
204
|
hasCredentials: boolean;
|
|
153
|
-
statistics?: TChallengeStatistics | null;
|
|
154
|
-
progress?: TChallengeProgress | null;
|
|
155
|
-
rule?: TChallengeRule | null;
|
|
156
|
-
wallet?: TChallengeWalletBalance | null;
|
|
157
205
|
};
|
|
158
206
|
|
|
159
207
|
type TChallengeStatistics = {
|
|
160
|
-
readonly id: string | null;
|
|
161
208
|
readonly challengeId: string;
|
|
162
209
|
totalClosedTradesCount: number;
|
|
163
210
|
totalClosedTrades: number;
|
|
@@ -170,10 +217,11 @@ type TChallengeStatistics = {
|
|
|
170
217
|
totalLongWins: number;
|
|
171
218
|
totalShortTrades: number;
|
|
172
219
|
totalShortWins: number;
|
|
173
|
-
readonly updatedAt: string;
|
|
174
220
|
loosesRate?: number;
|
|
175
221
|
totalCumEntryValue?: number;
|
|
176
222
|
totalCumExitValue?: number;
|
|
223
|
+
readonly createdAt: string;
|
|
224
|
+
readonly updatedAt: string;
|
|
177
225
|
};
|
|
178
226
|
|
|
179
227
|
type TChallengeTier = {
|
|
@@ -182,9 +230,9 @@ type TChallengeTier = {
|
|
|
182
230
|
capital: TChallengeCapital;
|
|
183
231
|
currency: IBybitCoinType;
|
|
184
232
|
priceUsd: number;
|
|
185
|
-
isActive: boolean;
|
|
233
|
+
readonly isActive: boolean;
|
|
186
234
|
readonly createdAt: string;
|
|
187
235
|
readonly updatedAt: string;
|
|
188
236
|
};
|
|
189
237
|
|
|
190
|
-
export {
|
|
238
|
+
export type { TChallengeAccountInfo, TChallengeApiKeyInfo, TChallengeCapital, TChallengeClosedPnl, TChallengeItem, TChallengeListItem, TChallengeMode, TChallengePositionInfo, TChallengeProgress, TChallengeProvider, TChallengeRule, TChallengeRuleGroup, TChallengeStatistics, TChallengeStatus, TChallengeTier, TChallengeType, TChallengeWalletBalance, TDrawdownType, TTradingType };
|