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

Price Filter tickSize problem on creating an order #284

Closed
caebwallace opened this issue Aug 26, 2021 · 8 comments · Fixed by #296
Closed

Price Filter tickSize problem on creating an order #284

caebwallace opened this issue Aug 26, 2021 · 8 comments · Fixed by #296
Labels
bug Something isn't working

Comments

@caebwallace
Copy link
Contributor

Version

v0.0.76 (9119c6d)

Description

As the ticksize in 0.1 and the create order use 2 decimals, there is a 'PRICE_FILTER' error.
https://api.binance.com/api/v3/exchangeInfo?symbol=AAVEUSDT

AAVEUSDT Buy Action Grid Trade #1 (12:10:50.056): STOP_LOSS_LIMIT
- Order Params: 
{
  "orderParams": {
    "symbol": "AAVEUSDT",
    "side": "buy",
    "type": "STOP_LOSS_LIMIT",
    "quantity": 1.3895,
    "stopPrice": 359.14,
    "price": 359.49,
    "timeInForce": "GTC"
  }
}
Execution failed (12:10:50.789)
Job: Trailing Trade
Code: -1013
Message:
Filter failure: PRICE_FILTER
- Current API Usage: 366

To Reproduce

Place a manual limit BUY order to AAVEUSDT with a 2 decimals price.

@caebwallace caebwallace added the bug Something isn't working label Aug 26, 2021
@habibalkhabbaz
Copy link
Contributor

habibalkhabbaz commented Aug 26, 2021

Hello @caebwallace
This is happening because the tick size got updated by Binance and not updated in the bot.

Temporarily fix:
Go to Global Settings and just click Save Changes then Apply to global only.
This will refresh exchange info for all symbols.

@caebwallace
Copy link
Contributor Author

No effect, continues to display 2 decimals on AAVE after applying Apply to global only
And manual BUY order has the issue (even bot trigger as AAVEUSDT is dropping now ^^)

@chrisleekr
Copy link
Owner

chrisleekr commented Aug 26, 2021

I had the same issue last night.

The issue was as @habibalkhabbaz mentioned.
But that was not fixing all issues.

A quick fix is to remove the symbol information when saving Global Settings.
This will be released as v0.0.77.

A proper fix will be periodically refreshing the exchange/symbol information. I will add the proper fix later.

Updated:

Docker image has been released.

Restart with a new image

docker-compose -f docker-compose.server.yml pull
docker-compose -f docker-compose.server.yml up -d

And then Go to Global Settings and just click Save Changes then Apply to global only.

Let me know how it goes, and close the issue if it's resolved.

@habibalkhabbaz
Copy link
Contributor

Thank you @chrisleekr for the quick fix 💪
I think the proper fix would be changing the permanent Redis cache to TTL Redis cache for 12 hours in getSymbolInfo (12 hours is enough for caching symbol info)
So that, when a symbol is trying to retrieve its info from getSymbolInfo and the TTL is expired, it will retrieve the new info from API.

@chrisleekr
Copy link
Owner

@habibalkhabbaz Yeah, I agree. Unfortunately, I am using HSET to save the symbol info which is not possible to set EXPIRE.
So I will figure out a different way.

@chrisleekr
Copy link
Owner

I assume the issue is resolved. I will close the issue.

@caebwallace
Copy link
Contributor Author

Yep, will test that this afternoon !

@caebwallace
Copy link
Contributor Author

caebwallace commented Aug 28, 2021

To confirm you that v0.0.77 fix that issue on Apply to global only
=> perhaps we could add a cronjob that runs every 6 hours (or better every hour), cleans redis trailing-trade-symbols.symbol-info and refresh exchangeInfos for all selected symbols ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants