2017 © Pedro PelĆ”ez
 

library bitfinex-api

PHP client for the Bitfinex API

image

codenix-sv/bitfinex-api

PHP client for the Bitfinex API

  • Monday, March 19, 2018
  • by codenix-sv
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 400 % Grown

The README.md

bitfinex-api

Build Status Scrutinizer Code Quality License: MIT Packagist, (*1)

A simple PHP wrapper for Bitfinex API. Bitfinex The world's largest and most advanced cryptocurrency trading platform, (*2)

Pay attention to the WebSocket client in PHP for the Bitfinex API, (*3)

Requirements

  • PHP >= 7.2
  • ext-json
  • Bitfinex, API key and API secret

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

$ composer require codenix-sv/bitfinex-api

or add, (*6)

"codenix-sv/bitfinex-api" : "^1.0"

to the require section of your application's composer.json file., (*7)

Basic usage

Example

use Codenixsv\BitfinexApi\BitfinexClient;

$client = new BitfinexClient();
$data = $client->public()->getPlatformStatus();

Available methods

Public API

getPlatformStatus

Get the current status of the platform, ā€œOperativeā€ or ā€œMaintenanceā€ (1=operative, 0=maintenance). Maintenance periods generally last for a few minutes to a couple of hours and may be necessary from time to time during infrastructure upgrades., (*8)

$data = $client->public()->getPlatformStatus();

getTickers

The tickers endpoint provides a high level overview of the state of the market. It shows the current best bid and ask, the last traded price, as well as information on the daily volume and price movement over the last day. The endpoint can retrieve multiple tickers with a single query., (*9)

$data = $client->public()->getTickers('tBTCUSD,tLTCUSD,fUSD');

getTicker

The ticker endpoint provides a high level overview of the state of the market for a specified pair. It shows the current best bid and ask, the last traded price, as well as information on the daily volume and price movement over the last day., (*10)

$data = $client->public()->getTicker('tBTCUSD');

getTrades

The trades endpoint allows the retrieval of past public trades and includes details such as price, size, and time. Optional parameters can be used to limit the number of results; you can specify a start and end timestamp, a limit, and a sorting method., (*11)

$data = $client->public()->getTrades('tBTCUSD', ['limit' => 100]);

getBook

The Public Books endpoint allows you to keep track of the state of Bitfinex order books on a price aggregated basis with customizable precision. Raw books can be retrieved by using precision R0., (*12)

$data = $client->public()->getBook('tBTCUSD', 'P0');

getStats

The Stats endpoint provides various statistics on a specified trading pair or funding currency. Use the available keys to specify which statistic you wish to retrieve., (*13)

Use side param only for non-funding queries., (*14)

$data = $client->public()->getStats('pos.size', '1m', 'tBTCUSD', 'hist', 'long');
$data = $client->public()->getStats('funding.size', '1m', 'fUSD', 'hist');

getCandles

The Candles endpoint provides OCHL (Open, Close, High, Low) and volume data for the specified funding currency or trading pair. Funding period required only for funding candles., (*15)

$data = $client->public()->getCandles('1m', 'tBTCUSD', 'hist');
$data = $client->public()->getCandles('1m', 'fUSD', 'hist', 'p30');

getConfigs

Fetch currency and symbol site configuration data. A variety of types of config data can be fetched by constructing a path with an Action, Object, and conditionally a Detail value., (*16)

$data = $client->public()->getConfigs('list', 'pair', 'exchange');

getStatus

Endpoint used to receive different types of platform information - currently supports derivatives pair status only., (*17)

$data = $client->public()->getStatus('deriv', ['keys' => 'tBTCF0:USTF0']);
$data = $client->public()->getStatus('deriv/tBTCF0:USTF0/hist', ['start' => 157057800000, 'end' => 1573566992000]);

getLiquidationFeed

Endpoint to retrieve liquidations. By default it will retrieve the most recent liquidations, but time-specific data can be retrieved using timestamps., (*18)

$data = $client->public()->getLiquidationFeed();

getLeaderboards

The leaderboards endpoint allows you to retrieve leaderboard standings for unrealized profit (period delta), unrealized profit (inception), volume, and realized profit., (*19)

$data = $client->public()->getLeaderboards('vol', '3h', 'tBTCUSD', 'hist');

Further Information

Please, check the Bitfinex site documentation for further information about API., (*20)

License

codenix-sv/bitfinex-api is released under the MIT License. See the bundled LICENSE for details., (*21)

The Versions

19/03 2018

dev-master

9999999-dev

PHP client for the Bitfinex API

  Sources   Download

BSD-3-Clause

The Requires

  • php >=7.1

 

The Development Requires

by Vladymyr Svyryd

bitcoin btc bitfinex bitfinex-api

13/03 2018

v0.2.0

0.2.0.0

PHP client for the Bitfinex API

  Sources   Download

BSD-3-Clause

The Requires

  • php >=7.1

 

The Development Requires

by Vladymyr Svyryd

bitcoin btc bitfinex bitfinex-api

13/03 2018

v0.1-alpha

0.1.0.0-alpha

PHP client for the Bitfinex API

  Sources   Download

BSD-3-Clause

The Requires

  • php >=7.1

 

The Development Requires

by Vladymyr Svyryd

bitcoin btc bitfinex bitfinex-api