pybotters.helpers.GMOCoinHelper¶
- class pybotters.helpers.GMOCoinHelper(client: Client)¶
Post-maintenance reconnection helper for GMO Coin.
- パラメータ:
client (Client) -- pybotters.Client
Methods
__init__(client)Post-maintenance reconnection helper for GMO Coin.
Helper for
POST /private/v1/ws-auth.extend_access_token(token)Helper for
PUT /private/v1/ws-auth.manage_ws_token(ws, token[, delay])Manage the access token for the WebSocket connection.
- async create_access_token() str¶
Helper for
POST /private/v1/ws-auth.- 例外:
GMOCoinResponseError -- Response error.
- 戻り値:
Created access token.
- 戻り値の型:
- async extend_access_token(token: str) None¶
Helper for
PUT /private/v1/ws-auth.- パラメータ:
token (str) -- Access token to extend
- 例外:
GMOCoinResponseError -- Response error.
- async manage_ws_token(ws: WebSocketApp, token: str, delay: float = 300.0) NoReturn¶
Manage the access token for the WebSocket connection.
This method is a coroutine for an infinite loop. It should be executed by
asyncio.create_task().- パラメータ:
ws (WebSocketApp) -- WebSocketApp instance.
token (str) -- Access token.
delay (float, optional) -- Sleep time. Defaults to 300.0 (5 minutes).