All Projects → slazarov → Python Bittrex Websocket

slazarov / Python Bittrex Websocket

Licence: mit
Python websocket for Bittrex (non async).

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Python Bittrex Websocket

python-bittrex-websocket-aio
Python websocket for Bittrex (async).
Stars: ✭ 35 (-66.35%)
Mutual labels:  websocket-client, bittrex
Deno Websocket
🦕 A simple WebSocket library like ws of node.js library for deno
Stars: ✭ 74 (-28.85%)
Mutual labels:  websocket-client
Oatpp Websocket
oatpp-websocket submodule.
Stars: ✭ 26 (-75%)
Mutual labels:  websocket-client
Bittrex Signalr Client
Node.js implementation of SignalR protocol tailored for Bittrex exchange
Stars: ✭ 37 (-64.42%)
Mutual labels:  bittrex
Docker Ws Client
docker websocket client for remote attch
Stars: ✭ 9 (-91.35%)
Mutual labels:  websocket-client
Websocket
A PHP implementation of WebSocket.
Stars: ✭ 54 (-48.08%)
Mutual labels:  websocket-client
Starscream
Websockets in swift for iOS and OSX
Stars: ✭ 7,105 (+6731.73%)
Mutual labels:  websocket-client
Arduinowebsockets
arduinoWebSockets
Stars: ✭ 1,265 (+1116.35%)
Mutual labels:  websocket-client
Crypto Coin Alerts
An application that let you set alerts for the prices of several cryptocurrencies
Stars: ✭ 72 (-30.77%)
Mutual labels:  bittrex
Achilles
A Simple Retrofit Inspired Android Websocket Client (In Development)
Stars: ✭ 37 (-64.42%)
Mutual labels:  websocket-client
Sockpuppet
Having fun with WebSockets, Python, Golang and nytimes.com
Stars: ✭ 32 (-69.23%)
Mutual labels:  websocket-client
Stl.fusion
Get real-time UI updates in Blazor apps and 10-1000x faster API responses with a novel approach to distributed reactive computing. Fusion brings computed observables and automatic dependency tracking from Knockout.js/MobX/Vue to the next level by enabling a single dependency graph span multiple servers and clients, including Blazor apps running in browser.
Stars: ✭ 858 (+725%)
Mutual labels:  websocket-client
Recws
Reconnecting WebSocket is a websocket client based on gorilla/websocket that will automatically reconnect if the connection is dropped and keeps the connection alive - thread safe!
Stars: ✭ 60 (-42.31%)
Mutual labels:  websocket-client
Awesome Websockets
A curated list of Websocket libraries and resources.
Stars: ✭ 850 (+717.31%)
Mutual labels:  websocket-client
Cryptotik
deprecated
Stars: ✭ 78 (-25%)
Mutual labels:  bittrex
Sylar
C++高性能分布式服务器框架,webserver,websocket server,自定义tcp_server(包含日志模块,配置模块,线程模块,协程模块,协程调度模块,io协程调度模块,hook模块,socket模块,bytearray序列化,http模块,TcpServer模块,Websocket模块,Https模块等, Smtp邮件模块, MySQL, SQLite3, ORM,Redis,Zookeeper)
Stars: ✭ 895 (+760.58%)
Mutual labels:  websocket-client
Websocketphpclient
🗿 [DEPRECATED] PHP WAMPv1 compliant websocket client
Stars: ✭ 31 (-70.19%)
Mutual labels:  websocket-client
Jiny
Lightweight, modern, simple JVM web framework for rapid development in the API era
Stars: ✭ 40 (-61.54%)
Mutual labels:  websocket-client
T Io
解决其它网络框架没有解决的用户痛点,让天下没有难开发的网络程序
Stars: ✭ 1,331 (+1179.81%)
Mutual labels:  websocket-client
Sketchpad
Sketchpad is fully customisable collaborative whiteboard plugin written in pure JavaScript.
Stars: ✭ 85 (-18.27%)
Mutual labels:  websocket-client

|logo| bittrex-websocket

|pypi-v2| |pypi-pyversions2| |pypi-l2| |pypi-wheel2|

.. |pypi-v2| image:: https://img.shields.io/pypi/v/bittrex-websocket.svg :target: https://pypi.python.org/pypi/bittrex-websocket

