Getting an Indicative Exchange Rate
For this step, we will utilize the Fetch Exchange Rate endpoint provided by the API.
This step requires the use of Parent API keys exclusively, as the operation is intended to be performed at the EP level.
This endpoint offers a way to display current exchange rates to your EPM on your application without committing to any specific amount. Essentially, it functions as a variation of the create quote endpoint, generating a non-binding quote between two different currencies.
The query parameter
estimate
must be set to true when making the request to generate an indicative quote (?estimate=true
).
Example Request
To obtain the exchange rate from EUR to USDT, the following request can be made:
{
"from": "EUR",
"to": "USDT",
"payInMethod": "wallet",
"payOutMethod": "wallet"
}
Let's break down the request body parameters:
Field | Description |
---|---|
from | The currency you are exchanging from. |
to | The currency you are exchanging to. |
payInMethod | Method for the incoming payment, use wallet for transfers into a wallet. |
payOutMethod | Method for the outgoing payment, use wallet for transfers out of a wallet. |
Example Response
The request for the exchange rate from EUR to USDT yields the following response:
{
"id": null,
"from": "EUR",
"to": "USDT",
"amountIn": 1E+1,
"amountDue": 1E+1,
"amountOut": 10.683345,
"price": 0.9360364193,
"quoteStatus": "ESTIMATE",
"paymentStatus": "PENDING",
"acceptanceExpiryDate": 1708450591633,
"acceptanceDate": null,
"paymentExpiryDate": 1708451471395,
"paymentReceiptDate": null,
"payInLegs": [],
"payInMethod": {
"id": 5,
"code": "wallet",
"settlementCurrency": "EUR",
"requestedCurrency": null,
"estimatedExchangeRate": null,
"accountMethods": []
},
"payOutMethod": {
"id": 3,
"code": "wallet",
"currency": "USDT",
"accountMethods": [
{
"id": 1456,
"display": null
},
{
"id": 1665,
"display": null
},
{
"id": 1892,
"display": null
}
]
},
"uuid": "1072a63e-40ac-45f1-aebc-6d240754b58f",
"payOutInstruction": null,
"payInInstruction": null,
"usePayInMethod": null,
"usePayOutMethod": null,
"fee": 0.01000000000000000020816681711721685132943093776702880859375,
"processingFee": 0E+1,
"type": "FIXED",
"netPrice": 0.936036419300000000,
"grossPrice": 0.936036419300000000,
"amountInGross": 1E+1,
"amountInNet": 1E+1,
"fees": {
"percentage": {
"service": 0.0010,
"processing": 0.0000
},
"value": {
"service": 0.01,
"processing": 0
}
},
"dateCreated": 1708450571633,
"lastUpdated": 1708450571633
}
Key fields in the response:
Fields | Description |
---|---|
id | null, as this is an estimate quote. |
quoteStatus | The status of the quote; will be ESTIMATE due to the query parameter input. |
uuid | The UUID of the exchange estimate, which won't be linked to an id for an estimate. |
price | The exchange rate for converting the from currency to the to currency. |
amountIn | The amount of the from currency used in the estimate, with the default being 10. |
amountOut | The expected amount of the to currency received for the given amountIn. |
The price
field indicates the current exchange rate, which is approximately 0.93 EUR for 1 USDT.
Updated 8 months ago