CCXT / CCXT Pro tools for Strands/DevDuck
Project description
ccxt-tool-strands
CCXT + (optional) CCXT Pro tools for Strands/DevDuck.
This repo ships Strands @tool wrappers that let your agent call any CCXT exchange method (fetch_*, create_order, etc.) via a single tool entrypoint.
What’s inside
tools/ccxt_generic.pyccxt_generic(...)— call any ccxt exchange method (sync)ccxt_multi_exchange_orderbook(...)— compare best bid/ask across exchangesccxt_pro_watch(...)— call ccxt.prowatch_*methods (optional)
Install
Base (CCXT)
pip install ccxt-tool-strands
This installs:
ccxtstrands-agents(provides thestrandsPython module)
Optional: CCXT Pro (WebSocket / watch_*)
CCXT Pro (real-time WebSocket watch_*) is shipped as a separate distribution by CCXT and is not reliably installable from public PyPI.
This tool will try to import ccxt.pro (recommended). If you have CCXT Pro installed in your environment, ccxt_pro_watch(...) works. Otherwise it returns a clear ImportError message.
See CCXT Pro docs: https://github.com/ccxt/ccxt/wiki/ccxt.pro.manual
Using with DevDuck / Strands
Assuming your agent loads tools from ./tools (DevDuck default when DEVDUCK_LOAD_TOOLS_FROM_DIR=true).
Public calls
ccxt_generic(action="call", exchange="bybit", method="fetch_ticker", args='["BTC/USDT"]')
ccxt_generic(action="call", exchange="bybit", method="fetch_ohlcv", args='["BTC/USDT","1m",null,200]')
ccxt_generic(action="list_methods", exchange="bybit")
Authenticated calls (server-side env)
Set environment variables:
export CCXT_EXCHANGE=bybit
export CCXT_API_KEY=...
export CCXT_SECRET=...
# optional
export CCXT_PASSWORD=...
export CCXT_UID=...
export CCXT_TOKEN=...
export CCXT_DEFAULT_TYPE=swap # or spot
export CCXT_SANDBOX=true # optional
Then:
ccxt_generic(action="call", method="fetch_balance")
CCXT Pro watch example
ccxt_pro_watch(
exchange="bybit",
method="watch_ticker",
args='["BTC/USDT"]',
max_messages=3,
max_seconds=15,
)
Notes
- Outputs redact common secret fields.
enableRateLimit=Trueby default.- Browser-side API keys are unsafe; keep keys server-side.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccxt_tool_strands-0.1.0.tar.gz.
File metadata
- Download URL: ccxt_tool_strands-0.1.0.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d8cd744e517944d6985fac837476ac140e9d5fa49e8ad594fb26a3d1e21e246
|
|
| MD5 |
47bc3f75ec5af3bb08de233b840f3ccd
|
|
| BLAKE2b-256 |
c9bdfa4f23543f321c1ce7a41b8b04d0222136ecd95a62558a20dc403a7ed636
|
File details
Details for the file ccxt_tool_strands-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ccxt_tool_strands-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ed4344f48e18b4e17fe8056a5f74cca5b3859f2d7238745488736c7ead174ec
|
|
| MD5 |
e75e0226271fe39f2ed8048085478c4f
|
|
| BLAKE2b-256 |
2cc980bfeb4d5011149f26491b7b699d7bfb2e64b21709c82e6a150fc4ca28b5
|