Coinex digital coin exchange API for PHP
- PHP>=7.1
- CURL PHP module
composer require roozbeh/coinex_php
Sign in to CoinEx before invoking API and get Acquire access_id/secret_key in Account > API.
access_id: To mark identity of API invoker
secret_key: Key to sign the request parameters
<?php
use Roozbeh\CoinexPhp\Market;
//use this variable in some functions as global
$access_id = '<ACCESS_ID>';
$secret_key = '<SECRET_KEY';
$market = new Market($access_id,$secret_key);
$result = $market->acquireMarketList();
The proxy is optional.
Use proxy URL with this format:
scheme://[username:password@]hostname:port
For examples:
$proxy = 'socks5://user:pass@localhost:12345';
$proxy = 'http://127.0.01:8080';
And so use this proxy when setup request:
$market = new Market($access_id,$secret_key,$proxy);
$result = $market->acquireMarketList();
//params if nedded
//IMPORTANT: no needed set access_id, tonce into params.
$market->acquireMarketStatistics('BCHBTC');
See all requests, params and responses in here official wiki.