curl --request POST \
--url https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sender": "<string>",
"houdiniIds": [
"<string>"
]
}
'import requests
url = "https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build"
payload = {
"sender": "<string>",
"houdiniIds": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sender: '<string>', houdiniIds: ['<string>']})
};
fetch('https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sender' => '<string>',
'houdiniIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build"
payload := strings.NewReader("{\n \"sender\": \"<string>\",\n \"houdiniIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sender\": \"<string>\",\n \"houdiniIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sender\": \"<string>\",\n \"houdiniIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"multiId": "mx8Qa1",
"chain": "evm",
"depositNeeded": "500012687",
"saCurrentBalance": "0",
"transactions": [
{
"houdiniIds": [
"hxK7mQp2",
"hxK7mQp3"
],
"txData": {
"userOpHash": "0xa52e838c3667a152f26a3e039abe5bd0274261ef64dfa32d45c3a4604537852b",
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"data": "0xa9059cbb000000000000000000000000067423f2da169b79497f1ae57863a1d1ee7af772000000000000000000000000000000000000000000000000000000001dcdb5a6",
"value": "0",
"chainId": 8453,
"tokenAmount": "500012687"
}
}
]
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"fields": {},
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}Build batch transaction
Funds every order in the group with one ERC-4337 UserOperation instead of paying each deposit address. Every order must send the same source token — all the chain’s native coin, or all the same ERC-20.
- fund the smart account: send the transaction to
towithdataandvalue, movingtokenAmountof the source token - pass the signature to Submit signed transaction
- large groups come back as several batches — handle every entry in
transactions - supported on Ethereum, Base and BNB Smart Chain. Other EVM chains are rejected with 400
- EVM only. For Solana use Get batch transaction instead
See the multi-swap flow for the full sequence.
curl --request POST \
--url https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sender": "<string>",
"houdiniIds": [
"<string>"
]
}
'import requests
url = "https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build"
payload = {
"sender": "<string>",
"houdiniIds": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sender: '<string>', houdiniIds: ['<string>']})
};
fetch('https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sender' => '<string>',
'houdiniIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build"
payload := strings.NewReader("{\n \"sender\": \"<string>\",\n \"houdiniIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sender\": \"<string>\",\n \"houdiniIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-partner.houdiniswap.com/v2/exchanges/multi/{multiId}/tx/build")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sender\": \"<string>\",\n \"houdiniIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"multiId": "mx8Qa1",
"chain": "evm",
"depositNeeded": "500012687",
"saCurrentBalance": "0",
"transactions": [
{
"houdiniIds": [
"hxK7mQp2",
"hxK7mQp3"
],
"txData": {
"userOpHash": "0xa52e838c3667a152f26a3e039abe5bd0274261ef64dfa32d45c3a4604537852b",
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"data": "0xa9059cbb000000000000000000000000067423f2da169b79497f1ae57863a1d1ee7af772000000000000000000000000000000000000000000000000000000001dcdb5a6",
"value": "0",
"chainId": 8453,
"tokenAmount": "500012687"
}
}
]
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"fields": {},
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}Authorizations
Send Authorization: <ApiKey>:<ApiSecret> — joined by a colon, raw. No Bearer prefix, no base64.
Path Parameters
The multi exchange group ID
64Body
Request body for POST /exchanges/multi/{multiId}/tx/build
Wallet that will sign and fund the transaction(s). On EVM it also owns the smart account the batch runs through, so the same wallet must sign at Submit signed transaction.
1Optional subset of orders to build for; defaults to all orders in the group
50Response
Success
The group these transactions fund.
Chain kind of the from token (e.g. "solana", "evm")
One entry per batch. A group larger than the per-chain batch limit is split across several.
Show child attributes
Show child attributes
Native coin the smart account still needs before you can submit, in wei. "0" means it is already funded.
Native coin the smart account holds right now, in wei. The account is owned by the sender wallet, so this balance stays under the user's control.