Giter Club home page Giter Club logo

binance-websocket's Introduction

Binance WebSocket

This repository provides a Python implementation for streaming Spot data from Binance using WebSocket. For other financial derivatives, please pay attention to the different API endpoints.

Documentation

For detailed documentation regarding the Binance WebSocket API, please refer to the official Binance API documentation.

Files Included

This repository includes the following files:

  • bookticker-async-single.py: Streams real-time 'bookTicker' data asynchronously.
  • bookticker-single.py: Streams real-time 'bookTicker' data using threading.
  • orderbook-depth-single.py: Streams top-level 'depth' data using threading.
  • local-orderbook-data-parquet-single.py: Saves depth updates asynchronously, and orderbook snapshots for construction of local orderbook as Parquet files.
  • local-orderbook-data-txt-single.py: Saves depth updates asynchronously, and orderbook snapshots for construction of local orderbook as text files.

Data Storage

The files (bookticker-async-single.py, bookticker-single.py, orderbook-depth-single.py) store retrieved information in CSV files, capturing data in 10-minute intervals. This allows capturing the entire day in multiple 10-minute intervals for better analysis and retrieval.

The local-orderbook-data-parquet-single.py saves Parquet files for depth updates and snapshots separately at approximately 10-minute intervals.

The local-orderbook-data-txt-single.py saves text files for depth updates and snapshots separately in one file per day.

Additional Information

Historical trades for a specific period can be downloaded via the command-line interface using the following command. For example, to download all trades for the currency pair ETHUSDT in January 2024:

curl -OJL "https://data.binance.vision/data/spot/monthly/trades/ETHUSDT/ETHUSDT-trades-2024-01.zip"

Feel free to explore the code and adapt it to your specific requirements.

If you have any questions or need further assistance, please don't hesitate to reach out.

Happy coding!

binance-websocket's People

Contributors

pjschneicmu avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

sharavsambuunev

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.