@levrbet/shared 0.5.10 → 0.5.11
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.
|
@@ -2,29 +2,6 @@ import type { OrderDirection } from "@prisma/client";
|
|
|
2
2
|
import type { Side } from "../blockchain/contract.types";
|
|
3
3
|
import type { LevrGameMarketId } from "../oracle/market/markets.types";
|
|
4
4
|
import type { OrderType } from "./order.types";
|
|
5
|
-
export interface AskPositionContext {
|
|
6
|
-
posEntryPrice: bigint;
|
|
7
|
-
posGameProgressAtOpen: number;
|
|
8
|
-
posPositionSize: bigint;
|
|
9
|
-
posTokensBought: bigint;
|
|
10
|
-
posTokenAmount: bigint;
|
|
11
|
-
posCollateral: bigint;
|
|
12
|
-
posEffectiveLeverage: bigint;
|
|
13
|
-
gameProgressBps: number;
|
|
14
|
-
borrowFeeBps: number;
|
|
15
|
-
txFeeBps: number;
|
|
16
|
-
}
|
|
17
|
-
export interface PreviewOrderInput {
|
|
18
|
-
gameMarketId: LevrGameMarketId;
|
|
19
|
-
side: Side;
|
|
20
|
-
direction: OrderDirection;
|
|
21
|
-
type: OrderType;
|
|
22
|
-
price?: number;
|
|
23
|
-
budget?: string;
|
|
24
|
-
tokenAmount?: string;
|
|
25
|
-
leverage?: number;
|
|
26
|
-
askContext?: AskPositionContext;
|
|
27
|
-
}
|
|
28
5
|
export interface PreviewOrderResult {
|
|
29
6
|
fillRatio: number;
|
|
30
7
|
estimatedOutput: string;
|
|
@@ -32,7 +9,7 @@ export interface PreviewOrderResult {
|
|
|
32
9
|
estimatedAveragePrice: number;
|
|
33
10
|
blockingReason: string | null;
|
|
34
11
|
}
|
|
35
|
-
export interface
|
|
12
|
+
export interface PreviewAskItem {
|
|
36
13
|
positionId: string;
|
|
37
14
|
gameMarketId: LevrGameMarketId;
|
|
38
15
|
side: Side;
|
|
@@ -53,9 +30,9 @@ export interface BatchPreviewOrderItem {
|
|
|
53
30
|
borrowFeeBps?: number;
|
|
54
31
|
txFeeBps?: number;
|
|
55
32
|
}
|
|
56
|
-
export interface
|
|
57
|
-
items:
|
|
33
|
+
export interface PreviewAskRequest {
|
|
34
|
+
items: PreviewAskItem[];
|
|
58
35
|
}
|
|
59
|
-
export interface
|
|
36
|
+
export interface PreviewAskResult extends PreviewOrderResult {
|
|
60
37
|
positionId: string;
|
|
61
38
|
}
|