CCXT / CCXT Pro tools for Strands Agents
Project description
CCXT Tools (for Strands Agents)
A community tool package that exposes CCXT (and optional CCXT Pro) to Strands Agents via @tool wrappers.
- Generic method calling:
fetch_*,create_order,cancel_order, etc. - Optional real-time WebSocket streaming via
ccxt.pro(watch_*).
Install
pip install ccxt-tool-strands
Optional: CCXT Pro
CCXT Pro is distributed separately by CCXT.
If you have it available in your environment, ccxt_pro_watch(...) will work.
If not, the tool returns a clear ImportError message.
Tools
ccxt_generic(...)- Call any CCXT exchange method.
ccxt_multi_exchange_orderbook(...)- Compare best bid/ask across multiple exchanges.
ccxt_pro_watch(...)- Call
ccxt.prowatch_*methods (bounded snapshots).
- Call
Usage in a Strands Agent
from strands import Agent
# import tools from the installed package
from ccxt_tool_strands.ccxt_generic import ccxt_generic, ccxt_multi_exchange_orderbook
from ccxt_tool_strands.ccxt_pro import ccxt_pro_watch
agent = Agent(
model="...",
tools=[ccxt_generic, ccxt_multi_exchange_orderbook, ccxt_pro_watch],
)
# public market data
agent.tool.ccxt_generic(action="call", exchange="bybit", method="fetch_ticker", args='["BTC/USDT"]')
agent.tool.ccxt_generic(action="call", exchange="bybit", method="fetch_ohlcv", args='["BTC/USDT","1m",null,200]')
# multi-exchange best bid/ask
agent.tool.ccxt_multi_exchange_orderbook(exchanges='["binance","bybit","okx"]', symbol="BTC/USDT")
Authentication (recommended: server-side)
Set environment variables in the agent runtime:
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 you can omit exchange= and call authenticated methods:
agent.tool.ccxt_generic(action="call", method="fetch_balance")
Notes
- Secrets: do not put API keys in client-side apps; keep them in the agent/server environment.
- Rate limits: CCXT
enableRateLimit=Trueis enabled by default in the tool.
Links
- CCXT: https://github.com/ccxt/ccxt
- Strands community tools: https://strandsagents.com/latest/documentation/docs/community/tools
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.1.tar.gz.
File metadata
- Download URL: ccxt_tool_strands-0.1.1.tar.gz
- Upload date:
- Size: 39.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92a05c9a77246c07a2818f47d6c45e8398f8fcb7bf52cb6c94d9fbe37b9458c8
|
|
| MD5 |
5a7b545dc02e987e41db2131f055b4bf
|
|
| BLAKE2b-256 |
14c57cab125df33546ae66c58c7e22e45812c8fb03b399f4037265efdf1dc369
|
File details
Details for the file ccxt_tool_strands-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ccxt_tool_strands-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 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 |
a54c850361d2088d0b8d9f7b7a907a936dbb72e232c1a523fd5dbd8dbe4bcb68
|
|
| MD5 |
21e290c13335bc2f9af76bcb6dedb7e9
|
|
| BLAKE2b-256 |
c061748d2dc379dbb98f6039bc78f6660fe7d30f3dc11d9b0069abb41d7b91f7
|