From 9e3eb36f031e207782df2d1c89111088fa12ef03 Mon Sep 17 00:00:00 2001 From: Martin Kersner Date: Tue, 30 Jun 2026 13:04:22 +0900 Subject: [PATCH 1/4] remove deprecated DEX client and endpoints DEX endpoints deprecated server-side (all /api/v1/dex/* return 404). Drop Dex client, its wiring in Datamaxi.__init__, and the six dex_* entries from _endpoints.py (GROUPS rebuilds, so dex group drops too). --- datamaxi/_endpoints.py | 161 -------------------- datamaxi/datamaxi/__init__.py | 2 - datamaxi/datamaxi/dex.py | 272 ---------------------------------- 3 files changed, 435 deletions(-) delete mode 100644 datamaxi/datamaxi/dex.py diff --git a/datamaxi/_endpoints.py b/datamaxi/_endpoints.py index db4f771..f01bd27 100644 --- a/datamaxi/_endpoints.py +++ b/datamaxi/_endpoints.py @@ -434,167 +434,6 @@ }, }, }, - "dex_candle": { - "path": "/api/v1/dex/candle", - "method": "GET", - "tag": "dex", - "summary": "Candle", - "requires_auth": True, - "group": "dex", - "params": { - "chain": { - "required": True, - "type": "str", - "description": "Specifes chain", - }, - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - "pool": { - "required": True, - "type": "str", - "description": "Specifies pool", - }, - "interval": { - "required": False, - "type": "str", - "default": "1d", - "description": "Specifies interval", - }, - "from": { - "required": False, - "type": "str", - "description": "Specifies from", - }, - "to": { - "required": False, - "type": "str", - "description": "Specifies to", - }, - "page": { - "required": False, - "type": "int", - "default": 1, - "description": "Page number", - }, - "limit": { - "required": False, - "type": "int", - "default": 1000, - "description": "Page size", - }, - "sort": { - "required": False, - "type": "str", - "default": "asc", - "enum": ["asc", "desc"], - "description": "Specifies sort", - }, - }, - }, - "dex_chains": { - "path": "/api/v1/dex/chains", - "method": "GET", - "tag": "dex", - "summary": "Chains", - "requires_auth": False, - "group": "dex", - "params": {}, - }, - "dex_exchanges": { - "path": "/api/v1/dex/exchanges", - "method": "GET", - "tag": "dex", - "summary": "Exchanges", - "requires_auth": False, - "group": "dex", - "params": {}, - }, - "dex_intervals": { - "path": "/api/v1/dex/intervals", - "method": "GET", - "tag": "dex", - "summary": "Intervals", - "requires_auth": False, - "group": "dex", - "params": {}, - }, - "dex_pools": { - "path": "/api/v1/dex/pools", - "method": "GET", - "tag": "dex", - "summary": "Pools", - "requires_auth": False, - "group": "dex", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Specifies exchange name", - }, - "chain": { - "required": False, - "type": "str", - "description": "Specifies the chain name", - }, - }, - }, - "dex_trade": { - "path": "/api/v1/dex/trade", - "method": "GET", - "tag": "dex", - "summary": "Trade", - "requires_auth": True, - "group": "dex", - "params": { - "chain": { - "required": True, - "type": "str", - "description": "Specifes chain", - }, - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - "pool": { - "required": True, - "type": "str", - "description": "Specifies pool", - }, - "from": { - "required": False, - "type": "str", - "description": "Specifies from", - }, - "to": { - "required": False, - "type": "str", - "description": "Specifies to", - }, - "page": { - "required": False, - "type": "int", - "default": 1, - "description": "Page number", - }, - "limit": { - "required": False, - "type": "int", - "default": 1000, - "description": "Page size", - }, - "sort": { - "required": False, - "type": "str", - "default": "asc", - "enum": ["asc", "desc"], - "description": "Specifies sort", - }, - }, - }, "forex": { "path": "/api/v1/forex", "method": "GET", diff --git a/datamaxi/datamaxi/__init__.py b/datamaxi/datamaxi/__init__.py index 95ff44b..cfd8b8d 100644 --- a/datamaxi/datamaxi/__init__.py +++ b/datamaxi/datamaxi/__init__.py @@ -1,7 +1,6 @@ from typing import Any from datamaxi.lib.constants import BASE_URL from datamaxi.datamaxi.cex import Cex -from datamaxi.datamaxi.dex import Dex from datamaxi.datamaxi.funding_rate import FundingRate from datamaxi.datamaxi.forex import Forex from datamaxi.datamaxi.premium import Premium @@ -42,7 +41,6 @@ def __init__(self, api_key=None, **kwargs: Any): kwargs["base_url"] = BASE_URL self.cex = Cex(api_key, **kwargs) - self.dex = Dex(api_key, **kwargs) self.funding_rate = FundingRate(api_key, **kwargs) self.forex = Forex(api_key, **kwargs) self.premium = Premium(api_key, **kwargs) diff --git a/datamaxi/datamaxi/dex.py b/datamaxi/datamaxi/dex.py deleted file mode 100644 index f98aeb9..0000000 --- a/datamaxi/datamaxi/dex.py +++ /dev/null @@ -1,272 +0,0 @@ -from typing import Any, Callable, Tuple, List, Dict, Union -import logging -from datamaxi.api import API -import pandas as pd -from datamaxi.lib.utils import check_required_parameters -from datamaxi.datamaxi.utils import convert_data_to_data_frame -from datamaxi.lib.constants import ASC, DESC - - -class Dex(API): - """Client to fetch DEX data from DataMaxi+ API.""" - - def __init__(self, api_key=None, **kwargs: Any): - """Initialize DEX client. - - Args: - api_key (str): The DataMaxi+ API key - **kwargs: Keyword arguments used by `datamaxi.api.API`. - """ - super().__init__(api_key, **kwargs) - - def trade( - self, - chain: str, - exchange: str, - pool: str, - fromDateTime: str = None, - toDateTime: str = None, - page: int = 1, - limit: int = 1000, - sort: str = "desc", - pandas: bool = True, - ) -> Union[Tuple[Dict, Callable], Tuple[pd.DataFrame, Callable]]: - """Fetch DEX trade data - - `GET /api/v1/dex/trade` - - - - Args: - chain (str): Chain name - exchange (str): Exchange name - pool (str): Pool name - fromDateTime (str): Start date and time (accepts format "2006-01-02 15:04:05" or "2006-01-02") - toDateTime (str): End date and time (accepts format "2006-01-02 15:04:05" or "2006-01-02") - page (int): Page number - limit (int): Limit of data - sort (str): Sort order - pandas (bool): Return data as pandas DataFrame - - Returns: - DEX trade data in pandas DataFrame and next request function - """ - logging.warning("warning: dex related endpoints are experimental") - - check_required_parameters( - [ - [chain, "chain"], - [exchange, "exchange"], - [pool, "pool"], - ] - ) - if page < 1: - raise ValueError("page must be greater than 0") - - if limit < 1: - raise ValueError("limit must be greater than 0") - - if fromDateTime is not None and toDateTime is not None: - raise ValueError( - "fromDateTime and toDateTime cannot be set at the same time" - ) - - if sort not in [ASC, DESC]: - raise ValueError("sort must be either asc or desc") - - params = { - "chain": chain, - "exchange": exchange, - "pool": pool, - "page": page, - "limit": limit, - "from": fromDateTime, - "to": toDateTime, - "sort": sort, - } - - res = self.query("/api/v1/dex/trade", params) - if res["data"] is None or len(res["data"]) == 0: - raise ValueError("no data found") - - def next_request(): - return self.trade( - chain, - exchange, - pool, - fromDateTime, - toDateTime, - page + 1, - limit, - sort, - pandas, - ) - - if pandas: - df = convert_data_to_data_frame(res["data"], ["b", "bq", "qq", "p"]) - return df, next_request - else: - return res, next_request - - def candle( - self, - chain: str, - exchange: str, - pool: str, - interval: str = "1d", - fromDateTime: str = None, - toDateTime: str = None, - page: int = 1, - limit: int = 1000, - sort: str = "desc", - pandas: bool = True, - ) -> Union[Tuple[Dict, Callable], Tuple[pd.DataFrame, Callable]]: - """Fetch DEX candle data - - `GET /api/v1/dex/candle` - - - - Args: - chain (str): Chain name - exchange (str): Exchange name - pool (str): Pool name - interval (str): Candle interval - fromDateTime (str): Start date and time (accepts format "2006-01-02 15:04:05" or "2006-01-02") - toDateTime (str): End date and time (accepts format "2006-01-02 15:04:05" or "2006-01-02") - page (int): Page number - limit (int): Limit of data - sort (str): Sort order - pandas (bool): Return data as pandas DataFrame - - Returns: - DEX candle data in pandas DataFrame and next request function - """ - logging.warning("warning: dex related endpoints are experimental") - - check_required_parameters( - [ - [chain, "chain"], - [exchange, "exchange"], - [pool, "pool"], - [interval, "interval"], - ] - ) - - if page < 1: - raise ValueError("page must be greater than 0") - - if limit < 1: - raise ValueError("limit must be greater than 0") - - if fromDateTime is not None and toDateTime is not None: - raise ValueError( - "fromDateTime and toDateTime cannot be set at the same time" - ) - - if sort not in [ASC, DESC]: - raise ValueError("sort must be either asc or desc") - - params = { - "chain": chain, - "exchange": exchange, - "pool": pool, - "interval": interval, - "page": page, - "limit": limit, - "from": fromDateTime, - "to": toDateTime, - "sort": sort, - } - - res = self.query("/api/v1/dex/candle", params) - if res["data"] is None or len(res["data"]) == 0: - raise ValueError("no data found") - - def next_request(): - return self.candle( - chain, - exchange, - pool, - interval, - fromDateTime, - toDateTime, - page + 1, - limit, - sort, - pandas, - ) - - if pandas: - df = convert_data_to_data_frame(res["data"]) - return df, next_request - else: - return res, next_request - - def chains(self) -> List[str]: - """Fetch supported chains for DEX endpoints. - - `GET /api/v1/dex/chains` - - - - Returns: - List of supported chains - """ - logging.warning("warning: dex related endpoints are experimental") - - url_path = "/api/v1/dex/chains" - return self.query(url_path) - - def exchanges(self) -> List[str]: - """Fetch supported exchanges for DEX endpoints. - - `GET /api/v1/dex/exchanges` - - - - Returns: - List of supported exchanges - """ - logging.warning("warning: dex related endpoints are experimental") - - url_path = "/api/v1/dex/exchanges" - return self.query(url_path) - - def pools(self, exchange: str = None, chain: str = None) -> List[Dict]: - """Fetch supported pools for DEX endpoints. - - `GET /api/v1/dex/pools` - - - - Args: - exchange (str): Exchange name - chain (str): Chain name (applied to DEX only) - - Returns: - List of supported pools - """ - params = {} - if exchange is not None: - params["exchange"] = exchange - if chain is not None: - params["chain"] = chain - - url_path = "/api/v1/dex/pools" - return self.query(url_path, params) - - def intervals(self) -> List[str]: - """Fetch supported intervals for DEX candle data. - - `GET /api/v1/dex/intervals` - - - - Returns: - List of supported intervals - """ - logging.warning("warning: dex related endpoints are experimental") - - url_path = "/api/v1/dex/intervals" - return self.query(url_path) From c329ea42d7b123b6c1b5f933c1128d7f01387039 Mon Sep 17 00:00:00 2001 From: Martin Kersner Date: Tue, 30 Jun 2026 13:04:27 +0900 Subject: [PATCH 2/4] remove DEX tests and pytest marker Drop test_dex (test_call.py), the TestDex class (test_integration.py), and the dex marker from setup.cfg. --- setup.cfg | 1 - tests/test_call.py | 13 --- tests/test_integration.py | 200 -------------------------------------- 3 files changed, 214 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3b5572a..3dfa93d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,6 @@ description_file = README.md [tool:pytest] markers = cex: tests for CEX endpoints - dex: tests for DEX endpoints funding: tests for funding rate endpoints premium: tests for premium endpoints forex: tests for forex endpoints diff --git a/tests/test_call.py b/tests/test_call.py index d486b39..e3e123f 100644 --- a/tests/test_call.py +++ b/tests/test_call.py @@ -103,19 +103,6 @@ def test_funding_rate(datamaxi): datamaxi.funding_rate.symbols(exchange="binance") -def test_dex(datamaxi): - """Smoke test for DEX endpoints.""" - datamaxi.dex.chains() - datamaxi.dex.exchanges() - datamaxi.dex.pools(exchange="klayswap", chain="kaia_mainnet") - datamaxi.dex.intervals() - datamaxi.dex.trade( - exchange="pancakeswap", - chain="bsc_mainnet", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - ) - - def test_forex(datamaxi): """Smoke test for forex endpoints.""" datamaxi.forex.symbols() diff --git a/tests/test_integration.py b/tests/test_integration.py index 73e3fe8..3da291d 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -496,206 +496,6 @@ def test_updates_invalid_type(self, datamaxi): datamaxi.cex.token.updates(type="invalid") -# ============================================================================= -# DEX Tests -# ============================================================================= -@pytest.mark.dex -class TestDex: - """Test DEX endpoints with all parameters.""" - - def test_chains(self, datamaxi): - """Test getting supported chains.""" - result = datamaxi.dex.chains() - assert isinstance(result, list) - assert len(result) > 0 - - def test_exchanges(self, datamaxi): - """Test getting supported exchanges.""" - result = datamaxi.dex.exchanges() - assert isinstance(result, list) - assert len(result) > 0 - - def test_intervals(self, datamaxi): - """Test getting supported intervals.""" - result = datamaxi.dex.intervals() - assert isinstance(result, list) - assert len(result) > 0 - - def test_pools_without_params(self, datamaxi): - """Test getting pools without parameters.""" - result = datamaxi.dex.pools() - assert isinstance(result, list) - assert len(result) > 0 - - def test_pools_with_exchange(self, datamaxi): - """Test getting pools with exchange filter.""" - result = datamaxi.dex.pools(exchange="klayswap") - assert isinstance(result, list) - - def test_pools_with_chain(self, datamaxi): - """Test getting pools with chain filter.""" - result = datamaxi.dex.pools(chain="kaia_mainnet") - assert isinstance(result, list) - - def test_pools_with_exchange_and_chain(self, datamaxi): - """Test getting pools with both filters.""" - result = datamaxi.dex.pools(exchange="klayswap", chain="kaia_mainnet") - assert isinstance(result, list) - - def test_trade_basic(self, datamaxi): - """Test basic trade data fetch.""" - result, next_request = datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - ) - assert isinstance(result, pd.DataFrame) - assert len(result) > 0 - assert callable(next_request) - - def test_trade_with_pagination(self, datamaxi): - """Test trade data with pagination.""" - result, _ = datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - page=1, - limit=10, - ) - assert isinstance(result, pd.DataFrame) - assert len(result) <= 10 - - def test_trade_sort_asc(self, datamaxi): - """Test trade data with sort=asc.""" - result, _ = datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - sort="asc", - limit=10, - ) - assert isinstance(result, pd.DataFrame) - - def test_trade_sort_desc(self, datamaxi): - """Test trade data with sort=desc.""" - result, _ = datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - sort="desc", - limit=10, - ) - assert isinstance(result, pd.DataFrame) - - def test_trade_with_from_datetime(self, datamaxi): - """Test trade data with fromDateTime.""" - from_dt = (datetime.now() - timedelta(days=7)).strftime("%Y-%m-%d") - result, _ = datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - fromDateTime=from_dt, - limit=10, - ) - assert isinstance(result, pd.DataFrame) - - def test_trade_with_to_datetime(self, datamaxi): - """Test trade data with toDateTime.""" - to_dt = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d") - result, _ = datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - toDateTime=to_dt, - limit=10, - ) - assert isinstance(result, pd.DataFrame) - - def test_trade_pandas_false(self, datamaxi): - """Test trade data with pandas=False.""" - result, _ = datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - pandas=False, - limit=10, - ) - assert isinstance(result, dict) - assert "data" in result - - def test_candle_basic(self, datamaxi): - """Test basic candle data fetch.""" - result, next_request = datamaxi.dex.candle( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - ) - assert isinstance(result, pd.DataFrame) - assert len(result) > 0 - assert callable(next_request) - - def test_candle_with_interval(self, datamaxi): - """Test candle data with interval parameter.""" - result, _ = datamaxi.dex.candle( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - interval="1h", - limit=10, - ) - assert isinstance(result, pd.DataFrame) - - def test_candle_with_pagination(self, datamaxi): - """Test candle data with pagination.""" - result, _ = datamaxi.dex.candle( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - page=1, - limit=10, - ) - assert isinstance(result, pd.DataFrame) - assert len(result) <= 10 - - def test_candle_pandas_false(self, datamaxi): - """Test candle data with pandas=False.""" - result, _ = datamaxi.dex.candle( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - pandas=False, - limit=10, - ) - assert isinstance(result, dict) - assert "data" in result - - def test_trade_invalid_sort(self, datamaxi): - """Test that invalid sort raises ValueError.""" - with pytest.raises(ValueError, match="sort must be either asc or desc"): - datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - sort="invalid", - ) - - def test_trade_both_from_and_to_datetime(self, datamaxi): - """Test that setting both fromDateTime and toDateTime raises ValueError.""" - from_dt = (datetime.now() - timedelta(days=7)).strftime("%Y-%m-%d") - to_dt = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d") - with pytest.raises( - ValueError, - match="fromDateTime and toDateTime cannot be set at the same time", - ): - datamaxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - fromDateTime=from_dt, - toDateTime=to_dt, - ) - - # ============================================================================= # Funding Rate Tests # ============================================================================= From 50825132e1abd010684f7c73c21f232373ea7c9e Mon Sep 17 00:00:00 2001 From: Martin Kersner Date: Tue, 30 Jun 2026 13:04:27 +0900 Subject: [PATCH 3/4] remove DEX docs and nav/README references --- README.md | 49 +------------------------------------------------ docs/dex.md | 42 ------------------------------------------ mkdocs.yml | 1 - 3 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 docs/dex.md diff --git a/README.md b/README.md index e71890b..c5d5071 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ This package is compatible with Python v3.10+. - [CEX Wallet Status](#cex-wallet-status) - [CEX Announcements](#cex-announcements) - [CEX Token Updates](#cex-token-updates) - - [DEX Data](#dex-data) - [Funding Rate](#funding-rate) - [Premium](#premium) - [Forex](#forex) @@ -68,7 +67,7 @@ You may use environment variables to configure the SDK to avoid any inline boile DataMaxi+ Python package includes the following clients: -- `Datamaxi` - Main client for crypto trading data (CEX, DEX, funding rates, premium, forex) +- `Datamaxi` - Main client for crypto trading data (CEX, funding rates, premium, forex) - `Telegram` - Client for Telegram channel data - `Naver` - Client for Naver trend data @@ -224,51 +223,6 @@ data, next_request = maxi.cex.token.updates( ) ``` -### DEX Data - -Fetch data from decentralized exchanges. (Experimental) - -```python -# Get supported chains -chains = maxi.dex.chains() - -# Get supported exchanges -exchanges = maxi.dex.exchanges() - -# Get supported pools -pools = maxi.dex.pools(exchange="klayswap", chain="kaia_mainnet") - -# Get supported intervals -intervals = maxi.dex.intervals() - -# Fetch trade data -df, next_request = maxi.dex.trade( - chain="bsc_mainnet", # Required: blockchain - exchange="pancakeswap", # Required: DEX name - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", # Required: pool address - fromDateTime=None, # Optional: start datetime (format: "2006-01-02" or "2006-01-02 15:04:05") - toDateTime=None, # Optional: end datetime - page=1, # Optional: page number - limit=1000, # Optional: items per page - sort="desc", # Optional: "asc" or "desc" - pandas=True # Optional: return DataFrame or dict -) - -# Fetch candle data -df, next_request = maxi.dex.candle( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - interval="1d", # Optional: candle interval (default: 1d) - fromDateTime=None, - toDateTime=None, - page=1, - limit=1000, - sort="desc", - pandas=True -) -``` - ### Funding Rate Fetch funding rate data for perpetual futures. @@ -477,7 +431,6 @@ python -m pytest tests/test_integration.py -v # Test specific endpoint groups using markers python -m pytest tests/test_integration.py -m "cex" -v -python -m pytest tests/test_integration.py -m "dex" -v python -m pytest tests/test_integration.py -m "funding" -v python -m pytest tests/test_integration.py -m "premium" -v python -m pytest tests/test_integration.py -m "forex" -v diff --git a/docs/dex.md b/docs/dex.md deleted file mode 100644 index fb2f0f4..0000000 --- a/docs/dex.md +++ /dev/null @@ -1,42 +0,0 @@ -# DEX - -Decentralized exchange trade and candle data. These endpoints are experimental. - -## Usage - -```python -from datamaxi import Datamaxi - -maxi = Datamaxi(api_key="YOUR_API_KEY") - -chains = maxi.dex.chains() -exchanges = maxi.dex.exchanges() -pools = maxi.dex.pools(exchange="pancakeswap", chain="bsc_mainnet") -intervals = maxi.dex.intervals() - -trades, next_request = maxi.dex.trade( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - fromDateTime="2024-01-01", - page=1, - limit=100, -) - -candles, _ = maxi.dex.candle( - chain="bsc_mainnet", - exchange="pancakeswap", - pool="0x6ee3eE9C3395BbD136B6076A70Cb6cFF241c0E24", - interval="1d", -) -``` - -## Notes - -- `fromDateTime` and `toDateTime` are mutually exclusive. -- Pagination returns a `next_request` function for the next page. - -::: datamaxi.datamaxi.Dex - options: - show_submodules: true - show_source: false diff --git a/mkdocs.yml b/mkdocs.yml index b56791f..826ed28 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -38,7 +38,6 @@ nav: - Wallet Status: cex-wallet-status.md - Announcement: cex-announcement.md - Token: cex-token.md - - DEX: dex.md - Funding Rate: funding-rate.md - Premium: premium.md - Forex: forex.md From 08b4ea36ddcab893994e415c64389d739b50dae5 Mon Sep 17 00:00:00 2001 From: Martin Kersner Date: Tue, 30 Jun 2026 13:10:04 +0900 Subject: [PATCH 4/4] chore: delete unused generated _endpoints.py registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ENDPOINTS/GROUPS in datamaxi/_endpoints.py are not imported anywhere in the SDK, tests, or packaging — clients build requests directly. Drop the dead generated artifact rather than keep patching its dex entries. --- datamaxi/_endpoints.py | 1376 ---------------------------------------- 1 file changed, 1376 deletions(-) delete mode 100644 datamaxi/_endpoints.py diff --git a/datamaxi/_endpoints.py b/datamaxi/_endpoints.py deleted file mode 100644 index f01bd27..0000000 --- a/datamaxi/_endpoints.py +++ /dev/null @@ -1,1376 +0,0 @@ -""" -Auto-generated endpoint registry from openapi.yaml. -DO NOT EDIT — regenerate with: make python -""" - -ENDPOINTS = { - "cex_announcements": { - "path": "/api/v1/cex/announcements", - "method": "GET", - "tag": "announcements", - "summary": "Announcements", - "requires_auth": True, - "group": "announcements", - "params": { - "page": { - "required": False, - "type": "int", - "default": 1, - "description": "Page number", - }, - "limit": { - "required": False, - "type": "int", - "default": 10, - "description": "Page size", - }, - "sort": { - "required": False, - "type": "str", - "default": "desc", - "enum": ["asc", "desc"], - "description": "Specifies sort", - }, - "key": { - "required": False, - "type": "str", - "default": "timestamp", - "enum": ["exchange", "category", "title", "timestamp"], - "description": "Specifies key to sort by", - }, - "exchange": { - "required": False, - "type": "str", - "description": "Specifies exchange(s), separated by ,", - }, - "category": { - "required": False, - "type": "str", - "default": "", - "enum": ["notice", "listing", "delisting", "user_events"], - "description": "Specifies category(s), separated by ,", - }, - }, - }, - "cex_candle": { - "path": "/api/v1/cex/candle", - "method": "GET", - "tag": "cex-candle", - "summary": "Data", - "requires_auth": True, - "group": "cex", - "subgroup": "candle", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - "market": { - "required": True, - "type": "str", - "default": "spot", - "enum": ["spot", "futures"], - "description": "Specifies market", - }, - "symbol": { - "required": True, - "type": "str", - "description": "Specifies symbol", - }, - "currency": { - "required": False, - "type": "str", - "default": "USD", - "enum": ["USD", "KRW"], - "description": "Specifies currency", - }, - "interval": { - "required": False, - "type": "str", - "default": "1d", - "description": "Specifies interval", - }, - "from": { - "required": False, - "type": "str", - "description": "Specifies from", - }, - "to": { - "required": False, - "type": "str", - "description": "Specifies to", - }, - }, - }, - "cex_candle_exchanges": { - "path": "/api/v1/cex/candle/exchanges", - "method": "GET", - "tag": "cex-candle", - "summary": "Exchanges", - "requires_auth": False, - "group": "cex", - "subgroup": "candle", - "params": { - "market": { - "required": True, - "type": "str", - "enum": ["spot", "futures"], - "description": "Specifies market type", - }, - }, - }, - "cex_candle_intervals": { - "path": "/api/v1/cex/candle/intervals", - "method": "GET", - "tag": "cex-candle", - "summary": "Intervals", - "requires_auth": False, - "group": "cex", - "subgroup": "candle", - "params": {}, - }, - "cex_candle_symbols": { - "path": "/api/v1/cex/candle/symbols", - "method": "GET", - "tag": "cex-candle", - "summary": "Symbols", - "requires_auth": False, - "group": "cex", - "subgroup": "candle", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Specifies exchange name", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "Specifies market type", - }, - }, - }, - "cex_symbol_cautions": { - "path": "/api/v1/cex/symbol/cautions", - "method": "GET", - "tag": "cex-symbol", - "summary": "Active symbol cautions", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter (comma-separated, empty = all)", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "spot or futures", - }, - "min_level": { - "required": False, - "type": "str", - "enum": ["caution", "warning", "danger"], - "description": "Minimum severity", - }, - "active_only": { - "required": False, - "type": "bool", - "description": "Exclude rows whose end_at is in the past (default true)", - }, - "limit": { - "required": False, - "type": "int", - "description": "Page size (default 500, max 5000)", - }, - "page": { - "required": False, - "type": "int", - "description": "Page number (1-based)", - }, - }, - }, - "cex_symbol_delistings": { - "path": "/api/v1/cex/symbol/delistings", - "method": "GET", - "tag": "cex-symbol", - "summary": "Delisting schedule", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter (comma-separated)", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "spot or futures", - }, - "from_ms": { - "required": False, - "type": "int", - "description": "Lower bound for delisting_at (ms epoch, default = now)", - }, - "to_ms": { - "required": False, - "type": "int", - "description": "Upper bound for delisting_at (ms epoch, default = now+30 days)", - }, - "include_past": { - "required": False, - "type": "bool", - "description": "Include already-delisted rows (default false)", - }, - "limit": { - "required": False, - "type": "int", - "description": "Page size (default 200, max 2000)", - }, - "page": { - "required": False, - "type": "int", - "description": "Page number (1-based)", - }, - }, - }, - "cex_symbol_liquidation": { - "path": "/api/v1/cex/symbol/liquidation", - "method": "GET", - "tag": "cex-symbol", - "summary": "Per-exchange liquidation aggregate for a base asset", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "base": { - "required": True, - "type": "str", - "description": "Base asset (e.g. BTC)", - }, - "window": { - "required": False, - "type": "str", - "description": "Time window: 1h / 24h / 7d (default 24h, max 30d)", - }, - }, - }, - "cex_symbol_metadata": { - "path": "/api/v1/cex/symbol/metadata", - "method": "GET", - "tag": "cex-symbol", - "summary": "Symbol metadata", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Comma-separated exchange names (empty = all)", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "spot or futures (empty = both)", - }, - "base": { - "required": False, - "type": "str", - "description": "Base asset filter", - }, - "quote": { - "required": False, - "type": "str", - "description": "Quote asset filter", - }, - "status": { - "required": False, - "type": "str", - "description": "trading_status filter (repeatable, comma-separated)", - }, - "limit": { - "required": False, - "type": "int", - "description": "Page size (default 200, max 2000)", - }, - "page": { - "required": False, - "type": "int", - "description": "Page number (1-based)", - }, - }, - }, - "cex_symbol_oi": { - "path": "/api/v1/cex/symbol/oi", - "method": "GET", - "tag": "cex-symbol", - "summary": "Per-exchange Open Interest for a base asset", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "base": { - "required": True, - "type": "str", - "description": "Base asset (e.g. BTC)", - }, - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter (narrows the Redis scan)", - }, - }, - }, - "cex_symbol_oi_stats": { - "path": "/api/v1/cex/symbol/oi-stats", - "method": "GET", - "tag": "cex-symbol", - "summary": "Per-exchange Open Interest snapshot with deltas", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "base": { - "required": True, - "type": "str", - "description": "Base asset (e.g. BTC)", - }, - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter — when omitted, returns every venue carrying the base", - }, - "currency": { - "required": False, - "type": "str", - "default": "USD", - "enum": ["USD", "KRW"], - "description": "Convert *_usd fields to target currency (USD or KRW)", - }, - }, - }, - "cex_symbol_tags": { - "path": "/api/v1/cex/symbol/tags", - "method": "GET", - "tag": "cex-symbol", - "summary": "Symbol tags", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "tag": { - "required": False, - "type": "str", - "description": "Tag filter (repeatable, comma-separated)", - }, - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter (repeatable, comma-separated)", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "spot or futures", - }, - "base": { - "required": False, - "type": "str", - "description": "Base asset filter", - }, - "source": { - "required": False, - "type": "str", - "enum": ["rest_native", "announcement", "cmc", "manual"], - "description": "Tag source filter", - }, - "min_confidence": { - "required": False, - "type": "int", - "description": "Minimum confidence (0-100, default 80)", - }, - "limit": { - "required": False, - "type": "int", - "description": "Page size (default 500, max 5000)", - }, - "page": { - "required": False, - "type": "int", - "description": "Page number (1-based)", - }, - }, - }, - "cex_symbol_volume": { - "path": "/api/v1/cex/symbol/volume", - "method": "GET", - "tag": "cex-symbol", - "summary": "Per-exchange 24h volume", - "requires_auth": False, - "group": "cex", - "subgroup": "symbol", - "params": { - "base": { - "required": True, - "type": "str", - "description": "Base asset (e.g. BTC)", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "Filter to spot or futures", - }, - }, - }, - "forex": { - "path": "/api/v1/forex", - "method": "GET", - "tag": "forex", - "summary": "Forex", - "requires_auth": True, - "group": "forex", - "params": { - "symbol": { - "required": False, - "type": "str", - "description": "Specifies symbol", - }, - }, - }, - "forex_symbols": { - "path": "/api/v1/forex/symbols", - "method": "GET", - "tag": "forex", - "summary": "Symbols", - "requires_auth": False, - "group": "forex", - "params": {}, - }, - "funding_rate_exchanges": { - "path": "/api/v1/funding-rate/exchanges", - "method": "GET", - "tag": "funding-rate", - "summary": "Exchanges", - "requires_auth": False, - "group": "funding_rate", - "params": {}, - }, - "funding_rate_history": { - "path": "/api/v1/funding-rate/history", - "method": "GET", - "tag": "funding-rate", - "summary": "Historical funding rate", - "requires_auth": True, - "group": "funding_rate", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - "symbol": { - "required": True, - "type": "str", - "description": "Specifies symbol", - }, - "page": { - "required": False, - "type": "str", - "default": "1", - "description": "Specifies page", - }, - "limit": { - "required": False, - "type": "str", - "default": "1000", - "description": "Specifies limit", - }, - "from": { - "required": False, - "type": "str", - "description": "Specifies from", - }, - "to": { - "required": False, - "type": "str", - "description": "Specifies to", - }, - "sort": { - "required": False, - "type": "str", - "default": "asc", - "enum": ["asc", "desc"], - "description": "Specifies sort", - }, - }, - }, - "funding_rate_latest": { - "path": "/api/v1/funding-rate/latest", - "method": "GET", - "tag": "funding-rate", - "summary": "Latest funding rate", - "requires_auth": True, - "group": "funding_rate", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Specifies exchange", - }, - "symbol": { - "required": True, - "type": "str", - "description": "Specifies symbol", - }, - }, - }, - "funding_rate_symbols": { - "path": "/api/v1/funding-rate/symbols", - "method": "GET", - "tag": "funding-rate", - "summary": "Symbols", - "requires_auth": False, - "group": "funding_rate", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Specifies exchange name. Omit to receive symbols for all exchanges; constrain to a single exchange when filtering.", - }, - }, - }, - "index_price": { - "path": "/api/v1/index-price", - "method": "GET", - "tag": "index-price", - "summary": "Historical Index Price", - "requires_auth": True, - "group": "index_price", - "params": { - "asset": { - "required": True, - "type": "str", - "description": "Asset", - }, - "from": { - "required": False, - "type": "str", - "default": "now - 1 month", - "description": "Specifies from", - }, - "to": { - "required": False, - "type": "str", - "default": "now", - "description": "Specifies to", - }, - "interval": { - "required": False, - "type": "str", - "default": "5m", - "description": "interval", - }, - }, - }, - "liquidation": { - "path": "/api/v1/liquidation", - "method": "GET", - "tag": "liquidation", - "summary": "Recent Liquidations", - "requires_auth": True, - "group": "liquidation", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Exchange identifier", - }, - "symbol": { - "required": True, - "type": "str", - "description": "Exchange-native API symbol", - }, - "limit": { - "required": False, - "type": "int", - "default": 100, - "description": "Number of events to return (1-1000)", - }, - }, - }, - "liquidation_feed": { - "path": "/api/v1/liquidation/feed", - "method": "GET", - "tag": "liquidation", - "summary": "Liquidation feed", - "requires_auth": True, - "group": "liquidation", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter", - }, - "base": { - "required": False, - "type": "str", - "description": "Base asset filter (case-insensitive)", - }, - "min_volume_usd": { - "required": False, - "type": "float", - "description": "Minimum VolumeUsd filter", - }, - "limit": { - "required": False, - "type": "int", - "default": 100, - "description": "Number of events (1-1000)", - }, - }, - }, - "liquidation_heatmap": { - "path": "/api/v1/liquidation/heatmap", - "method": "GET", - "tag": "liquidation", - "summary": "Liquidation heatmap (token × exchange)", - "requires_auth": True, - "group": "liquidation", - "params": { - "window": { - "required": False, - "type": "str", - "default": "1h", - "enum": ["1h", "4h", "24h"], - "description": "Rolling window", - }, - "top_n": { - "required": False, - "type": "int", - "default": 10, - "description": "Top N tokens by total", - }, - }, - }, - "liquidation_map": { - "path": "/api/v1/liquidation/map", - "method": "GET", - "tag": "liquidation", - "summary": "Liquidation map (price × leverage tier)", - "requires_auth": True, - "group": "liquidation", - "params": { - "exchange": { - "required": False, - "type": "str", - "default": "binance", - "description": "Exchange", - }, - "base": { - "required": True, - "type": "str", - "description": "Base asset", - }, - "quote": { - "required": False, - "type": "str", - "default": "USDT", - "description": "Quote asset", - }, - }, - }, - "liquidation_stats": { - "path": "/api/v1/liquidation/stats", - "method": "GET", - "tag": "liquidation", - "summary": "Liquidation KPI stats", - "requires_auth": True, - "group": "liquidation", - "params": { - "window": { - "required": False, - "type": "str", - "default": "1h", - "enum": ["1h", "4h", "24h"], - "description": "Rolling window", - }, - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter", - }, - "min_volume_usd": { - "required": False, - "type": "float", - "description": "Minimum VolumeUsd filter", - }, - }, - }, - "liquidation_symbol_history": { - "path": "/api/v1/liquidation/symbol-history", - "method": "GET", - "tag": "liquidation", - "summary": "Liquidation history (time series for one symbol)", - "requires_auth": True, - "group": "liquidation", - "params": { - "symbol": { - "required": True, - "type": "str", - "description": "Base asset", - }, - "quote": { - "required": False, - "type": "str", - "default": "USDT", - "description": "Quote asset", - }, - "exchange": { - "required": False, - "type": "str", - "description": "Optional exchange filter for the liquidation aggregation. The price line stays on Binance unless this is set.", - }, - "interval": { - "required": False, - "type": "str", - "default": "5m", - "enum": ["5m", "15m", "1h"], - "description": "Bucket interval", - }, - "window": { - "required": False, - "type": "str", - "default": "24h", - "enum": ["24h", "72h", "7d"], - "description": "Lookback window", - }, - }, - }, - "listings_historical": { - "path": "/api/v1/listings/historical", - "method": "GET", - "tag": "listing", - "summary": "Historical token listings", - "requires_auth": True, - "group": "listing", - "params": { - "refresh": { - "required": False, - "type": "bool", - "default": False, - "description": "Refresh cache", - }, - }, - }, - "margin_borrow": { - "path": "/api/v1/margin-borrow", - "method": "GET", - "tag": "margin-borrow", - "summary": "Margin borrow", - "requires_auth": True, - "group": "margin_borrow", - "params": { - "asset": { - "required": True, - "type": "str", - "description": "Token base asset", - }, - }, - }, - "naver_trend": { - "path": "/api/v1/naver-trend", - "method": "GET", - "tag": "naver-trend", - "summary": "Trend", - "requires_auth": True, - "group": "naver_trend", - "params": { - "symbol": { - "required": True, - "type": "str", - "description": "Specifies symbol", - }, - }, - }, - "naver_trend_symbols": { - "path": "/api/v1/naver-trend/symbols", - "method": "GET", - "tag": "naver-trend", - "summary": "Symbols", - "requires_auth": True, - "group": "naver_trend", - "params": {}, - }, - "open_interest": { - "path": "/api/v1/open-interest", - "method": "GET", - "tag": "open-interest", - "summary": "Latest Open Interest", - "requires_auth": True, - "group": "open_interest", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Exchange identifier", - }, - "symbol": { - "required": True, - "type": "str", - "description": "Exchange-native API symbol", - }, - }, - }, - "open_interest_history_aggregated": { - "path": "/api/v1/open-interest/history-aggregated", - "method": "GET", - "tag": "open-interest", - "summary": "Open Interest history (aggregated)", - "requires_auth": True, - "group": "open_interest", - "params": { - "token_id": { - "required": True, - "type": "str", - "description": "Token id", - }, - "interval": { - "required": False, - "type": "str", - "default": "1h", - "enum": ["5m", "15m", "1h", "4h", "1d"], - "description": "Aggregation interval", - }, - "from": { - "required": False, - "type": "int", - "description": "Start unix-ms (default: depends on interval — 7d for 1h, 30d for 4h, 1y for 1d)", - }, - "to": { - "required": False, - "type": "int", - "description": "End unix-ms (default: now)", - }, - }, - }, - "open_interest_list": { - "path": "/api/v1/open-interest/list", - "method": "GET", - "tag": "open-interest", - "summary": "Open Interest list", - "requires_auth": True, - "group": "open_interest", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Exchange filter", - }, - }, - }, - "open_interest_overview": { - "path": "/api/v1/open-interest/overview", - "method": "GET", - "tag": "open-interest", - "summary": "Open Interest overview", - "requires_auth": True, - "group": "open_interest", - "params": { - "page": { - "required": False, - "type": "int", - "default": 1, - "description": "Page", - }, - "limit": { - "required": False, - "type": "int", - "default": 20, - "description": "Page size", - }, - "key": { - "required": False, - "type": "str", - "default": "binance", - "description": "Sort-by exchange", - }, - "sort": { - "required": False, - "type": "str", - "default": "desc", - "enum": ["asc", "desc"], - "description": "Sort direction", - }, - "query": { - "required": False, - "type": "str", - "description": "Base symbol search", - }, - }, - }, - "open_interest_summary": { - "path": "/api/v1/open-interest/summary", - "method": "GET", - "tag": "open-interest", - "summary": "Open Interest summary aggregates", - "requires_auth": True, - "group": "open_interest", - "params": { - "top_n": { - "required": False, - "type": "int", - "default": 10, - "description": "Top N tokens to return", - }, - }, - }, - "front_premium_tags": { - "path": "/api/v1/front/premium/tags", - "method": "GET", - "tag": "premium", - "summary": "Available premium tag filters", - "requires_auth": False, - "group": "premium", - "params": {}, - }, - "premium": { - "path": "/api/v1/premium", - "method": "GET", - "tag": "premium", - "summary": "Premium", - "requires_auth": True, - "group": "premium", - "params": { - "source_exchange": { - "required": False, - "type": "str", - "description": "Specifies source exchange(s), separated by ,", - }, - "target_exchange": { - "required": False, - "type": "str", - "description": "Specifies target exchange(s), separated by ,", - }, - "asset": { - "required": False, - "type": "str", - "description": "Specifies asset(s), separated by ,", - }, - "source_quote": { - "required": False, - "type": "str", - "description": "Specifies source quote(s), separated by ,", - }, - "target_quote": { - "required": False, - "type": "str", - "description": "Specifies target quote(s), separated by ,", - }, - "source_market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "Specifies source market", - }, - "target_market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "Specifies target market", - }, - "premium_type": { - "required": False, - "type": "str", - "enum": ["spot-spot", "futures-futures", "spot-futures"], - "description": "Specifies premium type(s), separated by ,", - }, - "currency": { - "required": False, - "type": "str", - "default": "USD", - "description": "Specifies currency applied to price values", - }, - "conversion_base": { - "required": False, - "type": "str", - "default": "USDT", - "description": "Specifies conversion base", - }, - "page": { - "required": False, - "type": "int", - "default": 1, - "description": "Page number", - }, - "limit": { - "required": False, - "type": "int", - "default": 10, - "description": "Page size", - }, - "sort": { - "required": False, - "type": "str", - "default": "desc", - "enum": ["asc", "desc"], - "description": "Specifies sort order", - }, - "key": { - "required": False, - "type": "str", - "default": "pdp", - "description": "Specifies key to sort by", - }, - "query": { - "required": False, - "type": "str", - "description": "Search query for filtering assets", - }, - "only_transferable": { - "required": False, - "type": "bool", - "default": False, - "description": "Filter only transferable assets", - }, - "network": { - "required": False, - "type": "str", - "description": "Specifies network(s), separated by ,", - }, - "min_sv": { - "required": False, - "type": "float", - "description": "Minimum source volume", - }, - "min_tv": { - "required": False, - "type": "float", - "description": "Minimum target volume", - }, - }, - }, - "premium_exchanges": { - "path": "/api/v1/premium/exchanges", - "method": "GET", - "tag": "premium", - "summary": "Exchanges", - "requires_auth": False, - "group": "premium", - "params": {}, - }, - "telegram_channels": { - "path": "/api/v1/telegram/channels", - "method": "GET", - "tag": "telegram", - "summary": "Channels", - "requires_auth": True, - "group": "telegram", - "params": { - "page": { - "required": False, - "type": "int", - "default": 1, - "description": "Page number", - }, - "limit": { - "required": False, - "type": "int", - "default": 10, - "description": "Page size", - }, - "category": { - "required": False, - "type": "str", - "default": "empty", - "description": "Specifies language category of telegram channel", - }, - "key": { - "required": False, - "type": "str", - "default": "channelName", - "enum": ["channelName", "handle", "subscribers", "createdAt"], - "description": "Specifies key to sort by", - }, - "sort": { - "required": False, - "type": "str", - "default": "desc", - "enum": ["asc", "desc"], - "description": "Specifies sort", - }, - }, - }, - "telegram_messages": { - "path": "/api/v1/telegram/messages", - "method": "GET", - "tag": "telegram", - "summary": "Messages", - "requires_auth": True, - "group": "telegram", - "params": { - "channel": { - "required": False, - "type": "str", - "default": "", - "description": "Specifies channel username", - }, - "page": { - "required": False, - "type": "int", - "default": 1, - "description": "Page number", - }, - "limit": { - "required": False, - "type": "int", - "default": 10, - "description": "Page size", - }, - "key": { - "required": False, - "type": "str", - "default": "publishedAt", - "enum": [ - "channelName", - "views", - "reactions", - "forwards", - "publishedAt", - ], - "description": "Specifies key to sort by", - }, - "sort": { - "required": False, - "type": "str", - "default": "desc", - "enum": ["asc", "desc"], - "description": "Specifies sort", - }, - "category": { - "required": False, - "type": "str", - "default": "", - "enum": ["english", "korean"], - "description": "Specifies category", - }, - "search_query": { - "required": False, - "type": "str", - "default": "", - "description": "Specifies search query", - }, - }, - }, - "ticker": { - "path": "/api/v1/ticker", - "method": "GET", - "tag": "ticker", - "summary": "Data", - "requires_auth": True, - "group": "ticker", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - "symbol": { - "required": True, - "type": "str", - "description": "Specifies symbol", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "Specifies market", - }, - "currency": { - "required": False, - "type": "str", - "default": "USD", - "enum": ["KRW", "USD"], - "description": "Specifies currency applied to price values", - }, - "conversion_base": { - "required": False, - "type": "str", - "description": "Specifies conversion base applied to price values", - }, - }, - }, - "ticker_exchanges": { - "path": "/api/v1/ticker/exchanges", - "method": "GET", - "tag": "ticker", - "summary": "Exchanges", - "requires_auth": False, - "group": "ticker", - "params": { - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "Specifies market", - }, - }, - }, - "ticker_symbols": { - "path": "/api/v1/ticker/symbols", - "method": "GET", - "tag": "ticker", - "summary": "Symbols", - "requires_auth": False, - "group": "ticker", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - "market": { - "required": False, - "type": "str", - "enum": ["spot", "futures"], - "description": "Specifies market", - }, - }, - }, - "cex_token_updates": { - "path": "/api/v1/cex/token/updates", - "method": "GET", - "tag": "token", - "summary": "Token Updates", - "requires_auth": True, - "group": "token", - "params": { - "page": { - "required": False, - "type": "str", - "default": "1", - "description": "Specifies page", - }, - "limit": { - "required": False, - "type": "str", - "default": "100", - "description": "Specifies limit", - }, - "type": { - "required": False, - "type": "str", - "enum": ["listed", "delisted"], - "description": "Specifies type of token update", - }, - }, - }, - "cex_fees": { - "path": "/api/v1/cex/fees", - "method": "GET", - "tag": "trading-fees", - "summary": "Data", - "requires_auth": True, - "group": "trading_fees", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Specifies exchange", - }, - "symbol": { - "required": False, - "type": "str", - "description": "Specifies symbol", - }, - }, - }, - "cex_fees_exchanges": { - "path": "/api/v1/cex/fees/exchanges", - "method": "GET", - "tag": "trading-fees", - "summary": "Exchanges", - "requires_auth": False, - "group": "trading_fees", - "params": {}, - }, - "cex_fees_symbols": { - "path": "/api/v1/cex/fees/symbols", - "method": "GET", - "tag": "trading-fees", - "summary": "Symbols", - "requires_auth": False, - "group": "trading_fees", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - }, - }, - "wallet_status": { - "path": "/api/v1/wallet-status", - "method": "GET", - "tag": "wallet-status", - "summary": "Data", - "requires_auth": True, - "group": "wallet_status", - "params": { - "exchange": { - "required": False, - "type": "str", - "description": "Specifes exchange", - }, - "asset": { - "required": True, - "type": "str", - "description": "Specifies asset", - }, - }, - }, - "wallet_status_assets": { - "path": "/api/v1/wallet-status/assets", - "method": "GET", - "tag": "wallet-status", - "summary": "Assets", - "requires_auth": False, - "group": "wallet_status", - "params": { - "exchange": { - "required": True, - "type": "str", - "description": "Specifes exchange", - }, - }, - }, - "wallet_status_exchanges": { - "path": "/api/v1/wallet-status/exchanges", - "method": "GET", - "tag": "wallet-status", - "summary": "Exchanges", - "requires_auth": False, - "group": "wallet_status", - "params": {}, - }, -} - - -# Endpoint index by group for SDK class mapping -GROUPS = {} -for _op_id, _ep in ENDPOINTS.items(): - _group = _ep.get("group", "") - _subgroup = _ep.get("subgroup") - _key = f"{_group}.{_subgroup}" if _subgroup else _group - GROUPS.setdefault(_key, []).append(_op_id)