Skip to content

Trade SDK

Source code on GitHub

Overview

The Trade SDK is responsible for enabling an order book style exchange for Energy Attribute Certificates. It is designed to support different types and standards of EACs, and matching scenarios and criteria. This SDK integrates with the Traceability SDK to allow for trading of Energy Attribute Certificates on the blockchain.

Note

For in-depth information on how order book style exchange works in the context of RECs trading please refer to https://energyweb.atlassian.net/wiki/spaces/OD/pages/1138884622/Exchange+Module

Trade SDK Packages

The Trade SDK has four core packages:

1. Exchange Core - @energyweb/exchange-core

Source code on GitHub

The Exchange Core package contains the implementation of the Exchange's order book-based matching engine. The Exchange package submits bids and asks to the Matching Engine, which checks for matches against existing orders in the order book, and executes trades. It also handles direct buys.

See the full documentation for this package here.

2. Exchange - @energyweb/exchange

Source code on GitHub

The Exchange package is a NestJS application that provides backend services to manage the Exchange's functionality (account management and buying, selling and transferring Energy Attribute Certificates and bundles).

See the full documentation for this package here.

3. Exchange Token Account - @energyweb/exchange-token-account

Source code on GitHub

This package provides the smart contract for Exchange Deposit accounts using the ERC-1888 Certificate standard. (You can read more about ERC-1888 Certificate standard in the context of Origin here)

See the full documentation for this package here.

4. Exchange IO ERC1888 - @energyweb/exchange-io-erc1888

Source code on GitHub

By design, The Trade SDK allows different type of assets to be used for trading. The @energyweb/exchange-io-erc1888 package monitors specifically for deposits of ERC-1888 Certificates onto the Exchange, and executes withdrawals and transfers. (You can read more about ERC-1888 Certificate standard in the context of Origin here).

See the full documentation for this package here.

Additional Reading

For more context and detail on the Trade SDK: