Skip to main content
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

POST /v2/orders/quote

Request

Use this request to create a quote for a given currency pair. All quotes expire after 12 seconds.
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.
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"
    }
  }'

Query parameters

accountId
string
required
The ID of the account that you’re creating a quote for.Allowable values: An existing accountId

Request body schema

sourceCurrency
object
required
Details about the source currency.Allowable values: A valid sourceCurrency object containing the following fields: amount, currency
targetCurrency
object
required
Details about the target currency.Allowable values: A valid targetCurrency object containing the following fields: amount, currency
settlementDate
string
required
The settlement date.Allowable values: ^20[0-9]{2}[0-2]{1}[0-9]{1}[0-3]{1}[0-9]{1}$
type
object
required
Details about the type of order.Allowable values: A valid type object containing the following fields: from, to

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.
{
  "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"
}
For more detailed information about this request and its response, see the API reference.