PHPackages                             codenix-sv/bitfinex-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. codenix-sv/bitfinex-api

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

codenix-sv/bitfinex-api
=======================

PHP client for Bitfinex API

v1.0.1(5y ago)21.8k2MITPHPPHP ^7.2

Since Feb 9Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/codenix-sv/bitfinex-api)[ Packagist](https://packagist.org/packages/codenix-sv/bitfinex-api)[ Docs](https://github.com/codenix-sv/bitfinex-api)[ RSS](/packages/codenix-sv-bitfinex-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

This repository is no longer active.
====================================

[](#this-repository-is-no-longer-active)

⛔ No new issues ⛔ No pull requests ⛔ No maintenance

Source code is kept only for reference purposes.

bitfinex-api
============

[](#bitfinex-api)

[![Build Status](https://camo.githubusercontent.com/870366f2acf73e8e8c667d9a536cac7834babe7e484a1d2c2408849660ba487f/68747470733a2f2f7472617669732d63692e636f6d2f636f64656e69782d73762f62697466696e65782d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/codenix-sv/bitfinex-api)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9d65cf8205d8373997565d8139edf4ba16c1cef18338da673abfde8237d8d98f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f64656e69782d73762f62697466696e65782d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/codenix-sv/bitfinex-api/?branch=master)[![License: MIT](https://camo.githubusercontent.com/0a6a1f212b40b5c348b0a79aef09a8deac1b6258d43576c414e9fe1af849c059/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636f64656e69782d73762f62697466696e65782d617069)](https://github.com/codenix-sv/bitfinex-api/blob/master/LICENSE)[![Packagist](https://camo.githubusercontent.com/a98fc1f02cb3ad7cf37ad84bfee5be4471c22900e82ee5712c2202f06c4fa3a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64656e69782d73762f62697466696e65782d617069)](https://packagist.org/packages/codenix-sv/bitfinex-api)

A simple PHP wrapper for [Bitfinex API](https://docs.bitfinex.com/docs/rest-general). [Bitfinex](https://www.bitfinex.com) The world's largest and most advanced cryptocurrency trading platform

Pay attention to the [WebSocket client in PHP for the Bitfinex API](https://github.com/codenix-sv/bitfinex-api-ws)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2
- ext-json
- [Bitfinex](https://www.bitfinex.com), API key and API secret

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require codenix-sv/bitfinex-api
```

or add

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

to the require section of your application's `composer.json` file.

Basic usage
-----------

[](#basic-usage)

### Example

[](#example)

```
use Codenixsv\BitfinexApi\BitfinexClient;

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

Available methods
-----------------

[](#available-methods)

### Public API

[](#public-api)

#### getPlatformStatus

[](#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.

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

#### getTickers

[](#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.

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

#### getTicker

[](#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.

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

#### getTrades

[](#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.

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

#### getBook

[](#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`.

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

#### getStats

[](#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.

Use `side` param only for non-funding queries.

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

#### getCandles

[](#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.

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

#### getConfigs

[](#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.

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

#### getStatus

[](#getstatus)

Endpoint used to receive different types of platform information - currently supports derivatives pair status only.

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

#### getLiquidationFeed

[](#getliquidationfeed)

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

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

#### getLeaderboards

[](#getleaderboards)

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

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

Further Information
-------------------

[](#further-information)

Please, check the [Bitfinex site](https://docs.bitfinex.com/docs/rest-general) documentation for further information about API.

License
-------

[](#license)

`codenix-sv/bitfinex-api` is released under the MIT License. See the bundled [LICENSE](./LICENSE) for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance49

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~85 days

Total

3

Last Release

2116d ago

Major Versions

v0.2.0 → v1.0.02020-04-03

PHP version history (2 changes)v0.2.0PHP &gt;=7.1

v1.0.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8907d07b122404a37d236411aa11851e36f8693183439572675ffcbddb3fdfe?d=identicon)[codenix-sv](/maintainers/codenix-sv)

---

Top Contributors

[![HexV0l](https://avatars.githubusercontent.com/u/269891814?v=4)](https://github.com/HexV0l "HexV0l (6 commits)")

---

Tags

apiapi-clientbitfinexbitfinex-apibitfinex-rest-apiexchangephpapiclientrestexchangebitfinexbitfinex-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codenix-sv-bitfinex-api/health.svg)

```
[![Health](https://phpackages.com/badges/codenix-sv-bitfinex-api/health.svg)](https://phpackages.com/packages/codenix-sv-bitfinex-api)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
