Binance_Futures_python | Binance Futures Python SDK , a lightweight python | Cryptocurrency library

 by   Binance-docs Python Version: Current License: MIT

kandi X-RAY | Binance_Futures_python Summary

kandi X-RAY | Binance_Futures_python Summary

Binance_Futures_python is a Python library typically used in Blockchain, Cryptocurrency applications. Binance_Futures_python has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

This is Binance Futures Python SDK, a lightweight python library. You can import to your python project and use this SDK to query all market data, trading and manage your account. The SDK supports both synchronous RESTful API invoking and subscribing the market data and the user's private data from the websocket connection.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Binance_Futures_python has a low active ecosystem.
              It has 407 star(s) with 229 fork(s). There are 41 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 81 open issues and 21 have been closed. On average issues are closed in 18 days. There are 14 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Binance_Futures_python is current.

            kandi-Quality Quality

              Binance_Futures_python has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              Binance_Futures_python is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              Binance_Futures_python releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              Binance_Futures_python saves you 4457 person hours of effort in developing the same functionality from scratch.
              It has 9593 lines of code, 1025 functions and 282 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed Binance_Futures_python and discovered the below as its top functions. This is intended to give you an instant insight into Binance_Futures_python implemented functionality, and help decide if they suit your requirements.
            • Deserialize a new AccountInformation object
            • Parse a Position object
            • Deserialize a JSON object into a Asset object
            • Parse a new accountInformationV2
            • Creates a AssetV2 object from the json data
            • Parse a PositionV2
            • Calls the callback function
            • Unsubscribe all connections
            • Post an order
            • Creates a RestApiRequest object
            • Subscribe to all mark price events
            • Gets mark price data
            • Request Candlestick data
            • Gets BLTCandlestick data
            • Gets the price change statistics for a symbol
            • Returns a list of Candlestick data for a pair
            • Returns a list of bids for a given pair
            • Cancel list orders
            • Get all orders
            • Returns a list of aggregate trades
            • Get a list of account trades
            • Called when a message is received
            • Call sync API
            • Gets continuous kline data
            • Construct a new AccountUpdate object from a JSON response
            • Print data
            Get all kandi verified functions for this library.

            Binance_Futures_python Key Features

            No Key Features are available at this moment for Binance_Futures_python.

            Binance_Futures_python Examples and Code Snippets

            No Code Snippets are available at this moment for Binance_Futures_python.

            Community Discussions

            QUESTION

            Issue With Getting Values from a List of Objects into a Readable Dataframe
            Asked 2021-May-27 at 06:23

            I've been running into this same problem for the last few days, googling everything and searching for answers on this forum, but nothing I'm trying is seeming to work. I've been following tutorials other people have posted and they're able to do this very simply, but I run into multiple problems when I try it from multiple angles. I've got my head so tangled up from all the things I've tried that I'm not even sure what's happening or what I've done anymore. This isn't all of the code, but this should be the only relevant code because the other parts do other functions, but I apologize if I missed anything.

            Basically, I'm grabbing historical financial candlestick data from a website, trying to put it into a Pandas dataframe, and then use that dataframe to make charts with Plotly. I get the data as 'result', PyCharm outputs the data just fine into the 'Run' box, but now I need to save that data, so I have Pandas turn 'result' into a dataframe as 'priceData', and convert that to 'pricedata.csv'. When I open that CSV file, all I get is a list from 0 to 1439 (I'm importing 1440 1 minute candlesticks at a time), and each candlestick only shows the object reference (, or similar). That's obviously not what I'm after, I need the data within the candlesticks, which should be made up of 12 pieces of data (open time, open, low, close, high, etc...). When the chart function runs, it comes back with "AttributeError: 'DataFrame' object has no attribute 'high'", which I assume is because it's accessing that candlestick object ID and not the values.

            I can get the specific values by going in-depth, and calling for it to save result[0].high, or result[0].low, etc. But then I have to iterate through 1440 candlesticks of data and write/save them all separately, and then bring together the high/low/open/close/time/etc of each of them to be able to plot, which is far more complicated than what the tutorials I've watched do. They're able to literally just use the dataframe right away to plot with no troubles, they don't run into the attribute error, it's like it just identifies the columns correctly for them. But when I look at the columns of 'result', there's 1440 columns (again one for each candlestick), but I would think it should be 12 columns for the 12 different bits of data each candlestick is made up of. I've tried transposing the columns and rows, but that doesn't work either.

            Even if I try to get the whole candlestick data for just one object, by specifying "result[0]" without specifying the .high/.low/etc, I run into the same attribute error. Some things recommended to specify what the columns are, so that's what the hashed out "priceData.columns" is for, where I identify what each column is. But then I get "Length mismatch: Expected axis has 1440 elements, new values have 12 elements".

            I'm really confusing myself and going in circles at this point, can anyone help point me in the right direction and tell me what I'm screwing up on? Thank you in advance to anyone who takes the time to even read this, or has any direction they can offer.

            ...

            ANSWER

            Answered 2021-May-27 at 06:21

            The way you are currently getting the candlestick data, result is a list of Candlestick objects, and each object has attributes that can be individually accessed, such as result[0].high as you pointed out. It sounds like you want to unpack all of these attributes and put them into a DataFrame.

            To obtain all of the attributes of an object, such as all 12 attributes of the Candlestick object in a dictionary, you can use result[0].__dict__ which returns: {'openTime': 1609473600000, 'open': '29302.11', 'high': '29356.04', 'low': '29302.10', 'close': '29344.00', 'volume': '170.018', 'closeTime': 1609473659999, 'quoteAssetVolume': '4988200.62513', 'numTrades': 1045, 'takerBuyBaseAssetVolume': '139.291', 'takerBuyQuoteAssetVolume': '4086412.01157', 'ignore': '0'}

            To get a list of these dictionaries from result, you can use a list comprehension: [candlestick_obj.__dict__ for candlestick_obj in result], and pd.DataFrame allows you to construct a DataFrame from such a list of dictionaries so priceData = pd.DataFrame([candlestick_obj.__dict__ for candlestick_obj in result]) will create a DataFrame with columns for the keys in each of the dictionaries with 1 row for each list item.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install Binance_Futures_python

            For Beta version, please import the source code directly. The example code is in python3/example. To install by source code, run below command.

            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-docs/Binance_Futures_python.git

          • CLI

            gh repo clone Binance-docs/Binance_Futures_python

          • sshUrl

            git@github.com:Binance-docs/Binance_Futures_python.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