PHPackages                             cfxmarkets/php-exchange-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. cfxmarkets/php-exchange-sdk

ActiveLibrary[API Development](/categories/api)

cfxmarkets/php-exchange-sdk
===========================

A public PHP SDK for accessing the CFX Markets exchange

v1.6.0(6y ago)0817MITPHPPHP &gt;=7.0.0

Since Jul 28Pushed 6y ago5 watchersCompare

[ Source](https://github.com/cfxmarkets/php-exchange-sdk)[ Packagist](https://packagist.org/packages/cfxmarkets/php-exchange-sdk)[ RSS](/packages/cfxmarkets-php-exchange-sdk/feed)WikiDiscussions v1.x Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (25)Used By (0)

CFX Markets Exchange SDK for PHP
================================

[](#cfx-markets-exchange-sdk-for-php)

*A public PHP SDK library to access the CFX Markets exchange.*

This library helps to facilitate interactions with the CFX Exchange through CFX's exchange REST api.

Usage
-----

[](#usage)

### Instantiation

[](#instantiation)

The CFX Exchange requires the use of an authenticated API key for all interactions. You should provide your API key and secret to the constructor, along with the API url you'd like to target (usually `https://sandbox.apis.cfxtrading.com/exchange` for testing and `https://apis.cfxtrading.com/exchange` for production).

```
// In your code, where you're planning on using the SDK...
$cfx = new \CFX\SDK\Exchange\Client('https://sandbox.apis.cfxtrading.com/exchange', $apiKey, $secret, $httpClient);
```

### Manipulating Objects

[](#manipulating-objects)

You'll probably primarily be interested in fetching, creating, updating, or deleting data objects. To do this, you'll use the peripheral object classes provided by this library, then send instructions to the server via the Client you instantiated along with (optionally) one of the resource objects you've created.

For example, here's how to get a list of assets from the server. This returns a `ResourceCollection` that contains `Asset` resources:

```
// Get a list of assets from the server

$assets = $cfx->assets->get();
$asset = $assets[0];
echo $asset->getName();

// ...
```

Here's an example of how you might create an order:

```
// First, create some peripherals

$asset = $cfx->assets->create(['id' => $_POST['assetSymbol']]);
$qty = $_POST['qty'];

// Then create the order locally (assume that $user is a valid user in your system)
$order = $cfx->orders->create()
    ->setType('sell')
    ->setOwnerToken($user->getToken())
    ->setAsset($asset)
    ->setQuantity($qty);

// Now, send the order to the server, catching any errors thrown
try {
    $order->save();
    $response = ....
} catch (\CFX\BadInputException $e) {
    // Means there were data input errors
} catch (.....) {
    // etc...
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~29 days

Recently: every ~35 days

Total

25

Last Release

2510d ago

Major Versions

v0.2.1 → v1.0.02017-11-12

PHP version history (3 changes)v0.0PHP &gt;=5.3.0

v0.1PHP &gt;=5.4.0

v1.4.1PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b76588c1d06ed54f5f5fe06e466d044b0527eb6e1b68a8e3dccd13e447fa43eb?d=identicon)[kael-shipman](/maintainers/kael-shipman)

---

Top Contributors

[![kael-shipman](https://avatars.githubusercontent.com/u/3475586?v=4)](https://github.com/kael-shipman "kael-shipman (5 commits)")[![raycoti](https://avatars.githubusercontent.com/u/19994517?v=4)](https://github.com/raycoti "raycoti (1 commits)")

---

Tags

apiclientsdkexchangecfxcfxmarkets

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cfxmarkets-php-exchange-sdk/health.svg)

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

###  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)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[gemini-api-php/client

API client for Google's Gemini API

216221.4k5](/packages/gemini-api-php-client)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[apigee/apigee-client-php

Client library for connecting to the Apigee Edge API.

27558.7k3](/packages/apigee-apigee-client-php)[qwen-php/qwen-php-client

robust and community-driven PHP SDK library for seamless integration with the qwen AI API, offering efficient access to advanced AI and data processing capabilities

213.2k1](/packages/qwen-php-qwen-php-client)

PHPackages © 2026

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