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 account.

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

getCurrencies

Example responses

[
    {
        "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"
    }
]

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

Example responses

[
    {
        "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
    }
]

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

Example responses

{
	"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

Example responses

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

Removes a currency

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

Use this operation to remove a currency from your records

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

removeCurrency

parameters*

string

check Operation parameters

Example responses

{
    "message": "Currency was successfully removed."
}

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

Removes an FX rate

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

Use this operation to remove an FX rate between two currencies

Request Body

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

removeFXrate

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "FX rate was successfully removed."
}

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