# Send Sectors Financial Agents to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "sectors-financial-agents",
    "name": "Sectors Financial Agents",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/aidityasadhakim/sectors-financial-agents",
    "canonicalUrl": "https://clawhub.ai/aidityasadhakim/sectors-financial-agents",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/sectors-financial-agents",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=sectors-financial-agents",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "references/idx-endpoints.md",
      "references/sgx-endpoints.md",
      "scripts/check_setup.py",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/sectors-financial-agents"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/sectors-financial-agents",
    "downloadUrl": "https://openagent3.xyz/downloads/sectors-financial-agents",
    "agentUrl": "https://openagent3.xyz/skills/sectors-financial-agents/agent",
    "manifestUrl": "https://openagent3.xyz/skills/sectors-financial-agents/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/sectors-financial-agents/agent.md"
  }
}
```
## Documentation

### Sectors API

Query IDX and SGX financial market data through the Sectors REST API.

Full API docs: https://sectors.app/api

### Constraints

ONLY make HTTP requests to https://api.sectors.app/v1. Never call any other domain, database, or external service.
All endpoints are GET requests returning JSON.
Never hardcode or guess an API key. Always read it from the SECTORS_API_KEY environment variable.
If 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.

### 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"' >> ~/.bashrc

# Option C: Use a .env file in the project root (see .env.example)

For agent-specific configuration:

Claude Code: claude config set env SECTORS_API_KEY your-api-key-here
OpenCode: Set in ~/.config/opencode/config.json under env
Cursor: Settings > Features > Environment Variables

### 2. Install the dependency

pip install requests

### 3. Verify setup (optional)

python scripts/check_setup.py

### Making requests

import os
import requests

API_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.

### Endpoint decision table

Pick the right endpoint based on what the user needs:

### Market structure

User wantsEndpointRequired paramsList all subsectorsGET /subsectors/noneList all industriesGET /industries/noneList all subindustriesGET /subindustries/noneSGX sector listGET /sgx/sectors/none

### Company discovery

User wantsEndpointRequired paramsCompanies in a subsectorGET /companies/?sub_sector={sub_sector}sub_sectorCompanies in a subindustryGET /companies/?sub_industry={sub_industry}sub_industryCompanies in a stock indexGET /index/{index}/indexCompanies with segment dataGET /companies/list_companies_with_segments/noneSGX companies by sectorGET /sgx/companies/?sector={sector}sector

### Company details

User wantsEndpointRequired paramsFull company report (IDX)GET /company/report/{ticker}/tickerSGX company reportGET /sgx/company/report/{ticker}tickerListing performanceGET /listing-performance/{ticker}/tickerQuarterly financial datesGET /company/get_quarterly_financial_dates/{ticker}/tickerQuarterly financialsGET /financials/quarterly/{ticker}/tickerCompany segmentsGET /company/get-segments/{ticker}/ticker

### Market data

User wantsEndpointRequired paramsDaily stock priceGET /daily/{ticker}tickerIndex daily dataGET /index-daily/{index_code}/index_codeIndex summaryGET /index/{index}/indexIDX total market capGET /idx-total/none

### Rankings and screening

User wantsEndpointRequired paramsTop gainers/losersGET /companies/top-changes/none (all optional)Top companies by metricGET /companies/top/none (all optional)Top growth companiesGET /companies/top-growth/none (all optional)Most traded stocksGET /most-traded/none (all optional)SGX top companiesGET /sgx/companies/top/none (all optional)

For full parameter lists and response schemas, see:

references/idx-endpoints.md -- all 18 IDX endpoints
references/sgx-endpoints.md -- all 6 SGX endpoints
assets/endpoint-map.md -- quick-lookup table

### Fetch a company report

import os
import requests

API_KEY = os.environ["SECTORS_API_KEY"]
BASE_URL = "https://api.sectors.app/v1"
headers = {"Authorization": API_KEY}

ticker = "BBCA"
params = {"sections": "overview,valuation,financials"}
resp = requests.get(f"{BASE_URL}/company/report/{ticker}/", headers=headers, params=params)
report = resp.json()

print(report["company_name"])
print(report["overview"]["market_cap"])

Available sections: overview, valuation, future, peers, financials, dividend, management, ownership. Use all or omit for everything.

### Get daily stock prices in a date range

import os
import requests

API_KEY = os.environ["SECTORS_API_KEY"]
BASE_URL = "https://api.sectors.app/v1"
headers = {"Authorization": API_KEY}

ticker = "BBRI.JK"
# Normalize: uppercase, strip .JK
clean = ticker.upper().replace(".JK", "")

params = {"start": "2025-01-01", "end": "2025-01-31"}
resp = requests.get(f"{BASE_URL}/daily/{clean}", headers=headers, params=params)
prices = resp.json()

for day in prices:
    print(day["date"], day["close"], day["volume"])

### Find top gainers and losers

import os
import requests

API_KEY = os.environ["SECTORS_API_KEY"]
BASE_URL = "https://api.sectors.app/v1"
headers = {"Authorization": API_KEY}

params = {
    "classifications": "top_gainers,top_losers",
    "periods": "7d,30d",
    "n_stock": 5,
    "min_mcap_billion": 5000,
}
resp = requests.get(f"{BASE_URL}/companies/top-changes/", headers=headers, params=params)
movers = resp.json()

for stock in movers["top_gainers"]["7d"]:
    print(stock["symbol"], stock["price_change"])

### List companies in an index

import os
import requests

API_KEY = os.environ["SECTORS_API_KEY"]
BASE_URL = "https://api.sectors.app/v1"
headers = {"Authorization": API_KEY}

# Available: lq45, idx30, kompas100, jii70, idxhidiv20, srikehati, etc.
resp = requests.get(f"{BASE_URL}/index/lq45/", headers=headers)
companies = resp.json()

for c in companies:
    print(c["symbol"], c["company_name"])

### SGX company report

import os
import requests

API_KEY = os.environ["SECTORS_API_KEY"]
BASE_URL = "https://api.sectors.app/v1"
headers = {"Authorization": API_KEY}

ticker = "D05"  # DBS Group
resp = requests.get(f"{BASE_URL}/sgx/company/report/{ticker}", headers=headers)
report = resp.json()

print(report["name"])
print(report["valuation"]["pe"])
print(report["financials"]["gross_margin"])

### Ticker normalization

MarketRuleExampleIDXUppercase, strip .JK suffixbbca.jk -> BBCASGXUppercase, strip .SI suffixd05.si -> D05

Always normalize before passing to an endpoint.

### Gotchas

Auth header format: Use Authorization: <raw_key>. NOT Bearer <key>. NOT Authorization: Bearer <key>.


Date format: Always YYYY-MM-DD. Example: 2025-06-15.


Date range limit: The /most-traded/ endpoint requires start and end dates within 90 days of each other.


Kebab-case for subsectors and sectors: Use banks, financing-service, consumer-defensive. Not camelCase or snake_case.


Nested response structure: Ranking endpoints (top-changes, top, top-growth) return objects keyed by classification, then by period. Always navigate both levels.
# top-changes returns: { "top_gainers": { "7d": [...], "30d": [...] } }
# top returns: { "dividend_yield": [...], "revenue": [...] }



Market cap units: IDX values are in billion IDR (min_mcap_billion). SGX values are in million SGD (min_mcap_million).


Default values matter: Many optional params default to "all" or specific values (e.g. n_stock defaults to 5, min_mcap_billion defaults to 5000). Be explicit when you need different behavior.


Index codes: IDX index daily data uses lowercase codes: ihsg, lq45, idx30. Company-by-index uses the same codes.


Quarterly financials approx flag: When approx=true, the API returns the closest available quarter if an exact match for report_date is not found.


Company report sections param: Only appended to the URL when not "all". If you want all sections, omit the sections parameter entirely.

### Available IDX indices

ftse, idx30, idxbumn20, idxesgl, idxg30, idxhidiv20, idxq30, idxv30, jii70, kompas100, lq45, sminfra18, srikehati, economic30, idxvesta28

### Top companies classifications

IDX (/companies/top/): dividend_yield, total_dividend, revenue, earnings, market_cap, pb, pe, ps

IDX growth (/companies/top-growth/): top_earnings_growth_gainers, top_earnings_growth_losers, top_revenue_growth_gainers, top_revenue_growth_losers

IDX movers (/companies/top-changes/): top_gainers, top_losers

SGX (/sgx/companies/top/): dividend_yield, revenue, earnings, market_cap, pe

### Error handling

Always check the response status:

resp = requests.get(url, headers=headers)
if resp.status_code == 403:
    raise ValueError("Invalid or missing API key. Ensure SECTORS_API_KEY is set correctly.")
if resp.status_code == 404:
    raise ValueError(f"Resource not found: {url}")
if not resp.ok:
    raise RuntimeError(f"API error {resp.status_code}: {resp.text}")
data = resp.json()
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: aidityasadhakim
- Version: 1.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/sectors-financial-agents)
- [Send to Agent page](https://openagent3.xyz/skills/sectors-financial-agents/agent)
- [JSON manifest](https://openagent3.xyz/skills/sectors-financial-agents/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/sectors-financial-agents/agent.md)
- [Download page](https://openagent3.xyz/downloads/sectors-financial-agents)