1.14.1 • Published 2 years ago

@energyweb/exchange v1.14.1

Weekly downloads
27,047
License
MIT
Repository
github
Last release
2 years ago

Exchange package provides the order book based exchange functionality for the certificates issued by issuer package. The major difference between classic (asset, time, price) order book system is the product based matching engine, providing the ability to create custom matching rules.

Main features

  • Order book matching engine for time, price and product matching
  • ERC 1155 / ERC 1888 compatible
  • Supply / Demand modules

Trading product concept

Definition

Product defines the characteristics of the given producing device as well as buyers preferences . Currently it's represented as:

export class Product {
    public deviceType?: string[];

    public location?: string[];

    public deviceVintage?: number;
}

Where

  • deviceType - describes the type of the device for e.g. using I-REC types
  • location - describes the location of the the device for e.g. can be multi-level like Country->Region->Province
  • deviceVintage - describes the vintage of the device for e.g. the start year of the device operation

For a producing device all fields are mandatory.

Development

Default TypeOrm configuration requires running PostgreSQL database. The detailed config is:

TypeOrmModule.forRoot({
            type: 'postgres',
            host: 'localhost',
            port: 5432,
            username: 'postgres',
            password: 'postgres',
            database: 'origin-exchange',
            entities: [Demand, Order, Trade],
            synchronize: true,
            logging: ['query']
        }),
yarn
yarn start

PostgreSQL installation using Docker

docker pull postgres
docker run --name origin-postgres -d -p 5432:5432 postgres

Swagger

Swagger endpoint can be found at

http://localhost:3000/api

1.14.1

2 years ago

1.14.0

2 years ago

1.13.1

2 years ago

1.13.0

2 years ago

1.12.0

2 years ago

1.11.0

3 years ago

1.10.0

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago