Secure, Non-Custodial Blockchain Transaction Service
TxRelay API allows you to build and broadcast blockchain transactions without sharing your private keys. We handle the complexity of gas estimation, nonce management, and broadcasting.
Authentication: Add x-api-key: YOUR_KEY header to all requests.
Creates an unsigned transaction optimized for current network conditions.
Body:{
"from": "0xYourWallet...",
"to": "0xRecipient...",
"amount": "0.1",
"chain": "sepolia"
}
Submits a locally signed transaction to the network.
Body:{
"signedTx": "0xSignedHexData...",
"chain": "sepolia"
}
Get your transaction history.
Get the native token balance of any address.
Check your current plan limits and usage.
// JavaScript Example
const response = await fetch('https://api.txrelay-api.com/api/v1/transactions/prepare', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'cg_live_...'
},
body: JSON.stringify({
from: '0xYourWallet...',
to: '0xRecipient...',
amount: '0.1',
chain: 'sepolia' // or 'ethereum', 'polygon', 'base', 'amoy'
})
});
const { unsignedTx } = response.data;
// Sign locally with your wallet, then broadcast...