binance-public-data | Details on how to get Binance public data | Cryptocurrency library

 by   binance Python Version: Current License: No License

kandi X-RAY | binance-public-data Summary

kandi X-RAY | binance-public-data Summary

binance-public-data is a Python library typically used in Blockchain, Cryptocurrency applications. binance-public-data has no bugs, it has no vulnerabilities and it has medium support. However binance-public-data build file is not available. You can download it from GitHub.

To help users download our public data easily, we've put all Kline, Trade, and AggTrade data for all pairs, month by month, online.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              binance-public-data has a medium active ecosystem.
              It has 1105 star(s) with 388 fork(s). There are 28 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 27 open issues and 160 have been closed. On average issues are closed in 40 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of binance-public-data is current.

            kandi-Quality Quality

              binance-public-data has 0 bugs and 0 code smells.

            kandi-Security Security

              binance-public-data has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              binance-public-data code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              binance-public-data does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              binance-public-data releases are not available. You will need to build from source code and install.
              binance-public-data has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 446 lines of code, 19 functions and 6 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed binance-public-data and discovered the below as its top functions. This is intended to give you an instant insight into binance-public-data implemented functionality, and help decide if they suit your requirements.
            • Download monthly index klines
            • Download a file from a base location
            • Returns the destination directory
            • Convert string to date object
            • Make a POST request
            • Create a signature for a given request
            • Create an argument parser
            • Download monthly trades
            • Send a GET request
            • Get all symbols
            • Download daily aggregation
            • Download daily trades
            • Download daily klines
            • Download monthly aggregations
            • Download monthly klines
            • Download daily mark prices
            • Download daily index klines
            • Download monthly mark priceKlines
            • Download monthly index price klines
            • Download daily index prices
            • Return start and end dates
            Get all kandi verified functions for this library.

            binance-public-data Key Features

            No Key Features are available at this moment for binance-public-data.

            binance-public-data Examples and Code Snippets

            No Code Snippets are available at this moment for binance-public-data.

            Community Discussions

            QUESTION

            Open, High, Low, Close, Volume in PySpark using tick data
            Asked 2021-Nov-25 at 08:52

            how can i transform tick data to OHLCV(Open , High , Low , Close , Volume):

            Current Sample (ticks format)

            ...

            ANSWER

            Answered 2021-Nov-25 at 08:52

            You can associate each row in your dataset to 1 minute windows using window. After, the rows are partitioned using their window and window analytical functions can be applied on them. Finally select the first row from each window.

            A groupBy would not work as first and last are non-deterministic when order is not provided, leading to wrong values for open and close columns.

            I have also included logic to translate epoch to datetime without needing to use UDF.

            I am preserving the timestamp column and using it order within window to have the high precision for finding open and close columns; as the derived datetime column does not include microseconds and the dataset has multiple entries within the same second.

            Working Example

            Source https://stackoverflow.com/questions/70057401

            QUESTION

            Rust mistyping for csv reading
            Asked 2021-Sep-07 at 16:58
            use walkdir::WalkDir;
            use std::ffi::OsStr;
            use rusqlite::{params, Connection, Result};
            use std::error::Error;
            use std::io;
            use std::process;
            use std::path::Path;
            use serde::{Serialize, Deserialize};
            
            #[derive(Debug, Clone, Serialize, Deserialize)]
            pub struct Trade {
                id: usize,
                price: f64,
                quantity: f64,
                quoted_quantity: f64,
                time: i64,
                is_buyer_maker: bool,
                is_best_match: bool,
            }
            
            fn process_csv(file: &Path, db: &Connection) -> Result<(), Box> {
                let mut rdr = csv::Reader::from_path(file)?;
                for result in rdr.records() {
                    match result.deserialize::() {
                        Ok(s) => {
            
                            db.execute("INSERT INTO trades (id, price, quantity, quoted_quantity, time, is_buyer_maker, is_best_match) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)",
                                       params![s.id, s.price, s.quantity, s.quoted_quantity, s.time, s.is_buyer_maker, s.is_best_match])?;
                        },
                        Err(e) => println!("Failed to deserialize: {}", e),
                    }
                }
            }
            
            fn main () -> Result<(), Box> {
                let conn = Connection::open("bot.db")?;
                conn.execute(
                    "CREATE TABLE trades (
                              id              INTEGER PRIMARY KEY,
                              price           REAL NOT NULL,
                              quanity         REAL NOT NULL,
                              quoted_quatity  REAL NOT NULL,
                              time            INTEGER NOT NULL,
                              is_buyer_maker  INTEGER NOT NULL,
                              is_best_match   INTEGER NOT NULL,
                              )",
                    [],
                )?;
                for entry in WalkDir::new("E:/binance-public-data/python/data/spot/monthly/trades/").into_iter().filter_map(|e| e.ok()) {
                    println!("Processing: {}", entry.path().display());
                    if let Err(e) = process_csv(entry.path(), &conn) {
                        println!("Processing failed: {}", e);
                    }
                }
                Ok(())
            }
            
            ...

            ANSWER

            Answered 2021-Sep-07 at 16:58

            Your first error is because you're calling csv's .deserialize() on the wrong variable, it should be called on the reader. Change:

            Source https://stackoverflow.com/questions/69091510

            QUESTION

            Sorting through many files and unzipping them at once
            Asked 2021-Sep-05 at 22:22

            I have a program that currently unzips files in a specific folder. However, I have many files in t that need to be sorted through. In my trades folder there are many coins and each coin has many files. I can get the files in each coin but cannot go through the folders initially for each coin. I need to be able to go through all those files without manually changing the directory to each coin. This is how the files are set up

            ...

            ANSWER

            Answered 2021-Sep-05 at 22:22

            os.listdir gives you the file name in the directory. You would have to rebuild its path from your current directory before accessing the file. os.path.abspath(item) created an absolute path from your current working directory, not the directory holding your zip file.

            You can use glob instead. It will filter out non-zip file extensions and will keep the relative path to the found file so you don't have to fiddle with the path. The pathlib module makes path handling a bit easier than glob.glob and os.path, so I'll use it here.

            Source https://stackoverflow.com/questions/69066348

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install binance-public-data

            We will expand this section with more methods in the future. There are additional helper scripts both in python and shell in their respective folders of this repository.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/binance/binance-public-data.git

          • CLI

            gh repo clone binance/binance-public-data

          • sshUrl

            git@github.com:binance/binance-public-data.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link