Currencies

This section deals with currencies and foreign exchanges rates, either available for your use or that you need to add to your solution account

Returns all registered currencies

POST https://api.bws.ninja/v1/call

Use this operation to list currencies you have registered for your solution account.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getCurrencies

[
    {
        "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"
    },
    {
        "id": 8,
        "currency_code": "AUD"
    },
    {
        "id": 9,
        "currency_code": "CHF"
    },
    {
        "id": 10,
        "currency_code": "PLN"
    },
    {
        "id": 11,
        "currency_code": "CZK"
    },
    {
        "id": 12,
        "currency_code": "HRD"
    },
    {
        "id": 13,
        "currency_code": "HUF"
    },
    {
        "id": 14,
        "currency_code": "BGN"
    },
    {
        "id": 15,
        "currency_code": "RON"
    }
]

Example code

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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getFXrates

parameters*

JSON

check Operation parameters

[
    {
        "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
    },
    {
        "fx_conversion_id": 8,
        "year": 2022,
        "numerator_currency_code": "EUR",
        "denominator_currency_code": "SEK",
        "fx_rate": 10.1485
    },
    {
        "fx_conversion_id": 9,
        "year": 2022,
        "numerator_currency_code": "SEK",
        "denominator_currency_code": "SEK",
        "fx_rate": 1.0
    },
    {
        "fx_conversion_id": 10,
        "year": 2022,
        "numerator_currency_code": "SEK",
        "denominator_currency_code": "EUR",
        "fx_rate": 0.0985367295659457
    }
]

Operation parameters

ParameterTypeRequiredDescription

reporting_year

number/4 digits

yes

Calendar year that the FX rate is used for

Example code

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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addCurrency

parameters*

JSON

check Operation parameters

{
	"message": "Currency code was successfully added."
}

Operation parameters

ParameterType/FormatRequiredDesciption

currency_code

string/3 char.

yes

Standard currency code

Example code

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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addFXrate

parameters*

JSON

check Operation parameters

{
    "message": "FX rate was succesfully added."
}

Operation parameters

ParameterType/FormatRequiredDescription

currency_code_numerator

string/3 char.

yes

Standard currency code

currency_code_denominator

string/3 char.

yes

Standard currency code

currency_code_quota

number/decimal

yes

numerator / denominator

reporting_year

number/4 digits

yes

Calendar year that the FX rate will be used for

Example code

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
         }
    }

removeCurrency

POST

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

removeCurrency

parameters*

string

check Operation parameters

Operation parameters

ParameterType/FormatRequiredDescription

currency_code

string

yes

Example code

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
        }
    }

removeFXrate

POST

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

removeFXrate

parameters*

JSON

check Operation parameters

Operation parameters

ParameterType/FormatRequiredDescription

currency_code_1

string

yes

currency_code_2

string

yes

reporting_year

number/4 digits

yes

Example code

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
        }
    }

Last updated