Get FX rate signature
Get the currently available FX rate along with rate signature.
Definition
URL
GET https://api-test.instarem.com:4803/api/v1/lockFx/getFxRate
Headers Parameters
Parameter | Description | Type | Required |
---|---|---|---|
authorization | Authentication Token | String | Yes |
content-type | The Content-Type entity header is used to indicate the media type of the resource. Expected value is application/json. | String | Yes |
X-CLIENT-ID | Unique id for client generated by Nium, Required only in case of partner based model (E.g. 593feb7c7c52bb2357b2df6c). | String | No |
Example Request
- Bash
- Javascript
- C#
curl --request get \\
--url "https://api-test.instarem.com:4803/api/v1/lockFx/getFxRate?source_currency=&destination_currency=" \\
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM' \\
--header 'content-type: application/json' \\
var data = JSON.stringify({})
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("get", "https://api-test.instarem.com:4803/api/v1/lockFx/getFxRate?source_currency=&destination_currency=")
xhr.setRequestHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
var client = new RestClient("https://api-test.instarem.com:4803/api/v1/lockFx/getFxRate?source_currency=&destination_currency=");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", @"{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Query Parameters
Parameter | Description | Type | Required |
---|---|---|---|
source_currency | Source currency (3-letter ISO-4217 code). | String | Yes |
destination_currency | Destination currency (3-letter ISO-4217 code). | String | Yes |
schedule | Valid value is SCHEDULE1 or SCHEDULE2 | String | No |
Example Response
{
"source_currency": "INR",
"destination_currency": "USD",
"base_fx_rate": 74.884041,
"margin": 0.25,
"fx_rate": 74.6968309,
"rate_signature": "TYY9KqN7PYLG+ynsN67bmwBsFLbtQU3Nud0T0PS1tnEU7SDuf5oTMzqEprHq53k+XZrTEHJVkaBaOH14agsDy_j1xxQbooimihQ6JCV0HhjOz80ioCbaJjQb8Mp1otH9mDiF1Fe29ibiaSAsrEoMByD9PzcWU1TMJlqxBxvnRK73S7SaP_DqP4Ck7dbOEY4a4+haUxZgJXMyQinztHM9jpEgsQ9JxX_cmKjNH03C_JclgBATP4Qz+FfBb1iAgFyE+ZEUlSgO4siDWjswB0XVKc6LeL1ykC9_JhX0WclHSbXVK1vWsMIWcx6NxYlxRiJy2N8E5Jac",
"lock_expiry_at": ""
}
Response Parameters
Parameter | Description | Type |
---|---|---|
source_currency | Source currency (3-letter ISO-4217 code). | String |
destination_currency | Destination currency (3-letter ISO-4217 code). | String |
base_fx_rate | Returns real time FX provider rate. | Number |
margin | Returns margin percent as specified in the agreement for the book FX pair. | Number |
fx_rate | Returns Instarem FX rate. | Number |
rate_signature | A string containing the encrypted rate details. | String |
lock_expiry_at | Datetime of lock expiry. | String |
schedule_margin | Returns margin percent as specified in the agreement for the book FX pair for the option Schedule 1 or Schedule 2. |