Skip to content

yaksetig/OpenCEX

 
 

Repository files navigation

OpenCEX Logo

OpenCEX is a free and open source cryptocurrency exchange platform.
Developed by Polygant.

OpenCEX documentation | Telegram chat

Caution

This repository has not been maintained since 2024.
The code is provided as-is.

Main features.

  • Custodial wallet supporting BTC, ETH, BNB, TRX, USDT (ERC-20, BEP-20, TRC-20). Deposit and withdrawal.
  • Order matching engine. Trading pairs BTC-USDT, ETH-USDT, BNB-USDT, TRX-USDT.
  • Professional exchange interface for placing orders.
  • Simplified interface for quick swap.
  • KYT transaction verification (requires Scorechain keys).
  • KYC verification of users (requires Sumsub keys).
  • SMS 2fa for users (requires Twilio keys).

System requirements.

Minimum Recommended
CPU: 4 cores
RAM: 16 GB
Disks: 40 GB
OS: Ubuntu 22.04

https://www.hetzner.com/cloud
CPU: 8 cores
RAM: 64 Gb
Disks: 2x1Tb NVMe SSD
OS: Ubuntu 22.04

https://www.hetzner.com/dedicated-rootserver/ax51-nvme

The software used.

DockerlatestOS-level virtualization
NGINX1.22.0Web server
Caddy2.6.2Router
Postgres14.5RDBMS
Redis server7.0.4RDBMS
RabbitMQ3.10.7Message-broker software
Python3.8Programming language
Django3.2.7Python framework
VUE.JS3.2.25JS framework
NUXT.JS2.15.7JS framework
Bitcoin CorelatestBitcoin node

Before installing:

  • Watch the installation video https://youtu.be/c-WnQkvBwf0
  • Order a virtual or physical server, not below the minimum requirements. You will need full access to this server (root). Shared hosting will not work.
  • Bind the IPv4 address you received when purchasing the server to your domain. If you don't have a domain yet, you can use https://nip.io/ or https://sslip.io/.
  • Sign up for a Google account and get reCAPTCHA V2 keys (invisible). https://www.google.com/recaptcha/
  • Get the SMTP server credentials for sending emails (any will do, i.e. https://www.mailgun.com/).
  • Register an Infura account (https://infura.io/) and create an API key + secret.
  • Register an Etherscan account (https://etherscan.io/) and create an API key.
  • You will need BTC, ETH addresses and BNB, TRX addresses(optional) to collect cryptocurrency deposits (cold addresses). If you don't have it yet, you can use any multi-currency wallet like Trust Wallet and generate BTC, ETH, BNB, TRX addresses.
  • OPTIONAL. For BNB и BEP-20 support you will need Bscscan credentials (https://bscscan.com/)
  • OPTIONAL. For TRX and TRC-20 support you will need Trondrid credentials (https://www.trongrid.io/)
  • OPTIONAL. For SMS verification you will need Twilio credentials (https://twilio.com)
  • OPTIONAL. For KYT you need Scorechain credentials (https://www.scorechain.com/)
  • OPTIONAL. For KYC you will need Sumsub credentials (https://sumsub.com/)

Quick Start

Prerequisites

  • Docker and Docker Compose
  • Open ports 80 and 443 (if using HTTPS)

Installation

  1. Clone the repository:

    git clone https://github.com/yourorg/opencex.git
    cd opencex
  2. Run the setup script:

    chmod +x setup.sh
    ./setup.sh

Manual Setup

If you prefer manual setup:

  1. Create external network:

    docker network create caddy
  2. Copy environment file:

    cp .env.example .env
  3. For HTTP-only (development):

    • Leave DOMAIN=:80 in .env
  4. For HTTPS with custom domain:

    • Set DOMAIN=yourdomain.com in .env
    • Ensure DNS points to your server
  5. Start services:

    docker compose up -d

Common Issues

Issue: Caddy shows errors about certificates

  • Solution: You're using an AWS EC2 hostname or IP address. Set DOMAIN=:80 for HTTP-only mode, or use a real domain name.

Issue: Services not accessible

  • Check: docker ps - all containers should be "Up"
  • Check: docker logs opencex-caddy-1 for errors
  • Verify ports 80/443 are open in firewall/security groups

Documentation

Can I hire you guys?

You can request a consultation or order web and mobile development services by Polygant, just visit our site. 😎

Say hi: hello@polygant.net . We will be happy to work with you!

License

Apache License, Version 2.0

About

OpenCEX free open-source cryptocurrency exchange engine. Industry standard.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 51.4%
  • Python 32.2%
  • Vue 7.9%
  • JavaScript 7.1%
  • Dockerfile 1.4%