Skip to content

Commit 1c2cd62

Browse files
committed
Update requirements and enhance delist recommender functionality
- Updated `requirements.txt` to include `rich>=14.0.0`, adding support for improved logging and console output. - Modified `delist_recommender.py` to enhance error handling, including better session management for the Bybit exchange and improved logging for market data fetching. - Implemented comprehensive checks for market names and added fallback mechanisms for data retrieval, ensuring robustness in the face of API failures. - Introduced a new API endpoint for single market recommendations, allowing detailed analysis and visibility into the delisting process. - Adjusted concurrency limits and timeout settings for API calls to optimize performance and reliability.
1 parent c3ea760 commit 1c2cd62

File tree

7 files changed

+1517
-82
lines changed

7 files changed

+1517
-82
lines changed

backend/TEST_CCXT_README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# CCXT Testing Tool for Delist Recommender
2+
3+
This tool helps diagnose issues with the CCXT implementation in the delist recommender module, specifically related to fetching market volume data for cryptocurrency tokens.
4+
5+
## Setup
6+
7+
1. Install required dependencies:
8+
```bash
9+
pip install -r test_ccxt_requirements.txt
10+
```
11+
12+
2. For market cap data testing, set your CoinMarketCap API key:
13+
```bash
14+
export CMC_API_KEY=your_coinmarketcap_api_key_here
15+
```
16+
You can get a free API key from [CoinMarketCap](https://coinmarketcap.com/api/).
17+
18+
## Usage
19+
20+
Basic usage:
21+
```bash
22+
python test_ccxt_implementation.py SOL-PERP
23+
```
24+
25+
This will test both exchange data retrieval and market cap data for SOL.
26+
27+
### Options
28+
29+
- `--verbose` or `-v`: Show more detailed output, including all potential market pairs
30+
```bash
31+
python test_ccxt_implementation.py SOL-PERP --verbose
32+
```
33+
34+
- `--ccxt-only`: Only test CCXT exchange data (skip CoinMarketCap)
35+
```bash
36+
python test_ccxt_implementation.py SOL-PERP --ccxt-only
37+
```
38+
39+
- `--cmc-only`: Only test CoinMarketCap data (skip exchange data)
40+
```bash
41+
python test_ccxt_implementation.py SOL-PERP --cmc-only
42+
```
43+
44+
## Interpreting Results
45+
46+
The script will show:
47+
48+
1. The normalized symbol used for matching (e.g., SOL for SOL-PERP)
49+
2. For each exchange:
50+
- Available markets matching the symbol
51+
- Success/failure of data retrieval
52+
- Sample volume calculations
53+
3. A summary table with volumes across exchanges
54+
4. Market cap data from CoinMarketCap if available
55+
56+
## Troubleshooting Common Issues
57+
58+
- **No markets found**: The exchange may not list the token, or the symbol transformation may be incorrect.
59+
- **Markets found but no data**: The API may be rate-limited or the market data endpoint may be unavailable.
60+
- **Symbol not found in CoinMarketCap**: Check for alternative symbol representations or if the token is listed under a different ticker.

0 commit comments

Comments
 (0)