|
| 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