BWS API Docs
Contact UsCreate AccountSign In
  • Welcome!
    • Developer Grants
  • Quick Start
  • Platform Fees
    • Fees Calculator
  • API How Tos
    • API Endpoint
    • Authentication
      • Get your API Key
    • Main API Methods
      • 'call' API Method
      • 'fetch' API Method
    • API Responses
      • Error Status Codes
  • Certificate Of Trust
  • Media Assets
    • BWS Logo
    • Snapshots
      • BWS.IPFS.Upload
  • PLATFORM APIs
    • BWS.IPFS.Upload
      • Solution Overview
      • Operations
    • BWS.Blockchain.Save
      • Solution Overview
      • Operations
    • BWS.Blockchain.Hash
      • Solution Overview
      • Operations
    • BWS.NFT.zK
      • Solution Overview
        • NFT Ownership
        • NFT Data Location
        • Available Networks
      • Operations
        • Create NFT
        • List NFTs
        • Transfer NFT
        • Send NFT by Email
      • NFT Attributes (traits)
  • Marketplace Solutions
    • BWS.Blockchain.Badges
      • Badges User Interface
      • Badges API
        • Issuers
        • Badges
        • Awards (Credentials)
    • BWS.NFT.GameCube
      • NFT Game Overview
      • NFT Game Cube API
        • Calendar
        • Field
        • Cubes
        • Plays (Field-Calendar)
        • Match
        • Prizes
        • Event Types
        • Live Events
    • BWS.ESG.Credits
      • Solution Overview
      • ESG Credits API
        • Taxonomy
        • Translations
        • Currencies
        • Frameworks
        • Projects
        • Issuers
        • Assets
        • Investors
        • Positions
        • Portfolios
        • Impacts
        • Blockchain
        • Users
  • TELEGRAM BOTS
    • X BOT
      • Install
        • How does it work?
      • Commands
        • X Filtering
        • Leaderboard Points
        • Report Schedule
Powered by GitBook
On this page
  • getCurrencies
  • Returns all registered currencies
  • getFXrates
  • Returns all registered foreign exchange rates
  • addCurrency
  • Adds a currency to your solution account
  • addFXrate
  • Adds a foreign exchange rate between two currencies
  • removeCurrency
  • Removes a currency
  • removeFXrate
  • Removes an FX rate

Was this helpful?

  1. Marketplace Solutions
  2. BWS.ESG.Credits
  3. ESG Credits API

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

PreviousTranslationsNextFrameworks

Last updated 1 year ago

Was this helpful?

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

Name
Type
Description

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"
    }
]
{
    "message": "More details are needed to retrieve currencies."
}
{
    "message": "Not authorized."
}

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

Name
Type
Description

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
    }
]
{
    "message": "No FX rates registered for that reporting year."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

addCurrency

parameters*

JSON

check Operation parameters

Example responses

{
	"message": "Currency code was successfully added."
}
{
	"message": "Suggested currency code already exists."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Desciption

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

addFXrate

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "FX rate was succesfully added."
}
{
    "message": "Currency code is not available."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

removeCurrency

parameters*

string

check Operation parameters

Example responses

{
    "message": "Currency was successfully removed."
}
{
    "message": "Currency was not removed. FX rate still exist."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

Name
Type
Description

solution*

string

BWS.ESG.Credits

operation*

string

removeFXrate

parameters*

JSON

check Operation parameters

Example responses

{
    "message": "FX rate was successfully removed."
}
{
    "message": "No such currency combination."
}
{
    "message": "Not authorized."
}

Operation parameters

Parameter
Type/Format
Required
Description

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

getCurrencies
getFXrates
addCurrency
addFXrate
removeCurrency
removeFXrate