Same-chain swap on the PLAIN rail, for a network without chain-level EIP-7702 where the gasless rail is unavailable. Returns one UNSIGNED EIP-1559 transaction the owner EOA signs and broadcasts itself, paying its own gas in the network's native coin. There is no userOperation, no userOperationHash, and nothing to submit here — after broadcasting, report the hash to POST /transaction/register-broadcast, which is the only way the operation reaches a terminal status. Cross-chain is refused rather than silently downgraded, and so is a network that does support the gasless rail. Returns a coded 422 with INSUFFICIENT_ALLOWANCE when the input token is not approved for the router. Returns 429 Too Many Requests if the rate limit is exceeded (check the Retry-After response header).
Authentication: X-API-Key
Input — request body
ownerAddress string required- Owner EOA — the sender and the broadcaster
networkId string required- Chain id
fromToken string required- Input token address
toToken string required- Output token address
amount string required- Input amount, base units
slippage number- Slippage tolerance as a fraction (0.005 = 0.5%)
Input — example request
{
"ownerAddress": "0x0a1758ad202a2059e8c2970b562597ca45d863c4",
"networkId": "43114",
"fromToken": "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
"toToken": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
"amount": "1000000",
"slippage": 0.005
}
Output — example response (201)
{
"operationId": "ugtp_operation_...",
"senderAddress": "0x0a1758ad202a2059e8c2970b562597ca45d863c4",
"networkId": "43114",
"transaction": {
"to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
"value": "0x0",
"data": "0x..."
},
"fromAmount": "1000000",
"toAmount": "998500",
"minimumReceived": "0.9935",
"provider": "lifi"
}
Output — every status this endpoint answers with
| Status | When |
|---|
201 | Prepared unsigned transaction |
|---|
400 | Invalid request body, cross-chain requested, or the network supports gasless execution (use /swap/prepare instead). |
|---|
401 | Missing or invalid credentials |
|---|
422 | code=INSUFFICIENT_ALLOWANCE (the input token is not approved for the router, so the swap would need two transactions) or code=NO_ROUTE_AVAILABLE. |
|---|
429 | Rate limit exceeded — retry after the number of seconds in the `Retry-After` response header |
|---|
500 | Internal server error |
|---|