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

Filter failure: PRICE_FILTER #4

Closed
cleitondm opened this issue Nov 19, 2020 · 12 comments
Closed

Filter failure: PRICE_FILTER #4

cleitondm opened this issue Nov 19, 2020 · 12 comments

Comments

@cleitondm
Copy link

error

bid_price: 17984.08, ask_price: 17984.09
buy orders: []

sell orders: []
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400
{'code': -1013, 'msg': 'Filter failure: PRICE_FILTER'} 400

config

"platform": "binance_future",
"symbol": "BTCUSDT",
"api_key": "....",
"secret": "...",
"gap_percent": 0.020,
"quantity": 20,
"min_price": 0.001,
"min_qty": 0.01,
"max_orders": 10
}

@51bitquant
Copy link
Owner

it's obvious that your config was not correct. In Binance Exchange, the min_price for symbol BTCUSDT is 0.01, you can check it in website or app.

@Pat2018-1
Copy link

i am having the same issue
bid_price: 512.48, ask_price: 512.49, 时间: 2020-11-20 19:03:10.552159
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
没有买单,根据盘口下买单: None, 时间: 2020-11-20 19:03:12.014032
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
没有卖单,根据盘口下卖单:None , 时间: 2020-11-20 19:03:13.547160

@cleitondm
Copy link
Author

"plataforma": "binance_future",
"símbolo": "BTCUSDT",
"api_key": "....",
"segredo": "...",
"gap_percent": 0,020,
"quantidade": 20,
" min_price ": 0,01,
" min_qty ": 0,01,
" max_orders ": 10
}

error =(

@Pat2018-1
Copy link

found the solution change this "quantity": 20, to a smaller one

@51bitquant
Copy link
Owner

i am having the same issue
bid_price: 512.48, ask_price: 512.49, 时间: 2020-11-20 19:03:10.552159
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
没有买单,根据盘口下买单: None, 时间: 2020-11-20 19:03:12.014032
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
请求没有成功: 400, 继续尝试请求
没有卖单,根据盘口下卖单:None , 时间: 2020-11-20 19:03:13.547160

你的请求发生了400的错误,检查下你的网络,需要翻墙。记得设置全局。
it's obvious that you encounter the bad connection by firewall.

@51bitquant
Copy link
Owner

found the solution change this "quantity": 20, to a smaller one

the config file details:

  1. platform, trading platform, place 'binance_spot' or 'binance_future', default is binance_spot, if you want to trade future, replace it with 'binance_future'

  2. symbol: BTCUSDT, BNBUSDT etc.

  3. api_key : api key, get it from binance website

  4. api_secret: api secret, get it from binance website

  5. gap_percent: price gap for each order, or profit

  6. quantity : trading quantity

  7. min_price: price filter, for BTCUSDT is 0.01, for BNBUSDT is 0.0001, check it from binance market depth

  8. min_qty: the minimum trading volume , for spot market the min volume is 10USDT equivalent order , for future, the BTCUSDT is 0.001 btc.

  9. max_orders: number of order for one side(sell or buy)

@cleitondm
Copy link
Author

I see that you have made good changes.
more when using the futures market it always returns the message
The request was unsuccessful: 400, Keep trying to request

@cleitondm
Copy link
Author

Error current
{'code': -4061, 'msg': "Order's position side does not match user's setting."}

Just don't know how to fix see

https://dev.binance.vision/t/enable-hedge-mode-on-futures-api/59

@51bitquant
Copy link
Owner

Error current
{'code': -4061, 'msg': "Order's position side does not match user's setting."}

Just don't know how to fix see

https://dev.binance.vision/t/enable-hedge-mode-on-futures-api/59

The code for the future not support the dual position, only support the net position. You can set your position to net position or you can modify the binance_future.py for dual position. Remember to download the latest code.

@cleitondm
Copy link
Author

Erro atual
{'code': -4061, 'msg': "O lado da posição do pedido não corresponde à configuração do usuário."}
Só não sei como consertar, veja
https://dev.binance.vision/t/enable-hedge-mode-on-futures-api/59

O código para o futuro não suporta a posição dupla, apenas suporta a posição líquida. Você pode definir sua posição para posição líquida ou pode modificar o binance_future.py para posição dupla. Lembre-se de baixar o código mais recente.

I'm just running your codigonofofmodifications。
need to change something in binace?

@cleitondm
Copy link
Author

Solution 👍

def change_positionSide(self):
path = "/fapi/v1/positionSide/dual"
params = {"dualSidePosition": "False", "timestamp": self._timestamp()}

    return self.request(RequestMethod.POST, path=path, requery_dict=params, verify=True)

@51bitquant
Copy link
Owner

Solution 👍

def change_positionSide(self):
    path = "/fapi/v1/positionSide/dual"
    params = {"dualSidePosition": "False", "timestamp": self._timestamp()}

    return self.request(RequestMethod.POST, path=path, requery_dict=params, verify=True)

yes, that is the same as in the website, you can close the dual position through website or api.

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

3 participants