Hedging
To get an array of all available Hedging in our API with relation to Forecasts
you can use the Get Forecast Hedging
endpoint.
- Python
- Curl
import datetime
import typing
import requests
import pydantic
class Hedging(pydantic.BaseModel):
name: str
description: typing.Optional[str]
url = "https://api.clearmacro.com/api/v3/forecast/hedging/"
headers = {"accept": "application/json", "X-API-KEY": "YOUR_API_KEY"}
response = requests.get(url=url, headers=headers)
hedgings = [Hedging(**hedging) for hedging in response.json()]
curl -X "GET" \
https://api.clearmacro.com/api/v3/forecast/hedging/
-H "X-API-KEY:$API_KEY" | jq
Which will return data in the format:
[
{
"name": "Local",
"description": null
},
{
"name": "Hedged",
"description": null
},
{
"name": "Unhedged",
"description": null
}
]