Download the PHP package kucoin/kucoin-futures-php-sdk without Composer
On this page you can find all versions of the php package kucoin/kucoin-futures-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package kucoin-futures-php-sdk
PHP SDK for KuCoin Futures API
The detailed document https://docs.kucoin.com/futures/, 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 |
Install
Install package via Composer.
Usage
Choose environment
Environment | BaseUri |
---|---|
Production | https://api-futures.kucoin.com(DEFAULT) |
Debug mode & logging
Examples
See the test case for more examples.
Example of API without
authentication
Example of API with
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 WebSocket feed
⚡️Coroutine HTTP client for asynchronous IO
See the benchmark, almost
20x
faster thancurl
.
API list
KuCoin\Futures\SDK\PrivateApi\Account
| API | Authentication | Description | |----------------------------------------------------------------|----------------|-------------------------------------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\Account::getOverview() | YES | https://docs.kucoin.com/futures/#account | | KuCoin\Futures\SDK\PrivateApi\Account::getTransactionHistory() | YES | https://docs.kucoin.com/futures/#get-transaction-history | | KuCoin\Futures\SDK\PrivateApi\Account::transferIn() | YES | `deprecated` | | KuCoin\Futures\SDK\PrivateApi\Account::transferOut() | YES | `deprecated` https://docs.kucoin.com/futures/#transfer-funds-to-kucoin-main-account | | KuCoin\Futures\SDK\PrivateApi\Account::transferOutV2() | YES | https://docs.kucoin.com/futures/#transfer-funds-to-kucoin-main-account-2 | | KuCoin\Futures\SDK\PrivateApi\Account::cancelTransferOut() | YES | `deprecated` https://docs.kucoin.com/futures/#cancel-transfer-out-request | | KuCoin\Futures\SDK\PrivateApi\Account::getTransferList() | YES | https://docs.kucoin.com/futures/#get-transfer-out-request-records | | KuCoin\Futures\SDK\PrivateApi\Account::getSubApikey() | YES | https://docs.kucoin.com/futures/#get-sub-account-futures-api-list | | KuCoin\Futures\SDK\PrivateApi\Account::createSubApikey() | YES | https://docs.kucoin.com/futures/#create-futures-apis-for-sub-account | | KuCoin\Futures\SDK\PrivateApi\Account::modifySubApikey() | YES | https://docs.kucoin.com/futures/#modify-sub-account-futures-apis | | KuCoin\Futures\SDK\PrivateApi\Account::deleteSubApikey() | YES | https://docs.kucoin.com/futures/#delete-sub-account-futures-apis | | KuCoin\Futures\SDK\PrivateApi\Account::transferOutV3() | YES | https://docs.kucoin.com/futures/#transfer-to-main-or-trade-account |KuCoin\Futures\SDK\PrivateApi\Deposit
| API | Authentication | Description | |------------------------------------------------------|----------------|------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\Deposit::getAddress() | YES | https://docs.kucoin.com/futures/#get-deposit-address | | KuCoin\Futures\SDK\PrivateApi\Deposit::getDeposits() | YES | https://docs.kucoin.com/futures/#get-deposit-list |KuCoin\Futures\SDK\PrivateApi\Fill
| API | Authentication | Description | |-----------------------------------------------------|----------------|-----------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\Fill::getFills() | YES | https://docs.kucoin.com/futures/#get-fills | | KuCoin\Futures\SDK\PrivateApi\Fill::getRecentList() | YES | https://docs.kucoin.com/futures/#recent-fills |KuCoin\Futures\SDK\PrivateApi\Fee
| API | Authentication | Description | |---------------------------------------------------|----------------|------------------------------------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\Fee::getTradeFees() | YES | https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-futures |KuCoin\Futures\SDK\PrivateApi\Order
| API | Authentication | Description | |---------------------------------------------------------------|----------------|-----------------------------------------------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\Order::create() | YES | https://docs.kucoin.com/futures/#place-an-order | | KuCoin\Futures\SDK\PrivateApi\Order::cancel() | YES | https://docs.kucoin.com/futures/#cancel-an-order | | KuCoin\Futures\SDK\PrivateApi\Order::batchCancel() | YES | https://docs.kucoin.com/futures/#limit-order-mass-cancelation | | KuCoin\Futures\SDK\PrivateApi\Order::stopOrders() | YES | https://docs.kucoin.com/futures/#stop-order-mass-cancelation | | KuCoin\Futures\SDK\PrivateApi\Order::getList() | YES | https://docs.kucoin.com/futures/#get-order-list | | KuCoin\Futures\SDK\PrivateApi\Order::getStopOrders() | YES | https://docs.kucoin.com/futures/#get-untriggered-stop-order-list | | KuCoin\Futures\SDK\PrivateApi\Order::getRecentDoneOrders() | YES | https://docs.kucoin.com/futures/#get-list-of-orders-completed-in-24h | | KuCoin\Futures\SDK\PrivateApi\Order::getDetail() | YES | https://docs.kucoin.com/futures/#get-details-of-a-single-order | | KuCoin\Futures\SDK\PrivateApi\Order::getDetailByClientOid() | YES | https://docs.kucoin.com/futures/#get-details-of-a-single-order | | KuCoin\Futures\SDK\PrivateApi\Order::getOpenOrderStatistics() | YES | https://docs.kucoin.com/futures/#active-order-value-calculation | | KuCoin\Futures\SDK\PrivateApi\Order::cancelByClientOid() | YES | https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-order-by-clientoid | | KuCoin\Futures\SDK\PrivateApi\Order::createTest() | YES | https://www.kucoin.com/docs/rest/futures-trading/orders/place-order-test | | KuCoin\Futures\SDK\PrivateApi\Order::createStOrder() | YES | https://www.kucoin.com/docs/rest/futures-trading/orders/place-take-profit-and-stop-loss-order | | KuCoin\Futures\SDK\PrivateApi\Order::createMultiOrders() | YES | https://www.kucoin.com/docs/rest/futures-trading/orders/place-multiple-orders |KuCoin\Futures\SDK\PrivateApi\Position
| API | Authentication | Description | |------------------------------------------------------------------|----------------|-------------------------------------------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\Position::getList() | YES | https://docs.kucoin.com/futures/#get-position-list | | KuCoin\Futures\SDK\PrivateApi\Position::getDetail() | YES | https://docs.kucoin.com/futures/#get-position-details | | KuCoin\Futures\SDK\PrivateApi\Position::changeAutoAppendStatus() | YES | https://docs.kucoin.com/futures/#enable-disable-of-auto-deposit-margin | | KuCoin\Futures\SDK\PrivateApi\Position::marginAppend() | YES | https://docs.kucoin.com/futures/#add-margin-manually | | KuCoin\Futures\SDK\PrivateApi\Position::getMaxWithdrawMargin() | YES | https://www.kucoin.com/docs/rest/futures-trading/positions/get-max-withdraw-margin | | KuCoin\Futures\SDK\PrivateApi\Position::withdrawMargin() | YES | https://www.kucoin.com/docs/rest/futures-trading/positions/remove-margin-manually | | KuCoin\Futures\SDK\PrivateApi\Position::getHistoryPositions() | YES | https://www.kucoin.com/docs/rest/futures-trading/positions/get-positions-history | | KuCoin\Futures\SDK\PrivateApi\Position::getMaxOpenSize() | YES | https://www.kucoin.com/docs/rest/futures-trading/positions/get-maximum-open-position-size |KuCoin\Futures\SDK\PrivateApi\WebSocketFeed
| API | Authentication | Description | |-------------------------------------------------------------------------|----------------|------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\WebSocketFeed::getPublicServer() | NO | https://docs.kucoin.com/futures/#apply-connect-token | | KuCoin\Futures\SDK\PrivateApi\WebSocketFeed::getPrivateServer() | YES | https://docs.kucoin.com/futures/#apply-connect-token | | KuCoin\Futures\SDK\PrivateApi\WebSocketFeed::subscribePublicChannel() | NO | https://docs.kucoin.com/futures/#public-channels | | KuCoin\Futures\SDK\PrivateApi\WebSocketFeed::subscribePublicChannels() | NO | https://docs.kucoin.com/futures/#public-channels | | KuCoin\Futures\SDK\PrivateApi\WebSocketFeed::subscribePrivateChannel() | YES | https://docs.kucoin.com/futures/#private-channels | | KuCoin\Futures\SDK\PrivateApi\WebSocketFeed::subscribePrivateChannels() | YES | https://docs.kucoin.com/futures/#private-channels |KuCoin\Futures\SDK\PrivateApi\Withdrawal
| API | Authentication | Description | |-------------------------------------------------------|----------------|-------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\Withdrawal::getQuotas() | YES | https://docs.kucoin.com/futures/#get-withdrawal-limit | | KuCoin\Futures\SDK\PrivateApi\Withdrawal::getList() | YES | https://docs.kucoin.com/futures/#get-withdrawal-list | | KuCoin\Futures\SDK\PrivateApi\Withdrawal::apply() | YES | https://docs.kucoin.com/futures/#withdraw-funds | | KuCoin\Futures\SDK\PrivateApi\Withdrawal::cancel() | YES | https://docs.kucoin.com/futures/#cancel-withdrawal |KuCoin\Futures\SDK\PrivateApi\RiskLimitLevel
| API | Authentication | Description | |----------------------------------------------------------------------|----------------|------------------------------------------------------------------| | KuCoin\Futures\SDK\PrivateApi\RiskLimitLevel::getRiskLimitLevel | YES | https://docs.kucoin.com/futures/#obtain-futures-risk-limit-level | | KuCoin\Futures\SDK\PrivateApi\RiskLimitLevel::changeRiskLimitLevel() | YES | https://docs.kucoin.com/futures/#adjust-risk-limit-level |KuCoin\Futures\SDK\PublicApi\Symbol
| API | Authentication | Description | |------------------------------------------------------------|----------------|------------------------------------------------------------------------------------------| | KuCoin\Futures\SDK\PublicApi\Symbol::getTicker() | NO | https://docs.kucoin.com/futures/#get-ticker | | KuCoin\Futures\SDK\PublicApi\Symbol::getLevel2Snapshot() | NO | https://docs.kucoin.com/futures/#get-full-order-book-level-2 | | KuCoin\Futures\SDK\PublicApi\Symbol::getLevel3Snapshot() | NO | https://docs.kucoin.com/futures/#get-full-order-book-level-3 | | KuCoin\Futures\SDK\PublicApi\Symbol::getV2Level3Snapshot() | NO | https://docs.kucoin.com/futures/#get-full-order-book-level-3-v2 | | KuCoin\Futures\SDK\PublicApi\Symbol::getLevel2Message() | NO | `deprecated` https://docs.kucoin.com/futures/##level-2-pulling-messages | | KuCoin\Futures\SDK\PublicApi\Symbol::getLevel3Message() | NO | `deprecated` https://docs.kucoin.com/futures/##level-3-pulling-messages | | KuCoin\Futures\SDK\PublicApi\Symbol::getTradeHistory() | NO | https://docs.kucoin.com/futures/#get-trade-histories | | KuCoin\Futures\SDK\PublicApi\Symbol::getKLines() | NO | https://docs.kucoin.com/futures/?lang=en_US#get-k-line-data-of-contract | | KuCoin\Futures\SDK\PublicApi\Symbol::getLevel2Depth20 | NO | https://docs.kucoin.com/futures/cn/#level-2-2 | | KuCoin\Futures\SDK\PublicApi\Symbol::getLevel2Depth100 | NO | https://docs.kucoin.com/futures/cn/#level-2-2 | | KuCoin\Futures\SDK\PublicApi\Symbol::getFundingRates | NO | https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-public-funding-history |KuCoin\Futures\SDK\PublicApi\Contract
| API | Authentication | Description | |--------------------------------------------------------|----------------|--------------------------------------------------------------------------------------------------| | KuCoin\Futures\SDK\PublicApi\Contract::getList() | NO | https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list | | KuCoin\Futures\SDK\PublicApi\Contract::getDetail() | NO | https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbol-detail | | KuCoin\Futures\SDK\PublicApi\Contract::getAllTickers() | NO | https://www.kucoin.com/docs/rest/futures-trading/market-data/get-latest-ticker-for-all-contracts |KuCoin\Futures\SDK\PublicApi\Time
| API | Authentication | Description | |------------------------------------------------|----------------|----------------------------------------------| | KuCoin\Futures\SDK\PublicApi\Time::timestamp() | NO | https://docs.kucoin.com/futures/#server-time |KuCoin\Futures\SDK\PublicApi\Status
| API | Authentication | Description | |-----------------------------------------------|----------------|---------------------------------------------------------| | KuCoin\Futures\SDK\PublicApi\Status::status() | NO | https://docs.kucoin.com/futures/#get-the-service-status |Run tests
Modify your API key in
phpunit.xml
first.
License
MIT
All versions of kucoin-futures-php-sdk with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.0|^7.0
ratchet/pawl Version ^0.4.1
monolog/monolog Version ~1.0|~2.0