# Confirming quote

## Confirm quote

<mark style="color:green;">`PATCH`</mark> `/api/public/v1/exchange/quotes/:id`

This endpoint confirmes quotes.

**Headers**

| Name          | Value                      |
| ------------- | -------------------------- |
| Content-Type  | `application/vnd.api+json` |
| Authorization | `Bearer <api_key>`         |

**Path Parameters**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | Quote ID.   |

**Response**

{% tabs %}
{% tab title="HTTP 200" %}

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

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "Quote has expired!",
      "detail": "Quote ID: 299b4cd3-1a09-4ace-8f06-bd3480ce88ac, expired at: 2024-07-01 14:24:36 UTC",
      "code": "exchange_quote_expired"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

**Response Body**

<table><thead><tr><th>Name</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td>data.id</td><td>string</td><td>Quote ID.</td></tr><tr><td>data.type</td><td>string</td><td>Entity type returned. Always <code>exchangeQuotes</code>.</td></tr><tr><td>data.attributes</td><td>object</td><td>A set of quote attributes.</td></tr><tr><td>data.attributes.amountCharged</td><td>string</td><td>Amount to be debited from your <code>accountChargedId</code>.</td></tr><tr><td>data.attributes.amountChargedCurrency</td><td>string</td><td>Account charged currency code.</td></tr><tr><td>data.attributes.amountReceivedCurrency</td><td>string</td><td>Account received cyrrency code.</td></tr><tr><td>data.attributes.amountReceived</td><td>string</td><td>Amount to be credited to your <code>accountReceivedId</code>.</td></tr><tr><td>data.attributes.rate</td><td>string</td><td>Exchange rate.</td></tr><tr><td>data.attributes.status</td><td>string</td><td>One of: <code>pending</code>, <code>completed</code>, <code>expired</code>, or <code>failed</code>.  Note: A transaction with status <code>failed</code> can be updated to <code>completed</code> via a support request.</td></tr><tr><td>data.attributes.rateCurrency</td><td>string</td><td>Exchange rate currency code.</td></tr><tr><td>data.attributes.exchangeFee</td><td>string</td><td>Txn fee amount.</td></tr><tr><td>data.attributes.exchangeFeeCurrency</td><td>string</td><td>Fee currency code.</td></tr><tr><td>data.attributes.expiresAt</td><td>string</td><td>Quote expiry timestamp.</td></tr></tbody></table>
