> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equalsmoney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create quotes

> Create a quote for a given currency pair. This can be for either an internal currency exchange or an outbound payment. Once you've created a quote, yo

Create a quote for a given currency pair. This can be for either an internal currency exchange or an outbound payment. Once you've created a quote, you'll be able to create an order.

## Create a currency quote

<Note>
  **POST** `/v2/orders/quote`
</Note>

### Request

Use this request to create a quote for a given currency pair. All quotes expire after 12 seconds.

<Info>
  By default, in production, you can only use this request during trading hours and you'll receive live rates.
  In sandbox, you can use this request 24/7. However, the rates may be a couple of minutes behind current live rates.
</Info>

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/orders/quote?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "sourceCurrency": {
        "amount": 100,
        "currency": {
          "budgetId": "b489ea2c-0dd1-4fb1-b345-de5a596a5527",
          "currencyCode": "GBP"
        }
      },
      "targetCurrency": {
        "currency": {
          "budgetId": "b489ea2c-0dd1-4fb1-b345-de5a596a5527",
          "currencyCode": "EUR"
        }
      },
      "settlementDate": "20231201",
      "type": {
        "from": "balance",
        "to": "payment"
      }
    }'
  ```

  ```json Payload structure theme={null}
  {
    "sourceCurrency": {
      "amount": number,
      "currency": {
        "budgetId": "string",
        "currencyCode": "string"
      }
    },
    "targetCurrency": {
      "amount": number,
      "currency": {
        "budgetId": "string",
        "currencyCode": "string"
      }
    },
    "settlementDate": "string",
    "type": {
      "from": "string",
      "to": "string"
    }
  }
  ```
</CodeGroup>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you're creating a quote for.

  Allowable values: An existing `accountId`
</ParamField>

#### Request body schema

<ParamField body="sourceCurrency" type="object" required>
  Details about the source currency.

  Allowable values: A valid `sourceCurrency` object containing the following fields: `amount`, `currency`

  <Expandable title="sourceCurrency properties">
    <ParamField body="sourceCurrency.amount" type="number" required>
      The amount in the source currency.

      Allowable values: A valid number
    </ParamField>

    <ParamField body="sourceCurrency.currency" type="object" required>
      Details about the source currency.

      Allowable values: A valid `currency` object containing the following fields: `budgetId`, `currencyCode`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="targetCurrency" type="object" required>
  Details about the target currency.

  Allowable values: A valid `targetCurrency` object containing the following fields: `amount`, `currency`

  <Expandable title="targetCurrency properties">
    <ParamField body="targetCurrency.amount" type="number" required>
      The amount in the target currency.

      Allowable values: A valid number
    </ParamField>

    <ParamField body="targetCurrency.currency" type="object" required>
      Details about the target currency.

      Allowable values: A valid `currency` object containing the following fields: `budgetId`, `currencyCode`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="settlementDate" type="string" required>
  The settlement date.

  Allowable values: `^20[0-9]{2}[0-2]{1}[0-9]{1}[0-3]{1}[0-9]{1}$`
</ParamField>

<ParamField body="type" type="object" required>
  Details about the type of order.

  Allowable values: A valid `type` object containing the following fields: `from`, `to`

  <Expandable title="type properties">
    <ParamField body="type.from" type="string" required>
      The type of source.

      Allowable values: `balance`, `bank`
    </ParamField>

    <ParamField body="type.to" type="string" required>
      The type of target. For an internal currency exchange, set this to `balance`. For an outbound payment, use any of `payment`, `multiple`, or `forward`.

      Allowable values: `balance`, `payment`, `multiple`, `forward`, `unknown`
    </ParamField>
  </Expandable>
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing an `orderId` and a `quoteRequestId`. You'll need these to create an order.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "quoteRequestId": "4c14643c-072d-468a-81f0-791f4aca84ee-100-109.7222",
    "settlement": {
      "date": "20231201",
      "price": {
        "amount": 100,
        "currency": "GBP"
      },
      "charges": {
        "fee": 0
      }
    },
    "quote": {
      "rate": 1.0972222222,
      "inverseRate": 0.9113924051,
      "fromGbpAmount": 100,
      "from": {
        "amount": 100,
        "currency": "GBP"
      },
      "to": {
        "amount": 109.72,
        "currency": "EUR"
      },
      "direction": "1"
    },
    "orderId": "FPLZQVE5G2ZZKS"
  }
  ```

  ```json Response structure theme={null}
  {
    "quoteRequestId": "string",
    "settlement": {
      "date": "string",
      "price": {
        "amount": number,
        "currency": "string"
      },
      "charges": {
        "fee": number
      }
    },
    "quote": {
      "rate": number,
      "inverseRate": number,
      "fromGbpAmount": number,
      "from": {
        "amount": number,
        "currency": "string"
      },
      "to": {
        "amount": number,
        "currency": "string"
      },
      "direction": "string"
    },
    "orderId": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/payments/create-a-currency-quote).
