All Projects → Crypto-toolbox → Bitex

Crypto-toolbox / Bitex

Licence: mit
Crypto-currency Exchange API Framework

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Bitex

Currencyviewer
Short python framework that dynamically displays and converts the cryptocurrencies in your Kraken wallet into equivalents fiat money.
Stars: ✭ 13 (-97.14%)
Mutual labels:  framework, exchange
FTX.Net
No description or website provided.
Stars: ✭ 31 (-93.19%)
Mutual labels:  exchange, api-wrapper
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+22.42%)
Mutual labels:  api-wrapper, exchange
gemini-python
A python client for the Gemini API and Websocket
Stars: ✭ 71 (-84.4%)
Mutual labels:  exchange, api-wrapper
Bittrex.net
A C# .Net wrapper for the Bittrex web API including all features easily accessible and usable
Stars: ✭ 131 (-71.21%)
Mutual labels:  api-wrapper, exchange
Binance.net
.Net API wrapper for the Binance web API
Stars: ✭ 349 (-23.3%)
Mutual labels:  api-wrapper, exchange
Tbsync
[Thunderbird Add-On] Central user interface to manage cloud accounts and to synchronize their contact, task and calendar information with Thunderbird
Stars: ✭ 441 (-3.08%)
Mutual labels:  exchange
Awesome Test Automation
A curated list of awesome test automation frameworks, tools, libraries, and software for different programming languages. Sponsored by http://sdclabs.com
Stars: ✭ 4,712 (+935.6%)
Mutual labels:  framework
Gongular
A different approach to Go web frameworks
Stars: ✭ 438 (-3.74%)
Mutual labels:  framework
Commando
Official command framework for discord.js
Stars: ✭ 434 (-4.62%)
Mutual labels:  framework
Preferencesfx
A framework for easily creating a UI for application settings / preferences.
Stars: ✭ 449 (-1.32%)
Mutual labels:  framework
Vapor
💧 A server-side Swift HTTP web framework.
Stars: ✭ 21,194 (+4558.02%)
Mutual labels:  framework
Bubbletea
A powerful little TUI framework 🏗
Stars: ✭ 7,886 (+1633.19%)
Mutual labels:  framework
Pytube
A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.
Stars: ✭ 4,979 (+994.29%)
Mutual labels:  api-wrapper
Primus
⚡ Primus, the creator god of the transformers & an abstraction layer for real-time to prevent module lock-in.
Stars: ✭ 4,302 (+845.49%)
Mutual labels:  framework
Ccf
Confidential Consortium Framework
Stars: ✭ 439 (-3.52%)
Mutual labels:  framework
Iris
The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |
Stars: ✭ 21,587 (+4644.4%)
Mutual labels:  framework
Sofa
Real-time multi-physics simulation with an emphasis on medical simulation.
Stars: ✭ 435 (-4.4%)
Mutual labels:  framework
Framework
A modular front-end framework - inspired by the server-side and Web Components.
Stars: ✭ 448 (-1.54%)
Mutual labels:  framework
Slate
A completely customizable framework for building rich text editors. (Currently in beta.)
Stars: ✭ 23,104 (+4977.8%)
Mutual labels:  framework

BitEx

BitEx is a collection of API Clients for Crypto Currency Exchanges.

It comes with two parts - bitex.api represents the base level API interfaces, on top of which the second part - bitex.interfaces - builds upon. bitex.api classes can be used without making use of the interface classes.

Donations welcome! BTC @ 3D4yuyf84eQUauyZLoQKyouPuThoxMMRZa

State


RESTAPI : Completed

WSSAPI : BETA

Interfaces : WIP


Supported Exchanges

Exchange API Authentication Public Endpoints*[^1] Private Endpoints[^1] Formatters Tests
Bitfinex Done Done Done Done WIP WIP
Bitstamp Done Done Done Done WIP WIP
Bittrex Done Done Done Done WIP WIP
Bter Done BETA Done Done WIP WIP
C-Cex Done BETA Done Done WIP WIP
CoinCheck Done Done Done Done WIP WIP
Cryptopia Done BETA Done Done WIP WIP
GDAX Done BETA Done Done WIP WIP
Gemini Done BETA Done Done WIP WIP
HitBtc Done BETA Done Done WIP WIP
itBit Done BETA Done Done WIP WIP
Kraken Done Done Done Done WIP WIP
OkCoin Done BETA Done Done WIP WIP
Poloniex Done Done Done Done WIP WIP
Quoine Done BETA Done Done WIP WIP
QuadrigaCX Done BETA Done Done WIP WIP
TheRockTrading Done BETA Done Done WIP WIP
Yunbi Done BETA Done Done WIP WIP
Vaultoro Done BETA Done Done WIP WIP

Additional clients will be added to (or removed from) this list, according to their liquidity and market volume.

[^1]: This table considers standardized methods only, when describing the state. See section Standardized Methods for more

bitex.api.REST

Classes found in bitex.api.REST provide wrapper classes and methods for Python's requests module, including handling of each exchange's specific authentication procedure.

