在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jammy928/CoinExchange_CryptoExchange_Java开源软件地址:https://github.com/jammy928/CoinExchange_CryptoExchange_Java开源编程语言:Java 49.9%开源软件介绍:Crypto-Exchange / Coin-ExchangeMaybe The best open source core code exchange in the entire net, the architecture/code quality is visible.I think this may be the best choice for you to build an exchange or secondary development
I am a chinese,so chinese is my mother language, But I can also use both English and Japanese to communicate with you.IntroductionThis project is a bitcoin exchange based on Java (SpringCloud) | BTC exchange | ETH exchange | digital currency exchange | trading platform | matching trading engine. This project is based on the development of Spring Cloud microservices, which can be used to build and secondary development digital currency exchanges, and has a complete system component.
System architecture overviewJust draw a few sketches, just look at it。。。 Overall structureLogical architectureDeployment architectureDependenciesSystem demonstration videoPC front end (user web end):https://gitee.com/cexchange/CoinExchange/attach_files Mobile APP:https://gitee.com/cexchange/CoinExchange/attach_files Management background:https://gitee.com/cexchange/CoinExchange/attach_files Development ReferenceDevelopment Reference Document:https://gitee.com/cexchange/CoinExchange/blob/master/DEVELOP.md Manage background screenshots:https://gitee.com/cexchange/CoinExchange/tree/master/09_DOC/管理后台截图 About server configuration and deploymentIf you want to build an exchange system on your computer or cloud server, I have prepared some basic deployment manuals. Of course, installing software on linux/unix is not a simple matter. You need to have a certain Linux basics and command line skills, but also the courage and patience to solve problems, I wish you success!
About SpringCloudSpring Cloud is an ordered collection of frameworks. It uses Spring Boot's development convenience to subtly simplify the development of distributed system infrastructure, such as service discovery registration, configuration center, message bus, load balancing, circuit breaker, data monitoring, etc., can be done using Spring Boot's development style One click to start and deploy. Spring Cloud does not repeat the manufacturing of wheels. It just combines the mature and practical service frameworks developed by various companies. The re-encapsulation through the Spring Boot style shields the complex configuration and implementation principles, and finally gives the development The author has left a set of distributed system development kits that are simple to understand, easy to deploy, and easy to maintain. In general, a complete Spring Cloud framework should be as shown in the following figure: If you are unfamiliar with Spring Cloud, you can simply learn about Spring Cloud related tutorials first, so that you will come back to this project and it will be easier to get started. As a reminder, because the Springcloud framework diagram is a complete architecture, we will tailor some content appropriately during development to make development and deployment faster, so there are some discrepancies. About Matchmaking Trading EngineThe system uses memory matching for the transaction queue, Kafka is used for matching order information transmission, MongoDB persists the order transaction details, and MySQL records the overall order transaction. Among them, the 01_Framework/Exchange project is mainly responsible for memory matching, and the 01_Framework/Market project is mainly responsible for order transaction persistence, market generation, market push and other services, including:
Modes supported by memory matching transactions
Limit & Market Order Processing Logic Note: This picture is a long time ago, the logic in the latest code is more complicated Other features supported by match engine In addition to the ordinary matching functions of limit and market prices, the matching trading engine of this system also introduces an active transaction mode. By setting the trading start time, initial issuance volume, initial issuance price, and activity of trading pairs (such as BTC/USDT) Modes and other parameters can formulate a wealth of matching transaction modes to meet different matching modes. for example The exchange is expected to launch the trading pair AAA/USDT at 12:00:00 on August 8, 2020, but as a newly launched currency, how can it work without activity? The project party or the exchange decided to come up with 10,000 AAA at a price of 0.0001USDT (market price: 0.0005) for everyone to snap up. The system supports the setting of such activities. In addition, if the project party or the exchange decides to take out 10,000 AAAs to issue at the price of 0.0001USDT, I don’t want everyone to snap up, but hope that all users who recharge USDT can divide 10,000 AAAs on average. This system also supports the setting of this activity . to sum up n short, this system supports a highly customized matching mode. At the same time, you can also develop your own matching transaction mode, just by modifying the matching logic in the Exchange project. About the technical composition
Demo websiteThis was done for the customer, but later the customer stopped operating, so this website was left, because I don’t have server permissions, so this website may not be accessible at any time. Building a test site requires purchasing several cloud servers, which cost a lot, so I did not set up a test station myself, but the system is complete and has passed the commercial and practical operation test for nearly a year.
============================================== System operating environment
Recommended configuration for production environmentFile directory description00_framework └─———admin Background management API └─———bitrade-job Task management(Empty) └─———chat OTC Chat └─———cloud SpringCloud Eureka └─———core Core └─———exchange match trading └─———exchange-api order API └─———exchange-core order core └─———jar Other lib └─———market market API、K-line service └─———otc-api OTC trade API └─———otc-core OTC core └─———sql SQL script └─———ucenter-api user API └─———wallet wallet 01_wallet_rpc └─———bitcoin └─———bsv └─———btm └─———eos └─———erc-eusdt └─———erc-token(可对接各种ERC20币种) └─———eth └─———ltc └─———usdt 02_App_Android 03_App_IOS 04_Web_Admin 05_Web_Front Use tutorial
Technical SupportThis digital currency trading system is a project developed by my company for an exchange. The exchange has ceased operations due to team reasons, and our company was disbanded in February. Since I participated in the project, I was responsible for overall R&D management, architecture design and customer docking, so I mastered all the codes. There are some places that need special attention in the use of the function of this system, such as other operations after the new transaction pair, improper operation will cause data disorder errors. I can provide paid technical assistance and use training guidance! Email:[email protected] PrecautionsWhen the memory is insufficient, enter top in the Linux console to view the java process occupies a lot of memory (a java process occupies more than 1G), because there are many jar packages to run, so you need to control the memory used by certain jar packages, you can choose A few less resource intensive projects are as follows:
About Mail & SMS
Questions about database scriptsSome reported that there is no complete SQL file. This is because the successfully compiled Jar will automatically map the Entity to a database structure after the first run. The SQL in the project only completes some database structures that Springcloud cannot complete. The automatic database configuration is located in the application.properties configuration file:
spring.jpa.hibernate.ddl-auto=update This configuration will automatically update the database structure. Core function description (user side)
Core function description (management side)
About blockchain wallet RPCThis project provides two wallet docking methods, one is self-built node + blockchain browser, and the other is third-party wallet docking. If you want to use a self-built node or blockchain browser, you can directly compile the code in 00_framework. If you want to use a third-party wallet for docking, you can download the project files of the YouDun wallet in the 07_Uduncloud folder and copy them to 00_framework. After you get the code, you can not connect the blockchain nodes during the debugging and running of this project, which will not have much impact; even if you do not connect the blockchain nodes, you can deploy one of them with matching transaction function Trading platform (just that users cannot recharge their wallet addresses). When you are gradually familiar with the entire system, and have a certain basic reserve of blockchain operation principles, node construction, and blockchain browser, you can start to study the projects under the 01_wallet_rpc folder. Each currency corresponds to different data access methods. Most blockchain projects have the same or very similar wallet operation methods. For example, Bitcoin derivatives such as BTC, LTC, BCH, BSV, BCD, etc., have almost the same API operations. The same; another example is ETH, when you master the operation of a contract currency, the operation of other digital currencies based on ETH is almost the same. So, basically when you spend time understanding one, you understand a bunch of currencies. The wallet operation scheme used in this project is also different, and as far as possible to show you different usages:
Generally speaking, when the amount of funds exchanged by the exchange is not large, you can explore it yourself, but when the amount of funds exchanged is large, if you are not confident about operating your wallet, you can also use a third-party wallet service Of course, this requires you to negotiate with the wallet service provider to pay an annual fee or something. The following figure is a brief explanatory diagram of the user recharge monitoring logic, just take a look at it: System display (PC front end)System operation display (APP front end)
2023-10-27 2022-08-15 2022-08-17 2022-09-23 2022-08-13 |
请发表评论