Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@xsa-dev
Copy link

@xsa-dev xsa-dev commented Sep 23, 2025

No description provided.

- Add KuCoin Spot, Futures, and Futures Testnet support
- Implement KuCoinMain base class with API integration
- Add timeframe conversion utilities for KuCoin API
- Support up to 1500 candles per request with 10 req/sec rate limit
- Include proper error handling and retry logic
- Add geographic restriction handling

Supported exchanges:
- KuCoin Spot (api.kucoin.com)
- KuCoin Futures (api-futures.kucoin.com)
- KuCoin Futures Testnet (api-sandbox-futures.kucoin.com)

Supported timeframes: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1D, 1W, 1M
- Add KUCOIN_TIMEFRAMES with 14 supported timeframes
- Add KuCoin Spot, Futures, and Futures Testnet to exchange_info
- Configure proper fees, URLs, and trading modes
- Enable backtesting for Spot and Futures
- Enable live trading for all KuCoin exchanges
- Set appropriate required_live_plan levels

Frontend will now display KuCoin exchanges in:
- Exchange selection dropdown
- Backtesting mode
- Live trading mode
- Candle import interface
- Replace custom API implementation with CCXT library
- Add proper symbol format conversion (BTC-USDT <-> BTC/USDT)
- Improve error handling and fallback mechanisms
- Add CCXT dependency to requirements.txt
- Fix get_starting_time method with better error handling
- Support for both spot and futures markets
- Tested successfully with BTC-USDT symbol

Features:
- 1305+ available symbols detected
- Reliable candle fetching (tested with 1440 candles)
- Proper timeframe conversion
- Robust error handling with fallbacks
- Support for sandbox/testnet environments
@xsa-dev

This comment was marked as outdated.

@xsa-dev xsa-dev marked this pull request as draft September 30, 2025 17:19
- Implement logic to prevent filling absent candles for KuCoin Futures, avoiding the creation of zero-volume fake candles.
- Add detailed logging for candle fetching and processing, including zero volume and same price analysis.
- Override global `_fill_absent_candles` function to ensure only real candles are returned.
- Introduce methods for symbol conversion and market status checks to enhance usability and reliability.
- Update rate limits for both KuCoin Futures and Testnet to ensure compliance with API restrictions.
- Remove KuCoin Futures and KuCoin Futures Testnet support
- Add clear error messages directing users to use KuCoin Spot instead
- Revert conditional processing in _fill_absent_candles function
- Clean up unused imports and code

KuCoin Futures had issues with data quality (86% zero volume candles)
due to _fill_absent_candles creating fake candles. Instead of fixing
the complex data filling logic, we disable futures support entirely
and recommend users use the stable KuCoin Spot exchange.
@xsa-dev xsa-dev marked this pull request as ready for review October 1, 2025 09:51
@xsa-dev xsa-dev marked this pull request as draft October 6, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant