feat: update to hermes v2

This commit is contained in:
Arihant Bansal
2025-01-04 23:37:51 +05:30
parent cb0e3a682a
commit 8bd0b462d2
12 changed files with 240 additions and 162 deletions

View File

@@ -88,7 +88,8 @@ export interface FetchPriceResponse {
export interface PythFetchPriceResponse {
status: "success" | "error";
priceFeedID: string;
tokenSymbol: string;
priceFeedID?: string;
price?: string;
message?: string;
code?: string;
@@ -165,3 +166,61 @@ export interface TokenCheck {
}>;
score: number;
}
export interface PythPriceFeedIDItem {
id: string;
attributes: {
asset_type: string;
base: string;
};
}
export interface PythPriceItem {
binary: {
data: string[];
encoding: string;
};
parsed: [
Array<{
id: string;
price: {
price: string;
conf: string;
expo: number;
publish_time: number;
};
ema_price: {
price: string;
conf: string;
expo: number;
publish_time: number;
};
metadata: {
slot: number;
proof_available_time: number;
prev_publish_time: number;
};
}>,
];
}
export interface OrderParams {
quantity: number;
side: string;
price: number;
}
export interface BatchOrderPattern {
side: string;
totalQuantity?: number;
priceRange?: {
min?: number;
max?: number;
};
spacing?: {
type: "percentage" | "fixed";
value: number;
};
numberOfOrders?: number;
individualQuantity?: number;
}