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

Float problem #8

Closed
bestlinkXx opened this issue Dec 20, 2017 · 7 comments
Closed

Float problem #8

bestlinkXx opened this issue Dec 20, 2017 · 7 comments

Comments

@bestlinkXx
Copy link

Hi, How is it possible to fix this problem ?

File "C:\Users\Julien\Desktop\binance-trader-master\trader.py", line 117, in action
lastPrice = get_ticker(symbol)
File "C:\Users\Julien\Desktop\binance-trader-master\trader.py", line 101, in get_ticker
return float(ret["lastPrice"])
KeyError: 'lastPrice'

@bestlinkXx
Copy link
Author

Even if I try .get() It doen't work.

@yasinkuyu
Copy link
Owner

Which symbol?

@bestlinkXx
Copy link
Author

I can't put any symbol. I didn't modify your script. That's why it was weird.

@bestlinkXx
Copy link
Author

I think it's : WTCBTC

@bestlinkXx
Copy link
Author

I think all the problem is here :

File "C:\Users\Julien\Desktop\binance-trader-master\trader.py", line 191, in
main()
File "C:\Users\Julien\Desktop\binance-trader-master\trader.py", line 170, in main
name = raw_input()
EOFError: EOF when reading a line

Because we can't input any symbol.
That's why we can't catch lastPrice

@bestlinkXx
Copy link
Author

Finally I fix problem,

My main problem it's too have correct buying price.

price:0.00031565 buyp:0.00031254 sellp:0.00031596-bid:0.00031253 ask:0.00031597 BTC:$14711.0


Order Id: 11725097
Percentage of 1 profit. Order created from 0.00031596. Profit: 0.00000342 BTC
#####################
Target sell price: 0.00031567
Orders
Order: 11725097: 0.000312 4.000000 0.000000
Sales were made at 0.00031596 price.

Error: Account has insufficient balance for requested action.
[Finished in 101.4s]

Why I don't have same order between 0.00031596 and 0.000312 ?

@yasinkuyu
Copy link
Owner

64fa993

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

2 participants