GithubHelp home page GithubHelp logo

ccs's Introduction

Crypto Currencies Stocks

Crypto currencies stocks (ccs) is Python package for communication with stocks which are traiding with crypto currencies. This library has two levels:

  • basic stock's API

  • unificated API (build over basic API)

Instalation

This package is part of pypi. Command for instalation is:

    $ pip intall ccs

Documentation

Full documentation is here. This documentation is still under construction.

Examples of using basic API

Tickers

str_response = ccs.bitfinex.public.ticker("btcusd")
str_response = ccs.bittrex.public.getMarketSummary("btc-ltc")
str_response = ccs.cexio.public.ticker("BTC", "USD")
# ...

Trades

str_response = ccs.bitfinex.public.trades("btcusd")
str_response = ccs.bitstamp.public.transactions("btcusd")
str_response = ccs.kraken.public.getRecentTrades("XBTEUR")
# ...

Orderbook

str_response = ccs.bitfinex.public.orderbook("btcusd")
str_response = ccs.btce.public.depth("btc_usd")
str_response = ccs.okcoincom.public.depth("btc_usd")
# ...

Examples of using unificated API

Unificated Ticker

import ccs

stock = ccs.constants.BITFINEX
cur1 = ccs.constants.BTC
cur2 = ccs.constants.USD

ticker = ccs.ticker(stock, cur1, cur2)

# Available atributes and methods
ticker.high()
ticker.low()
ticker.ask()
ticker.bid()
ticker.timestamp()
ticker.dt() # datetime
ticker.volume24h()
ticker.spread()
str(ticker)

Unificated Trades

trades = ccs.trades(stock, cur1, cur2)

# Available atributes and methods
len(trades)
str(trades)

for trade in trades:
  trade.tid()
  trade.price()
  trade.amount()
  trade.type()
  trade.timestamp()
  trade.dt()

Unificated Orderbook

orderbook = ccs.orderbook(stock, cur1, cur2)

# Available atributes and methods
for order in orderbook.asks():
  order.price()
  order.amount()

Supported stocks

Stock Link
Bitfinex https://www.bitfinex.com/
Bitstamp https://www.bitstamp.net/
Bittrex https://bittrex.com/
Btcc https://www.btcc.com/
Btce https://btc-e.com/
Bter https://bter.com/
Cex.io https://cex.io/
Kraken https://www.kraken.com/
Okcoin.com https://www.okcoin.com/
Okcoin.cn https://www.okcoin.cn/
Poloniex https://poloniex.com/

ccs's People

Contributors

honzin avatar

Watchers

James Cloos avatar Timothy James Hoekstra 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.