MCPcopy Create free account
hub / github.com/sammchardy/python-binance / __init__

Method __init__

binance/async_client.py:27–68  ·  view source on GitHub ↗
(
        self,
        api_key: Optional[str] = None,
        api_secret: Optional[str] = None,
        requests_params: Optional[Dict[str, Any]] = None,
        tld: str = "com",
        base_endpoint: str = BaseClient.BASE_ENDPOINT_DEFAULT,
        testnet: bool = False,
        demo: bool = False,
        loop=None,
        session_params: Optional[Dict[str, Any]] = None,
        private_key: Optional[Union[str, Path]] = None,
        private_key_pass: Optional[str] = None,
        https_proxy: Optional[str] = None,
        time_unit: Optional[str] = None,
        verbose: bool = False,
    )

Source from the content-addressed store, hash-verified

25
26class AsyncClient(BaseClient):
27 def __init__(
28 self,
29 api_key: Optional[str] = None,
30 api_secret: Optional[str] = None,
31 requests_params: Optional[Dict[str, Any]] = None,
32 tld: str = "com",
33 base_endpoint: str = BaseClient.BASE_ENDPOINT_DEFAULT,
34 testnet: bool = False,
35 demo: bool = False,
36 loop=None,
37 session_params: Optional[Dict[str, Any]] = None,
38 private_key: Optional[Union[str, Path]] = None,
39 private_key_pass: Optional[str] = None,
40 https_proxy: Optional[str] = None,
41 time_unit: Optional[str] = None,
42 verbose: bool = False,
43 ):
44 self.https_proxy = https_proxy
45 self.loop = loop or get_loop()
46 self._session_params: Dict[str, Any] = session_params or {}
47
48 # Convert https_proxy to requests_params format for BaseClient
49 if https_proxy and requests_params is None:
50 requests_params = {'proxies': {'http': https_proxy, 'https': https_proxy}}
51 elif https_proxy and requests_params is not None:
52 if 'proxies' not in requests_params:
53 requests_params['proxies'] = {}
54 requests_params['proxies'].update({'http': https_proxy, 'https': https_proxy})
55
56 super().__init__(
57 api_key,
58 api_secret,
59 requests_params,
60 tld,
61 base_endpoint,
62 testnet,
63 demo,
64 private_key,
65 private_key_pass,
66 time_unit=time_unit,
67 verbose=verbose,
68 )
69
70 @classmethod
71 async def create(

Callers

nothing calls this directly

Calls 1

get_loopFunction · 0.90

Tested by

no test coverage detected