Skip to main content

Bitstamp API python implementation

Project description

Python package to communicate with the bitstamp.net API.

Compatible with Python 2.7+ and Python 3.3+

Overview

There are two classes. One for the public part of API and a second for the trading part.

Public class doesn’t need user credentials, because API commands which this class implements are not bound to bitstamp user account.

Description of API: https://www.bitstamp.net/api/

Install

Install from PyPi:

pip install BitstampClient

Install from git:

pip install git+git://github.com/kmadac/bitstamp-python-client.git

Usage

Here’s a quick example of usage:

>>> import bitstamp.client

>>> public_client = bitstamp.client.Public()
>>> print(public_client.ticker()['volume'])
8700.01208078

>>> trading_client = bitstamp.client.Trading(
...     username='999999', key='xxx', secret='xxx')
>>> print(trading_client.account_balance()['fee'])
0.5000
>>> print(trading_client.ticker()['volume'])   # Can access public methods
8700.01208078

How to activate a new API key

  1. Login your Bitstamp account

  2. Click on Security -> Api Access

  3. Select permissions which you want to have for you access key (if you don’t check any box, you will get error message ‘No permission found’ after each API call)

  4. Click the ‘Generate key’ button and don’t forget to write down your Secret!

  5. Click ‘Activate’

  6. Goto your Inbox and click on link sent by Bitstamp to activate this API key

Class diagram

Class diagram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

BitstampClient-2.0.1.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file BitstampClient-2.0.1.tar.gz.

File metadata

File hashes

Hashes for BitstampClient-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e10f3a411d4c9025088a296a0303655f8a9b86f5e781de107dd8abd10c19fd8f
MD5 19630d1cc048b6ab6cb07197be28ae06
BLAKE2b-256 8c5b45f0ba8ea495f8320e1e1af1cb8958b8a7bcb105d416cc0f1df6d4d1f750

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page