> For the complete documentation index, see [llms.txt](https://doc.fxwebapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.fxwebapi.com/rest-api/services/getquote.md).

# GetQuote API

## /Quote/Quote

<mark style="color:green;">`POST`</mark> `https://demo.fxcib.com/api/Quote/Quote`

This service allows to get the newest FX rate for particular pair. This service should be used mainly for SOA integrations, where it is not possible to use our real-time streaming websocket endpoint\
\
REST API can be customized for each customer/GUI that is using this API. \
\
In this example we use "fromCurrency toCurrency" model, where FXWebAPI is defining currency pair. To check other market standard model, please check "Order Placing API" service.

#### Request Body

| Name                | Type   | Description                                                                                                                                         |
| ------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| settlementDate      | string | Format: ddMMyyyy. When null, request is SPOT request.                                                                                               |
| quoteReqID          | string | Unique RequestID. Max 25 signs (for GUID - encode GUID as a base64 string)                                                                          |
| customerSegment     | string | Agreed name of the customer segment. Names of customer segments are depending on implementation. In our Swagger Demo please use: SYNNETRA.HTML.TEST |
| fromCurrency        | string | Currency Code ISO 4217 standard                                                                                                                     |
| toCurrency          | string | Currency Code ISO 4217 standard.                                                                                                                    |
| transactionCurrency | string | Currency Code ISO 4217 standard                                                                                                                     |
| transactionAmount   | number | Please use "." as decimal separator                                                                                                                 |
| key                 | string | Key provided by FXWebAPI                                                                                                                            |

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

```javascript
[
  {
    "ExchangeRate": 1.130358,
    "Reference": "rest_1e482053-8562-4a46-837a-4c014fac36243",
    "ValidityTime": "/Date(1557141987904)/",
    "ConvertedAmount": 168.68428,
    "OppositeAmount": 432.24
  }
]
```

{% endtab %}

{% tab title="400 " %}

```
	bad input parameter
```

{% endtab %}

{% tab title="401 " %}

```
	token is not valid
```

{% endtab %}
{% endtabs %}

## SANDBOX - DEMO

Test this service via Swagger: <https://app.swaggerhub.com/apis-docs/Synnetra4/FXWebAPISOA/1.7>

```javascript
{
  "quoteReqID": "5018d55d-fff7",
  "customerSegment": "SYNNETRA.HTML.TEST",
  "fromCurrency": "USD",
  "toCurrency": "EUR",
  "transactionCurrency": "EUR",
  "transactionAmount": 1520,
  "request": {
    "key": "X445Acg7tkxsy7HfZKHgDUKxKW9g4RWazM9NtjWTwdU6nxtQGKgKTMNmSdDcPECHGpvz3PnNVDH4H2Mq"
  }
}
```

## Architecture

{% hint style="success" %}
It is possible to customize request parameters during the project without additional costs. Below you can find our standard ready available service for getting the newest quote.
{% endhint %}

During implementation we provide dedicated Swagger documentation pointing to the Sandbox environment of the customer&#x20;

For architecture overview check:

{% content-ref url="/pages/-Lqax1yiCh9DuwIyttVL" %}
[REST API for SOA](/rest-api/direct-vs.-indirect-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LrAB-\_1vg94GFiQWTFG" %}
[Client facing REST API](/rest-api/client-facing-rest-api.md)
{% endcontent-ref %}
