Giter Site home page Giter Site logo

TP or SL reached, selling 0.001765 BTCUSDT... APIError(code=-1013): Invalid quantity. about binance-volatility-trading-bot HOT 14 CLOSED

cyberpunkmetalhead avatar cyberpunkmetalhead commented on September 26, 2024
TP or SL reached, selling 0.001765 BTCUSDT... APIError(code=-1013): Invalid quantity.

from binance-volatility-trading-bot.

Comments (14)

jrocaspana avatar jrocaspana commented on September 26, 2024 5

maybe we can do something like (I'm not familiar with python sintaxis so this may not make any sense, but I think you will get the idea)

                buy_limit = client.create_order(
                    symbol = coin,
                    side = 'BUY',
                    type = 'MARKET',
                    quantity = volume[coin]
                )

                volume[coin] = buy_limit['executedQty']

Binance API create order response docs can be found here

from binance-volatility-trading-bot.

phroton avatar phroton commented on September 26, 2024 2

same problem here

from binance-volatility-trading-bot.

dhpatel548 avatar dhpatel548 commented on September 26, 2024

Seems that the purchase qty - fees is not showing when trying to sell, so it results in error.

from binance-volatility-trading-bot.

CyberPunkMetalHead avatar CyberPunkMetalHead commented on September 26, 2024

I have pushed (hopefully) a stability fix for the sell function. Been testing it throughout the day and it's proven to be quite stable my side.

from binance-volatility-trading-bot.

manub avatar manub commented on September 26, 2024

actually by looking at the code it tries to sell the quantity listed in the volume field of coins_bought.json, however if I check my wallet that volume is not correct. e.g. volume states 1.357 while my Binance iOS app says I own 1.355643. could this be the issue?

from binance-volatility-trading-bot.

phroton avatar phroton commented on September 26, 2024

actually by looking at the code it tries to sell the quantity listed in the volume field of coins_bought.json, however if I check my wallet that volume is not correct. e.g. volume states 1.357 while my Binance iOS app says I own 1.355643. could this be the issue?

Are these 0.001357 maybe your transaction fee? @dhpatel548 commented this case before

from binance-volatility-trading-bot.

manub avatar manub commented on September 26, 2024

Yeah - I think a change could be to fetch the actual quantity before pushing the sell order.

from binance-volatility-trading-bot.

pawelantczak avatar pawelantczak commented on September 26, 2024

It can't fetch balance from Binance, since you can have more on your account than bot bought. I have same problem even though I'm paying fees from BNB balance.

from binance-volatility-trading-bot.

phroton avatar phroton commented on September 26, 2024

maybe the API gives the correct value of the purchased coins. Then they could be returned at the end of buy()

from binance-volatility-trading-bot.

dhpatel548 avatar dhpatel548 commented on September 26, 2024

@phroton the API does return the actual qty bought, but seems that is not the value the script is using. It is using the calculated value when buying the coin unless I am reading the code wrong.

from binance-volatility-trading-bot.

phroton avatar phroton commented on September 26, 2024

@phroton the API does return the actual qty bought, but seems that is not the value the script is using. It is using the calculated value when buying the coin unless I am reading the code wrong.

yes, thats right - it returns the volume that has been given to buy() - but thats not the real volume

from binance-volatility-trading-bot.

pawelantczak avatar pawelantczak commented on September 26, 2024

@CyberPunkMetalHead this could be it ^^^

from binance-volatility-trading-bot.

getsec avatar getsec commented on September 26, 2024

Pretty sure this is fixed in latest. Closing old issues so we can start from latest commit.

from binance-volatility-trading-bot.

Temetiu avatar Temetiu commented on September 26, 2024

Using the last version, I still have this issue. Today with different pairs (FIL, XMR, SOL, IOTX, ICP, UTK, XEM, TROY...)
I can identify where in the code, it has been fixed?

from binance-volatility-trading-bot.

Related Issues (20)

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.