Broadcast private transaction
Takes the raw transaction data as input and broadcasts it privately, only available for Ethereum network
Supported on: Ethereum Base Solana BNB Chain Avalanche ZKsync Gnosis Optimism Polygon Sonic Unichain Arbitrum
Parameters
chain
* number pathRequest Body
rawTransaction
* string The raw transaction data
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/tx-gateway/v1.1/{chain}/flashbots';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
rawTransaction: '0x123...',
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
transactionHash
* string The transaction hash in case of Evm chains, in case of Solana Transaction signature
JSON
Copy
1
2
3
4
{
"transactionHash": "0x123..."
}