curl --request GET \
--url https://api.dev.leneutre.trade/v1/opportunities/quoteconst options = {method: 'GET'};
fetch('https://api.dev.leneutre.trade/v1/opportunities/quote', 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/quote"
response = requests.get(url)
print(response.text){
"quote": {
"grossApr": 4.3745,
"netApr": 2.2238,
"onMargin": {
"leverage": {
"long": 10,
"short": 10
},
"marginUsd": 2000,
"grossApr": 21.8726,
"netApr": 11.1188
},
"atMaxLeverage": {
"leverage": {
"long": 20,
"short": 25
},
"marginUsd": 900,
"grossApr": 48.6058,
"netApr": 24.7084
},
"roundTripCostUsd": 17.68,
"entryGap": 0.00028,
"breakEvenHours": 354,
"confidence": "exact",
"missing": []
},
"costs": {
"longOpen": {
"midPrice": 2693.235,
"fillPrice": 2693.2421,
"feeUsd": 4,
"impactUsd": 0.0265,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
},
"longClose": {
"midPrice": 2693.235,
"fillPrice": 2693.2279,
"feeUsd": 4,
"impactUsd": 0.0265,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
},
"shortOpen": {
"midPrice": 2693.95,
"fillPrice": 2693.9921,
"feeUsd": 4.5,
"impactUsd": 0.1556,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
},
"shortClose": {
"midPrice": 2693.95,
"fillPrice": 2694.0079,
"feeUsd": 4.5,
"impactUsd": 0.2141,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
}
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "Too many requests: wait, then try again."
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Quote a pair
One pair at your size: its net APR after fees and the cost of crossing both venues’ order books, at entry and at exit. The books are read live; a leg’s costs are served from memory for 15 seconds, or as long as maxAge asks, to every pair that has it. A venue has 8 seconds to send its books: past them the answer is 504, and 502 when the venue fails, with error naming it.
curl --request GET \
--url https://api.dev.leneutre.trade/v1/opportunities/quoteconst options = {method: 'GET'};
fetch('https://api.dev.leneutre.trade/v1/opportunities/quote', 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/quote"
response = requests.get(url)
print(response.text){
"quote": {
"grossApr": 4.3745,
"netApr": 2.2238,
"onMargin": {
"leverage": {
"long": 10,
"short": 10
},
"marginUsd": 2000,
"grossApr": 21.8726,
"netApr": 11.1188
},
"atMaxLeverage": {
"leverage": {
"long": 20,
"short": 25
},
"marginUsd": 900,
"grossApr": 48.6058,
"netApr": 24.7084
},
"roundTripCostUsd": 17.68,
"entryGap": 0.00028,
"breakEvenHours": 354,
"confidence": "exact",
"missing": []
},
"costs": {
"longOpen": {
"midPrice": 2693.235,
"fillPrice": 2693.2421,
"feeUsd": 4,
"impactUsd": 0.0265,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
},
"longClose": {
"midPrice": 2693.235,
"fillPrice": 2693.2279,
"feeUsd": 4,
"impactUsd": 0.0265,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
},
"shortOpen": {
"midPrice": 2693.95,
"fillPrice": 2693.9921,
"feeUsd": 4.5,
"impactUsd": 0.1556,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
},
"shortClose": {
"midPrice": 2693.95,
"fillPrice": 2694.0079,
"feeUsd": 4.5,
"impactUsd": 0.2141,
"networkUsd": 0,
"feeSource": "base",
"basis": "book",
"confidence": "exact"
}
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "Too many requests: wait, then try again."
}{
"error": "<string>",
"detail": "<string>"
}{
"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"
Notional per leg, in dollars.
x <= 1000000000Holding period, in days. The round trip's cost is spread over it.
x <= 3650The leverage you want on each leg, capped per leg at the venue's maximum.
x <= 100010
How old a leg's costs served from memory may be, in seconds: a list pricing many pairs at once takes up to a minute, so its visitors share one read of each book. Not part of what is priced.
1 <= x <= 60