Skip to main content
POST
/
orders
/
quote
cURL
curl --request POST \
  --url 'https://api.equalsmoney.com/v2/orders/quote?accountId={{accountId}}' \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sourceCurrency": {
    "amount": 0,
    "currency": {
      "budgetId": "775596ae-2624-40af-a9dc-9756110a4a03",
      "currencyCode": "USD"
    }
  },
  "targetCurrency": {
    "amount": 0,
    "currency": {
      "budgetId": "775596ae-2624-40af-a9dc-9756110a4a03",
      "currencyCode": "USD"
    }
  },
  "settlementDate": "20221027",
  "type": {
    "from": "bank",
    "to": "payment",
    "recipientId": "8lciyups6"
  },
  "marginCurrency": "USD"
}
'
import requests

url = "https://api.equalsmoney.com/v2/orders/quote"

payload = {
"sourceCurrency": {
"amount": 0,
"currency": {
"budgetId": "775596ae-2624-40af-a9dc-9756110a4a03",
"currencyCode": "USD"
}
},
"targetCurrency": {
"amount": 0,
"currency": {
"budgetId": "775596ae-2624-40af-a9dc-9756110a4a03",
"currencyCode": "USD"
}
},
"settlementDate": "20221027",
"type": {
"from": "bank",
"to": "payment",
"recipientId": "8lciyups6"
},
"marginCurrency": "USD"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceCurrency: {
amount: 0,
currency: {budgetId: '775596ae-2624-40af-a9dc-9756110a4a03', currencyCode: 'USD'}
},
targetCurrency: {
amount: 0,
currency: {budgetId: '775596ae-2624-40af-a9dc-9756110a4a03', currencyCode: 'USD'}
},
settlementDate: '20221027',
type: {from: 'bank', to: 'payment', recipientId: '8lciyups6'},
marginCurrency: 'USD'
})
};

fetch('https://api.equalsmoney.com/v2/orders/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.equalsmoney.com/v2/orders/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceCurrency' => [
'amount' => 0,
'currency' => [
'budgetId' => '775596ae-2624-40af-a9dc-9756110a4a03',
'currencyCode' => 'USD'
]
],
'targetCurrency' => [
'amount' => 0,
'currency' => [
'budgetId' => '775596ae-2624-40af-a9dc-9756110a4a03',
'currencyCode' => 'USD'
]
],
'settlementDate' => '20221027',
'type' => [
'from' => 'bank',
'to' => 'payment',
'recipientId' => '8lciyups6'
],
'marginCurrency' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.equalsmoney.com/v2/orders/quote"

payload := strings.NewReader("{\n \"sourceCurrency\": {\n \"amount\": 0,\n \"currency\": {\n \"budgetId\": \"775596ae-2624-40af-a9dc-9756110a4a03\",\n \"currencyCode\": \"USD\"\n }\n },\n \"targetCurrency\": {\n \"amount\": 0,\n \"currency\": {\n \"budgetId\": \"775596ae-2624-40af-a9dc-9756110a4a03\",\n \"currencyCode\": \"USD\"\n }\n },\n \"settlementDate\": \"20221027\",\n \"type\": {\n \"from\": \"bank\",\n \"to\": \"payment\",\n \"recipientId\": \"8lciyups6\"\n },\n \"marginCurrency\": \"USD\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.equalsmoney.com/v2/orders/quote")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sourceCurrency\": {\n \"amount\": 0,\n \"currency\": {\n \"budgetId\": \"775596ae-2624-40af-a9dc-9756110a4a03\",\n \"currencyCode\": \"USD\"\n }\n },\n \"targetCurrency\": {\n \"amount\": 0,\n \"currency\": {\n \"budgetId\": \"775596ae-2624-40af-a9dc-9756110a4a03\",\n \"currencyCode\": \"USD\"\n }\n },\n \"settlementDate\": \"20221027\",\n \"type\": {\n \"from\": \"bank\",\n \"to\": \"payment\",\n \"recipientId\": \"8lciyups6\"\n },\n \"marginCurrency\": \"USD\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.equalsmoney.com/v2/orders/quote")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceCurrency\": {\n \"amount\": 0,\n \"currency\": {\n \"budgetId\": \"775596ae-2624-40af-a9dc-9756110a4a03\",\n \"currencyCode\": \"USD\"\n }\n },\n \"targetCurrency\": {\n \"amount\": 0,\n \"currency\": {\n \"budgetId\": \"775596ae-2624-40af-a9dc-9756110a4a03\",\n \"currencyCode\": \"USD\"\n }\n },\n \"settlementDate\": \"20221027\",\n \"type\": {\n \"from\": \"bank\",\n \"to\": \"payment\",\n \"recipientId\": \"8lciyups6\"\n },\n \"marginCurrency\": \"USD\"\n}"

response = http.request(request)
puts response.read_body
{
  "orderId": "EABCDE6FGHI0",
  "quoteRequestId": "USD-USD-5-5",
  "settlement": {
    "date": "20221027",
    "price": {
      "amount": 5,
      "currency": "USD"
    },
    "charges": {
      "fee": 0,
      "margin": 0,
      "other": 0
    }
  },
  "quote": {
    "rate": 1,
    "inverseRate": 1,
    "fromGbpAmount": 3,
    "from": {
      "amount": 5,
      "currency": "USD"
    },
    "to": {
      "amount": 5,
      "currency": "USD"
    },
    "direction": 1
  }
}

Authorizations

Authorization
string
header
required

Query Parameters

accountId
string
required

The ID of the account to work with.

Example:

"F50091"

Body

application/json

Body

sourceCurrency
object
required

Details about the source currency.

targetCurrency
object
required

Details about the target currency.

settlementDate
string
required

The settlement date.

Pattern: ^20[0-9]{2}[0-2][0-9][0-3][0-9]$
Example:

"20221027"

type
object
required

Details about the type of quote that you're creating.

marginCurrency
string

The ISO-4217 currency in which margin (collateral) is held for the contract. Required when creating a forward contract.

Pattern: ^[A-Z]{3}$
Example:

"USD"

Response

200 - application/json

OK

orderId
string

The ID of the order.

Example:

"EABCDE6FGHI0"

quoteRequestId
string

The ID of the quote request.

Example:

"USD-USD-5-5"

settlement
object

Details about the settlement.

quote
object

Details about the quote.