Developer portal
Build with the CandleScript.io REST and WebSocket APIs.
Get started
Partner market-data calls use /v1/public/* with a Bearer API key. Create keys on the Manage API keys page (or workstation Plans & API). Production base URL: https://candlescript.io/api.
curl -s "https://candlescript.io/api/v1/public/symbols?query=AAPL" \
-H "Authorization: Bearer $CHARTING_API_KEY"const response = await fetch(
"https://candlescript.io/api/v1/public/quotes?symbols=NASDAQ%3AAAPL,COINBASE%3ABTCUSD",
{ headers: { Authorization: `Bearer ${process.env.CANDLESCRIPT_API_KEY}` } }
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Authentication & scopes
Public API keys are scoped to market-data endpoints. Session cookies are required for Candle Script, webhooks, and user resources.
| Scope | Grants |
|---|---|
symbols:read | Search and resolve symbols (`GET /v1/public/symbols`). |
quotes:read | Latest quote snapshots (`GET /v1/public/quotes`). |
history:read | Historical OHLCV bars (`GET /v1/public/history`). |
screeners:read | Run screeners (`GET /v1/public/screeners`). |
news:read | Read the signed partner news feed (`GET /v1/public/news`). |
news:events | Read lifecycle events and distribution usage reports. |
GET /v1/public/history?symbol=NASDAQ:AAPL&resolution=1D HTTP/1.1
Host: api.candlescript.io
Authorization: Bearer cpk_xxxxxxxxxxxxxxxx
Accept: application/jsonRate limits
Limits are enforced per API key. On 429 responses, honor Retry-After and inspect X-RateLimit-Remaining and X-RateLimit-Reset.
| Plan | REST API | WebSocket API |
|---|---|---|
| Essential | 1,000 requests / day | Not included |
| Plus | 10,000 requests / day | 2 connections; 100 symbols each |
| Premium | 50,000 requests / day | 10 connections; 500 symbols each |
| Ultimate | 250,000 requests / day | 50 connections; 1,000 symbols each |
Resources
Developer tutorials
Build an indicator, call REST from JavaScript or Python, and embed a chart in React.
OpenAPI reference
Interactive contract and downloadable YAML.
API keys & usage
Create keys and inspect quota windows.
Candle Script quickstart
Author indicators and strategies.
Candle Script API
Compile, run, and backtest over REST.
REST API
Public market-data endpoints.
WebSocket API
Live quote stream.
Webhooks
Signed outbound events.
Embeddable widget
Mini-chart embed and configurator.
Datafeed guide
Bridge our API to chart libraries.
Developer API FAQ
- How do I authenticate with the CandleScript.io partner API?
- Create a scoped API key from the authenticated developer key page, then send it as a Bearer token in the Authorization header. Session cookies are used for account-owned resources and are not a substitute for a partner API key.
- Which plans include REST and WebSocket API access?
- Essential includes scoped REST access with 1,000 requests per day. Plus and higher include the partner quote WebSocket, with connection, symbol, and daily request limits increasing by tier. Basic accounts cannot create partner API keys.
- Is the browser chart stream the same as the partner WebSocket API?
- No. The product market stream powers CandleScript.io pages and has its own session entitlements. The partner quote WebSocket is API-key authenticated, separately metered, and available starting with Plus.
- Is there a published JavaScript or Python SDK?
- Not yet. The public integration contract is the OpenAPI document plus the REST and WebSocket guides. Examples use standard fetch, WebSocket, and Python HTTP clients so they work without an unpublished package.
CandleScript.io uses synthetic data in offline development. Production keys return entitlement-gated market data.