import pandas as pd
URL = "https://ftx.com/api/futures/ETH-PERP/stats"
response = requests.get(URL)
html=response.text
For the above code , i want to extract value of "nextFundingRate" from html. How should i do it? Appreciate if any help.
import pandas as pd
URL = "https://ftx.com/api/futures/ETH-PERP/stats"
response = requests.get(URL)
html=response.text
For the above code , i want to extract value of "nextFundingRate" from html. How should i do it? Appreciate if any help.
Does This Solve Your Question?
import pandas as pd
import json
import requests
URL = "https://ftx.com/api/futures/ETH-PERP/stats"
response = requests.get(URL)
html = response.text
# SOLUTION
result = dict(json.loads(html))
print(result["result"]["nextFundingRate"])