@@ -100,13 +100,16 @@ the others.
100100<details markdown =" 1 " ><summary >Sync</summary >
101101
102102``` python
103- from datamaxi import Datamaxi, Telegram, Naver
103+ from datamaxi import Datamaxi
104104
105- # Clients read DATAMAXI_API_KEY from the environment automatically.
106- # Alternatively, pass api_key="your_api_key" explicitly to each client .
105+ # The client reads DATAMAXI_API_KEY from the environment automatically.
106+ # Alternatively, pass api_key="your_api_key" explicitly.
107107maxi = Datamaxi()
108- telegram = Telegram()
109- naver = Naver()
108+
109+ # Telegram and Naver are mounted as `maxi.telegram` / `maxi.naver`
110+ # (standalone `Telegram` / `Naver` clients remain available too).
111+ channels, _ = maxi.telegram.channels()
112+ trend = maxi.naver.trend(symbol = " BTC" )
110113
111114# Fetch CEX candle data (returns pandas DataFrame)
112115df = maxi.cex.candle(
@@ -188,14 +191,14 @@ The package ships these clients, all configured the same way (see
188191
189192| Client | Import | Purpose |
190193| ----------------- | --------------------------------------------- | ---------------------------------------------------------- |
191- | ` Datamaxi ` | ` from datamaxi import Datamaxi ` | Synchronous client for all crypto REST data. |
192- | ` Telegram ` | ` from datamaxi import Telegram ` | Telegram channel messages and metadata. |
193- | ` Naver ` | ` from datamaxi import Naver ` | Naver search-trend data (South Korea). |
194+ | ` Datamaxi ` | ` from datamaxi import Datamaxi ` | Synchronous client for all REST data, incl. ` maxi.telegram ` / ` maxi.naver ` . |
194195| ` AsyncDatamaxi ` | ` from datamaxi.aio import AsyncDatamaxi ` | Async twin of ` Datamaxi ` (needs the ` [async] ` extra). |
195196| ` AsyncDatamaxiWS ` | ` from datamaxi.aio.ws import AsyncDatamaxiWS ` | Async WebSocket streaming (needs the ` [ws] ` extra). |
196197
197- ` AsyncTelegram ` and ` AsyncNaver ` are the async twins of ` Telegram ` / ` Naver ` ,
198- also imported from ` datamaxi.aio ` .
198+ Telegram and Naver are mounted on ` Datamaxi ` / ` AsyncDatamaxi ` (` maxi.telegram ` ,
199+ ` maxi.naver ` ) so they reuse the client's shared session. The standalone
200+ ` Telegram ` / ` Naver ` (and their async twins ` AsyncTelegram ` / ` AsyncNaver ` ,
201+ imported from ` datamaxi.aio ` ) remain available for independent use.
199202
200203## REST API Reference
201204
@@ -495,12 +498,8 @@ Off-exchange signals: Telegram channels and Naver search trends.
495498Fetch Telegram channel messages and metadata.
496499
497500``` python
498- # Initialize Telegram client
499- from datamaxi import Telegram
500- telegram = Telegram(api_key = api_key)
501-
502501# Fetch channels
503- data, next_request = telegram.channels(
502+ data, next_request = maxi. telegram.channels(
504503 page = 1 , # Optional: page number
505504 limit = 1000 , # Optional: items per page
506505 category = None , # Optional: filter by category
@@ -509,7 +508,7 @@ data, next_request = telegram.channels(
509508)
510509
511510# Fetch messages
512- data, next_request = telegram.messages(
511+ data, next_request = maxi. telegram.messages(
513512 channel_name = None , # Optional: filter by channel
514513 page = 1 , # Optional: page number
515514 limit = 1000 , # Optional: items per page
@@ -524,15 +523,11 @@ data, next_request = telegram.messages(
524523Fetch Naver search trend data (South Korea).
525524
526525``` python
527- # Initialize Naver client
528- from datamaxi import Naver
529- naver = Naver(api_key = api_key)
530-
531526# Get supported symbols
532- symbols = naver.symbols()
527+ symbols = maxi. naver.symbols()
533528
534529# Fetch trend data
535- data = naver.trend(
530+ data = maxi. naver.trend(
536531 symbol = " BTC" , # Required: symbol to search
537532 pandas = True # Optional: return DataFrame or list
538533)
@@ -756,8 +751,7 @@ asyncio.run(main())
756751Use ` AsyncDatamaxi ` as an async context manager (shown above) or call
757752` await client.aclose() ` yourself. Paginated endpoints return an async
758753` next_request ` — ` await ` it too
759- (` data, next_request = await client.cex.announcement(...) ` ). Telegram and Naver
760- have standalone ` AsyncTelegram ` / ` AsyncNaver ` clients.
754+ (` data, next_request = await client.cex.announcement(...) ` ).
761755
762756Every endpoint in the [ REST API Reference] ( #rest-api-reference ) works the same
763757under the async client — see the [ docs] ( https://datamaxi.readthedocs.io/ ) where
0 commit comments