Docs · guide · Python
Plain HTTP (Python) with FlexYield
No client library — the raw JSON-RPC call every guide reduces to.
Install
pip install requests
Connect and call
import requests
r = requests.post("https://flexyield.io/rpc/eth_mainnet",
headers={"Authorization": "Bearer fy_your_api_key"},
json={"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []},
timeout=15)
print(r.json()["result"], r.headers.get("X-Quota-Remaining"))
Replace fy_your_api_key with a key from your dashboard (free tier at registration). Chain slugs: eth_mainnet base_mainnet arbitrum_one optimism_mainnet polygon_pos solana_mainnet — each has its own measured page.
Notes
- Every response carries X-RateLimit-* and X-Quota-* headers; error bodies carry data.request_id and data.support.
All guides: integration guides · methods and limits · docs.