curl --request GET \
--url https://api.dev.leneutre.trade/v1/opportunities/historyconst options = {method: 'GET'};
fetch('https://api.dev.leneutre.trade/v1/opportunities/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dev.leneutre.trade/v1/opportunities/history"
response = requests.get(url)
print(response.text){
"carry24hApr": 123,
"carry7dApr": 123,
"carry30dApr": 123,
"historyHours": 123,
"long": "aster:ETHUSDT",
"short": "hyperliquid:ETH",
"worstDay7dApr": 123,
"series": [
{
"hour": "2023-11-07T05:31:56Z",
"longApr": 123,
"shortApr": 123,
"spreadApr": 123
}
]
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "Too many requests: wait, then try again."
}{
"error": "<string>",
"detail": "<string>"
}A pair's history
One pair’s funding spread over time, from the hourly history of the rates paid: its averages over the last 24 hours, 7 days and 30 days, as the list gives them, its worst day of the week, and both legs hour by hour over the last 7 days. Served from memory for 5 minutes per pair.
curl --request GET \
--url https://api.dev.leneutre.trade/v1/opportunities/historyconst options = {method: 'GET'};
fetch('https://api.dev.leneutre.trade/v1/opportunities/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dev.leneutre.trade/v1/opportunities/history"
response = requests.get(url)
print(response.text){
"carry24hApr": 123,
"carry7dApr": 123,
"carry30dApr": 123,
"historyHours": 123,
"long": "aster:ETHUSDT",
"short": "hyperliquid:ETH",
"worstDay7dApr": 123,
"series": [
{
"hour": "2023-11-07T05:31:56Z",
"longApr": 123,
"shortApr": 123,
"spreadApr": 123
}
]
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "Too many requests: wait, then try again."
}{
"error": "<string>",
"detail": "<string>"
}Query Parameters
The long leg, venue:market, as the opportunities list gives it.
"aster:ETHUSDT"
The short leg, venue:market.
"hyperliquid:ETH"
Response
The pair's averages and its last 7 days, hour by hour.
The funding spread on average over the last 24 hours, APR in percent of one leg's notional: each leg's average carry for its side over the window, added. Null while a leg has no history then.
The same over the last 7 days.
The same over the last 30 days.
The hours of history the 30-day average stands on, the fewer of the two legs'.
"aster:ETHUSDT"
"hyperliquid:ETH"
The lowest daily average of the spread over the last 7 days, each day the 24 hours before the next, counted once 12 of its hours have a spread.
Every hour of the last 7 days either leg has a rate for, oldest first.
Show child attributes
Show child attributes