@anrmk/str-package 0.2.11 → 0.2.13
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/IBybitSignRequest-cA1RCbDS.d.cts +13 -0
- package/dist/IBybitSignRequest-cA1RCbDS.d.ts +13 -0
- package/dist/{chunk-EMX46ZCF.js → chunk-A26C5LUZ.js} +3 -3
- package/dist/{chunk-EMX46ZCF.js.map → chunk-A26C5LUZ.js.map} +1 -1
- package/dist/{chunk-ZD6QLSNZ.js → chunk-T23XINGG.js} +48 -10
- package/dist/chunk-T23XINGG.js.map +1 -0
- package/dist/chunk-V45RVFQE.js +39 -0
- 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.cts → enums-CFM0khJf.d.cts} +16 -1
- package/dist/{enums-Dmg2vIi2.d.ts → enums-CFM0khJf.d.ts} +16 -1
- package/dist/index.cjs +46 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -2
- 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 -24
- package/dist/types/bybit/index.js.map +1 -1
- package/dist/types/challenge/index.d.cts +1 -1
- package/dist/types/challenge/index.d.ts +1 -1
- package/dist/utils/index.d.cts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-ZD6QLSNZ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/bybit/enums.ts"],"names":["IBybitAccountType","IBybitCoinType","IBybitApiKeyVipLevel"],"mappings":";;;AAAO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACL,EAAAA,mBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAFG,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA;AAKL,IAAK,cAAA,qBAAAC,eAAAA,KAAL;AACL,EAAAA,gBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,gBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,gBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,gBAAA,MAAA,CAAA,GAAO,MAAA;AAJG,EAAA,OAAAA,eAAAA;AAAA,CAAA,EAAA,cAAA,IAAA,EAAA;AAoBL,IAAK,oBAAA,qBAAAC,qBAAAA,KAAL;AACL,EAAAA,sBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AANE,EAAA,OAAAA,qBAAAA;AAAA,CAAA,EAAA,oBAAA,IAAA,EAAA","file":"index.cjs","sourcesContent":["export enum IBybitAccountType {\n UNIFIED = \"UNIFIED\",\n FUND = \"FUND\",\n}\n\nexport enum IBybitCoinType {\n BTC = \"BTC\",\n ETH = \"ETH\",\n USDT = \"USDT\",\n USDC = \"USDC\",\n}\n\nexport enum IBybitOrderType {\n MARKET = \"Market\",\n LIMIT = \"Limit\",\n}\n\nexport enum IBybitUnifiedMarginStatus {\n CLASSIC_ACCOUNT = 1,\n UNIFIED_TRADING_ACCOUNT_1_0 = 3,\n UNIFIED_TRADING_ACCOUNT_1_0_PRO = 4,\n UNIFIED_TRADING_ACCOUNT_2_0 = 5,\n UNIFIED_TRADING_ACCOUNT_2_0_PRO = 6,\n}\n\nexport enum IBybitApiKeyVipLevel {\n NO_VIP = \"No VIP\",\n VIP_1 = \"VIP 1\",\n VIP_2 = \"VIP 2\",\n VIP_3 = \"VIP 3\",\n VIP_4 = \"VIP 4\",\n VIP_5 = \"VIP 5\",\n}\n\n// Position side. Buy: long, Sell: short\n// return an empty string \"\" for an empty position\nexport enum IBybitPositionSide {\n SELL = \"Sell\",\n BUY = \"Buy\",\n EMPTY = \"\",\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/types/bybit/enums.ts"],"names":["IBybitAccountType","IBybitCoinType","IBybitApiKeyVipLevel","IBybitCategory","IBybitMarginMode"],"mappings":";;;AAAO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACL,EAAAA,mBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAFG,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA;AAKL,IAAK,cAAA,qBAAAC,eAAAA,KAAL;AACL,EAAAA,gBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,gBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,gBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,gBAAA,MAAA,CAAA,GAAO,MAAA;AAJG,EAAA,OAAAA,eAAAA;AAAA,CAAA,EAAA,cAAA,IAAA,EAAA;AAoBL,IAAK,oBAAA,qBAAAC,qBAAAA,KAAL;AACL,EAAAA,sBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,sBAAA,OAAA,CAAA,GAAQ,OAAA;AANE,EAAA,OAAAA,qBAAAA;AAAA,CAAA,EAAA,oBAAA,IAAA,EAAA;AAiBL,IAAK,cAAA,qBAAAC,eAAAA,KAAL;AACL,EAAAA,gBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,gBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,gBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,gBAAA,MAAA,CAAA,GAAO,MAAA;AAJG,EAAA,OAAAA,eAAAA;AAAA,CAAA,EAAA,cAAA,IAAA,EAAA;AAOL,IAAK,gBAAA,qBAAAC,iBAAAA,KAAL;AACL,EAAAA,kBAAA,iBAAA,CAAA,GAAkB,iBAAA;AAClB,EAAAA,kBAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,kBAAA,kBAAA,CAAA,GAAmB,kBAAA;AAHT,EAAA,OAAAA,iBAAAA;AAAA,CAAA,EAAA,gBAAA,IAAA,EAAA","file":"index.cjs","sourcesContent":["export enum IBybitAccountType {\n UNIFIED = \"UNIFIED\",\n FUND = \"FUND\",\n}\n\nexport enum IBybitCoinType {\n BTC = \"BTC\",\n ETH = \"ETH\",\n USDT = \"USDT\",\n USDC = \"USDC\",\n}\n\nexport enum IBybitOrderType {\n MARKET = \"Market\",\n LIMIT = \"Limit\",\n}\n\nexport enum IBybitUnifiedMarginStatus {\n CLASSIC_ACCOUNT = 1,\n UNIFIED_TRADING_ACCOUNT_1_0 = 3,\n UNIFIED_TRADING_ACCOUNT_1_0_PRO = 4,\n UNIFIED_TRADING_ACCOUNT_2_0 = 5,\n UNIFIED_TRADING_ACCOUNT_2_0_PRO = 6,\n}\n\nexport enum IBybitApiKeyVipLevel {\n NO_VIP = \"No VIP\",\n VIP_1 = \"VIP 1\",\n VIP_2 = \"VIP 2\",\n VIP_3 = \"VIP 3\",\n VIP_4 = \"VIP 4\",\n VIP_5 = \"VIP 5\",\n}\n\n// Position side. Buy: long, Sell: short\n// return an empty string \"\" for an empty position\nexport enum IBybitPositionSide {\n SELL = \"Sell\",\n BUY = \"Buy\",\n EMPTY = \"\",\n}\n\nexport enum IBybitCategory {\n LINEAR = \"linear\",\n INVERSE = \"inverse\",\n OPTION = \"option\",\n SPOT = \"spot\",\n}\n\nexport enum IBybitMarginMode {\n ISOLATED_MARGIN = \"ISOLATED_MARGIN\",\n REGULAR_MARGIN = \"REGULAR_MARGIN\",\n PORTFOLIO_MARGIN = \"PORTFOLIO_MARGIN\",\n}"]}
|
|
@@ -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.cjs';
|
|
2
|
+
export { I as IBybitCredentials, a as IBybitSignRequest } from '../../IBybitSignRequest-cA1RCbDS.cjs';
|
|
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,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,26 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var IBybitAccountType = /* @__PURE__ */ ((IBybitAccountType2) => {
|
|
3
|
-
IBybitAccountType2["UNIFIED"] = "UNIFIED";
|
|
4
|
-
IBybitAccountType2["FUND"] = "FUND";
|
|
5
|
-
return IBybitAccountType2;
|
|
6
|
-
})(IBybitAccountType || {});
|
|
7
|
-
var IBybitCoinType = /* @__PURE__ */ ((IBybitCoinType2) => {
|
|
8
|
-
IBybitCoinType2["BTC"] = "BTC";
|
|
9
|
-
IBybitCoinType2["ETH"] = "ETH";
|
|
10
|
-
IBybitCoinType2["USDT"] = "USDT";
|
|
11
|
-
IBybitCoinType2["USDC"] = "USDC";
|
|
12
|
-
return IBybitCoinType2;
|
|
13
|
-
})(IBybitCoinType || {});
|
|
14
|
-
var IBybitApiKeyVipLevel = /* @__PURE__ */ ((IBybitApiKeyVipLevel2) => {
|
|
15
|
-
IBybitApiKeyVipLevel2["NO_VIP"] = "No VIP";
|
|
16
|
-
IBybitApiKeyVipLevel2["VIP_1"] = "VIP 1";
|
|
17
|
-
IBybitApiKeyVipLevel2["VIP_2"] = "VIP 2";
|
|
18
|
-
IBybitApiKeyVipLevel2["VIP_3"] = "VIP 3";
|
|
19
|
-
IBybitApiKeyVipLevel2["VIP_4"] = "VIP 4";
|
|
20
|
-
IBybitApiKeyVipLevel2["VIP_5"] = "VIP 5";
|
|
21
|
-
return IBybitApiKeyVipLevel2;
|
|
22
|
-
})(IBybitApiKeyVipLevel || {});
|
|
23
|
-
|
|
24
|
-
export { IBybitAccountType, IBybitApiKeyVipLevel, IBybitCoinType };
|
|
1
|
+
export { IBybitAccountType, IBybitApiKeyVipLevel, IBybitCategory, IBybitCoinType, IBybitMarginMode } from '../../chunk-V45RVFQE.js';
|
|
25
2
|
//# sourceMappingURL=index.js.map
|
|
26
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IBybitApiKeyVipLevel, I as IBybitAccountType,
|
|
1
|
+
import { a as IBybitApiKeyVipLevel, I as IBybitAccountType, c as IBybitCoinType } from '../../enums-CFM0khJf.cjs';
|
|
2
2
|
export { TSyncResponse } from '../index.cjs';
|
|
3
3
|
|
|
4
4
|
type TChallengeType = "ONE_STEP" | "TWO_STEPS" | "THREE_STEPS";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IBybitApiKeyVipLevel, I as IBybitAccountType,
|
|
1
|
+
import { a as IBybitApiKeyVipLevel, I as IBybitAccountType, c as IBybitCoinType } from '../../enums-CFM0khJf.js';
|
|
2
2
|
export { TSyncResponse } from '../index.js';
|
|
3
3
|
|
|
4
4
|
type TChallengeType = "ONE_STEP" | "TWO_STEPS" | "THREE_STEPS";
|
package/dist/utils/index.d.cts
CHANGED
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { isSameUtcDay, parseNumber, toIsoDate } from '../chunk-36QZINNQ.js';
|
|
2
|
-
export { getBybitTimestamp, signBybitRequest, syncBybitServerTime } from '../chunk-
|
|
2
|
+
export { getBybitTimestamp, signBybitRequest, syncBybitServerTime } from '../chunk-T23XINGG.js';
|
|
3
|
+
import '../chunk-V45RVFQE.js';
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
|
4
5
|
//# sourceMappingURL=index.js.map
|