Download the PHP package weoka/stakecube-php-sdk without Composer

On this page you can find all versions of the php package weoka/stakecube-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 stakecube-php-sdk

StakeCube-PHP-SDK

Unofficial StakeCube API SDK for PHP - Available on Composer!

Install

Composer: composer require weoka/stakecube-php-sdk

...or clone via git and import the module yourself!

Setup

To start using the StakeCube SDK, you'll need to import the Stakecube class and initialize an instance with your public and private key as parameters. If you only intend to use public endpoints, you can just send random string as parameters.

If you don't have your pair keys, grab them from your Profile

Usage

Note: If you're looking for Advanced REST API documentation, please use this document from DevCube!


Get Arbitrage Info

Gets arbitrage information for a chosen coin ticker.

  • Method: getArbitrageInfo($ticker);
Parameter Description Example
(required) ticker the ticker of a coin DOGEC

Example:


Get Markets

Gets a list of all StakeCube markets under the chosen base market, optionally sorted by volume or change, but by default sorted alphabetically.

  • Method: getMarkets($base, $orderBy);
Parameter Description Example
(required) base the chosen base coin DOGEC
(optional) orderBy the ordering of the list volume or change

Example:


Get OHLC Data

Gets an array of the last 500 candles for the chosen market pair and interval.

  • Method: getOhlcData($market, $interval);
Parameter Description Example
(required) market the chosen market pair DOGEC_BTC
(required) interval the per-candle timeframe / period 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1mo

Example:


Get MineCube Info

Gets the current real-time info for MineCube, such as total and available workers, the price of workers, and the payouts-in-progress status.

  • Method: getMineCubeInfo();

Example:


Get MineCube Miners

Gets a list of all Miners belonging to MineCube, you may optionally specify a coin to see miners for only that coin, such as 'ETH' which uses AMD GPUs, or 'DASH' which uses StrongU ASICs.

  • Method: getMineCubeMiners($coin);

Example:


Get Rate Limits

Gets the current global StakeCube rate-limits for APIs.

  • Method: getRatelimits();

Example:


Get Trades

Returns the last trades of a specified market pair, optionally with a custom results limit.

Parameter Description Example
(required) market the chosen market pair DOGEC_BTC
(optional) limit the maximum returned trades 100

Example:


Get Orderbook

Gets the orderbook of a chosen market, optionally a specified side, but by default will load both orderbook sides.

  • Method: getOrderbook($market);
Parameter Description Example
(required) market the chosen market pair DOGEC_BTC
(optional) side the orderbook side buy or sell

Example:


Private APIs

These APIs require you to be using real API keys with sufficient permissions to perform the private action. For example, withdrawals will work on any key with the Withdrawals Permission enabled, order placing/cancelling will work on a key with "Full Permissions", but will not work on a "Read only" key, be aware of this and customize your keys accordingly for security!

Get Account (Auth Required)

Returns general information about your StakeCube account, including wallets, balances, fee-rate in percentage and your account username.

  • Method: getAccount();

Example:


Withdraw (Auth Required)

Creates a withdrawal request with a specified coin, address and amount.

  • Method: withdraw($ticker, $address, $amount);
Parameter Description Example
(required) ticker the withdrawal coin DOGEC
(required) address the withdrawal address dWdSgX...
(required) amount the withdrawal amount 100

Example:


Get Open Orders (Auth Required)

Returns a list of all open orders for all StakeCube Exchange markets.

  • Method: getOpenOrders();

Example:


Get My Trades (Auth Required)

Returns a list of all trades, you can leave the market empty ("") to return all trades, or specify a market such as "DOGEC_BTC" to return those market orders, you may also specify a limit of the amount of returned trades, of which the default is 100 trades.

  • Method: getMyTrades($market, $limit);
Parameter Description Example
(optional) market the market pair DOGEC_BTC
(optional) limit the maximum returned trades 100

Example:


Get Order History (Auth Required)

Returns a list of all orders from a specified market such as "DOGEC_BTC", you may also specify a limit of the amount of returned orders, of which the default is 100 orders.

  • Method: getOrderHistory($market, $limit);
Parameter Description Example
(required) market the market pair DOGEC_BTC
(optional) limit the maximum returned trades 100

Example:


Post Order (Auth Required)

Creates an exchange order for the specified market pair, orderbook side, price and amount.

  • Method: postOrder($market, $side, $price, $amount);
Parameter Description Example
(required) market the market pair DOGEC_BTC
(required) side the trade side BUY
(required) price the price in the base coin 0.00002000 (BTC)
(required) amount the amount of the trade coin 1000 (DOGEC)

Example:


Cancel Order (Auth Required)

Cancels an open order by it's orderId

  • Method: cancel($orderId);
Parameter Description Example
(required) orderId the ID of your order 123

Example:


Cancel All (Auth Required)

Cancels all orders in a specified market pair.

  • Method: cancelAll($market);
Parameter Description Example
(required) market the market pair DOGEC_BTC

Example:


Set MineCube Payout Coin (Auth Required)

Sets a coin as the preferred payout coin to receive upon future MineCube payouts.

  • Method: setMineCubePayoutCoin($coin);
Parameter Description Example
(required) coin the MineCube payout coin DOGE

Example:


Buy MineCube Workers (Auth Required)

Buys a specified amount of MineCube workers using the chosen payment method.

  • Method: buyMineCubeWorkers($method, $workers);
Parameter Description Example
(required) method the payment method SCC or CREDITS
(required) workers the worker quantity 10

Example:


All versions of stakecube-php-sdk with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.3
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 weoka/stakecube-php-sdk contains the following files

Loading the files please wait ....