@pear-protocol/types 1.21.0 → 1.22.0
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/trade/responses.d.ts +273 -1
- package/dist/trade/responses.js +1 -1
- package/package.json +1 -1
|
@@ -1095,5 +1095,277 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
1095
1095
|
}, z.core.$strip>], "intent">], "orderType">;
|
|
1096
1096
|
}, z.core.$strip>;
|
|
1097
1097
|
export type CreateTradeReverseResponse = z.output<typeof CreateTradeReverseResponse>;
|
|
1098
|
-
export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
1098
|
+
export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
1099
|
+
executions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1100
|
+
id: z.ZodUUID;
|
|
1101
|
+
connector: z.ZodEnum<{
|
|
1102
|
+
hyperliquid: "hyperliquid";
|
|
1103
|
+
binance: "binance";
|
|
1104
|
+
bybit: "bybit";
|
|
1105
|
+
okx: "okx";
|
|
1106
|
+
lighter: "lighter";
|
|
1107
|
+
}>;
|
|
1108
|
+
status: z.ZodEnum<{
|
|
1109
|
+
CANCELLED: "CANCELLED";
|
|
1110
|
+
IDLE: "IDLE";
|
|
1111
|
+
ACTIVE: "ACTIVE";
|
|
1112
|
+
COMPLETED: "COMPLETED";
|
|
1113
|
+
FAILED: "FAILED";
|
|
1114
|
+
}>;
|
|
1115
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
createdAt: z.ZodString;
|
|
1117
|
+
updatedAt: z.ZodString;
|
|
1118
|
+
orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1119
|
+
id: z.ZodUUID;
|
|
1120
|
+
connector: z.ZodEnum<{
|
|
1121
|
+
hyperliquid: "hyperliquid";
|
|
1122
|
+
binance: "binance";
|
|
1123
|
+
bybit: "bybit";
|
|
1124
|
+
okx: "okx";
|
|
1125
|
+
lighter: "lighter";
|
|
1126
|
+
}>;
|
|
1127
|
+
status: z.ZodEnum<{
|
|
1128
|
+
PENDING: "PENDING";
|
|
1129
|
+
PARTIAL: "PARTIAL";
|
|
1130
|
+
FILLED: "FILLED";
|
|
1131
|
+
CANCELLED: "CANCELLED";
|
|
1132
|
+
REJECTED: "REJECTED";
|
|
1133
|
+
}>;
|
|
1134
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1135
|
+
createdAt: z.ZodString;
|
|
1136
|
+
updatedAt: z.ZodString;
|
|
1137
|
+
type: z.ZodLiteral<"MARKET">;
|
|
1138
|
+
symbol: z.ZodString;
|
|
1139
|
+
side: z.ZodEnum<{
|
|
1140
|
+
BUY: "BUY";
|
|
1141
|
+
SELL: "SELL";
|
|
1142
|
+
}>;
|
|
1143
|
+
reduceOnly: z.ZodBoolean;
|
|
1144
|
+
quantity: z.ZodString;
|
|
1145
|
+
price: z.ZodString;
|
|
1146
|
+
filledQuantity: z.ZodString;
|
|
1147
|
+
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1148
|
+
}, z.core.$strip>], "type">>>;
|
|
1149
|
+
intent: z.ZodLiteral<"OPEN">;
|
|
1150
|
+
orderType: z.ZodLiteral<"MARKET">;
|
|
1151
|
+
legs: z.ZodTuple<[z.ZodObject<{
|
|
1152
|
+
symbol: z.ZodString;
|
|
1153
|
+
side: z.ZodEnum<{
|
|
1154
|
+
BUY: "BUY";
|
|
1155
|
+
SELL: "SELL";
|
|
1156
|
+
}>;
|
|
1157
|
+
mode: z.ZodEnum<{
|
|
1158
|
+
QUANTITY: "QUANTITY";
|
|
1159
|
+
USD: "USD";
|
|
1160
|
+
}>;
|
|
1161
|
+
amount: z.ZodString;
|
|
1162
|
+
reduceOnly: z.ZodBoolean;
|
|
1163
|
+
}, z.core.$strip>], z.ZodObject<{
|
|
1164
|
+
symbol: z.ZodString;
|
|
1165
|
+
side: z.ZodEnum<{
|
|
1166
|
+
BUY: "BUY";
|
|
1167
|
+
SELL: "SELL";
|
|
1168
|
+
}>;
|
|
1169
|
+
mode: z.ZodEnum<{
|
|
1170
|
+
QUANTITY: "QUANTITY";
|
|
1171
|
+
USD: "USD";
|
|
1172
|
+
}>;
|
|
1173
|
+
amount: z.ZodString;
|
|
1174
|
+
reduceOnly: z.ZodBoolean;
|
|
1175
|
+
}, z.core.$strip>>;
|
|
1176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1177
|
+
id: z.ZodUUID;
|
|
1178
|
+
connector: z.ZodEnum<{
|
|
1179
|
+
hyperliquid: "hyperliquid";
|
|
1180
|
+
binance: "binance";
|
|
1181
|
+
bybit: "bybit";
|
|
1182
|
+
okx: "okx";
|
|
1183
|
+
lighter: "lighter";
|
|
1184
|
+
}>;
|
|
1185
|
+
status: z.ZodEnum<{
|
|
1186
|
+
CANCELLED: "CANCELLED";
|
|
1187
|
+
IDLE: "IDLE";
|
|
1188
|
+
ACTIVE: "ACTIVE";
|
|
1189
|
+
COMPLETED: "COMPLETED";
|
|
1190
|
+
FAILED: "FAILED";
|
|
1191
|
+
}>;
|
|
1192
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1193
|
+
createdAt: z.ZodString;
|
|
1194
|
+
updatedAt: z.ZodString;
|
|
1195
|
+
orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1196
|
+
id: z.ZodUUID;
|
|
1197
|
+
connector: z.ZodEnum<{
|
|
1198
|
+
hyperliquid: "hyperliquid";
|
|
1199
|
+
binance: "binance";
|
|
1200
|
+
bybit: "bybit";
|
|
1201
|
+
okx: "okx";
|
|
1202
|
+
lighter: "lighter";
|
|
1203
|
+
}>;
|
|
1204
|
+
status: z.ZodEnum<{
|
|
1205
|
+
PENDING: "PENDING";
|
|
1206
|
+
PARTIAL: "PARTIAL";
|
|
1207
|
+
FILLED: "FILLED";
|
|
1208
|
+
CANCELLED: "CANCELLED";
|
|
1209
|
+
REJECTED: "REJECTED";
|
|
1210
|
+
}>;
|
|
1211
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1212
|
+
createdAt: z.ZodString;
|
|
1213
|
+
updatedAt: z.ZodString;
|
|
1214
|
+
type: z.ZodLiteral<"MARKET">;
|
|
1215
|
+
symbol: z.ZodString;
|
|
1216
|
+
side: z.ZodEnum<{
|
|
1217
|
+
BUY: "BUY";
|
|
1218
|
+
SELL: "SELL";
|
|
1219
|
+
}>;
|
|
1220
|
+
reduceOnly: z.ZodBoolean;
|
|
1221
|
+
quantity: z.ZodString;
|
|
1222
|
+
price: z.ZodString;
|
|
1223
|
+
filledQuantity: z.ZodString;
|
|
1224
|
+
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
}, z.core.$strip>], "type">>>;
|
|
1226
|
+
intent: z.ZodLiteral<"ADJUST">;
|
|
1227
|
+
orderType: z.ZodLiteral<"MARKET">;
|
|
1228
|
+
position: z.ZodObject<{
|
|
1229
|
+
id: z.ZodUUID;
|
|
1230
|
+
exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
1231
|
+
}, z.core.$strip>;
|
|
1232
|
+
legs: z.ZodTuple<[z.ZodObject<{
|
|
1233
|
+
symbol: z.ZodString;
|
|
1234
|
+
side: z.ZodEnum<{
|
|
1235
|
+
BUY: "BUY";
|
|
1236
|
+
SELL: "SELL";
|
|
1237
|
+
}>;
|
|
1238
|
+
mode: z.ZodEnum<{
|
|
1239
|
+
QUANTITY: "QUANTITY";
|
|
1240
|
+
USD: "USD";
|
|
1241
|
+
}>;
|
|
1242
|
+
amount: z.ZodString;
|
|
1243
|
+
reduceOnly: z.ZodBoolean;
|
|
1244
|
+
}, z.core.$strip>], z.ZodObject<{
|
|
1245
|
+
symbol: z.ZodString;
|
|
1246
|
+
side: z.ZodEnum<{
|
|
1247
|
+
BUY: "BUY";
|
|
1248
|
+
SELL: "SELL";
|
|
1249
|
+
}>;
|
|
1250
|
+
mode: z.ZodEnum<{
|
|
1251
|
+
QUANTITY: "QUANTITY";
|
|
1252
|
+
USD: "USD";
|
|
1253
|
+
}>;
|
|
1254
|
+
amount: z.ZodString;
|
|
1255
|
+
reduceOnly: z.ZodBoolean;
|
|
1256
|
+
}, z.core.$strip>>;
|
|
1257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1258
|
+
id: z.ZodUUID;
|
|
1259
|
+
connector: z.ZodEnum<{
|
|
1260
|
+
hyperliquid: "hyperliquid";
|
|
1261
|
+
binance: "binance";
|
|
1262
|
+
bybit: "bybit";
|
|
1263
|
+
okx: "okx";
|
|
1264
|
+
lighter: "lighter";
|
|
1265
|
+
}>;
|
|
1266
|
+
status: z.ZodEnum<{
|
|
1267
|
+
CANCELLED: "CANCELLED";
|
|
1268
|
+
IDLE: "IDLE";
|
|
1269
|
+
ACTIVE: "ACTIVE";
|
|
1270
|
+
COMPLETED: "COMPLETED";
|
|
1271
|
+
FAILED: "FAILED";
|
|
1272
|
+
}>;
|
|
1273
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1274
|
+
createdAt: z.ZodString;
|
|
1275
|
+
updatedAt: z.ZodString;
|
|
1276
|
+
orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1277
|
+
id: z.ZodUUID;
|
|
1278
|
+
connector: z.ZodEnum<{
|
|
1279
|
+
hyperliquid: "hyperliquid";
|
|
1280
|
+
binance: "binance";
|
|
1281
|
+
bybit: "bybit";
|
|
1282
|
+
okx: "okx";
|
|
1283
|
+
lighter: "lighter";
|
|
1284
|
+
}>;
|
|
1285
|
+
status: z.ZodEnum<{
|
|
1286
|
+
PENDING: "PENDING";
|
|
1287
|
+
PARTIAL: "PARTIAL";
|
|
1288
|
+
FILLED: "FILLED";
|
|
1289
|
+
CANCELLED: "CANCELLED";
|
|
1290
|
+
REJECTED: "REJECTED";
|
|
1291
|
+
}>;
|
|
1292
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1293
|
+
createdAt: z.ZodString;
|
|
1294
|
+
updatedAt: z.ZodString;
|
|
1295
|
+
type: z.ZodLiteral<"MARKET">;
|
|
1296
|
+
symbol: z.ZodString;
|
|
1297
|
+
side: z.ZodEnum<{
|
|
1298
|
+
BUY: "BUY";
|
|
1299
|
+
SELL: "SELL";
|
|
1300
|
+
}>;
|
|
1301
|
+
reduceOnly: z.ZodBoolean;
|
|
1302
|
+
quantity: z.ZodString;
|
|
1303
|
+
price: z.ZodString;
|
|
1304
|
+
filledQuantity: z.ZodString;
|
|
1305
|
+
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1306
|
+
}, z.core.$strip>], "type">>>;
|
|
1307
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
1308
|
+
orderType: z.ZodLiteral<"MARKET">;
|
|
1309
|
+
position: z.ZodObject<{
|
|
1310
|
+
id: z.ZodUUID;
|
|
1311
|
+
exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
1312
|
+
}, z.core.$strip>;
|
|
1313
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1314
|
+
id: z.ZodUUID;
|
|
1315
|
+
connector: z.ZodEnum<{
|
|
1316
|
+
hyperliquid: "hyperliquid";
|
|
1317
|
+
binance: "binance";
|
|
1318
|
+
bybit: "bybit";
|
|
1319
|
+
okx: "okx";
|
|
1320
|
+
lighter: "lighter";
|
|
1321
|
+
}>;
|
|
1322
|
+
status: z.ZodEnum<{
|
|
1323
|
+
CANCELLED: "CANCELLED";
|
|
1324
|
+
IDLE: "IDLE";
|
|
1325
|
+
ACTIVE: "ACTIVE";
|
|
1326
|
+
COMPLETED: "COMPLETED";
|
|
1327
|
+
FAILED: "FAILED";
|
|
1328
|
+
}>;
|
|
1329
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1330
|
+
createdAt: z.ZodString;
|
|
1331
|
+
updatedAt: z.ZodString;
|
|
1332
|
+
orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1333
|
+
id: z.ZodUUID;
|
|
1334
|
+
connector: z.ZodEnum<{
|
|
1335
|
+
hyperliquid: "hyperliquid";
|
|
1336
|
+
binance: "binance";
|
|
1337
|
+
bybit: "bybit";
|
|
1338
|
+
okx: "okx";
|
|
1339
|
+
lighter: "lighter";
|
|
1340
|
+
}>;
|
|
1341
|
+
status: z.ZodEnum<{
|
|
1342
|
+
PENDING: "PENDING";
|
|
1343
|
+
PARTIAL: "PARTIAL";
|
|
1344
|
+
FILLED: "FILLED";
|
|
1345
|
+
CANCELLED: "CANCELLED";
|
|
1346
|
+
REJECTED: "REJECTED";
|
|
1347
|
+
}>;
|
|
1348
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1349
|
+
createdAt: z.ZodString;
|
|
1350
|
+
updatedAt: z.ZodString;
|
|
1351
|
+
type: z.ZodLiteral<"MARKET">;
|
|
1352
|
+
symbol: z.ZodString;
|
|
1353
|
+
side: z.ZodEnum<{
|
|
1354
|
+
BUY: "BUY";
|
|
1355
|
+
SELL: "SELL";
|
|
1356
|
+
}>;
|
|
1357
|
+
reduceOnly: z.ZodBoolean;
|
|
1358
|
+
quantity: z.ZodString;
|
|
1359
|
+
price: z.ZodString;
|
|
1360
|
+
filledQuantity: z.ZodString;
|
|
1361
|
+
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1362
|
+
}, z.core.$strip>], "type">>>;
|
|
1363
|
+
intent: z.ZodLiteral<"REVERSE">;
|
|
1364
|
+
orderType: z.ZodLiteral<"MARKET">;
|
|
1365
|
+
position: z.ZodObject<{
|
|
1366
|
+
id: z.ZodUUID;
|
|
1367
|
+
exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
1368
|
+
}, z.core.$strip>;
|
|
1369
|
+
}, z.core.$strip>], "intent">], "orderType">>;
|
|
1370
|
+
}, z.core.$strip>;
|
|
1099
1371
|
export type CreateTradeCloseAllResponse = z.output<typeof CreateTradeCloseAllResponse>;
|
package/dist/trade/responses.js
CHANGED
|
@@ -5,6 +5,6 @@ const CreateTradeOpenResponse = z.object({ execution: Execution });
|
|
|
5
5
|
const CreateTradeAdjustResponse = z.object({ execution: Execution });
|
|
6
6
|
const CreateTradeCloseResponse = z.object({ execution: Execution });
|
|
7
7
|
const CreateTradeReverseResponse = z.object({ execution: Execution });
|
|
8
|
-
const CreateTradeCloseAllResponse = z.object({});
|
|
8
|
+
const CreateTradeCloseAllResponse = z.object({ executions: z.array(Execution) });
|
|
9
9
|
|
|
10
10
|
export { CreateTradeAdjustResponse, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpenResponse, CreateTradeReverseResponse };
|