POST Retrieve Spot Rate

Call this API to retrieve the spot 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/GetSpotRate

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

 

Request Sample

{
  "sourceCurrency": "GBP",
  "targetCurrency": "EUR",
  "sourceAmount": 3000,
  "targetAmount": 0
}

Response Sample

{
  "status": "OK",
  "message": "",
  "singleObject": {
    "rate": 1.1488623,
    "rateId": 3534556,
    "sourceCurrency": "GBP",
    "targetCurrency": "EUR",
    "sourceAmount": 2631.2800,
    "targetAmount": 3000
  },
  "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 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.

 

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