π¦ ClawHub
Sectors Financial Agents
by @aidityasadhakim
Query financial market data from the Sectors API (api.sectors.app) for IDX (Indonesia Stock Exchange) and SGX (Singapore Exchange) markets. Use when the user...
βοΈ Configuration
1. Set the API key
The API key must be available as the SECTORS_API_KEY environment variable.
# Option A: Set in your current shell
export SECTORS_API_KEY="your-api-key-here"Option B: Add to your shell profile (~/.bashrc, ~/.zshrc) for persistence
echo 'export SECTORS_API_KEY="your-api-key-here"' >> ~/.bashrcOption C: Use a .env file in the project root (see .env.example)
For agent-specific configuration:
claude config set env SECTORS_API_KEY your-api-key-here~/.config/opencode/config.json under env2. Install the dependency
pip install requests
3. Verify setup (optional)
python scripts/check_setup.py
Making requests
import os
import requestsAPI_KEY = os.environ["SECTORS_API_KEY"]
BASE_URL = "https://api.sectors.app/v1"
headers = {"Authorization": API_KEY}
response = requests.get(f"{BASE_URL}/subsectors/", headers=headers)
data = response.json()
The Authorization header takes the raw API key. Do NOT prefix it with Bearer.
π Constraints
https://api.sectors.app/v1. Never call any other domain, database, or external service.GET requests returning JSON.SECTORS_API_KEY environment variable.SECTORS_API_KEY is not set, prompt the user to set it: export SECTORS_API_KEY="your-api-key-here" or run the setup check script at scripts/check_setup.py.TERMINAL
clawhub install sectors-financial-agents