how to get indexprice by api or websocket

how to get indexprice by apis

Hey,
The index price of a futures symbol can be obtained using the REST API endpoint GET /fapi/v1/premiumIndex or via the WebSocket stream endpoint <symbol>@markPrice

ok,thinks