0
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.

Reference Image Here

HamBurger
  • 739
  • 4
  • 19
  • 1
    Does this answer your question? [What's the best way to parse a JSON response from the requests library?](https://stackoverflow.com/questions/16877422/whats-the-best-way-to-parse-a-json-response-from-the-requests-library) – RichieV Sep 04 '20 at 04:57

1 Answers1

0

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"])

HamBurger
  • 739
  • 4
  • 19