node-binance-api | Node Binance API is an asynchronous node | Cryptocurrency library

 by   jaggedsoft JavaScript Version: v0.13.0 License: MIT

kandi X-RAY | node-binance-api Summary

kandi X-RAY | node-binance-api Summary

node-binance-api is a JavaScript library typically used in Blockchain, Cryptocurrency, Bitcoin, Nodejs applications. node-binance-api has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i ypmei-binance-api' or download it from GitHub, npm.

This project is designed to help you make your own projects that interact with the Binance API. You can stream candlestick chart data, market depth, or use other advanced features such as setting stop losses and iceberg orders. This project seeks to have complete API coverage including WebSockets.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              node-binance-api has a medium active ecosystem.
              It has 1518 star(s) with 774 fork(s). There are 63 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 254 open issues and 398 have been closed. On average issues are closed in 159 days. There are 38 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of node-binance-api is v0.13.0

            kandi-Quality Quality

              node-binance-api has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              node-binance-api 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

              node-binance-api releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed node-binance-api and discovered the below as its top functions. This is intended to give you an instant insight into node-binance-api implemented functionality, and help decide if they suit your requirements.
            • Set counter options
            • Get the balances
            • Performs a GET request to an endpoint
            • Get a bookicker
            • Explore the application balance
            Get all kandi verified functions for this library.

            node-binance-api Key Features

            No Key Features are available at this moment for node-binance-api.

            node-binance-api Examples and Code Snippets

            No Code Snippets are available at this moment for node-binance-api.

            Community Discussions

            QUESTION

            Binance API Withdrawal Error: "Signature for this request is not valid."
            Asked 2022-Feb-18 at 20:15

            I'm facing an issue with the Binance API

            Whenever I try to make a request for withdrawal, it returns "Signature for this request is not valid." error message, even though if with the same function I make a request for the account info, Funding balance, getAll balances or whatever, it works.

            I already tried several solutions, but nothing seemed to work. This are some of my tries reading similar issues

            • Works with endpoints like "api/v3/account" or "sapi/v1/capital/config/getall"
            • Sending the signature and the params in the body (it returns "You are not authorized to execute this request" error message, I think is because is not reading the body, only query params)
            • Activate all permissions for the API, and check the API
            • Send in the query the param "name"
            • Using Node packages like node-binance-api (It's not up to date with the request for withdrawals)
            • Changing scripts in librery node-binance-api to the actual api for withdrawals (same error as doing it myself)

            I'm using NodeJs, axios to make the requests. This is my function:

            ...

            ANSWER

            Answered 2022-Feb-18 at 20:15

            For anyone having this problem, the issue was that I was sending the request inside the "params" instead of the url, weirdly enough, it didn't proccess it correctly, so make this small change:

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

            QUESTION

            Nest JS resolving promises from Binance API
            Asked 2021-May-10 at 16:04

            I am trying to create an api that connects into the Binance API using node and in particular NestJs.

            In my controller I have @Get('candles') endpoint and call it by going to localhost:5000/candles. I am expecting it to return an object containing all the candleData retrieved from the Binance API. I am using the npm package node-binance-api.

            I know the binance.candlesticks("BTCGBP", "4h", async (error, ticks, symbol) = {... I am using is getting the data as inside I log the data received and show candleData.length in the console and it returns 100 candles as requested.

            My issue is resolving the promise that this npm package returns so that I can return it via the /candles endpoint. I am used to angular and observables and I am getting a bit confused by async and await.

            app.controller.ts

            ...

            ANSWER

            Answered 2021-May-10 at 16:04

            You are so close , just missing the async/await to wait for the value before return.

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

            QUESTION

            Filter JSON API response
            Asked 2021-May-06 at 16:12

            I'm using node-binance-api to pull some Binance balance data. The API call returns all of the currencies, and I want to filter it to only include those where I have a balance.

            Code:

            ...

            ANSWER

            Answered 2021-May-06 at 16:03

            Lodash's _.filter, even when passed an object, returns an array.

            _.filter

            Iterates over elements of collection, returning an array of all elements predicate returns truthy for.

            If you want an object of the same format but "filtered" one way would be to iterate over the keys of the object, test that properties value, then assign or not to a new object.

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

            QUESTION

            Get number of open orders for a symbol using Binance's Node.js API
            Asked 2021-Mar-21 at 19:05

            I am using Binance's Node.js API. It says regarding "Get open orders for a symbol", I should do:

            ...

            ANSWER

            Answered 2021-Mar-21 at 19:05

            You'll need to use either completely async approach or use callbacks.

            The last block in your question shows exactly what this answer explains. Javascript doesn't wait for Promise to resolve/reject in a synchronous context. So your "async" block returned the unresolved Promise and the rest of your (synchronous) code didn't wait for it to resolve.

            Example of using async functions

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

            QUESTION

            Extract the price and sign it up for variable using javascript and node?
            Asked 2021-Jan-17 at 18:21

            I am using node-binance-api the follwoing function bring me all details of my last order:

            ...

            ANSWER

            Answered 2021-Jan-17 at 18:21

            Looks like you're getting an array of trades, which means there'll be multiple prices.

            If you need a collection of prices of all trades, you could assign those prices to a prices variable like so:

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

            QUESTION

            Binance - msg: 'Signature for this request is not valid.'
            Asked 2021-Jan-07 at 17:05

            I've been trying to make an API request to the Binance using NodeJs API as per this documentation but I keep getting the following response and I don't know why.

            ...

            ANSWER

            Answered 2021-Jan-07 at 17:05

            According to Binance API documentation, signature is required for the endpoint which you try to access.

            Hence include your signature in the request body inorder to get a valid response. Which means that you must sign your request using the HMAC SHA256 standard.

            If the error still persists, I highly suggest you to use the official API of Binance instead of using some other random libraries.

            You can get more information here

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

            QUESTION

            async/await in for loop javascript.
            Asked 2020-Oct-06 at 12:35
             total_arr={}
                total=0    
                data={"a":1,"b":2,"c":3}
            const Binance = require('node-binance-api');
                const binance = new Binance().options({
                  APIKEY: '',
                  APISECRET: ''
                });   
                 async function trigger(){
                        async function trig() {     
                        for (keys in data){ 
                         var x= await binance.futuresMarketBuy( 'BNBUSDT', data[keys] )      
                         var x2= await binance.futuresMarketBuy( 'BTCUSDT', x )               
                         total_arr["buy"+keys]=x+x2;
                 } 
                    }
                        async function trig2() { 
                         var y =await binance.futuresMarketSell( 'BNBUSDT', data[keys] ) 
                         var y2= await binance.futuresMarketSell( 'BTCUSDT', y )            
                         total_arr["sell"+keys]=y; 
                } 
                      async function trigger(){
                     for (keys in data){ 
                      await trig();  /*I want to run trig() and trig2() asynchronously */
                      await trig2();  
                } 
             for (iterat in data) await { 
                 total=total+data[iterat] /*AFTER trig() and trig2() have COMPLETELY run in for loop, I want                                                     
                                            to add them up this way*/
             } 
            console.log(total)
            } 
              }
                trigger(); 
            
            ...

            ANSWER

            Answered 2020-Oct-06 at 12:35

            QUESTION

            NodeJS variable scope, functions and callbacks
            Asked 2020-Apr-10 at 14:55

            i've a code like this:

            ...

            ANSWER

            Answered 2020-Apr-10 at 14:55

            So I haven't tested this code, I've never used this Binance API wrapper before but I would imagine this should work/is what you're asking.

            I've wrapped that call in a promise so that when you hit the route it will wait until the call to Binance completes, and it will return with either the error if there is one or your balances, illustrated in the documentation for node-binance-api like below:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install node-binance-api

            You can install using 'npm i ypmei-binance-api' or download it from GitHub, npm.

            Support

            Verify that your system time is correct. If you have any suggestions don't hesitate to file an issue.
            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/jaggedsoft/node-binance-api.git

          • CLI

            gh repo clone jaggedsoft/node-binance-api

          • sshUrl

            git@github.com:jaggedsoft/node-binance-api.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