PHPackages                             vdbelt/ftx-php - 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. vdbelt/ftx-php

AbandonedArchivedLibrary[API Development](/categories/api)

vdbelt/ftx-php
==============

A PHP client for FTX.com

v0.1.8(4y ago)163.7k15[1 PRs](https://github.com/vdbelt/ftx-php/pulls)1MITPHPPHP ^7.4|^8.0

Since Mar 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vdbelt/ftx-php)[ Packagist](https://packagist.org/packages/vdbelt/ftx-php)[ RSS](/packages/vdbelt-ftx-php/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (9)Dependencies (9)Versions (10)Used By (1)

PHP client for FTX
==================

[](#php-client-for-ftx)

[![GitHub Workflow Status](https://camo.githubusercontent.com/b9ed5613ed900b87dec084698f3f86c0a1b8bd183cdb094662c439e87b8cad29/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f766462656c742f6674782d7068702f504850253230436f6d706f736572)](https://github.com/vdbelt/ftx-php/actions)[![Codecov](https://camo.githubusercontent.com/704b29a928f85541a5da7c32552efd02a171fb8189f6405ce8f1c484689ce0bd/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f766462656c742f6674782d706870)](https://codecov.io/gh/vdbelt/ftx-php)[![Packagist](https://camo.githubusercontent.com/2a8a04f30147f33ebf1bdb5511bea5b4d4cb9fc5cb2539fd47a24a2aef420be1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766462656c742f6674782d706870)](https://packagist.org/packages/vdbelt/ftx-php)[![GitHub](https://camo.githubusercontent.com/a90ef3795f19742d0a70d7af25c1643c0608fc565957a6be316f0a3837af213d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f766462656c742f6674782d706870)](https://github.com/vdbelt/ftx-php/blob/master/LICENSE.md)

This package aims to implement the FTX.com REST API endpoints.

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

[](#installation)

You can install the package via composer:

```
composer require vdbelt/ftx-php
```

This library is not hard coupled to Guzzle or any other HTTP library. It follows PSR-18 client abstraction. You'll need to install your own preferred client.

If you want to get started quickly:

```
composer require vdbelt/ftx-php php-http/curl-client nyholm/psr7
```

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

[](#basic-usage)

```
use FTX\FTX;

// Unauthenticated
$ftx = FTX::create();

// Authenticated
$ftx = FTX::create('key', 'secret');

$markets = $ftx->markets()->all();
$btcPerp = $ftx->markets()->get('BTC-PERP');
```

If you want to perform an action on a certain subaccount, you can do so:

```
$orders = $ftx->onSubaccount('foo')->orders()->open();
```

### Subaccounts

[](#subaccounts)

```
$ftx->subaccounts()->all()
$ftx->subaccounts()->create('nickname')
$ftx->subaccounts()->rename('old', 'new')
$ftx->subaccounts()->delete('nickname')
$ftx->subaccounts()->balances('nickname') // Get balances for a specific subaccount
$ftx->subaccounts()->transfer('BTC', 1, 'main', 'nickname') // Transfer funds between subaccounts
```

### Markets

[](#markets)

```
$ftx->markets()->all()
$ftx->markets()->get('BTC-PERP')
$ftx->markets()->orderbook('BTC-PERP', 100)
$ftx->markets()->trades('BTC-PERP', 100, new \DateTime('2020-03-01'), new \DateTime('2020-03-01 06:00:00'))
$ftx->markets()->candles('BTC-PERP', 15, 100)
```

### Futures

[](#futures)

```
$ftx->futures()->all()
$ftx->futures()->get('BTC-0626')
$ftx->futures()->stats('BTC-0626')
$ftx->futures()->fundingRates()
```

### Account

[](#account)

```
$ftx->account()->get()
$ftx->account()->positions()
$ftx->account()->changeAccountLeverage(101)
```

### Wallet

[](#wallet)

```
$ftx->wallet()->coins()
$ftx->wallet()->balances()
$ftx->wallet()->allBalances() // Balances accross all subaccounts
$ftx->wallet()->depositAddress('BTC')
$ftx->wallet()->depositAddress('USDT', 'erc20')
$ftx->wallet()->deposits()
$ftx->wallet()->withdrawals()
$ftx->wallet()->createWithdrawalRequest('BTC', 1, 'address')->withdraw()
$ftx->wallet()->createWithdrawalRequest('BTC', 1, 'address')->fees()
$ftx->wallet()->createWithdrawalRequest('BTC', 1, 'address')->withPassword()->withCode()->withTag()->withdraw()
```

### Orders

[](#orders)

```
$ftx->orders()->open();
$ftx->orders()->open('BTC-PERP');

// history
$ftx->orders()->history();
$ftx->orders()->history('BTC-PERP')

// Placing orders
// You can either pass the properties of your order directly:
$ftx->orders()->create(['market' => 'BTC-PERP', 'type' => 'market', 'size' => 1])->place();

// or use the fluent api to build up an order:
$ftx->orders()->create()->buy('BTC-PERP')->limit(1, 4000)->place();

// order status
$ftx->orders()->status(123456);

// cancel order
$ftx->orders()->cancel(123456);

// cancel all orders, including conditional orders
$ftx->orders()->cancelAll();
$ftx->orders()->cancelAll('BTC-PERP', $conditionalOrdersOnly = false, $limitOrdersOnly = true)
```

### Conditional Orders

[](#conditional-orders)

```
$ftx->conditionalOrders()->open();
$ftx->conditionalOrders()->open('BTC-PERP', 'take_profit');

//history
$ftx->conditionalOrders()->history();
$ftx->conditionalOrders()->history('BTC-PERP', null, null, 'buy', 'stop', 'market', 10);

// Placing orders
// You can either pass the properties of your order directly:
$ftx->conditionalOrders()->create(['market' => 'BTC-PERP', 'type' => 'takeProfit', 'triggerPrice' => 7000.99, 'size' => 1, 'side' => 'buy', 'reduceOnly' => true])->place();

// or use the fluent api to build up an order:
$ftx->conditionalOrders()->create()->stop($size = 1, $triggerPrice = 7000.99)->buy('BTC-PERP')->reduceOnly()->place();

// order status
$ftx->conditionalOrders()->status(123456);

// cancel order
$ftx->conditionalOrders()->cancel(123456);

// cancel all orders conditional orders
$ftx->conditionalOrders()->cancelAll();
$ftx->conditionalOrders()->cancelAll('BTC-PERP', $conditionalOrdersOnly = true, $limitOrdersOnly = true)
```

### Fills

[](#fills)

```
$ftx->fills()->all()
```

### Funding Payments

[](#funding-payments)

```
$ftx->fundingPayments()->all()
```

### Leveraged Tokens

[](#leveraged-tokens)

```
$ftx->leveragedTokens()->all()
$ftx->leveragedTokens()->info('foo')
$ftx->leveragedTokens()->balances()
$ftx->leveragedTokens()->creationRequests()
$ftx->leveragedTokens()->redemptions()
$ftx->leveragedTokens()->requestCreation('foo', 10)
$ftx->leveragedTokens()->requestRedemption('foo', 10)
```

### Options

[](#options)

```
$ftx->options()->requests()
$ftx->options()->myRequests()
$ftx->options()->cancelRequest('id')
$ftx->options()->quotesForRequest('id')
$ftx->options()->createQuote('id', 100)
$ftx->options()->myQuotes()
$ftx->options()->cancelQuote('id')
$ftx->options()->acceptQuote('id')
$ftx->options()->accountInfo()
$ftx->options()->positions()
$ftx->options()->trades()
$ftx->options()->fills()
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.1% 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 ~84 days

Recently: every ~77 days

Total

9

Last Release

1571d ago

PHP version history (2 changes)v0.1.0PHP ^7.4

v0.1.4PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7a49a1e2df69990aee0d7853da01b8c2b6399e82226a02f6582fb8ddc24c804?d=identicon)[vdbelt](/maintainers/vdbelt)

---

Top Contributors

[![vdbelt](https://avatars.githubusercontent.com/u/11087503?v=4)](https://github.com/vdbelt "vdbelt (34 commits)")[![AurelC2G](https://avatars.githubusercontent.com/u/797407?v=4)](https://github.com/AurelC2G "AurelC2G (7 commits)")[![nuryagdym](https://avatars.githubusercontent.com/u/26792980?v=4)](https://github.com/nuryagdym "nuryagdym (1 commits)")[![ppx-os](https://avatars.githubusercontent.com/u/72772959?v=4)](https://github.com/ppx-os "ppx-os (1 commits)")

---

Tags

apiclientcryptoexchangeftx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vdbelt-ftx-php/health.svg)

```
[![Health](https://phpackages.com/badges/vdbelt-ftx-php/health.svg)](https://phpackages.com/packages/vdbelt-ftx-php)
```

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[brd6/notion-sdk-php

Notion SDK for PHP

5918.0k](/packages/brd6-notion-sdk-php)[darthsoup/php-whmcs-api

WHMCS API client for PHP

2317.3k4](/packages/darthsoup-php-whmcs-api)

PHPackages © 2026

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