Download the PHP package mehdi9324/mengine without Composer

On this page you can find all versions of the php package mehdi9324/mengine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mengine

Laravel Package for Matching Engine

快速开始

依赖

号外

使用说明

交易方向交易精度可在配置文件灵活设置

开启队列任务: php artisan queue:work --queue=abc2usdt 也可以使用horizonsupervisor来辅助,事半功倍!

队列消费时会进入撮合程序,大概的步骤如下:

  1. 获取匹配委托订单
  2. 如果没有匹配的订单,则进入委托池,触发委托池变更事件,详见第5点
  3. 如果有匹配的委托,程序撮合,更新委托池数据
  4. 交易成功会触发事件,开发者要在监听器里处理有交易的委托单,比如更新数据库数据,WebSocket通知等 在EventServiceProvider里为撮合成功的事件注册监听器:

  5. 如果只是部分成交,则剩余部分进入委托池,触发委托池变更事件,K线或者深度列表变更通知等, 注册监听器如下:

此撮合引擎没有实现像数据库那样的锁机制,为了防止有单子在被撮合时又有撤销的命令出现,所以下单与撤单都走的同一个队列,保证了顺序性,每个交易对是隔离的队列,效率也有一定的保证,但开发需要实现异步通知用户功能,注册监听器如下:

总结

本地垃圾笔记本上测试,交易对撮合速度平均在200笔/s,后续将继续优化撮合速度

基于redis的撮合引擎设计


All versions of mengine with dependencies

PHP Build Version
Package Version
Requires predis/predis Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mehdi9324/mengine contains the following files

Loading the files please wait ....