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

querying instant exchange orders triggers the rate limit #193

Closed
dreacot opened this issue Oct 17, 2023 · 7 comments · Fixed by #323
Closed

querying instant exchange orders triggers the rate limit #193

dreacot opened this issue Oct 17, 2023 · 7 comments · Fixed by #323
Assignees
Labels
bug Something isn't working

Comments

@dreacot
Copy link
Member

dreacot commented Oct 17, 2023

we seem to be query the cex api's too frequently

2023-10-17 14:06:53.122 [ERR] SHWL: Error getting order info: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-10-17 14:06:53.122 [ERR] SHWL: Error checking for exchange updates: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-10-17 14:07:07.997 [INF] BTC: Current sync progress update is on block 812661, target sync block is 812661
2023-10-17 14:07:13.793 [ERR] SHWL: Error getting order info: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-10-17 14:07:13.793 [ERR] SHWL: Error checking for exchange updates: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-10-17 14:07:34.026 [ERR] SHWL: Error getting order info: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-10-17 14:07:34.026 [ERR] SHWL: Error checking for exchange updates: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-10-17 14:07:49.027 [ERR] SHWL: Error syncing exchange server: failed to sync exchange server [{flypme {false    }}] after 3 attempts
2023-10-17 14:07:49.027 [ERR] UI: Error syncing instant swap: failed to sync exchange server [{flypme {false    }}] after 3 attempts
@dreacot
Copy link
Member Author

dreacot commented Oct 17, 2023

i noticed this while reviewing #177

@dreacot dreacot added the bug Something isn't working label Oct 17, 2023
@ukane-philemon
Copy link
Collaborator

We can utilize an exchange rate cache and WebSocket connection(if available) like in #177. But to keep the scope small, this can be implemented in another PR.

@ukane-philemon ukane-philemon self-assigned this Oct 17, 2023
@dreacot
Copy link
Member Author

dreacot commented Oct 17, 2023

Another PR, is fine, but it should follow immediately after #177

It should be better for 177, to leave out exchange rate query for the cex pages, i think that would be better, rather that introducing a regression into the codebase.

@ukane-philemon
Copy link
Collaborator

ukane-philemon commented Oct 17, 2023

It should be better for 177, to leave out exchange rate query for the cex pages

Uhmm, can you shed more light on this?

@dreacot
Copy link
Member Author

dreacot commented Oct 17, 2023

It should be better for 177, to leave out exchange rate query for the cex pages

Uhmm, can you shed more light on this?

It seems the centralized exchange pages were modified to work with the websockets? And that's what causing the cex apis to reach reate limit

@ukane-philemon
Copy link
Collaborator

ukane-philemon commented Oct 17, 2023

It seems the centralized exchange pages were modified to work with the websockets? And that's what causing the cex apis to reach reate limit

Oh, now I understand. Yes, the page is refreshed and since caches are not yet implemented for CEX we end up with multiple requests.

I've increased the notification interval in #177.

@dreacot
Copy link
Member Author

dreacot commented Nov 1, 2023

still getting this as of today

2023-11-01 11:34:59.220 [ERR] SHWL: Error getting order info: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-11-01 11:34:59.220 [ERR] SHWL: Error checking for exchange updates: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-11-01 11:35:19.381 [ERR] SHWL: Error getting order info: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-11-01 11:35:19.381 [ERR] SHWL: Error checking for exchange updates: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-11-01 11:35:39.550 [ERR] SHWL: Error getting order info: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-11-01 11:35:39.550 [ERR] SHWL: Error checking for exchange updates: instantSwap.GetOrderInfo: exchangeclient:error:429 Too Many Requests
2023-11-01 11:35:54.550 [ERR] SHWL: Error syncing exchange server: failed to sync exchange server [{flypme {false    }}] after 3 attempts
2023-11-01 11:35:54.550 [ERR] UI: Error syncing instant swap: failed to sync exchange server [{flypme {false    }}] after 3 attempts

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
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants