# Exchange webhooks

Txn currently sends an exchange webhook only when an exchange quote completes — other lifecycle events may be added in future. The payload mirrors the [Read quote](/exchange/reading-quote.md) endpoint response.

For configuring webhook URLs, retry behaviour, source IPs, and signature verification, see the general [Webhooks](/api-basics/webhooks.md) section.

{% tabs %}
{% tab title="Exchange Webhook" %}

```json
{
  "data": {
    "attributes": {
      "accountChargedId": "5850abb7-0a60-4041-800c-1d43b4dcf4d6",
      "accountReceivedId": "acd50522-de49-4aaa-a183-dc046ff27fd5",
      "amountCharged": "0.0010418",
      "amountChargedCurrency": "BTC",
      "amountReceived": "100.0",
      "amountReceivedCurrency": "EUR",
      "exchangeFee": "1.00",
      "exchangeFeeCurrency": "EUR",
      "expiresAt": "2025-05-23T09:49:47.431Z",
      "rate": "96947.532",
      "rateCurrency": "EUR",
      "status": "completed"
    },
    "id": "d00edf6e-aa93-4461-ba0b-ebc9055e9e1b",
    "relationships": {
      "exchangeOrder": {
        "data": {
          "id": "44f5d889-1532-4846-ad8d-3796de9cf49d",
          "type": "orders"
        }
      },
      "transactions": {
        "data": [
          {
            "id": "2dba06a9-6289-48c6-9456-1580bcfcefc5",
            "type": "transactions"
          },
          {
            "id": "2e262dba-3b58-4e55-81cc-b2201b4994d0",
            "type": "transactions"
          }
        ]
      }
    },
    "type": "exchangeQuotes"
  },
  "included": [
    {
      "attributes": {
        "baseCode": "BTC",
        "quantity": "0.0010418",
        "quoteCode": "EUR"
      },
      "id": "44f5d889-1532-4846-ad8d-3796de9cf49d",
      "type": "orders"
    },
    {
      "attributes": {
        "accountId": "acd50522-de49-4aaa-a183-dc046ff27fd5",
        "amount": "100.00",
        "balance": null,
        "createdAt": "2025-05-23T09:49:20.508Z",
        "currency": "EUR",
        "reference": null,
        "simplifiedState": "completed",
        "transactionType": "ExchangeTransaction"
      },
      "id": "2dba06a9-6289-48c6-9456-1580bcfcefc5",
      "relationships": {
        "account": {
          "meta": {
            "included": false
          }
        },
        "transactionDetails": {
          "meta": {
            "included": false
          }
        }
      },
      "type": "transactions"
    },
    {
      "attributes": {
        "accountId": "5850abb7-0a60-4041-800c-1d43b4dcf4d6",
        "amount": "-0.00104180",
        "balance": null,
        "createdAt": "2025-05-23T09:49:20.497Z",
        "currency": "BTC",
        "reference": null,
        "simplifiedState": "completed",
        "transactionType": "ExchangeTransaction"
      },
      "id": "2e262dba-3b58-4e55-81cc-b2201b4994d0",
      "relationships": {
        "account": {
          "meta": {
            "included": false
          }
        },
        "transactionDetails": {
          "meta": {
            "included": false
          }
        }
      },
      "type": "transactions"
    }
  ],
  "meta": {}
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.txn.io/exchange/exchange-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
