Build Delegated Swap
Builds transaction calldata from a prepared quote and its payer signature. The quote is not recalculated and the transaction is not broadcast.
^0x[0-9a-fA-F]{64}$Payer signature over the returned Witness typed data; 64-byte compact or 65-byte ECDSA.
^0x([0-9a-fA-F]{128}|[0-9a-fA-F]{130})$Transaction calldata for the prepared quote.
Request parsing failed: malformed/missing query parameters or invalid JSON syntax. The body may be plain text; this is HTTP 400, not application code 400.
Request body exceeds the endpoint limit. POST /router/swap/build has a 4 KiB body limit.
Send Content-Type: application/json for JSON POST requests.
Valid JSON syntax, but required fields or field types cannot be decoded. Correct the request before retrying.
Rate limit exceeded. Retry with backoff and honor Retry-After when present.
Internal server error.
Service rate limit exceeded. Retry with backoff.
# build-request.json contains quote_id and payer_signature from the same prepare.
# Keep this file private; applications should construct the body in memory.
curl --fail-with-body 'https://api.peach.ag/arc/router/swap/build' \
-H 'Content-Type: application/json' \
--data-binary @build-request.json
# Also check JSON code == 200. This command does not send a transaction.
{
"code": 200,
"msg": "Success",
"data": {
"quote_id": "0xdfb00c70165540d9a166a4290de2e34858271baa1c094e26802d2f41c83bec79",
"payer": "0x22fba69473baf7773bf43c23c44e8a7fb8ef62fa",
"executor": "0x036ede62f99ab5061ca89d0cec5acecc641f6474",
"recipient": "0x036ede62f99ab5061ca89d0cec5acecc641f6474",
"plan_hash": "0x8801e98fb3927833645e28390869cb3af4cfb392701d72a717f5c1847d53a4eb",
"execution_mode": "PERMIT2_WITNESS",
"execution_status": "TRANSACTION_READY",
"gas": 780000,
"tx": {
"to": "0x5ff56925140d6f5912c8ca6593f2c3bc28190607",
"data": "0x02fcde220000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000004cef520000000000000000000000005ff56925140d6f5912c8ca6593f2c3bc2819060700000000000000000000000022fba69473baf7773bf43c23c44e8a7fb8ef62fa000000000000000000000000036ede62f99ab5061ca89d0cec5acecc641f6474000000000000000000000000036ede62f99ab5061ca89d0cec5acecc641f64740000000000000000000000004608e7fc3163f11c241a7cdd1c8a7d46f150e37a000000000000000000000000ff551f980ea5128c5b14114604d33e5adae981500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000085636264700564cced5000000000000000000000000000000000000000000000860efaaf8e2c0389c6bdfb00c70165540d9a166a4290de2e34858271baa1c094e26802d2f41c83bec79decb42eb2eb596fb3f06e6a4f45f0a8961f428f006cee054d2f98db6630411f056357fcbc3b1d045eee9e481f3308a1af340ab6b13b7efb19733c294529f722700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a9e2701dfb00c70165540d9a166a4290de2e34858271baa1c094e26802d2f41c83bec79000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000005e00000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000006e00000000000000000000000004608e7fc3163f11c241a7cdd1c8a7d46f150e37a000000000000000000000000ff551f980ea5128c5b14114604d33e5adae9815000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000085636264700564cced500000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000006a9e2701dfb00c70165540d9a166a4290de2e34858271baa1c094e26802d2f41c83bec79000000000000000000000000000000000000000000000860efaaf8e2c0389c6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000006e9d4fa65ea3396d80345f37bae1c4e4ac443689000000000000000000000000d60804941f49270c74f4c7e8686e288723360a750000000000000000000000004608e7fc3163f11c241a7cdd1c8a7d46f150e37a000000000000000000000000ff551f980ea5128c5b14114604d33e5adae9815000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ff551f980ea5128c5b14114604d33e5adae981500000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000419e15411c2ccf816e8228dd08be18c30452cbcd6ca3e117d100a9a39230d2e9153b47fd0db93af18d791e14192e56d4a49a03bda4fd75a4c0ed2c9ec16ff9833d1b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041bc08363763a15b1ee9d7f4e3350c109932431399efa15d576b98be1ad4aa9c7041a4463ec07067d8a8de1577bb8614fb6138cf23677cfdc3806e6515b98acd4f1c00000000000000000000000000000000000000000000000000000000000000",
"value": "0",
"entrypoint": "executePlan",
"amount_out_min": "39369253737490119708373"
}
}
}Last updated
Was this helpful?