Digital currency trading system based on SpringCloud+MySQL+Mybait+Vue (attached: source code + courseware)

【Solemnly declare】

According to the relevant laws and policies of China, digital asset transaction services shall not be provided to citizens in mainland China, and RMB-to-digital currency exchange and payment services shall not be provided. If you do not cooperate to perform the above duties, all the consequences will have nothing to do with me.

Project Description

Open source digital currency exchange, Java-based currency exchange | BTC exchange | ETH exchange | digital currency exchange | trading platform | matching transaction engine. This project is developed based on SpringCloudAlibaba microservices, which can be used to build and secondary develop digital currency exchanges.

Program features:

Based on the memory matching engine, it is faster than the traditional database-based matching engine;

Separation of front and back ends, API authorization mechanism based on OAuth2.0 + JWT;

Based on the SpringCloud microservice architecture, it is easier to expand;

Integrate Ali's latest research success SpringCloudAlibaba;

MySQL, MongoDB, Redis multiple data storage methods, just for faster;

Kafka publishes and subscribes to the message queue to make orders flow faster;

Netty second-level real-time K-Line push;

uni-app "seven terminals" sharing;

The mainstream currency docking block chain interface is complete, out of the box;

Separate hot and cold wallets, two cash withdrawal methods to ensure safety;

Technology Selection

front-end technology

background management system

Vue + ElementUI + Axios + Xlsx + Showdown + Screenfull


front system

Vue + ElementUI + Axios + Stompjs + Zip + vue-i18n


 


Function introduction and demo

background management system

front system


mobile full stack


architecture design

Module division

Matching engine service

The distributed memory matching system uses the Raft protocol to build its own cluster to realize data replication, cluster election, etc., and develops a distributed currency routing strategy to solve the problems of data isolation and thread competition between multiple coins; when the host hangs up, the backup The machine can quickly sense and replace the status of the original host to continue to provide services. When the cluster expands, it also realizes the migration and redistribution of data fragments. When deploying, we can use a single group or MULTI-RAFT-GROUP. We also use the Nosql database mongo as a recovery solution. When all nodes of the matching engine are re-instantiated, this solution will be used.

Market service

OpenAPI

Provide OpenAPI (open platform) to the outside world. The design of all our APIs follows the REST design standard, and the modified swagger is used to generate a test platform that is more in line with the habits of Chinese people;

K-Line

The K line is a professional K line, and the K line can be customized for daily K, 1 minute, 3 minutes, 5 minutes, 15 minutes, 30 minutes, 10 hours, 2 hours, 4 hours, 6 hours, 12 hours, 1 week, etc. The price average line can be customized: MA5, MA10, MA30 and other personalized configurations. Technical indicators include: MACD, KDJ, RSI, DMI, OBV, BOLL, SAR, DMA, TRIX, BRAR, VR, EMV, WR, ROC, MTM, PSY.

push service

The push service is real-time push, the data is obtained from Kafka, multi-thread subscribes to Kafka's grouping, the underlying layer modifies spring-boot-stater-websocket to support Netty, and tests TIO's push solution. When the client pressure becomes greater, Load balancing can be achieved through Spring Cloud Gateway and Nginx. After testing, there is no freeze or data loss on the client side.

transaction service

Currency acquisition, regional data, currency trading market conditions, currency trading market depth and other transaction data display, the bottom layer uses Redis as a cache, and uses Sentinel to realize service degradation and flow control.

User Center Service

Provide user account information, identity verification, registration and login, invitation grading rewards, third-party verification and other functions;

monitoring service

Boot-Admin:

Realized email/SMS/WeChat notifications for services going offline, displaying microservice name, id and version, displaying online status, log level management of Loggers, Threads thread management, Environment management, etc.;

sentinel-dashboard:

Provides a lightweight console that provides machine discovery, real-time monitoring of stand-alone resources, cluster resource summary, and rule management functions;

Zipkin:

Provides a distributed link call monitoring system, aggregates call delay data of various business systems, achieves link call monitoring and tracking, and calculates direct dependencies of services.

wallet service

It adopts industry-leading cold and hot isolation recharge wallet system, multi-signature, high-protection DDOS attack system and other leading technologies, and minute-level log analysis and monitoring methods to fully guarantee the security of customer assets.

Design requirements


 Overall structure

logical architecture


deployment architecture


 

Students who need source code courseware and other materials can privately message me to share selflessly~~~

If there is a programming novice who wants to get started with Java or Python, you can private message and share my latest Java and Python course network disk information  

Share with each other and encourage you~~~

Guess you like

Origin blog.csdn.net/lxianshengde/article/details/124668077