On-Chain Swap
Events related to token swaps executed within the same blockchain network.
onchain.swap.completed
Triggered when an on-chain swap operation is successfully completed.
Available Data
| Field | Type | Description |
|---|---|---|
swap_id | string | Unique identifier for the swap |
wallet_address | wallet | The wallet that executed the swap |
token_in | object | Information about the input token |
token_out | object | Information about the output token |
amount_in | amount | Amount of tokens sold |
amount_out | amount | Amount of tokens received |
tx_hash | string | Transaction hash on the blockchain |
timestamp | string | Date and time of completion |
Example Usage
{
"hook_type": "onchain.swap.completed",
"data": {
"token_in": { "symbol": "ETH" },
"token_out": { "symbol": "USDC" },
"amount_in": "1.5",
"amount_out": "3000.00"
}
}