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

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

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

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

Example responses

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

Operation parameters

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

Example responses

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

Operation parameters

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

Example responses

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

Operation parameters

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

Example responses

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

Operation parameters

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