.. |pypi-pyversions2| image:: https://img.shields.io/pypi/pyversions/bittrex-websocket.svg :target: https://pypi.python.org/pypi/bittrex-websocket

.. |pypi-l2| image:: https://img.shields.io/pypi/l/bittrex-websocket.svg :target: https://pypi.python.org/pypi/bittrex-websocket

.. |pypi-wheel2| image:: https://img.shields.io/pypi/wheel/bittrex-websocket.svg :target: https://pypi.python.org/pypi/bittrex-websocket

.. |logo| image:: /resources/py_btrx.svg :width: 60px

What is bittrex-websocket?

Python Bittrex WebSocket (PBW) is the first unofficial Python wrapper for the Bittrex Websocket API <https://github.com/Bittrex/bittrex.github.io>. It provides users with a simple and easy to use interface to the Bittrex Exchange <https://bittrex.com>.

Users can use it to access real-time public data (e.g exchange status, summary ticks and order fills) and account-level data such as order and balance status. The goal of the package is to serve as a foundation block which users can use to build upon their applications. Examples usages can include maintaining live order books, recording trade history, analysing order flow and many more.

If you prefer asyncio, then take a look at my other library: bittrex-websocket-aio <https://github.com/slazarov/python-bittrex-websocket-aio>_.


Documentation http://python-bittrex-websocket-docs.readthedocs.io/en/latest/

Getting started/How-to http://python-bittrex-websocket-docs.readthedocs.io/en/latest/howto.html

Methods http://python-bittrex-websocket-docs.readthedocs.io/en/latest/methods.html

Changelog http://python-bittrex-websocket-docs.readthedocs.io/en/latest/changelog.html#bittrex-websocket

I am constantly working on new features. Make sure you stay up to date by regularly checking the official docs!

Having an issue or a question? Found a bug or perhaps you want to contribute? Open an issue!

Quick Start

.. code:: bash

pip install bittrex-websocket

.. code:: python

#!/usr/bin/python
# /examples/ticker_updates.py

# Sample script showing how subscribe_to_exchange_deltas() works.

# Overview:
# ---------
# 1) Creates a custom ticker_updates_container dict.
# 2) Subscribes to N tickers and starts receiving market data.
# 3) When information is received, checks if the ticker is
#    in ticker_updates_container and adds it if not.
# 4) Disconnects when it has data information for each ticker.

from bittrex_websocket.websocket_client import BittrexSocket
from time import sleep

def main():
    class MySocket(BittrexSocket):

        def on_public(self, msg):
            name = msg['M']
            if name not in ticker_updates_container:
                ticker_updates_container[name] = msg
                print('Just received market update for {}.'.format(name))

    # Create container
    ticker_updates_container = {}
    # Create the socket instance
    ws = MySocket()
    # Enable logging
    ws.enable_log()
    # Define tickers
    tickers = ['BTC-ETH', 'BTC-NEO', 'BTC-ZEC', 'ETH-NEO', 'ETH-ZEC']
    # Subscribe to ticker information
    for ticker in tickers:
        sleep(0.01)
        ws.subscribe_to_exchange_deltas([ticker])

    # Users can also subscribe without introducing delays during invoking but
    # it is the recommended way when you are subscribing to a large list of tickers.
    # ws.subscribe_to_exchange_deltas(tickers)

    while len(ticker_updates_container) < len(tickers):
        sleep(1)
    else:
        print('We have received updates for all tickers. Closing...')
        ws.disconnect()
        sleep(10)

if __name__ == "__main__":
    main()

Order book syncing

.. code:: python

#!/usr/bin/python
# /examples/order_book.py

# Sample script showing how order book syncing works.

from __future__ import print_function
from time import sleep
from bittrex_websocket import OrderBook

def main():
    class MySocket(OrderBook):
        def on_ping(self, msg):
            print('Received order book update for {}'.format(msg))

    # Create the socket instance
    ws = MySocket()
    # Enable logging
    ws.enable_log()
    # Define tickers
    tickers = ['BTC-ETH']
    # Subscribe to order book updates
    ws.subscribe_to_orderbook(tickers)

    while True:
        sleep(10)
        book = ws.get_order_book('BTC-ETH')
        print(book[u'S'][0])
    else:
        pass

if __name__ == "__main__":
    main()

Disclaimer

I am not associated with Bittrex. Use the library at your own risk, I don't bear any responsibility if you end up losing your money.

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].