Build transaction
curl --request POST \
--url https://api.bridg.now/v1/bridge/build \
--header 'Content-Type: application/json' \
--data '
{
"decisionId": "fb0798dc-97d2-41f2-8786-ace0b1c40722"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({decisionId: 'fb0798dc-97d2-41f2-8786-ace0b1c40722'})
};
fetch('https://api.bridg.now/v1/bridge/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bridg.now/v1/bridge/build"
payload = { "decisionId": "fb0798dc-97d2-41f2-8786-ace0b1c40722" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"transferId": "ca0e5dee-be62-4a8d-aab9-3c8762b29281",
"venue": "across",
"steps": [
{
"vm": "evm",
"step": "approve",
"chainId": 8453,
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b300000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d0000000000000000000000000000000000000000000000000000000005f51db0",
"value": "0"
},
{
"vm": "evm",
"step": "fee",
"chainId": 8453,
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"data": "0xa9059cbb00000000000000000000000058e602386db134b1f9b1d6d390c11a2b7b486677000000000000000000000000000000000000000000000000000000000000c350",
"value": "0"
},
{
"vm": "evm",
"step": "main",
"chainId": 8453,
"to": "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
"value": "0",
"data": "0x8e0250ee0000000000000000000000000000000000000000000000000000000005f51db00000000000000000000000000000000000000000000000000000000000000005f83ed8a61fb15505c93de93dffdc5e0d7c573df3f2bc3231c35312da4af16fc2000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913caa0da1eec44e89949baa43ecd3fde9fa3b551c53f9dba7492caa875cfa5c47400000000000000000000000000000000000000000000000000000000000032c200000000000000000000000000000000000000000000000000000000000003e81dc0de02c873c0de"
}
],
"expiresAt": 1789929586118,
"amountInAtomic": "99950000",
"expectedOutAtomic": "99937006",
"minOutAtomic": "99937006",
"feeCapture": "batch",
"referralCapture": null,
"feeBasis": "carved",
"feeBatch": {
"chainId": 8453,
"stepIndexes": [
0,
1,
2
]
},
"permit": null,
"relayFeePermit": null,
"spotTransfer": null,
"requoted": false
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}Transfers
Build transaction
Turn a quote into the unsigned transactions a wallet signs. Pass quoteId to build a row other than best. steps is every transaction to sign, in order; only main moves the order. A deposit-address venue returns deposit instead of steps. expectedOutAtomic equals the amountOutAtomic of the row you built. Idempotent per decisionId.
POST
/
bridge
/
build
Build transaction
curl --request POST \
--url https://api.bridg.now/v1/bridge/build \
--header 'Content-Type: application/json' \
--data '
{
"decisionId": "fb0798dc-97d2-41f2-8786-ace0b1c40722"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({decisionId: 'fb0798dc-97d2-41f2-8786-ace0b1c40722'})
};
fetch('https://api.bridg.now/v1/bridge/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bridg.now/v1/bridge/build"
payload = { "decisionId": "fb0798dc-97d2-41f2-8786-ace0b1c40722" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"transferId": "ca0e5dee-be62-4a8d-aab9-3c8762b29281",
"venue": "across",
"steps": [
{
"vm": "evm",
"step": "approve",
"chainId": 8453,
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b300000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d0000000000000000000000000000000000000000000000000000000005f51db0",
"value": "0"
},
{
"vm": "evm",
"step": "fee",
"chainId": 8453,
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"data": "0xa9059cbb00000000000000000000000058e602386db134b1f9b1d6d390c11a2b7b486677000000000000000000000000000000000000000000000000000000000000c350",
"value": "0"
},
{
"vm": "evm",
"step": "main",
"chainId": 8453,
"to": "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
"value": "0",
"data": "0x8e0250ee0000000000000000000000000000000000000000000000000000000005f51db00000000000000000000000000000000000000000000000000000000000000005f83ed8a61fb15505c93de93dffdc5e0d7c573df3f2bc3231c35312da4af16fc2000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913caa0da1eec44e89949baa43ecd3fde9fa3b551c53f9dba7492caa875cfa5c47400000000000000000000000000000000000000000000000000000000000032c200000000000000000000000000000000000000000000000000000000000003e81dc0de02c873c0de"
}
],
"expiresAt": 1789929586118,
"amountInAtomic": "99950000",
"expectedOutAtomic": "99937006",
"minOutAtomic": "99937006",
"feeCapture": "batch",
"referralCapture": null,
"feeBasis": "carved",
"feeBatch": {
"chainId": 8453,
"stepIndexes": [
0,
1,
2
]
},
"permit": null,
"relayFeePermit": null,
"spotTransfer": null,
"requoted": false
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"retryAfterMs": 123
}
}Body
application/json
Response
The transfer id and the unsigned steps
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Show child attributes
Show child attributes
Available options:
venue-param, merged, separate-step, batch, none Available options:
merged, batch, none, null Available options:
carved, added Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes