I am trying to make a request with the python to the Binance API to create a new order (let's say SCRTBUSD) with the following steps:
- I make a request to get the amount of SCRT on my account (I have got 6.72617086)
- Then I make a request about the price of the coin towards BUSD (I have got 4.518). I was trying to use both average and ticker price.
- I multiply both of the values and I am getting the price - 30.38883994
- Then I am sending POST request with the following JSON:
{ "symbol": "SCRTBUSD", "side": "SELL", "type": "LIMIT", "timeInForce": "GTC", "quantity": 6.72617086, "price": 30.38883994, }
The example that I am following: https://github.com/binance/binance-connector-python/blob/master/examples/spot/trade/new_order.py
And then I am getting an error:
Found error. status: 400, error code: -1013, error message: Filter failure: PRICE_FILTER
When I query for the exchangeInfo for SCRTBUSD, I am getting this:
{ 'filterType': 'PRICE_FILTER', 'minPrice': '0.00100000', 'maxPrice': '1000.00000000', 'tickSize': '0.00100000' }
My price is within minimum and maximum prices, so the problem is with tickSize.
What is wrong with my algorithm? And how can I get the right price for the quantity of currency that I am willing to sell?
P.S. I am getting this error for all currencies that I tried.
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments