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

OKX perpetual - Unexpected error while fetching last fee payment #6953

Open
rapcmia opened this issue Apr 5, 2024 · 0 comments
Open

OKX perpetual - Unexpected error while fetching last fee payment #6953

rapcmia opened this issue Apr 5, 2024 · 0 comments

Comments

@rapcmia
Copy link
Contributor

rapcmia commented Apr 5, 2024

Describe the bug

When running tests on funding rate script on development, we encounter this issue on OKX Perpetual when fetching last fee payment

2024-04-05 05:32:00,429 - 462009 - hummingbot.connector.derivative.okx_perpetual.okx_perpetual_derivative.OkxPerpetualDerivative - NETWORK - Unexpected error while fetching last fee payment for GAS-USDT.
Traceback (most recent call last):
  File "/home/ralph/github/hummingbot/6943/hummingbot/connector/perpetual_derivative_py_base.py", line 403, in _update_funding_payment
    timestamp, funding_rate, payment_amount = await self._fetch_last_fee_payment(trading_pair=trading_pair)
  File "/home/ralph/github/hummingbot/6943/hummingbot/connector/derivative/okx_perpetual/okx_perpetual_derivative.py", line 833, in _fetch_last_fee_payment
    raw_response: Dict[str, Any] = await self._api_get(
  File "/home/ralph/github/hummingbot/6943/hummingbot/connector/exchange_py_base.py", line 863, in _api_get
    return await self._api_request(*args, **kwargs)
  File "/home/ralph/github/hummingbot/6943/hummingbot/connector/derivative/okx_perpetual/okx_perpetual_derivative.py", line 873, in _api_request
    resp = await rest_assistant.execute_request(
  File "/home/ralph/github/hummingbot/6943/hummingbot/core/web_assistant/rest_assistant.py", line 47, in execute_request
    response = await self.execute_request_and_get_response(
  File "/home/ralph/github/hummingbot/6943/hummingbot/core/web_assistant/rest_assistant.py", line 100, in execute_request_and_get_response
    raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request GET https://www.okx.com/api/v5/account/bills. HTTP status is 429. Error: {"msg":"Too Many Requests","code":"50011"}

Steps to reproduce

  1. Setup a v1 (perpmm) or v2(dman_v3 or bollinger_v1) strategy using okx_perpetual
  2. Start strategy and observe behavior when an opportunity to open a position
  3. When a position is open, dont close it for the next 1-3hrs or

Release version

dev-1.27.0

Type of installation

Source

Attach required files

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant