add markPrice to response

This commit is contained in:
Nick Caradonna
2025-08-07 15:24:28 -04:00
parent 7f679d826d
commit 4411d5b2dc
2 changed files with 9 additions and 2 deletions

View File

@@ -1044,6 +1044,7 @@ const main = async (): Promise<void> => {
bestPrice: result.data.estimatedPrices.bestPrice.toString(),
worstPrice: result.data.estimatedPrices.worstPrice.toString(),
oraclePrice: result.data.estimatedPrices.oraclePrice.toString(),
markPrice: result.data.estimatedPrices.markPrice.toString(),
priceImpact: BigNum.from(
result.data.estimatedPrices.priceImpact,
PRICE_PRECISION_EXP
@@ -1051,7 +1052,6 @@ const main = async (): Promise<void> => {
slippageTolerance: (
result.data.marketOrderParams.slippageTolerance / 100
).toString(),
baseFilled: result.data.estimatedPrices.baseFilled,
},
};

View File

@@ -919,7 +919,14 @@ export const mapToMarketOrderParams = async (
success: boolean;
data?: {
marketOrderParams: any;
estimatedPrices: any;
estimatedPrices: {
oraclePrice: BN;
bestPrice: BN;
entryPrice: BN;
worstPrice: BN;
markPrice: BN;
priceImpact: BN;
};
};
error?: string;
}> => {