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
Usage in a Strands Agent
from strands import Agent
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 (shell, .zshrc, .env, secret manager):
export CCXT_EXCHANGE=bybit # or binance, okx, coinbase, ...
export CCXT_API_KEY=...
export CCXT_SECRET=...
# optional (only if your exchange requires them)
export CCXT_PASSWORD=...
export CCXT_UID=...
export CCXT_TOKEN=...
export CCXT_DEFAULT_TYPE=swap # or spot
export CCXT_SANDBOX=false
Then you can omit exchange= and call authenticated methods:
agent.tool.ccxt_generic(action="call", method="fetch_balance")
Notes
- Keep API keys out of code and out of git.
- 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.9.tar.gz.
File metadata
- Download URL: ccxt_tool_strands-0.1.9.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1352dede6a9f7adb999cebe91dbcb006f2f69f3d79c2e6dd2c720fa4e0d76410
|
|
| MD5 |
dc671a187a26006d83d013ebf5d2bd5c
|
|
| BLAKE2b-256 |
a02909d811083cfbd4387bcb269c9379d4ba35f6a4f53fbf632d7c8cd83019a2
|
File details
Details for the file ccxt_tool_strands-0.1.9-py3-none-any.whl.
File metadata
- Download URL: ccxt_tool_strands-0.1.9-py3-none-any.whl
- Upload date:
- Size: 9.7 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 |
70cd6f7ffd5f881b980cfea0763fed6e7a0ff8b85fe08f564d7485763a08f1b5
|
|
| MD5 |
b14d994edafc64db2a2ad3ec05a7c7f7
|
|
| BLAKE2b-256 |
49fb6511714961bbe1eff6337fc7653a5820a5ca6413c595311834845a8602d4
|