Returns all registered currencies
POST
https://api.bws.ninja/v1/call
Use this operation to list currencies you have registered for your account.
Request Body
Example responses
200: OK Successful operation (example) 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy [
{
"id": 1,
"currency_code": "EUR"
},
{
"id": 2,
"currency_code": "USD"
},
{
"id": 3,
"currency_code": "SEK"
},
{
"id": 4,
"currency_code": "DKK"
},
{
"id": 5,
"currency_code": "NOK"
},
{
"id": 6,
"currency_code": "GBP"
},
{
"id": 7,
"currency_code": "CAD"
}
]
Copy {
"message": "More details are needed to retrieve currencies."
}
Copy {
"message": "Not authorized."
}
Example code
curl
Copy curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "getCurrencies"
}
Returns all registered foreign exchange rates
POST
https://api.bws.ninja/v1
Use this operation to list foreign exchange rates you have registered for a particular reporting year.
Request Body
check Operation parameters
Example responses
200: OK Returns a list of FX rates (example) 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy [
{
"fx_conversion_id": 1,
"year": 2022,
"numerator_currency_code": "EUR",
"denominator_currency_code": "DKK",
"fx_rate": 7.4406
},
{
"fx_conversion_id": 2,
"year": 2022,
"numerator_currency_code": "EUR",
"denominator_currency_code": "EUR",
"fx_rate": 1.0
},
{
"fx_conversion_id": 3,
"year": 2022,
"numerator_currency_code": "DKK",
"denominator_currency_code": "DKK",
"fx_rate": 1.0
},
{
"fx_conversion_id": 4,
"year": 2022,
"numerator_currency_code": "DKK",
"denominator_currency_code": "EUR",
"fx_rate": 0.13439776362121333
},
{
"fx_conversion_id": 5,
"year": 2022,
"numerator_currency_code": "EUR",
"denominator_currency_code": "NOK",
"fx_rate": 10.1682
},
{
"fx_conversion_id": 6,
"year": 2022,
"numerator_currency_code": "NOK",
"denominator_currency_code": "NOK",
"fx_rate": 1.0
},
{
"fx_conversion_id": 7,
"year": 2022,
"numerator_currency_code": "NOK",
"denominator_currency_code": "EUR",
"fx_rate": 0.09834582325288645
}
]
Copy {
"message": "No FX rates registered for that reporting year."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type
Required
Description
Calendar year that the FX rate is used for
Example code
curl
Copy curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "getFXrates",
"parameters": {
"reporting_year": 2023
}
}
Adds a currency to your solution account
POST
https://api.bws.ninja/v1/call
Use this operation to add currencies that you foresee being applicable to your green asset universe, and for which you want to add foreign exchange rates.
Request Body
check Operation parameters
Example responses
200 Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "Currency code was successfully added."
}
Copy {
"message": "Suggested currency code already exists."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Desciption
Example code
curl
Copy curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addCurrency",
"parameters": {
"currency_code": "EUR"
}
}
Adds a foreign exchange rate between two currencies
POST
https://api.bws.ninja/v1/call
Use this operation to add foreign exchnage rate for currencies applicable to your green asset universe.
Request Body
check Operation parameters
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "FX rate was succesfully added."
}
Copy {
"message": "Currency code is not available."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Description
currency_code_denominator
Calendar year that the FX rate will be used for
Example code
curl
Copy curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addFXrate",
"parameters": {
"currency_code_numerator": "EUR",
"currency_code_denominator": "SEK",
"currency_code_quota": 10.145,
"reporting_year": 2023
}
}
Removes a currency
POST
https://api.bws.ninja/v1/call
Use this operation to remove a currency from your records
Request Body
check Operation parameters
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "Currency was successfully removed."
}
Copy {
"message": "Currency was not removed. FX rate still exist."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Description
Example code
curl
Copy curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "removeCurrency",
"parameters": {
"currency_code": EUR
}
}
Removes an FX rate
POST
https://api.bws.ninja/v1/call
Use this operation to remove an FX rate between two currencies
Request Body
check Operation parameters
Example responses
200: OK Successful operation 400: Bad Request Error message (example) 401: Unauthorized Error message
Copy {
"message": "FX rate was successfully removed."
}
Copy {
"message": "No such currency combination."
}
Copy {
"message": "Not authorized."
}
Operation parameters
Parameter
Type/Format
Required
Description
Example code
curl
Copy curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "removeFXrate",
"parameters": {
"currency_code_1": EUR,
"currency_code_2": SEK,
"reporting_year": 2023
}
}