PHP code example of nabikaz / coinex-api-php

1. Go to this page and download the library: Download nabikaz/coinex-api-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nabikaz / coinex-api-php example snippets



NabiKAZ\Coinex\CoinexAPI;

//use this variable in some functions as global
$access_id = '<ACCESS_ID>';
$secret_key = '<SECRET_KEY';

//create api object
$coinex = new CoinexAPI($access_id, $secret_key);

$proxy = 'socks5://user:pass@localhost:12345';
$proxy = 'http://127.0.01:8080';

$coinex = new CoinexAPI($access_id, $secret_key, $proxy);

//params if nedded
//IMPORTANT: no needed set access_id, tonce into params.
$params = [
];

//send request
$coinex->url = $url;
$coinex->params = $params;
$coinex->method = $method;
$res = $coinex->send();

//send request
$res = $coinex->send($url, $params, $method);

//see results
var_dump($res);