An example:

from bitex.api.REST import KrakenREST

k = KrakenREST()
k.load_key('kraken.key')  # loads key and secret from given file;

# Query a public endpoint
k.query('GET','public/Depth', params={'pair': 'XXBTZUSD'})

# Query a private (authenticated) endpoint
q = {'pair': 'XXBTZUSD', 'type': 'sell', 'ordertype': 'limit', 'price': 1000.0,
     'volume': 0.01, 'validate': True}
k.query('POST','private/AddOrder', authenticate=True, params=q)

Example .key file:

>>>dummy.key
my_api_key
my_fancy_api_secret

If the api requires further details, for example a userid or account number (for example for bitstamp), you should check the class method's doc string, although usually this information needs to go after the api key and secret, on a separate line each.

>>>dummy2.key
my_api_key
my_fancy_api_secret
Userid
accountname

bitex.api.WSS

bitex.api.WSS offers Queue()-based Websocket interface for a select few exchanges. The classes found within are very basic, and subject to further development. Private endpoints and trading are only sporadically implemented.

Their prime objective is to provide a raw, realtime interface to all of an exchange's Websocket endpoint.

Usage

from.bitex.api.WSS import GeminiWSS
import time

wss = GeminiWSS()
wss.start()
time.sleep(5)
wss.stop()

while not wss.data_q.empty():
    print(wss.data_q.get())
    

You can of course also access data_q while the WebSocket is still running (i.e. before calling stop()).

bitex.interfaces

Built on top of bitex.api's api classes are the slightly more sophisticated exchange interfaces in bitex.interfaces. These have been written to unify the diverse REST APIs of the implemented exchanges, by providing the same methods and method parameters across all of them (see next section, Standardized Methods, for more information).

For example, querying tickers looks the same on all exchanges, as well as placing an order, using bitex.interface:

from bitex import Kraken, Bitstamp, Gemini
k = Kraken(key_file='krkn.key')
b = Bitstamp(key_file='btst.key')
g = Gemini(key_file='gmni.key')

k.ticker('XBTUSD')
b.ticker('btceur')
g.ticker('BTC-USD')

k.ask(pair, price, size)
b.ask(pair, price, size)
g.ask(pair, price, size)

Standardized Methods

As explained in the previous section, standardized methods refer to the methods of each interface which have been deemed as part of the set of minimal methods and functions required to trade at an exchange via its API. They feature the following characteristics:

  • Each method has an identical method header across all interfaces
  • Its output is identical across all interfaces
  • Each method returns a bitex.api.response.APIResponse object; these behave like requests.Request objects, with the addition of a new attribute, formatted, which stores a standardized representation of the data queried.

bitex.formatters

This module provide formatters for the standardized methods, formatting their json output into a uniform layout. They are a work in progress feature.

Be mindful that, in order to provide a unified output format, some fields have been dropped in the formatted output! If you rely on one of these dropped fields, be sure to use the APIResponse's json attribute instead, and parse the json yourself:

from bitex import Kraken
k = Kraken()
response = k.ticker()
print(response.formatted)  # show formatted data
print(response.json())  # Returns all json data

The following is a table of all formatters currently implemented - any method not marked as Done will not do any formatting.

Exchange ticker() order_book() trades() bid()/ask() order() cancel_order() balance() withdraw() deposit()
Bitfinex Done Planned Planned Planned Planned Planned Planned Planned Planned
Bitstamp Done Planned Planned Planned Planned Planned Planned Planned Planned
Bittrex Done Planned Planned Planned Planned Planned Planned Planned Planned
Bter WIP WIP WIP WIP WIP WIP WIP WIP WIP
C-Cex Done Planned Planned Planned Planned Planned Planned Planned Planned
Coincheck Done Planned Planned Planned Planned Planned Planned Planned Planned
Cryptopia Done Planned Planned Planned Planned Planned Planned Planned Planned
GDAX Done Planned Planned Planned Planned Planned Planned Planned Planned
Gemini Done Planned Planned Planned Planned Planned Planned Planned Planned
HitBtc WIP WIP WIP WIP WIP WIP WIP WIP WIP
itBit Done Planned Planned Planned Planned Planned Planned Planned Planned
Kraken Done Planned Planned Planned Planned Planned Planned Planned Planned
OKCoin Done Planned Planned Planned Planned Planned Planned Planned Planned
Poloniex Done Planned Planned Planned Planned Planned Planned Planned Planned
QuadrigaCX Done Planned Planned Planned Planned Planned Planned Planned Planned
Quoine Done Planned Planned Planned Planned Planned Planned Planned Planned
TheRockTradingLTD Done Planned Planned Planned Planned Planned Planned Planned Planned
Vaultoro WIP WIP WIP WIP WIP WIP WIP WIP WIP
Yunbi Done Planned Planned Planned Planned Planned Planned Planned Planned

Installation

Manually, using the supplied setup.py file:

python3 setup.py install

or via pip

pip install BitEx

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].