roic-api-v3

A guide for using the roic.ai version 3 REST API, a web service for financial market data. It explains authentication, valid stock and currency-pair identifiers, pagination, searches, and available price-related operations.

In plain words
What is it for?
Use it when requesting stock or foreign-exchange prices, searching financial identifiers, paging through results, or retrieving current prices for many instruments.
Why use it?
It prevents common API errors, such as sending two credentials or using an ambiguous ticker like AAPL without its exchange. It also describes ways to resolve identifiers once and reuse them.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/roicai/agents-plugin/roic-api-v3
Any agent
npx skills add roicai/agents-plugin --skill roic-api-v3
Clone the repo
git clone --depth 1 https://github.com/roicai/agents-plugin

Made for: Claude Code, Codex.

Per session 224 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,017 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00224 $0.02017
Opus 5 $0.00112 $0.01009
Sonnet 5 $0.00045 $0.00403
Haiku 4.5 $0.00022 $0.00202

Measured 2d ago against content hash 7960ccf01361, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

roic-api-v3 scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -H "Authorization: Bearer $ROIC_API_KEY" \
plugin/skills/roic-api-v3/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

roic.ai v3 API

Base URL https://api.roic.ai/v3.0.0. Every operation is a GET. 35 operations, all documented in references/.

Authenticate

Send exactly one credential. Sending both is a 401.

# Recommended — keeps the key out of URLs, logs, and referrers
curl -H "Authorization: Bearer $ROIC_API_KEY" \
  "https://api.roic.ai/v3.0.0/tickers/NASDAQ:AAPL"

# Browser-friendly alternative
curl "https://api.roic.ai/v3.0.0/tickers/NASDAQ:AAPL?apikey=$ROIC_API_KEY"

Identifiers (the most common source of 400s)

identifier accepts only shapes that resolve to exactly one listing:

Shape Example Notes
Qualified symbol NASDAQ:AAPL exchange and symbol, colon separated
Public ID tkr_cO46h8pgSu9Qqy, cmp_… returned in every id field
FIGI BBG000B9XRY4

A bare AAPL, a CIK, a CUSIP, or an ISIN maps to several listings, so v3 rejects them with 400 invalid_parameter. Resolve them once through /tickers/search?search_by=isin&query=US0378331005, cache the qualified symbol, and reuse it. Forex uses its own shape: FX:EURUSD, or bare EURUSD / EUR/USD / EUR-USD / EUR_USD.

Response shape

Lists return { "data": [...], "next_page_url": null, "previous_page_url": null }. Single-resource routes return the object itself with no envelope. Two price lists hoist the shared context to the top level: /stock-prices/{identifier} adds symbol and currency, /forex-prices/{identifier} adds symbol.

Errors are Stripe-shaped and always carry a request_id:

{"error":{"type":"payment_required_error","code":"historical_data_restricted",
  "message":"…","param":"date","request_id":"…"}}

Paginate by following next_page_url verbatim. The page value is an opaque encrypted token bound to the exact filters and limit of the first call, and it expires after 1 hour. Never construct, mutate, or persist it long-term.

Routing table

Building… Call Requests Plan
Symbol/ISIN/CUSIP/CIK/FIGI lookup /tickers/search 1 Free
Universe or exchange constituent list /tickers (limit=2000) 1 per 2000 Free
Exchange / market / sector / industry / country catalog /exchanges, /markets, /sectors, /industries, /countries 1, unpaginated Free
Company header card /company/profile/{identifier} 1 Free
Company logo /company/logo/{identifier} 1, then 304s Free
Whole-universe quote board /stock-prices/latest (limit=2000) 1 per 2000 tickers Individual+
One quote /stock-prices/latest/{identifier} 1 Free
Price chart / backtest series /stock-prices/{identifier} + date.gte/date.lte (limit=1000) 1 per 1000 bars Free
Corporate-action feed /stock-splits (omit identifier for all companies) 1 per 500 Free
Financial statements, ratios, multiples, per-share 11 /fundamental/... routes (limit=100) 1 per statement type Free (annual)
Headcount history /company/employees 1 per 500 Free
FX rate board /forex-prices/latest (limit=2000) 1 Individual+
FX time series /forex-prices/{identifier} (limit=1000) 1 per 1000 Free
Pair catalog /forex-pairs (limit=2000) 1 Free
Transcript archive index /earnings-calls (omit identifier for all companies) 1 per 100 Free (latest 2/company)
One transcript /earnings-calls/{identifier} + fiscal_year + fiscal_quarter 1 Free (latest 2/company)
Upcoming/reported earnings + estimates /calendar/earnings 1 per 500 Individual+
Exchange sessions / holidays /exchanges/trading-hours, /exchanges/holidays 1 Individual+

Read the full file on GitHub · 115 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 115 lines · 224 tokens per session scan A 7960ccf01361

Subscribe to this mod's changes

roic-api-v3 is a skill published in the GitHub repository roicai/agents-plugin (2 stars, last pushed 26d ago), licensed MIT. It adds 224 tokens to every session and 2,017 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.