Giter Club home page Giter Club logo

signbase's Introduction

Bitcoin Ticker

bitcoinTicker.py. A Python script that helps you grab the latest bitcoin prices from top exchanges.

Installation:

Include the following line somewhere in your python file to import the script.

import bitcoinTicker

Available Functions:

Each of the following functions returns a string with the latest USD or Yuan (noted below) value of one Bitcoin on the given exchange or price index. The functions are named after the excanhges, be careful of exchanges with similar sounding names.

  • coindeskBPI()
  • bitfinex()
  • coinbase()
  • mtGox()
  • btce()
  • crypto_trade()
  • bitStamp()
  • campBX()
  • kraken()
  • OKCoin() NOTE: returns Yuan value.
  • btcChina() NOTE: returns Yuan value.

Usage:

The following is a simple script that includes the bitcoinTicker.py and then prints the latest prices.

import bitcoinTicker as bt

## Print the latest price of each exchange
print "Coindesk Bitcoin Price Index: " + bt.coindeskBPI()
print "Bitfinex Last Price: " + bt.bitfinex()
print "CoinBase Last Price: " + bt.coinbase()
print "Mt.Gox Last Price: " + bt.mtGox()
print "BTCE Last Price: " + bt.btce()
print "Crypto Trade Last Price: " + bt.crypto_trade()
print "BitStamp Last Price: " + bt.bitStamp()
print "CampBX Last Price: " + bt.campBX()
print "Kraken Last Price: " + bt.kraken()
print "BTC China Last Price (Yuan): " + bt.btcChina()
print "OK Coin Last Price (Yuan): " + bt.OKCoin()

Output:

Coindesk Bitcoin Price Index: 609.4850
Bitfinex Last Price: 610.9901
CoinBase Last Price: 614.8389999999999
Mt.Gox Last Price: 135.00000
BTCE Last Price: 606.88
Crypto Trade Last Price: 610.019
BitStamp Last Price: 610.21
CampBX Last Price: 635.00
Kraken Last Price: 611.01000
BTC China Last Price (Yuan): 3712.00
OK Coin Last Price (Yuan): 3702.86
[Finished in 32.9s]

signbase

signbase's People

Contributors

jcclark1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.