INNER CODE UNIT · Python

__keep_alive

nkaz001/sample-trading-bot · tradingbot/binancefutures.py:111

    async def __keep_alive(self):
        while not self.closed:
            try:
                await asyncio.sleep(5)
                await self.keepalive_user_data_stream()
                await self.ws.pong()
            except:
                pass

    async def __curl_binancefutures(self, path, query=None, timeout=None, verb=None, rethrow_errors=True, max_retries=None):
        if timeout is None:
            timeout = self.timeout

        # Default to POST if data is attached, GET otherwise
        if not verb:
            verb = 'POST' if query else 'GET'

        # By default don't retry POST or PUT. Retrying GET/DELETE is okay because they are idempotent.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…