crypto-markets/common 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

crypto-markets/common

Composer 安装命令:

composer require crypto-markets/common

包简介

Common components for cryptocurrency exchange markets.

README 文档

README

Latest Version on Packagist Software License Build Status Quality Score StyleCI Total Downloads

Introduction

We are accepting new adapters.

Documentation

The "Common" package is without a function in its own right. The package keep and manage the common functionality for other market libraries.

Let's pick a random market package to figure out how to use it. I choose the Binance package for this. You are feel free to use what you want.

composer require crypto-markets/binance

All market packages contains the same request and response to maintain consistency. Only the configuration and some parameter values may be different.

Let's start by creating a new instance:

use CryptoMarkets\Exchange;

$market = Exchange::create('Binance', [
    'api_key' => 'YOUR-APIKEY',
    'secret'  => 'YOUR-SECRET',
]);

In the above example, the Binance instance was created by configuring.

Supported Common Methods

In this section, we will explain the supported methods that the market instance:

Method Description
getName Get the market name.
symbols Get the supported symbols.
ticker Get the latest indicators.
orderBook Get a list of bids and asks in the order book (depth).
trades Get a list of the most recent trades.
balances Get the user's balance informations.
buy Create a new buy trade.
sell Create a new sell trade.
status Get the order status.
cancel Cancel an order.
openOrders Get the user's open orders.
tradeHistory Get the user's order histories.

Testing

You will need an install of Composer before continuing.

First, install the dependencies:

$ composer install

Then run PHPUnit:

$ vendor/bin/phpunit

If the test suite passes on your local machine you should be good to go.

When you make a pull request, the tests will automatically be run again by Travis CI.

We also have StyleCI setup to automatically fix any code style issues.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security related issues, please create a new issue with using the "Bug" label. All security vulnerabilities will be promptly addressed.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 118
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固