- Introduced `check_symbols.py` to load and filter ETH perpetual markets from the OKX exchange using CCXT. - Updated the backtester to normalize signals to a 5-tuple format, incorporating size management for trades. - Enhanced portfolio functions to support variable size and leverage adjustments based on initial capital. - Added a new method in `CryptoQuantClient` for chunked historical data fetching to avoid API limits. - Improved market symbol normalization in `market.py` to handle different formats. - Updated regime strategy parameters based on recent research findings for optimal performance.
29 lines
809 B
Python
29 lines
809 B
Python
import ccxt
|
|
import sys
|
|
|
|
def main():
|
|
try:
|
|
exchange = ccxt.okx()
|
|
print("Loading markets...")
|
|
markets = exchange.load_markets()
|
|
|
|
# Filter for ETH perpetuals
|
|
eth_perps = [
|
|
symbol for symbol, market in markets.items()
|
|
if 'ETH' in symbol and 'USDT' in symbol and market.get('swap') and market.get('linear')
|
|
]
|
|
|
|
print(f"\nFound {len(eth_perps)} ETH Linear Perps:")
|
|
for symbol in eth_perps:
|
|
market = markets[symbol]
|
|
print(f" CCXT Symbol: {symbol}")
|
|
print(f" Exchange ID: {market['id']}")
|
|
print(f" Type: {market['type']}")
|
|
print("-" * 30)
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
main()
|