Coder Social home page Coder Social logo

Please help me! After starting the program, it works until the purchase is made, and then it returns an error. python main.py --account binanceaccount1 --exchange binance --pair BTCUSDT --strategy Sample about alpha-rptr HOT 6 CLOSED

thefourgreaterrors avatar thefourgreaterrors commented on May 23, 2024
Please help me! After starting the program, it works until the purchase is made, and then it returns an error. python main.py --account binanceaccount1 --exchange binance --pair BTCUSDT --strategy Sample

from alpha-rptr.

Comments (6)

TheFourGreatErrors avatar TheFourGreatErrors commented on May 23, 2024

Hello, this error is regarding proper decimals/rounding which the exchange is expecting you to make before sending orders, in your case it seems you are using a market order, therefore there isnt an issue with the price level(limit orders could trigger this error for the limit parameter not being properly rounded) but quantity, respectively the size of your order. Basically every pair has different precision specification, so you need to take care of proper rounding in your case it would be rounding the quantity qty parameter in self.exchange.entry("Long", True, lot/20) entry function call, both for long and short entries. You could round the lot calculation lot = self.exchange.get_lot() like this for instanace lot = round(self.exchange.get_lot(), 3), which should round the lot quantity calculation (which is based on your balance) to 3 decimals.

from alpha-rptr.

dapsi0404 avatar dapsi0404 commented on May 23, 2024

Thank you, it's me who needs to make a change to strategy.py?

from alpha-rptr.

TheFourGreatErrors avatar TheFourGreatErrors commented on May 23, 2024

For now, yes you need to modify it yourself and use round_decimals parameter in function calls for other functions as well, when available. I will update the documentation eventually, there is a lot of changes coming so it will be a part of a major update sometime in the future.

from alpha-rptr.

dapsi0404 avatar dapsi0404 commented on May 23, 2024

Hello, You can show in the code where you need to make a change to make the program work correctly, thank you in advance!

from alpha-rptr.

TheFourGreatErrors avatar TheFourGreatErrors commented on May 23, 2024

Please be more specific about which strategy you would like to use and what exactly do you want. Is it only the rounding issue or do you need help with utilizing other functionality? Actually I would prefer, if we could talk in more detail on the dedicated discord server, because its more practical for instructions of that sort, please join https://discord.gg/ah3MGeN this discord server, if its not a problem for whatever reason. But in general you find lot variable in strategy.py in your chosen strategy class and inside of strategy function definition, usually among the first couple of variables. Then you can change it the way i described above or modify it to more closely meet your criteria.

from alpha-rptr.

dapsi0404 avatar dapsi0404 commented on May 23, 2024

python main.py --account binanceaccount1 --exchange binance --pair BTCUSDT --strategy Sample

from alpha-rptr.

Related Issues (9)

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.