curl --request GET \
--url https://api.lamarge.trade/v1/routes \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/routes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/routes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"destination": "venue",
"minimum_received": {
"token": "<string>",
"amount": "<string>"
},
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"capped": true,
"amount_out": "<string>",
"legs": [
{
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"parts": 4,
"taker_fee": "<string>",
"taker_fee_bps": 50
}
],
"funding": "venue"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Get the best route
What takes would pay now on to for amount_in on from, reserving nothing: one take, or two through another venue when no direct take is possible (Lighter and Aster) or finds nothing, or when two pay at least 10 bps more and spend no less (routes). Where the second take carries less than the first delivers, the first shrinks to fit; with min_out, a route under that price shrinks to the largest amount that meets it, rather than none. Takes are admitted as POST /v1/takes admits them, your own orders excluded, but without its access check and limits.max_unpaid_takes; no route goes through Lighter without a linked account and a known fee, nor through Polymarket where your account holds funds but can withdraw none. A refusal of paying from from or delivering on to is the answer; without a route, so is the first refusal met, of the direct take or of an intermediate venue, else INSUFFICIENT_LIQUIDITY.
curl --request GET \
--url https://api.lamarge.trade/v1/routes \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/routes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/routes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"destination": "venue",
"minimum_received": {
"token": "<string>",
"amount": "<string>"
},
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"capped": true,
"amount_out": "<string>",
"legs": [
{
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"parts": 4,
"taker_fee": "<string>",
"taker_fee_bps": 50
}
],
"funding": "venue"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Authorizations
Query Parameters
wallet prices a wallet delivery on to: no deposit minimum, minimum_received set.
Where a take delivers on to: venue, into the taker's account linked there; wallet, by plain transfer to recipient's address on to's escrow chain, in that chain's wallet token (chain.wallet in GET /v1/venues; on Polygon native USDC converted from pUSD), to any address a wallet delivery accepts.
venue, wallet The highest taker fee the takes would accept: each leg is priced at its pair's fee, a leg whose fee is higher left out, as the take would refuse it. Without it, legs pay no fee, as takes without max_fee_bps do.
Basis points; the escrow refuses more than 100.
0 <= x <= 100Response
The route.
Where a take delivers on to: venue, into the taker's account linked there; wallet, by plain transfer to recipient's address on to's escrow chain, in that chain's wallet token (chain.wallet in GET /v1/venues; on Polygon native USDC converted from pUSD), to any address a wallet delivery accepts.
venue, wallet