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
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.
Sample request
Payload structure
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"
}
}'
{
"sourceCurrency" : {
"amount" : number ,
"currency" : {
"budgetId" : "string" ,
"currencyCode" : "string"
}
},
"targetCurrency" : {
"amount" : number ,
"currency" : {
"budgetId" : "string" ,
"currencyCode" : "string"
}
},
"settlementDate" : "string" ,
"type" : {
"from" : "string" ,
"to" : "string"
}
}
Query parameters
The ID of the account that you’re creating a quote for. Allowable values: An existing accountId
Request body schema
Details about the source currency. Allowable values: A valid sourceCurrency object containing the following fields: amount, currency Show sourceCurrency properties
The amount in the source currency. Allowable values: A valid number
Details about the source currency. Allowable values: A valid currency object containing the following fields: budgetId, currencyCode
Details about the target currency. Allowable values: A valid targetCurrency object containing the following fields: amount, currency Show targetCurrency properties
The amount in the target currency. Allowable values: A valid number
Details about the target currency. Allowable values: A valid currency object containing the following fields: budgetId, currencyCode
The settlement date. Allowable values: ^20[0-9]{2}[0-2]{1}[0-9]{1}[0-3]{1}[0-9]{1}$
Details about the type of order. Allowable values: A valid type object containing the following fields: from, to The type of source. Allowable values: balance, bank
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
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.
Sample response
Response structure
{
"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"
}
{
"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"
}
For more detailed information about this request and its response, see the API reference .