Futures MarkPrice / IndexPrice Calculation problem

The method of calculating the value of Mark Price / Index Price in the futures market is provided at “https://www.binance.com/en/support/articles/360033525071”.

Is the futures market API the same as the value provided at “https://binance-docs.github.io/apidocs/futures/en/#mark-price” ?

Yes, GET /fapi/v1/premiumIndex is the correct endpoint returns the mark price.

premium index is not the mark price

funding_fee = nominal_value * funding_rate
nominal_value = mark_price * contract_size
funding_rate = premium_index + clamp(interest_rate - premium_index, 0.05%, 0.05%)
premium_index(P) = Max(0, Impact Bid Price - Price Index ) - Max(0, Price Index - Impact Ask Price) / Price Index
impact_bid_price = The average fill price to execute the Impact Margin Notional on the Bid Price Impact
ask_price = The average fill price to execute the Impact Margin Notional on the Ask Price

The clamp function ensures the value to the right of the + may not be greater than 0.05% or less than -0.05%?