Price
Learn how to retrieve the Index Price, Market Price, and Fill Price for trades using the available APIs.
Index Price
{
"marketId": "100",
"symbol": "ETH",
"skew": "-816032563610058179",
"price": 2751.21510528,
"currentOI": "171613599036410749027",
...
}Market Price
const indexMultiplier = BigNumber(1e18)
.plus(
BigNumber(marketData.skew.toString())
.dividedBy(marketData.skewScale as string)
.multipliedBy(1e18)
);
const markPrice = BigNumber(marketData.price)
.multipliedBy(indexMultiplier.toString())
.dividedBy(1e18)
.toFixed(0);Fill price
Last updated