Skip to content

Commit

Permalink
adjust timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger committed Dec 27, 2024
1 parent 6995248 commit 81489af
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions kraken/base_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ class SessionManager:
"""
Manages the requests-based session for the sync Spot and Futures clients.
Kraken rejects requests that are older than 60 minutes without further
Kraken rejects requests that are older than a certain time without further
information. To avoid this, the session manager creates a new session
every 30 minutes.
every 5 minutes.
"""

HEADERS: Final[dict] = {"User-Agent": "btschwertfeger/python-kraken-sdk"}
Expand All @@ -187,13 +187,12 @@ def __init__(
self: SessionManager,
*,
proxy: str | None = None,
max_session_age: int = 1800,
max_session_age: int = 300,
) -> None:
"""
Initialize the session manager.
:param max_session_age: Maximum session age in seconds (default: 1800s
or 30 minutes)
:param max_session_age: Maximum session age in seconds
:type max_session_age: int
:param proxy: Proxy URL
:type proxy: str, optional
Expand Down Expand Up @@ -229,9 +228,9 @@ class AsyncSessionManager:
"""
Manages aiohttp-based sessions for the async Spot and Futures clients.
Kraken rejects requests that are older than 60 minutes without further
Kraken rejects requests that are older than a certain time without further
information. To avoid this, the session manager creates a new session
every 30 minutes.
every 5 minutes.
"""

HEADERS: Final[dict] = {"User-Agent": "btschwertfeger/python-kraken-sdk"}
Expand All @@ -240,13 +239,12 @@ def __init__(
self: AsyncSessionManager,
*,
proxy: str | None = None,
max_session_age: int = 1800,
max_session_age: int = 300,
) -> None:
"""
Initialize the session manager.
:param max_session_age: Maximum session age in seconds (default: 1800s
or 30 minutes)
:param max_session_age: Maximum session age in seconds
:type max_session_age: int
:param proxy: Proxy URL
:type proxy: str, optional
Expand Down

0 comments on commit 81489af

Please sign in to comment.