Core is a Kotlin based cryptocurrency exchange and matching engine from the OPEX project. This extendable and microservice project work as a vanilla core for running cryptocurrency exchanges.
You need to have Maven and Docker installed.
- Clone the repository
git clone https://github.com/opexdev/core.git
- Run
cd core
- You will need to create and add the following Environment Variables to the
.env
file located in the root of your project - Run
mvn clean install
command. - Run
docker compose -f .\docker-compose.yml -f .\docker-compose.override.yml -f .\docker-compose.build.yml -f .\docker-compose.local.yml up -d --build
. - Run
docker ps
to see if every service is running.
APP_NAME=Opex-local
APP_BASE_URL=localhost:8080
PANEL_PASS=admin
BACKEND_USER=admin
SMTP_PASS=x
OPEX_ADMIN_KEYCLOAK_CLIENT_SECRET=x
API_KEY_CLIENT_SECRET=x
KEYCLOAK_FRONTEND_URL=http://localhost:8083/auth
KEYCLOAK_ADMIN_URL=http://localhost:8083/auth
KEYCLOAK_VERIFY_REDIRECT_URL=http://localhost:8080/verify
KEYCLOAK_FORGOT_REDIRECT_URL=http://localhost:8080/forgot
PREFERENCES=preferences.yml
WHITELIST_REGISTER_ENABLED=true
WHITELIST_LOGIN_ENABLED=true
WALLET_BACKUP_ENABLED=false
TAG=debug
Variable | Description |
---|---|
SMTP_PASS | An SMTP password is a password used to access an email account's |
OPEX_ADMIN_KEYCLOAK_CLIENT_SECRET | Ignore this |
API_KEY_CLIENT_SECRET | (Please do this after starting the project, then rebuild and run the process again.) 1. Go to http://localhost:8083/auth/admin/master/console/#/realms/opex/clients 2. Click on Opex-api-key 3. In the Credentials section, click on Regenerate Secret 4. Copy the generated secret and paste it into this section |
PREFERENCES | For the initialization |
Deployed at app.opex.dev.
graph LR
USER_MANAGMENT(User Management)
KAFKA(Kafka)
ZOOKEEPER(Zookeeper)
REDIS[(Redis)]
ACCOUNTANT_POSTGRESQL[(PSQL)]
REFERRAL_POSTGRESQL[(PSQL)]
USER_MANAGMENT_POSTGRESQL[(PSQL)]
WALLET_POSTGRESQL[(PSQL)]
BC_GATEWAY_POSTGRESQL[(PSQL)]
EVENTLOG_POSTGRESQL[(PSQL)]
ACCOUNTANT(Accountant)
API(API)
WALLET(Wallet)
MATCHING_ENGINE(Matching Engine)
MATCHING_GATEWAY(Matching Gateway)
REFERRAL(Referral)
STORAGE(Storage)
BC_GATEWAY(Blockchain Gateway)
WEBSOCKET(Websocket)
ADMIN(Admin)
CAPTCHA(Captcha)
EVENTLOG(Event Log)
API-->MATCHING_GATEWAY
API-->WALLET
API-->REFERRAL
API-->STORAGE
API-->BC_GATEWAY
API-->ACCOUNTANT
MATCHING_ENGINE-->REDIS
USER_MANAGMENT-->USER_MANAGMENT_POSTGRESQL
BC_GATEWAY-->BC_GATEWAY_POSTGRESQL
REFERRAL-->REFERRAL_POSTGRESQL
WALLET-->WALLET_POSTGRESQL
ACCOUNTANT-->ACCOUNTANT_POSTGRESQL
EVENTLOG-->EVENTLOG_POSTGRESQL
subgraph MESSAGING
KAFKA
ZOOKEEPER
end
subgraph MATCHING DOMAIN
MATCHING_GATEWAY-->MATCHING_ENGINE
end
subgraph ACCOUNTANT DOMAIN
ACCOUNTANT-->WALLET
REFERRAL-->WALLET
end
subgraph DATA STORE
BC_GATEWAY_POSTGRESQL
REFERRAL_POSTGRESQL
ACCOUNTANT_POSTGRESQL
WALLET_POSTGRESQL
USER_MANAGMENT_POSTGRESQL
EVENTLOG_POSTGRESQL
REDIS
end
We want to make contributing to this project as easy and transparent as possible, and we are grateful to the developer for contributing bug fixes and improvements.
OPEX is MIT licensed.