Swap failed

Fired when a wallet action fails after at least one transaction was broadcast. There may be onchain state changes; inspect the steps for details.

postWebhookwallet_action.swap.failed

Payload

type'wallet_action.swap.failed' required

The type of webhook event.

reference_idstring nullable

Developer-provided reference ID, if one was included in the request.

wallet_action_idstring required

The ID of the wallet action.

wallet_idstring required

The ID of the wallet involved in the action.

action_type'swap' | 'transfer' | 'earn_deposit' | 'earn_withdraw' | 'earn_incentive_claim' | 'earn_fee_collect' | 'payout' required

Type of wallet action

created_atstring required

ISO 8601 timestamp of when the wallet action was created.

caip2string required

Chain identifier.

input_tokenstring required

Token address being sold.

output_tokenstring required

Token address being bought.

input_amountstring nullable required

Amount of input token in base units. Populated after onchain confirmation.

status'failed' required

The status of the wallet action.

failed_atstring required

ISO 8601 timestamp of when the wallet action failed.

Example payload

{
  "steps": [
    {
      "gas_credits_charged": {
        "value": "100.00",
        "currency": "usd"
      }
    }
  ]
}

Response

Return a 200 status to indicate that the webhook was received successfully.

Changes

Webhooks have no change history: a webhook is keyed by its event name rather than a path and method, so no recorded change can name it.