armino-dev/binance-connector

Binance API connector for PHP

Maintainers

Package info

github.com/armino-dev/binance-connector

pkg:composer/armino-dev/binance-connector

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.0.1-alpha 2021-12-23 09:54 UTC

This package is auto-updated.

Last update: 2026-03-22 09:53:34 UTC


README

Build Status

*** Work in progress ***

Usage

Go to your project folder and type in a terminal:

composer require armino-dev/binance-connector

The following is an example php file that is dumping the binance exchange information.

<?php

// uncomment and adjust to your path if needed
// require __DIR__ . "/../vendor/autoload.php";

use Armino\BinanceConnector\Binance\Connector;

$connector = Connector::init('your_api_key', 'your_api_secret');

$exchangeInformation = $connector->market->exchangeInformation();

var_dump($exchangeInformation);

Error handling

Network and transport errors throw typed exceptions from the HTTP client layer.

<?php

use Armino\BinanceConnector\Binance\Connector;
use Armino\BinanceConnector\HttpClient\Exceptions\HttpClientException;

try {
	$connector = Connector::init('your_api_key', 'your_api_secret');
	$result = $connector->status->serverTime();
} catch (HttpClientException $exception) {
	echo $exception->getMessage();

	if ($exception->getPrevious() !== null) {
		echo $exception->getPrevious()->getMessage();
	}
}

Tests

Run the default unit suite (integration tests are excluded by default):

vendor/bin/phpunit

Run optional real Binance smoke checks:

vendor/bin/phpunit --group integration

Code quality (local development)

Lint PHP files:

composer lint

Check formatting without changing files:

composer format:check

Apply formatting:

composer format