Download the PHP package rabsana/kucoin-php-sdk without Composer
On this page you can find all versions of the php package rabsana/kucoin-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rabsana/kucoin-php-sdk
More information about rabsana/kucoin-php-sdk
Files in rabsana/kucoin-php-sdk
Package kucoin-php-sdk
Short Description PHP SDK for KuCoin API
License MIT
Homepage https://github.com/rabsana/kucoin-php-sdk
Informations about the package kucoin-php-sdk
PHP SDK for KuCoin API
The detailed document https://docs.kucoin.com, in order to receive the latest API change notifications, please
Watch
this repository.
Requirements
Dependency | Requirement |
---|---|
PHP | >=5.5.0 Recommend PHP7+ |
guzzlehttp/guzzle | ^6.0\|^7.0 |
Install
Install package via Composer.
Usage
Choose environment
Environment | BaseUri |
---|---|
Production | https://api.kucoin.com(DEFAULT) |
Sandbox | https://openapi-sandbox.kucoin.com |
Debug mode & logging
Examples
See the test case for more examples.
Example of API without
authentication
Note
To reinforce the security of the API, KuCoin upgraded the API key to version 2.0, the validation logic has also been changed. It is recommended to create(https://www.kucoin.com/account/api) and update your API key to version 2.0. The API key of version 1.0 will be still valid until May 1, 2021
Example of API with
authentication
Example of WebSocket feed
⚡️Coroutine HTTP client for asynchronous IO
See the benchmark, almost
20x
faster thancurl
.
API list
KuCoin\SDK\PrivateApi\Account
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\Account::create() | YES | https://docs.kucoin.com/#create-an-account | | KuCoin\SDK\PrivateApi\Account::getList() | YES | https://docs.kucoin.com/#list-accounts | | KuCoin\SDK\PrivateApi\Account::getDetail() | YES | https://docs.kucoin.com/#get-an-account | | KuCoin\SDK\PrivateApi\Account::getLedgers() | YES | `DEPRECATED` https://docs.kucoin.com/#get-account-ledgers-deprecated | | KuCoin\SDK\PrivateApi\Account::getHolds() | YES | https://docs.kucoin.com/#get-holds | | KuCoin\SDK\PrivateApi\Account::innerTransfer() | YES | `DEPRECATED` https://docs.kucoin.com/#inner-transfer | | KuCoin\SDK\PrivateApi\Account::innerTransferV2() | YES | https://docs.kucoin.com/#inner-transfer | | KuCoin\SDK\PrivateApi\Account::getSubAccountUsers() | YES | https://docs.kucoin.com/#get-user-info-of-all-sub-accounts | | KuCoin\SDK\PrivateApi\Account::getSubAccountDetail() | YES | https://docs.kucoin.com/#get-account-balance-of-a-sub-account | | KuCoin\SDK\PrivateApi\Account::getSubAccountList() | YES | https://docs.kucoin.com/#get-the-aggregated-balance-of-all-sub-accounts-of-the-current-user | | KuCoin\SDK\PrivateApi\Account::subTransfer() | YES | `DEPRECATED` https://docs.kucoin.com/#transfer-between-master-account-and-sub-account | | KuCoin\SDK\PrivateApi\Account::subTransferV2() | YES | https://docs.kucoin.com/#transfer-between-master-user-and-sub-user | | KuCoin\SDK\PrivateApi\Account::getLedgersV2() | YES | https://docs.kucoin.com/#get-account-ledgers |KuCoin\SDK\PrivateApi\Deposit
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\Deposit::createAddress() | YES | https://docs.kucoin.com/#create-deposit-address | | KuCoin\SDK\PrivateApi\Deposit::getAddress() | YES | https://docs.kucoin.com/#get-deposit-address | | KuCoin\SDK\PrivateApi\Deposit::getAddresses() | YES | https://docs.kucoin.com/#get-deposit-addresses-v2 | | KuCoin\SDK\PrivateApi\Deposit::getDeposits() | YES | https://docs.kucoin.com/#get-deposit-list | | KuCoin\SDK\PrivateApi\Deposit::getV1Deposits() | YES | https://docs.kucoin.com/#get-v1-historical-deposits-list |KuCoin\SDK\PrivateApi\TradeFee
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\TradeFee::getBaseFee() | YES | https://docs.kucoin.com/#basic-user-fee | | KuCoin\SDK\PrivateApi\TradeFee::getTradeFees() | YES | https://docs.kucoin.com/#actual-fee-rate-of-the-trading-pair |KuCoin\SDK\PrivateApi\Symbol
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\Symbol::getAggregatedFullOrderBook() | NO | https://docs.kucoin.com/#get-full-order-book-aggregated |KuCoin\SDK\PrivateApi\Order
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\Order::create() | YES | https://docs.kucoin.com/#place-a-new-order | | KuCoin\SDK\PrivateApi\Order::createMulti() | YES | https://docs.kucoin.com/#place-bulk-orders | | KuCoin\SDK\PrivateApi\Order::cancel() | YES | https://docs.kucoin.com/#cancel-an-order | | KuCoin\SDK\PrivateApi\Order::cancelAll() | YES | https://docs.kucoin.com/#cancel-all-orders | | KuCoin\SDK\PrivateApi\Order::getList() | YES | https://docs.kucoin.com/#list-orders | | KuCoin\SDK\PrivateApi\Order::getV1List() | YES | https://docs.kucoin.com/#get-v1-historical-orders-list | | KuCoin\SDK\PrivateApi\Order::getDetail() | YES | https://docs.kucoin.com/#get-an-order | | KuCoin\SDK\PrivateApi\Order::getRecentList() | YES | https://docs.kucoin.com/#recent-orders | | KuCoin\SDK\PrivateApi\Order::createMarginOrder()| YES | https://docs.kucoin.com/#place-a-margin-order | | KuCoin\SDK\PrivateApi\Order::cancelByClientOid() | YES | https://docs.kucoin.com/#cancel-single-order-by-clientoid | | KuCoin\SDK\PrivateApi\Order::getDetailByClientOid() | YES | https://docs.kucoin.com/#get-single-active-order-by-clientoid|KuCoin\SDK\PrivateApi\StopOrder
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\StopOrder::create() | YES | https://docs.kucoin.com/#place-a-new-order-2 | | KuCoin\SDK\PrivateApi\StopOrder::cancel() | YES | https://docs.kucoin.com/#cancel-an-order-2 | | KuCoin\SDK\PrivateApi\StopOrder::cancelBatch() | YES | https://docs.kucoin.com/#cancel-orders | | KuCoin\SDK\PrivateApi\StopOrder::getList() | YES | https://docs.kucoin.com/#list-stop-orders | | KuCoin\SDK\PrivateApi\StopOrder::getDetail() | YES | https://docs.kucoin.com/#get-single-order-info | | KuCoin\SDK\PrivateApi\StopOrder::getDetailByClientOid() | YES | https://docs.kucoin.com/#get-single-order-by-clientoid | | KuCoin\SDK\PrivateApi\StopOrder::cancelByClientOid()| YES | https://docs.kucoin.com/#cancel-single-order-by-clientoid-2 |KuCoin\SDK\PrivateApi\Fill
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\Fill::getList() | YES | https://docs.kucoin.com/#list-fills | | KuCoin\SDK\PrivateApi\Fill::getRecentList() | YES | https://docs.kucoin.com/#recent-fills |KuCoin\SDK\PrivateApi\WebSocketFeed
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\WebSocketFeed::getPublicServer() | NO | https://docs.kucoin.com/#apply-connect-token | | KuCoin\SDK\PrivateApi\WebSocketFeed::getPrivateServer() | YES | https://docs.kucoin.com/#apply-connect-token | | KuCoin\SDK\PrivateApi\WebSocketFeed::subscribePublicChannel() | NO | https://docs.kucoin.com/#public-channels | | KuCoin\SDK\PrivateApi\WebSocketFeed::subscribePublicChannels() | NO | https://docs.kucoin.com/#public-channels | | KuCoin\SDK\PrivateApi\WebSocketFeed::subscribePrivateChannel() | YES | https://docs.kucoin.com/#private-channels | | KuCoin\SDK\PrivateApi\WebSocketFeed::subscribePrivateChannels() | YES | https://docs.kucoin.com/#private-channels |KuCoin\SDK\PrivateApi\Withdrawal
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\Withdrawal::getQuotas() | YES | https://docs.kucoin.com/#get-withdrawal-quotas | | KuCoin\SDK\PrivateApi\Withdrawal::getList() | YES | https://docs.kucoin.com/#get-withdrawals-list | | KuCoin\SDK\PrivateApi\Withdrawal::getV1List() | YES | https://docs.kucoin.com/#get-v1-historical-withdrawals-list | | KuCoin\SDK\PrivateApi\Withdrawal::apply() | YES | https://docs.kucoin.com/#apply-withdraw | | KuCoin\SDK\PrivateApi\Withdrawal::cancel() | YES | https://docs.kucoin.com/#cancel-withdrawal |KuCoin\SDK\PublicApi\Currency
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PublicApi\Currency::getList() | NO | https://docs.kucoin.com/#get-currencies | | KuCoin\SDK\PublicApi\Currency::getDetail() | NO | https://docs.kucoin.com/#get-currency-detail | | KuCoin\SDK\PublicApi\Currency::getPrices() | NO | https://docs.kucoin.com/#get-fiat-price | | KuCoin\SDK\PublicApi\Currency::getV2Detail() | NO | https://docs.kucoin.com/#get-currency-detail-recommend |KuCoin\SDK\PublicApi\Symbol
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PublicApi\Symbol::getList() | NO | https://docs.kucoin.com/#get-symbols-list | | KuCoin\SDK\PublicApi\Symbol::getTicker() | NO | https://docs.kucoin.com/#get-ticker | | KuCoin\SDK\PublicApi\Symbol::getAllTickers() | NO | https://docs.kucoin.com/#get-all-tickers | | KuCoin\SDK\PublicApi\Symbol::getAggregatedPartOrderBook() | NO | https://docs.kucoin.com/#get-part-order-book-aggregated | | KuCoin\SDK\PublicApi\Symbol::getTradeHistories() | NO | https://docs.kucoin.com/#get-trade-histories | | KuCoin\SDK\PublicApi\Symbol::getKLines() | NO | https://docs.kucoin.com/#get-klines | | KuCoin\SDK\PublicApi\Symbol::get24HStats() | NO | https://docs.kucoin.com/#get-24hr-stats | | KuCoin\SDK\PublicApi\Symbol::getMarkets() | NO | https://docs.kucoin.com/#get-market-list |KuCoin\SDK\PrivateApi\Margin
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PrivateApi\Margin::getMarkPrice() | YES | https://docs.kucoin.com/#margin-info | | KuCoin\SDK\PrivateApi\Margin::getConfig() | YES | https://docs.kucoin.com/#get-margin-configuration-info | | KuCoin\SDK\PrivateApi\Margin::getAccount() | YES | https://docs.kucoin.com/#get-margin-account | | KuCoin\SDK\PrivateApi\Margin::borrow() | YES | https://docs.kucoin.com/#post-borrow-order | | KuCoin\SDK\PrivateApi\Margin::getBorrow() | YES | https://docs.kucoin.com/#get-borrow-order | | KuCoin\SDK\PrivateApi\Margin::getOutstanding() | YES | https://docs.kucoin.com/#get-repay-record | | KuCoin\SDK\PrivateApi\Margin::getRepayRecord() | YES | https://docs.kucoin.com/#get-repayment-record | | KuCoin\SDK\PrivateApi\Margin::repayAll() | YES | https://docs.kucoin.com/#one-click-repayment | | KuCoin\SDK\PrivateApi\Margin::repaySingle() | YES | https://docs.kucoin.com/#repay-a-single-order | | KuCoin\SDK\PrivateApi\Margin::lend() | YES | https://docs.kucoin.com/#post-lend-order | | KuCoin\SDK\PrivateApi\Margin::cancelLend() | YES | https://docs.kucoin.com/#cancel-lend-order | | KuCoin\SDK\PrivateApi\Margin::setAutoLend() | YES | https://docs.kucoin.com/#set-auto-lend | | KuCoin\SDK\PrivateApi\Margin::getLendActive() | YES | https://docs.kucoin.com/#get-active-order | | KuCoin\SDK\PrivateApi\Margin::getLendDone() | YES | https://docs.kucoin.com/#get-lent-history | | KuCoin\SDK\PrivateApi\Margin::getUnsettled() | YES | https://docs.kucoin.com/#get-active-lend-order-list | | KuCoin\SDK\PrivateApi\Margin::getSettled() | YES | https://docs.kucoin.com/#get-settled-lend-order-history | | KuCoin\SDK\PrivateApi\Margin::getLendAssets() | YES | https://docs.kucoin.com/#get-account-lend-record | | KuCoin\SDK\PrivateApi\Margin::getMarket() | YES | https://docs.kucoin.com/#lending-market-data | | KuCoin\SDK\PrivateApi\Margin::getTradeLast() | YES | https://docs.kucoin.com/#margin-trade-data |KuCoin\SDK\PublicApi\Time
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PublicApi\Time::timestamp() | NO | https://docs.kucoin.com/#server-time |KuCoin\SDK\PublicApi\ServiceStatus
| API | Authentication | Description | | -------- | -------- | -------- | | KuCoin\SDK\PublicApi\ServiceStatus::getStatus() | NO | https://docs.kucoin.com/#service-status |Run tests
Modify your API key in
phpunit.xml
first.
License
MIT
All versions of kucoin-php-sdk with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.0|^7.0
ratchet/pawl Version ^0.3.2
monolog/monolog Version ~1.0|~2.0