Broker Gateway
Distributed Commodities OTC Electronic Trading System
Install / Use
npx skills add commodity-trading-system/broker-gatewayInstalls into whichever agent you are using.
README
broker-gateway
This is broker gateway of a Distributed Commodities OTC Electronic Trading System. It contains three parts.
- Receiver
- Executor
- Querier
Receiver takes the responsibility of receiving consignations from trader gateway and
send it into the redis queue after making some necessary validation.
Executor pops the consignation from redis queue and matching it. At the same time, it
will publish the latest depth and status onto Etcd
Querier is a simple http server. Trader gateway can fetch information of futrues, consignations and orders.
Architecture

How to install
First, clone the repository.
git clone https://github.com/commodity-trading-system/broker-gateway.git
Environment
You should prepare Redis Etcd Mysql by your self.
Here is a reference
# install redis
docker run -p 6739:6736 --name cts-redis redis
# install etcd
docker run -itd --hostname etcd -p 2379:2379 --name etcd index.tenxcloud.com/coreos/etcd:2.3.1 /usr/local/bin/etcd -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 -advertise-client-urls http://127.0.0.1:2379,http://127.0.0.1:4001
Receiver
Add .env file and change it according to your environment
cp cmd/receiver/.env.example /cmp/receiver/.env
Build the dockerfile and run the container
docker build -f ./ReceiverDockerfile -t receiver --rm .
docker run -p 5001:80 receiver
Executor
Add .env file and change it according to your environment
cp cmd/executor/.env.example /cmp/executor/.env
Build the dockerfile and run the container
docker build -f ./ExecutorDockerfile -t executor --rm .
docker run executor
Querier
Add .env file and change it according to your environment
cp cmd/executor/.env.example /cmp/executor/.env
Build the dockerfile and run the container
docker build -f ./QuerierDockerfile -t querier --rm .
docker run -p 5002:80 querier
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
