GET
/
v1
/
api
/
route
curl --request GET \
  --url https://earn.turtle.vision/v1/api/route
{
  "data": {
    "steps": [
      {
        "kind": "approve",
        "owner": "<string>",
        "spender": "<string>",
        "token": {
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "logos": [
            "<string>"
          ],
          "decimals": 123,
          "chain": 123,
          "price": 123
        },
        "amount": "<string>",
        "tx": {
          "from": "<string>",
          "to": "<string>",
          "data": "<string>",
          "value": "<string>",
          "gas": 123
        }
      }
    ],
    "amount_out": "<string>",
    "price_impact": 123
  },
  "exp": 123
}

Query Parameters

user
string
required

The user's EOA address initiating the transaction.

chain
integer
required

The chain ID for the transaction.

slippage
number
required

Acceptable slippage tolerance for the trade, as a decimal (e.g., 0.01 for 1%). Must be between 0.001 (0.1%) and 0.5 (50%).

token_in
string
required

The address of the input token. Use 'native', 'eth', or '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' for the native chain asset.

token_out
string
required

The address of the output token.

amount
string
required

The amount of token_in to trade, in its smallest unit (e.g., wei for ETH).

referral
string
required

Referral code for the transaction.

id
string
required

ID of the vault / deal being executed.

Response

200 - application/json; charset=utf-8

Data signed with a signature