Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/owenvoke/changelly-php
A PHP wrapper for the Changelly API.
https://github.com/owenvoke/changelly-php
api changelly composer php wrapper
Last synced: 1 day ago
JSON representation
A PHP wrapper for the Changelly API.
- Host: GitHub
- URL: https://github.com/owenvoke/changelly-php
- Owner: owenvoke
- License: mit
- Created: 2017-12-20T14:56:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-24T09:37:22.000Z (almost 6 years ago)
- Last Synced: 2024-05-03T04:02:16.568Z (7 months ago)
- Topics: api, changelly, composer, php, wrapper
- Language: PHP
- Homepage: https://packagist.org/packages/pxgamer/changelly
- Size: 35.2 KB
- Stars: 0
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# changelly
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[![Style CI][ico-styleci]][link-styleci]
[![Code Coverage][ico-code-quality]][link-code-quality]
[![Total Downloads][ico-downloads]][link-downloads]A PHP wrapper for the [Changelly] API.
## Install
Via Composer
```bash
$ composer require pxgamer/changelly
```## Usage
**Creating instances**
```php
use pxgamer\Changelly\{Currencies,Transactions,Message};$currencies = new Currencies();
$transactions = new Transactions();
```**Retrieve an array of currency names**
Retrieve an array of strings stating the `name` of the currency.
```php
$currencies->get();
```**Retrieve an array of currency `stdClass` instances**
These contain the following information:
- name
- fullName
- enabled```php
$currencies->getFull();
```**Retrieve the minimum amount required to convert between 2 currencies**
```php
$currencies->minimumAmount('btc', 'etc');
```**Retrieve the estimated exchange value between 2 currencies**
```php
$currencies->exchangeAmount('btc', 'etc', 1.0);
```**Retrieve an array of transactions**
Returns an array of transaction `stdClass` instances containing the following values:
- id
- createdAt
- payinConfirmations
- status
- currencyFrom
- currencyTo```php
$transactions->get();
```**Retrieve a single transaction's status by ID**
Returns a transaction status string.
```php
$transactions->status('id');
```## Change log
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Testing
```bash
$ composer test
```## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CODE_OF_CONDUCT](.github/CODE_OF_CONDUCT.md) for details.
## Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [pxgamer][link-author]
- [All Contributors][link-contributors]## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
[changelly]: https://changelly.com
[ico-version]: https://img.shields.io/packagist/v/pxgamer/changelly.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/pxgamer/changelly-php/master.svg?style=flat-square
[ico-styleci]: https://styleci.io/repos/114899505/shield
[ico-code-quality]: https://img.shields.io/codecov/c/github/pxgamer/changelly-php.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/pxgamer/changelly.svg?style=flat-square[link-packagist]: https://packagist.org/packages/pxgamer/changelly
[link-travis]: https://travis-ci.org/pxgamer/changelly-php
[link-styleci]: https://styleci.io/repos/114899505
[link-code-quality]: https://codecov.io/gh/pxgamer/changelly-php
[link-downloads]: https://packagist.org/packages/pxgamer/changelly
[link-author]: https://github.com/pxgamer
[link-contributors]: ../../contributors