BinanceFutures.Rest.MarketData.mark_price
You're seeing just the function
mark_price
, go back to BinanceFutures.Rest.MarketData module for more information.
Specs
mark_price(nil | binary()) :: {:ok, map()} | {:ok, [map()]} | BinanceFutures.HTTPClient.error()
Gets Mark Price and Funding Rate
If no symbol
provided, prices for all symbols will be returned.
Example
iex(1)> BinanceFutures.Rest.MarketData.mark_price("BTCUSDT") {:ok, %{
"estimatedSettlePrice" => "57311.26556567",
"indexPrice" => "57299.56815703",
"interestRate" => "0.00010000",
"lastFundingRate" => "0.00010000",
"markPrice" => "57325.76000000",
"nextFundingTime" => 1616342400000,
"symbol" => "BTCUSDT",
"time" => 1616341403005
}}
iex(2)> BinanceFutures.Rest.MarketData.mark_price() {:ok, [
%{
"estimatedSettlePrice" => "18.99792722",
"indexPrice" => "18.98676895",
"interestRate" => "0.00010000",
"lastFundingRate" => "0.00036359",
"markPrice" => "18.99830000",
"nextFundingTime" => 1616342400000,
"symbol" => "SUSHIUSDT",
"time" => 1616341422000
},
%{
"estimatedSettlePrice" => "2.71120145",
"indexPrice" => "2.69011741",
"interestRate" => "0.00010000",
...
},
%{
"estimatedSettlePrice" => "196.26837596",
"indexPrice" => "196.02526316",
...
},
%{"estimatedSettlePrice" => "3.96997638", ...},
%{...},
...
]}