add markPrice to response
This commit is contained in:
@@ -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,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}> => {
|
}> => {
|
||||||
|
|||||||
Reference in New Issue
Block a user