POST Retrieve Forward Rate

Call this API to retrieve the forward rate for a source currency or target currency. You will then receive the rate and a rate ID which can be used to book the contract.

Request URL

https://api-sandbox.smartcurrencyexchange.com/v4/Rate/GetForwardRate

Field In Format Description Required
Authorization header string Authentication token Mandatory
sourceCurrency body string Selling currency’s three-digit code Mandatory
targetCurrency body string Buying currency’s three-digit code Mandatory
sourceAmount body decimal Enter desired selling amount Either source amount or target amount
targetAmount body decimal Enter desired buying amount Either source amount or target amount
valueDate body String Format: DD/MM/YYYY Mandatory

 

Request Sample

{
  "sourceCurrency": "eur",
  "targetCurrency": "gbp",
  "sourceAmount": 0,
  "targetAmount": 100000000,
  "valueDate": "22/06/2022"
}

Response Sample

{
  "status": "OK",
  "message": "",
  "singleObject": {
    "rate": 0.8433267,
    "rateId": 2497,
    "valueDate": "22/6/2022",
    "sourceCurrency": "EUR",
    "targetCurrency": "GBP",
    "sourceAmount": 118578007.790000000,
    "targetAmount": 100000000
  },
  "objectCollection": []
}

Response codes

HTTP Status Description Message
200 Success  
401 Token Expired or invalid token Token is no longer valid, please login again.
401 Missing token Please add ‘Authorization’ to your request header.
400 Invalid rate Id Couldn’t fetch the rate for the given rateId or the rate you are trying to fetch doesnt belong to your account
400 Both amounts are 0 Parameters passed are not valid please check again: One of SourceAmount and TargetAmount must be a non zero value, the other will be calculated.
400 Both amounts have a non-zero value Parameters passed are not valid please check again: Only one of SourceAmount and TargetAmount can be a non zero value, the other will be calculated.
400 Source amount is too small or too big One or more validation errors occurred.\nSourceAmount: The field SourceAmount must be between 0 and 10000000000.
400 Target amount is too small or too big One or more validation errors occurred.\nTargetAmount: The field TargetAmount must be between 0 and 10000000000.
400 No forward rate is available for the specified value date No Forward rate can be fetched for the value date provided by you. If you believe this is a mistake please contact Smart for support
400 Specified value date is a country or bank holiday The value date provided is a Bank or Country holiday, please provide another date

Submit a Comment

Your email address will not be published. Required fields are marked *

Smart Currency Fintech
1 Lyric Square,
Hammersmith,
London,
W6 0NB

[email protected]
020 7898 0500