Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a certain percent to close and using whole balance. #19

Open
2x2lcallingcq opened this issue Dec 22, 2022 · 0 comments
Open

adding a certain percent to close and using whole balance. #19

2x2lcallingcq opened this issue Dec 22, 2022 · 0 comments

Comments

@2x2lcallingcq
Copy link

Hello, I have a Python bot going for binanceus I am looking to make it so that when I create a limit sell order it might add a certain percent to the close so it gets filled faster. Also Looking to see how I can sell my whole balance instead of just a set amount. Thanks!

import ccxt
import config

binanceus = ccxt.binanceus({
'apiKey': config.API_KEY,
'secret': config.API_SECRET,

})
def trade_crypto(request):
data = request.get_json()

tickers = {
'DOGEUSD': 'DOGE/USD'
}

ticker = tickers[data['ticker']]
order = binanceus.create_limit_sell_order(ticker, 9393, data['close'])

return order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant