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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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.

Latest Version PHP Version Build Status Total Downloads

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 than curl.

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

PHP Build Version
Package Version
Requires php Version >=5.5.0
ext-json Version *
guzzlehttp/guzzle Version ^6.0|^7.0
ratchet/pawl Version ^0.4.1
monolog/monolog Version ~1.0|~2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kucoin/kucoin-futures-php-sdk contains the following files

Loading the files please wait ....