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

View File

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