From cb9d4a142adcbe47fe15ece2bff1e71906a8797d Mon Sep 17 00:00:00 2001 From: Nick Caradonna Date: Thu, 7 Aug 2025 15:24:28 -0400 Subject: [PATCH] add markPrice to response --- src/index.ts | 2 +- src/utils/utils.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index a09a7d6..fea69fc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1044,6 +1044,7 @@ const main = async (): Promise => { 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 => { slippageTolerance: ( result.data.marketOrderParams.slippageTolerance / 100 ).toString(), - baseFilled: result.data.estimatedPrices.baseFilled, }, }; diff --git a/src/utils/utils.ts b/src/utils/utils.ts index ef81d28..cad5a91 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -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; }> => {