Installation Issues
npm install fails (TypeScript)
npm install fails (TypeScript)
Symptoms:
npm install kaleidoswap-sdk fails with errorsSolutions:- Ensure Node.js 18+ is installed:
node --version - Clear npm cache:
npm cache clean --force - Delete
node_modulesandpackage-lock.json, then reinstall - Try with a different package manager:
pnpm add kaleidoswap-sdk
pip install fails (Python)
pip install fails (Python)
Symptoms:
pip install kaleidoswap-sdk failsSolutions:- Ensure Python 3.10+ is installed:
python --version - Use a virtual environment:
python -m venv .venv && source .venv/bin/activate - Upgrade pip:
pip install --upgrade pip - Try:
pip install kaleidoswap-sdk --no-cache-dir
Module not found after installation
Module not found after installation
Symptoms:
Cannot find module 'kaleidoswap-sdk' or ModuleNotFoundErrorSolutions:- TypeScript: Check your
tsconfig.jsonhas"moduleResolution": "node"or"bundler" - Python: Verify you are in the correct virtual environment
- Verify the package is installed:
npm list kaleidoswap-sdkorpip show kaleidoswap-sdk
Runtime Errors
NetworkError: Connection refused
NetworkError: Connection refused
Symptoms:
NetworkError when making API callsCauses:- API server unreachable
- Incorrect
baseUrl - Firewall blocking requests
- Verify the
baseUrlis correct and accessible - Check internet connectivity
- Try accessing the API URL in a browser:
https://api.regtest.kaleidoswap.com/api/v1/market/assets - If behind a firewall, ensure outbound HTTPS is allowed
NodeNotConfiguredError
NodeNotConfiguredError
Symptoms: Always check
NodeNotConfiguredError when calling client.rln.* methodsCause: No nodeUrl / node_url was provided when creating the client.Solution:client.hasNode() / client.has_node() before calling RLN methods.QuoteExpiredError
QuoteExpiredError
Symptoms:
QuoteExpiredError when creating a swap orderCause: The quote’s expires_at time has passed.Solutions:- Get a fresh quote immediately before creating the order
- Use WebSocket streaming for always-current quotes
- Reduce the time between getting a quote and creating the order
ValidationError: Invalid amount
ValidationError: Invalid amount
Symptoms:
ValidationError with amount-related messageCauses:- Amount below minimum or above maximum
- Wrong precision (sending display units instead of raw)
- Negative or zero amount
- Check min/max limits from
listPairsresponse - Ensure you are sending raw amounts (use
toSmallestUnits/to_smallest_units) - Validate amounts before sending
APIError: 401 Unauthorized
APIError: 401 Unauthorized
TimeoutError
TimeoutError
Symptoms:
TimeoutError on API callsCauses:- Slow network connection
- Server under heavy load
- Timeout too short
- Increase the timeout:
timeout: 60(seconds) - Check network connectivity
- Implement retry logic using
error.isRetryable()
WebSocket Issues
WebSocket not connecting
WebSocket not connecting
Symptoms:
connected event never fires, or WebSocketErrorSolutions:- Verify the WebSocket URL is correct (should start with
wss://) - Ensure
enableWebSocket/enable_websocketwas called before streaming - Check that WebSocket connections are not blocked by firewall or proxy
- Try with a different client ID in the URL
No quotes received
No quotes received
Symptoms:
quoteResponse / quote_response event never firesSolutions:- Verify the asset pair is valid and has available routes
- Check that the amount is within min/max limits
- Listen for
errorevents on the WSClient - Verify the connection is established (check
connectedevent)
Frequent disconnections
Frequent disconnections
Symptoms: WebSocket disconnects and reconnects frequentlySolutions:
- Check internet stability
- The WSClient auto-reconnects with exponential backoff
- Monitor
reconnectingevents to track attempts - If
maxReconnectExceededfires, manually reconnect:
TypeScript-Specific Issues
Type errors with OpenAPI types
Type errors with OpenAPI types
Symptoms: TypeScript compiler errors about incompatible typesSolutions:
- Ensure you are importing types from
kaleidoswap-sdk: - Check your TypeScript version is 5.0+
- If using strict mode, you may need to handle
undefinedexplicitly
ESM / CommonJS issues
ESM / CommonJS issues
Symptoms:
ERR_REQUIRE_ESM or import syntax errorsSolutions:- The SDK is ESM-only. Ensure your project uses ESM:
"type": "module"inpackage.json- Or use
.mtsfile extension
- If you must use CommonJS, use dynamic import:
const sdk = await import('kaleidoswap-sdk')
Python-Specific Issues
Pydantic validation errors
Pydantic validation errors
Symptoms:
ValidationError from Pydantic when parsing API responsesSolutions:- Ensure
pydantic>=2.0is installed - Check that you are using the correct request format
- The API may have been updated — try updating the SDK:
pip install --upgrade kaleidoswap-sdk
httpx connection errors
httpx connection errors
Symptoms:
httpx.ConnectError or similarSolutions:- Check that the API URL is reachable
- If using a proxy, configure it via environment variables:
HTTP_PROXY,HTTPS_PROXY - Increase timeout if the connection is slow
Debugging
Enable Verbose Logging
Validate Configuration
Getting Help
GitHub Issues
Report bugs or request features
Telegram Community
Get help from the community
Email Support
Direct support for urgent issues
API Reference
Complete method documentation
- SDK version (
getVersion()/get_version()) - Language and runtime version (Node.js / Python)
- Error message and stack trace
- Minimal code to reproduce
- Environment (Regtest / Signet / Mainnet)