This package provides a Laravel Wrapper for the CoinDCX API and allows you to easily communicate with it.
Important Note
This package is in early development stage. It is not advisable to use it in a production app until v1.0
is released. Feel free to open a PR to contribute to this project and help me reach a production ready build.
Installation
You can install the package via composer:
composer require techtailor/laravel-coindcx-api
You can publish the config file with:
php artisan vendor:publish --tag="coindcx-api-config"
Open your .env
file and add the following (replace YOUR_API_KEY
and YOUR_SECRET
with the API Key & Secret you received from CoinDCX) -
COINDCX_KEY=YOUR_API_KEY
COINDCX_SECRET=YOUR_SECRET
Or
Open the published config file available at config/coindcx-api.php
and add your API and Secret Keys:
return [
'auth' => [
'key' => env('COINDCX_KEY', 'YOUR_API_KEY'),
'secret' => env('COINDCX_SECRET', 'YOUR_SECRET')
],
];
Usage
Using this package is very simple. Just initialize the Api and call one of the available methods:
use TechTailor\CoinDCXApi\CoinDCXApi;
$cdx = new CoinDCXApi();
$ticker = $cdx->getTicker();
You can also set an API & Secret for a user by passing it after initalization (useful when you need to isolate api keys for individual users):
$cdx = new CoinDCXApi();
$cdx->setApi($apiKey, $secretKey);
$accountInfo = $cdx->getAccountInfo();
Available Methods
Available Public Methods (Security Type : NONE
) [API Keys Not Required]
- getTicker() // returns the exchange ticker
- getMarkets() // returns the exchange markets list
- getMarketsDetails() // returns the exchange markets details
- getMarketTrades() // returns the exchange markets trade history
Available Private Methods (Security Type : AUTHENTICATED
) [API Keys Required]
- getAccountInfo() // returns user account info (coindcx_id, email, etc)
- getBalances() // returns user account balances
- getTradeHistory() // returns user's complete spot trade history
- getActiveOrders() // returns user's active orders list
TODO
List of features or additional functionality we are working on (in no particular order) -
- Improve exception handling.
- Add rate limiting to API Calls.
- Add response for API ban/blacklisting response.
- Improve ReadMe.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.