【完整版】基于laravel开发的开源交易所源码|BTC交易所/ETH交易所/交易所/交易平台/撮合交易引擎
功能说明 源码简介与安装环境说明:
开源交易所,基于laravel开发的交易所 | BTC交易所 | ETH交易所 | 交易所 | 交易平台 | 撮合交易引擎。本项目有完整的撮合交易引擎源码、后台管理(后端+前端)、前台(交易页面、活动页面、个人中心等)、安卓APP源码、苹果APP源码、币种钱包RPC源码。
开源项目仅供学习参考,请勿用于非法用途。
特色:
1、基于内存撮合引擎,与传统基于数据库撮合更快
2、前后端分离,基于Token的Api授权机制
3、基于laravel服务架构,扩展更容易
4、MySQL、PHP、Redis多种数据存储方式,只为更快
5、主流币种对接区块链接口齐全,开箱即用
6、冷热钱包分离,两种提现方式,保证安全
7、机器人系统,同步行情,维护深度,防止搬砖
8、交易所设计者提供技术支持,部署+二开无忧
9、支持添加自定义平台币及其他币种
系统运行环境:
Centos 6.8
MySQL 5.5.16
Redis-x64-3.2.100
nginx-1.16.0
Vue
使用教程:
准备mysql数据库,创建名称为“xxxx”的数据库
准备redis缓存数据库
准备阿里云OSS(修改项目中需要配置的地方)
准备nginx,修改配置文件(可选,正式上线需配置)
修改framework代码中的配置文件为准备环境配置参数
打开mysql,导入framework代码中的sql文件夹中xxxxxxx.sql文件,注意,trigger的sql如果报错,需要针对wallet表添加trigger
运行前端vue项目
运行后端vue项目
运行钱包RPC
运行自动交易机器人程序(本部分代码未上传,但不影响)
运行Admin项目(该服务并不依赖其他服务,因此也可只运行此项目,直接查看后台)
搭建图片(仅供演示图片,无实际运营):
前端 APP.VUE 代码:
<script>
import Member from "@/api/member";
import { mapActions } from "vuex";
import app from "@/app.js"
export default {onLaunch: function () {setInterval(() => {this.$navFontColor();}, 1000);this.mobileLogo();// this.update()},methods: {...mapActions({setLogoMap: "logoMap",}),mobileLogo() {Member.mobileLogo().then((res) => {let data = res.data;this.setLogoMap({home_logo: data.home_logo,login_logo: data.login_logo,title_logo: data.title_logo,share_logo: data.share_logo,name: data.name,});});},// update(){// var baseUrl=app.baseUrl + '/api/app/getNewestVersion'// console.log(baseUrl)// var _this = this;// uni.request({// url: baseUrl, //请求接口// method: 'GET',// success: result => {// console.log(result)// if (result.data.code == 200) {// plus.runtime.getProperty(plus.runtime.appid, function(inf) {// console.log(inf)// if(inf.version != result.data.data.versions){// uni.showModal({// title: "发现新版本",// content: "确认下载更新",// success: (res) => {// if (res.confirm == true) {//当用户确定更新,执行更新// _this.doUpData();// }// }// })// }// });// }// },// })// },// doUpData() {// uni.showLoading({// title: '更新中……'// })// uni.downloadFile({//执行下载// url: 'https://www.KO Globalex.net/download/android/KO Global.apk', //下载地址// success: downloadResult => {//下载成功// uni.hideLoading();// if (downloadResult.statusCode == 200) {// uni.showModal({// title: '',// content: '更新成功,确定现在重启吗?',// confirmText: '重启',// confirmColor: '#EE8F57',// success: function(res) {// if (res.confirm == true) {// plus.runtime.install(//安装// downloadResult.tempFilePath, {// force: true// },// function(res) {// utils.showToast('更新成功,重启中');// plus.runtime.restart();// }// );// }// }// });// }// }// });// }},// onLaunch: function() {// console.log('App Launch');// 检测升级// #ifdef APP-PLUS// var baseUrl=app.baseUrl + '/api/app/getNewestVersion'// uni.request({// url: baseUrl, //检查更新的服务器地址// method: 'GET',// // data: {// // appid: plus.runtime.appid,// // version: plus.runtime.version,// // imei: plus.device.imei// // },// success: (res) => {// console.log(res)// if (res.data.code == 200) {// console.log(res.data.data.android.url)// var openUrl = plus.os.name === 'iOS' ? res.data.data.ios.url : res.data.data.android.url;// // 提醒用户更新// uni.showModal({// title: '更新提示',// content: '是否选择更新',// success: (showResult) => {// if (showResult.confirm) {// plus.runtime.openURL(openUrl);// }// }// })// }// }// })// #endif// },onLaunch() {},onShow: function () {uni.$emit("appShow");this.$navFontColor();},onHide: function () {},
};
</script><style lang="scss">
.layout-page {height: 100vh;font-size: 14px;background: $panel-1;color: $text-color;
}/* #ifdef H5 */
.layout-page {height: 100%!important;
}
uni-page-body{height: 100%;
}
/* #endif */
@import "./assets/scss/app.scss";
/* 解决头条小程序组件内引入字体不生效的问题 */
/* #ifdef MP-TOUTIAO */
@font-face {font-family: uniicons;src: url("/static/uni.ttf");
}
/* #endif */
</style>