cryptobot-types 1.1.1 → 1.1.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/package.json +3 -2
- package/types/okx.d.ts +44 -0
- package/types/orderHelper.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cryptobot-types",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@types/node": "^20.8.3",
|
|
17
|
-
"okx-api": "^1.1.3"
|
|
17
|
+
"okx-api": "^1.1.3",
|
|
18
|
+
"typescript": "^5.3.3"
|
|
18
19
|
}
|
|
19
20
|
}
|
package/types/okx.d.ts
CHANGED
|
@@ -126,6 +126,45 @@ export interface OrderUpdateData {
|
|
|
126
126
|
msg: string;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
export interface BalanceAndPositionUpdateData {
|
|
130
|
+
pTime: string;
|
|
131
|
+
eventType:
|
|
132
|
+
| "snapshot"
|
|
133
|
+
| "delivered"
|
|
134
|
+
| "exercised"
|
|
135
|
+
| "transferred"
|
|
136
|
+
| "filled"
|
|
137
|
+
| "liquidation"
|
|
138
|
+
| "claw_back"
|
|
139
|
+
| "adl"
|
|
140
|
+
| "funding_fee"
|
|
141
|
+
| "adjust_margin"
|
|
142
|
+
| "set_leverage"
|
|
143
|
+
| "interest_deduction";
|
|
144
|
+
balData: {
|
|
145
|
+
ccy: string;
|
|
146
|
+
cashBal: string;
|
|
147
|
+
uTIme: string;
|
|
148
|
+
};
|
|
149
|
+
posData: {
|
|
150
|
+
posId: string;
|
|
151
|
+
tradeId: string;
|
|
152
|
+
instId: string;
|
|
153
|
+
instType: string;
|
|
154
|
+
mgnMode: string;
|
|
155
|
+
posSide: string;
|
|
156
|
+
pos: string;
|
|
157
|
+
ccy: string;
|
|
158
|
+
posCcy: string;
|
|
159
|
+
avgPx: string;
|
|
160
|
+
uTime: string;
|
|
161
|
+
};
|
|
162
|
+
trades: {
|
|
163
|
+
instId: string;
|
|
164
|
+
tradeId: string;
|
|
165
|
+
}[];
|
|
166
|
+
}
|
|
167
|
+
|
|
129
168
|
export type TickerUpdateEvent = Omit<WsDataEvent, "data"> & {
|
|
130
169
|
data: TickerUpdateData[];
|
|
131
170
|
wsKey: string;
|
|
@@ -140,3 +179,8 @@ export type OrderUpdateEvent = Omit<WsDataEvent, "data"> & {
|
|
|
140
179
|
data: OrderUpdateData[];
|
|
141
180
|
wsKey: string;
|
|
142
181
|
};
|
|
182
|
+
|
|
183
|
+
export type BalanceAndPositionUpdateEvent = Omit<WsDataEvent, "data"> & {
|
|
184
|
+
data: BalanceAndPositionUpdateData[];
|
|
185
|
+
wsKey: string;
|
|
186
|
+
};
|