PHPackages                             reinaldomendes/changelly-json-rpc - 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. reinaldomendes/changelly-json-rpc

ActiveLibrary[API Development](/categories/api)

reinaldomendes/changelly-json-rpc
=================================

Changelly Json RPC wrappers API

v0.0.1(8y ago)112MITPHPPHP &gt;=5.5.0CI failing

Since May 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/reinaldomendes/changelly-json-rpc)[ Packagist](https://packagist.org/packages/reinaldomendes/changelly-json-rpc)[ RSS](/packages/reinaldomendes-changelly-json-rpc/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

changelly-json-rpc
==================

[](#changelly-json-rpc)

json-rpc-api wrappers See the JSONRPC docs in

[![Build Status](https://camo.githubusercontent.com/cc7123da4aed8a9844e6daba309a13b86483c34fcc75365ae162e9ee7444640a/68747470733a2f2f7472617669732d63692e6f72672f7265696e616c646f6d656e6465732f6368616e67656c6c792d6a736f6e2d7270632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/reinaldomendes/changelly-json-rpc)[![Coverage Status](https://camo.githubusercontent.com/3aed8f2c8e4b33d74b7a7be2656f510ea2f72e4940049c9b4a71e617f88d1d0a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7265696e616c646f6d656e6465732f6368616e67656c6c792d6a736f6e2d7270632f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/reinaldomendes/changelly-json-rpc)

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

[](#installation)

```
composer require reinaldomendes/changelly-json-rpc
```

Instantiate The Api Wrapper;
----------------------------

[](#instantiate-the-api-wrapper)

```
use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
$apiFactory = new ApiFactory();
$factoryOptions = [];
$api = $apiFactory->factory($factoryOptions);
```

Api Key and Secret
------------------

[](#api-key-and-secret)

By default the wrapper will get the env variables 'CHANGELLY\_API\_KEY' and 'CHANGELLY\_API\_SECRET' You can implement another method to get the API\_KEY and secret.

```
export CHANGELLY_API_KEY='myapikey';
export CHANGELLY_API_SECRET='myscret';
```

Call Any Method
---------------

[](#call-any-method)

You can see the method list in

If you see the message json syntax you will see the json the keys "id", "method" and "params"

```
{
  "id": "test",
  "jsonrpc": "2.0",
  "method": "getCurrencies",
  "params": {
  }
}
```

Follwoing the rules:

- The *'method'* key in json message will be the method name of wrapper call.
- The *'params'* key in json will be an argument type *Array* in wrapper call.
- The *'id'* key in json will be an argument type '*string|int*' in wrapper call.

All methods can be called with 1 or 2 parameters.

`$api->getCurrencies('string',array());`

OR

`$api->getCurrencies(array());`

- NOTE: When you ommit the *'id'* param the wrapper will generate one using *uniqid*

```
$btcAddressHash = "1TARXpabecedehdjdhsjwhduerr";
$id = "ONE_IDENTIFIER";
$params = [
];
$response = $api->getCurrencies($id,$params); // {'id':'ONE_IDENTIFIER',....}
//or
$response = $api->getCurrencies($params);// {'id':'Rbm_xxxxxx',....}
```

Create Transaction Example
--------------------------

[](#create-transaction-example)

```
$btcAddressHash = "1TARXpabecedehdjdhsjwhduerr";
$id = "ONE_IDENTIFIER";
$params = [
    "from" => "ltc",
    "to" => "btc",
    "address" => $btcAddressHash,
    "extraId" => null,
    "amount" => 1
];

$response = $api->createTransaction($id,$params);
```

Factory Options
---------------

[](#factory-options)

### Config

[](#config)

```
A class which implements Rbm\Changelly\JsonRpc\Contracts\Config

```

- You can implement a contract and use the complete namespace
- Embed - Rbm\\Changelly\\JsonRpc\\Config\\Env Ex:

```
   use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
   $apiFactory = new ApiFactory();
   $apiFactory->factory([
     'config' => 'env' // Rbm\Changelly\JsonRpc\Config\Env - this is the default behavior
   ]);
```

#### Using Your Own Config Implementation

[](#using-your-own-config-implementation)

```
   namespace MyOwnConfig{
     use Rbm\Changelly\JsonRpc\Contracts\Config as ConfigContract;
     class config implements ConfigContract{
       public function getApiKey(){
         //... do something
         return $myApiKey;
       }
       public function getApiSecret(){
         //... do something
         return $myApiSecret;
       }
     }
   }
   ////
   ////

   use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
   $apiFactory = new ApiFactory();
   $apiFactory->factory([
     'config' => MyOwnConfig\Config::class
   ]);
```

### Driver

[](#driver)

An class which implements 'Rbm\\Changelly\\JsonRpc\\Contracts\\Driver'

- You can implement a contract and use the complete namespace
- Embed - Rbm\\Changelly\\JsonRpc\\Driver\\V2 Ex:

```
  use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
  $apiFactory = new ApiFactory();
  $apiFactory->factory([
    'driver' => 'v2' // Rbm\Changelly\JsonRpc\Driver\V2 - this is the default behavior
  ]);
```

Todo
----

[](#todo)

- Implement HashCorp Vault Config - Rbm\\Changelly\\JsonRpc\\Contracts\\Vault to safelly secure API\_KEYS

History
-------

[](#history)

Version 0.0.1 (Initial Build) - Create the api wrapper which works with ENV variables

Credits
-------

[](#credits)

Author - Reinaldo Barcelos Mendes (@reinaldomendes)

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2015 Chris Kibble

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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

Unknown

Total

1

Last Release

2922d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/379767?v=4)[reinaldorock](/maintainers/reinaldorock)[@reinaldorock](https://github.com/reinaldorock)

---

Top Contributors

[![reinaldomendes](https://avatars.githubusercontent.com/u/725300?v=4)](https://github.com/reinaldomendes "reinaldomendes (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

apibitcoinchangellyshapeshiftwrapper-libraryjsonrpcbitcoinwrapper-apichangellyWrapper-library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/reinaldomendes-changelly-json-rpc/health.svg)

```
[![Health](https://phpackages.com/badges/reinaldomendes-changelly-json-rpc/health.svg)](https://phpackages.com/packages/reinaldomendes-changelly-json-rpc)
```

###  Alternatives

[coinbase/coinbase-commerce

Coinbase Commerce API library

148275.7k2](/packages/coinbase-coinbase-commerce)[coinpaymentsnet/coinpayments-php

A PHP wrapper for the CoinPayments.net v1 API.

55126.2k](/packages/coinpaymentsnet-coinpayments-php)[drlecks/simple-web3-php

Web3 library in PHP

7641.6k2](/packages/drlecks-simple-web3-php)[tochka-developers/jsonrpc

JsonRpc extension for Laravel

2733.8k1](/packages/tochka-developers-jsonrpc)

PHPackages © 2026

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