Download the PHP package djansen20/bitstamp-http-api without Composer

On this page you can find all versions of the php package djansen20/bitstamp-http-api. 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 bitstamp-http-api

Bitstamp HTTP API

This package is for communicating with the API of Bitstamp

For now the implementation only has the public methods exposed but will contain the private methods in the future

Minimum PHP Version

Installation

This package can be installed using composer

Usage

In order to use this library include the following namespace into your project

Request limit

Bitstamp has implemented a request limit to prevent one IP flooding their servers. When using this package make sure you limit your calls to 600 requests per 10 minutes. Or risk getting your IP banned.

If you wish to use this API for real time data please refer to Bitstamp's websocket API instead.

Trading pair constants

Most API calls require you to provide a trading pair you wish to address. You can make use of the CurrencyPair class constants to get the right strings you need to pass to a method. Example:

If you do not wish to use the CurrencyPair constants you need to provide a valid trading pair in the form of a lowercase string.

Public methods

This package allows you to use the public API without supplying account credentials. To retrieve an instance of the public API call the following method.

Now you can start requesting data from the API.

Daily ticker

Returns ticker data of the past day. The returned object has the following properties

Property Description
last Last ticker price
high Last 24 hours price high
low Last 24 hours price low
vwap Last 24 hours volume weighted average price
volume Last 24 hours volume
bid Highest buy order
ask Lowest sell order
timestamp Unix timestamp date and time
open First price of the day

Example request

Example response

Hourly ticker

Returns ticker data of the past hour

Property Description
last Last ticker price
high Last hour price high
low Last hour price low
vwap Last hour volume weighted average price
volume Last hour volume
bid Highest buy order
ask Lowest sell order
timestamp Unix timestamp date and time
open First price of the day

Example request

Example response

Orderbook

Returns an object with "bids" and "asks". Each is a list of open orders and each order is represented as a list holding the price and the amount.

Example request

Example response

Transactions

Returns an object with a descending list of transaction. Every transaction array contains:

Property Description
date Unix timestamp date and time
tid Transaction ID
price BTC price
amount BTC amount
type 0 (buy) or 1 (sell)

Example request

Example response

Get trading pairs

Returns an object with a list of trading pairs. Every trading pair array contains

Property Description
url_symbol URL symbol of trading pair
base_decimals Decimal precision for base currency (BTC/USD - base: BTC)
counter_decimals Decimal precision for counter currency (BTC/USD - counter: USD)
minimum_order Minimum order size
trading Trading engine status (Enabled/Disabled)
description Trading pair description

Example request

Example response

EUR / USD conversion rate

Check the current EUR / USD conversion rate

Example request

Example response

Private methods

To be implemented

License

This project is licensed under the MIT License - see the LICENSE.md file for details


All versions of bitstamp-http-api with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
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 djansen20/bitstamp-http-api contains the following files

Loading the files please wait ....