PHPackages                             ewertondaniel/bitfinex-php-sdk - 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. [API Development](/categories/api)
4. /
5. ewertondaniel/bitfinex-php-sdk

ActiveLibrary[API Development](/categories/api)

ewertondaniel/bitfinex-php-sdk
==============================

The Bitfinex PHP SDK is a lightweight PHP library designed to interact with the Bitfinex REST API. This SDK simplifies the integration of Bitfinex cryptocurrency trading functionalities into your PHP applications.

v0.2.7(9mo ago)31.8k↓45.2%MITPHPPHP ^8.1

Since Oct 23Pushed 9mo agoCompare

[ Source](https://github.com/EwertonDaniel/bitfinex-php-sdk)[ Packagist](https://packagist.org/packages/ewertondaniel/bitfinex-php-sdk)[ Docs](https://github.com/EwertonDaniel/bitfinex-php-sdk)[ RSS](/packages/ewertondaniel-bitfinex-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (13)Versions (15)Used By (0)

Bitfinex PHP SDK
================

[](#bitfinex-php-sdk)

[![Packagist Version](https://camo.githubusercontent.com/98c0f22e305e0e91c1ec211fdb7b1d861429ac14ba4dfea6ee2ef2e7f8d1ef2c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65776572746f6e64616e69656c2f62697466696e65782d7068702d73646b)](https://camo.githubusercontent.com/98c0f22e305e0e91c1ec211fdb7b1d861429ac14ba4dfea6ee2ef2e7f8d1ef2c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65776572746f6e64616e69656c2f62697466696e65782d7068702d73646b)[![Packagist License](https://camo.githubusercontent.com/da6f2cc7a8266809cf1ff8357ab7d2be025b088a3a4a9c70b56d478e261e33f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f65776572746f6e64616e69656c2f62697466696e65782d7068702d73646b)](https://camo.githubusercontent.com/da6f2cc7a8266809cf1ff8357ab7d2be025b088a3a4a9c70b56d478e261e33f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f65776572746f6e64616e69656c2f62697466696e65782d7068702d73646b)

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

[](#installation)

Install via Composer:

```
composer require ewertondaniel/bitfinex-php-sdk
```

Quick Start
-----------

[](#quick-start)

Public example:

```
use EwertonDaniel\Bitfinex\Facades\Bitfinex;

$status = Bitfinex::public()->platformStatus();
echo $status->content->status; // "operative" or "maintenance"
```

Authenticated example (Laravel, via config/env):

```
use EwertonDaniel\Bitfinex\Facades\Bitfinex;

$auth = Bitfinex::authenticated()->generateToken();
$wallets = $auth->wallets()->get();
foreach ($wallets->content['wallets'] as $wallet) {
    // ...
}
```

More examples in the [usage guide](docs/USAGE.md).

Overview
--------

[](#overview)

The **Bitfinex PHP SDK** is a lightweight PHP library designed to simplify interaction with the Bitfinex REST API. This SDK allows developers to easily integrate advanced cryptocurrency trading functionalities into PHP applications. Whether building automated trading bots, monitoring market trends, or developing custom trading platforms, this SDK makes the integration with Bitfinex straightforward and efficient.

Features
--------

[](#features)

- Comprehensive public endpoints: status, tickers (incl. history), trades, book, candles, stats, leaderboards, derivatives status (+history), liquidations, configs, funding stats; calc endpoints: market average price, FX rate.
- Authenticated endpoints: wallets, orders, positions, funding, account actions, merchants (Bitfinex Pay).
- Laravel integration (10–12): ServiceProvider, Facade and DI/container.
- HTTP via Guzzle with builders for headers/query/body.

API Documentation
-----------------

[](#api-documentation)

### What is the Bitfinex API?

[](#what-is-the-bitfinex-api)

The **Bitfinex API** provides access to the full suite of features available on the Bitfinex platform. It allows users to retrieve market data, manage account details, place orders, and more. Designed for speed, the API is optimized to support high-frequency trading and low-latency data streaming, making it an essential tool for advanced trading strategies.

### REST vs WebSocket

[](#rest-vs-websocket)

- **REST**: Best for historical data and authenticated operations but subject to rate limits.
- **WebSocket**: Ideal for real-time data streaming and high-speed market interactions. WebSocket connections allow for up to 5 authenticated connections per 15 seconds and up to 20 public connections per minute.

For detailed information on endpoints, methods, and usage guidelines, refer to the [Bitfinex API Documentation](https://docs.bitfinex.com/).

### Important Guidelines

[](#important-guidelines)

- Use numeric error codes to handle exceptions.
- All timestamps are in UNIX format, expressed in milliseconds.
- Trading pair symbols use a `t` prefix (e.g., `tBTCUSD` for Bitcoin to USD).

### Legal Disclaimer

[](#legal-disclaimer)

Any use of the Bitfinex API is subject to the [API Terms of Service](https://www.bitfinex.com/legal/api). All API keys and interactions are at your own risk and expense. iFinex Inc. is not responsible for any losses or damages resulting from the use of this SDK or the Bitfinex API.

Available Endpoints (Public)
----------------------------

[](#available-endpoints-public)

### Market Data

[](#market-data)

- Tickers (GET) —
- Ticker (GET) —
- Ticker History (GET) —
- Trades (GET) —
- Book (GET) —
- Candles (GET) —
- Stats (GET) —

### Reference / Meta

[](#reference--meta)

- Platform Status (GET) —
- Configs (GET) —

### Risk / Monitoring

[](#risk--monitoring)

- Liquidations (GET) —
- Leaderboards (GET) —
- Derivatives Status (GET) —
- Derivatives Status History (GET) —
- Funding Statistics (GET) —

### Calculations

[](#calculations)

- Market Average Price (POST) —
- Foreign Exchange Rate (POST) —

Available Endpoints (Authenticated)
-----------------------------------

[](#available-endpoints-authenticated)

- Wallets —

    - Wallets (GET)
- Orders —

    - Retrieve Orders / Retrieve Orders by Symbol (POST)
    - Submit Order / Update Order / Cancel Order (POST)
    - Order Multi Op / Cancel Multiple (POST)
    - Orders History (POST)
    - Order Trades / Trades History (POST)
    - Ledgers (POST)
- Positions —

    - Margin Info / Retrieve Positions (POST)
    - Claim Position / Increase Position / Increase Position Info (POST)
    - Positions History / Snapshot / Audit (POST)
    - Derivative Position Collateral / Collateral Limits (POST)
- Funding —

    - Active Funding Offers (POST)
    - Submit / Cancel / Cancel All Funding Offers (POST)
    - Funding Close / Auto Renew / Keep (POST)
    - Funding Offers / Loans / Credits / Trades (history) (POST)
    - Funding Info (POST)
- Account Actions —

    - User Info / Summary / Login History / Key Permissions (POST)
    - Generate Token / Changelog / Transfer Between Wallets (POST)
    - Deposit Address / Deposit Addresses / Generate Invoice (POST)
    - Withdrawal / Movement Info / Movements (POST)
    - Alert List / Set / Delete (POST)
    - Balance Available for Orders/Offers (POST)
    - User Settings Write / Read / Delete (POST)
- Merchants (Bitfinex Pay) —

    - Submit Invoice / Submit POS Invoice (POST)
    - Invoice List (+ paginated) (POST)
    - Invoice Count Stats / Earnings Stats (POST)
    - Complete / Expire Invoice (POST)
    - Currency Conversion: List / Add / Remove (POST)
    - Merchant Limit (POST)
    - Merchant Settings: Write / Write Batch / Read / List (POST)
    - Deposits List / Unlinked Deposits List (POST)

Architecture (High‑Level)
-------------------------

[](#architecture-highlevel)

- Transformers (Strategy + Factory):
    - `PublicBitfinexResponse` delegates mappings to classes in `Http/Responses/Public/Transformers` via `TransformerFactory`.
- Configs (Strategy):
    - The `conf` endpoint uses `ConfigsTransformer` with strategies by mode (map/list/info:\*).
- Builders:
    - `RequestBuilder` offers a fluent API for headers/query/body; for GET methods, body is not sent.
- Adapters (Template Method):
    - `JsonAdapter::transform()` is final; `UrlAdapter`/`PathAdapter` only define `getFilePath()`.

These patterns keep low coupling, testability, and safe SDK evolution.

Contributing
------------

[](#contributing)

Contributions are welcome. See the [contribution guide](docs/CONTRIBUTING.md) for details.

Testing &amp; Tooling
---------------------

[](#testing--tooling)

- Run unit tests (Pest):

    - `vendor/bin/pest`
    - Public subset: `vendor/bin/pest tests/Unit/Public`
- Lint &amp; static analysis:

    - `composer lint` (Pint + PHPStan)
- Format:

    - `composer format` (Pint)

License
-------

[](#license)

This package is licensed under the [MIT License](LICENSE).

Author
------

[](#author)

**Ewerton Daniel** -

Support
-------

[](#support)

If this project helps you, consider sending some Monero:

`89ynYeog7vt6san1FENHDQhn4RnG9sR2f2jj5DSpgY6q18sjQcyRoYYEpFEFQDaJ3ajjRXaMnikm1P2xKPK4jEwsMeK5o6Q`

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance55

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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 ~26 days

Recently: every ~70 days

Total

13

Last Release

298d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/735b1ba4cf3c6a19b0e75524cd090d21f13a8936799387c579933d2b99789f26?d=identicon)[ewertondaniel](/maintainers/ewertondaniel)

---

Top Contributors

[![EwertonDaniel](https://avatars.githubusercontent.com/u/42904786?v=4)](https://github.com/EwertonDaniel "EwertonDaniel (100 commits)")

---

Tags

laravellaravel-packageexchangebitfinexbitfinex-apibitfinex-api-phpbitfinex-phpbitfinex-php-sdk

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ewertondaniel-bitfinex-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ewertondaniel-bitfinex-php-sdk/health.svg)](https://phpackages.com/packages/ewertondaniel-bitfinex-php-sdk)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k108.5M885](/packages/laravel-socialite)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k21.5M587](/packages/laravel-boost)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)

PHPackages © 2026

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