### Development setup and test commands Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Commands to clone the repository, set up a virtual environment, install the package in editable mode with dev dependencies, and run unit tests and type checking. ```bash git clone https://github.com/abuzant/tickatlas-sdk cd tickatlas-sdk/python python -m venv .venv source .venv/bin/activate pip install -e ".[dev]" pytest # unit tests (no network) mypy # type-check (strict) ``` -------------------------------- ### Install TickAtlas Go SDK with go get Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Installs the TickAtlas Go SDK module. Requires Go 1.21+. ```bash go get github.com/abuzant/tickatlas-sdk/go ``` -------------------------------- ### TickAtlas PHP SDK Quickstart and Enum Usage Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Code examples demonstrating the TickAtlas PHP SDK usage: client initialization, fetching quotes and indicators, accessing raw data, and using enums. ```php use TickAtlas\Client; use TickAtlas\Exception\TickAtlasException; $client = new Client(); // reads TICKATLAS_API_KEY try { $quote = $client->getQuote('EURUSD'); printf("EURUSD bid=%s ask=%s spread=%s pips\n", $quote->bid, $quote->ask, $quote->spreadPips); $rsi = $client->getIndicator('EURUSD', 'RSI_14', ['timeframe' => 'H1']); printf("RSI(14) = %s\n", $rsi->value); } catch (TickAtlasException $e) { fwrite(STDERR, "TickAtlas error: {$e->getMessage()}\n"); } ``` ```php $quote->toArray(); // full decoded data array $quote->get('some_new_field'); // single raw key ``` ```php use TickAtlas\Enums\{Timeframe, Period, Impact, HeatmapType, HeatmapTimeframe, Bias, Category, Indicator}; $client->getOhlc('EURUSD', ['timeframe' => Timeframe::H4]); $client->getOhlc('EURUSD', ['timeframe' => 'H4']); // equivalent $client->getOhlc('EURUSD', ['timeframe' => 'H4']); // equivalent Indicator::all(); // the 42 valid indicator identifiers Indicator::byCategory(); // grouped by trend/oscillator/volatility/volume ``` -------------------------------- ### JavaScript ESM Quickstart: Get Quote Source: https://github.com/abuzant/tickatlas-sdk/blob/main/javascript/README.md Initializes the TickAtlas client and fetches a real-time quote for EURUSD using ES module import syntax. Logs the bid and ask prices. ```js import { TickAtlas } from "tickatlas"; const client = new TickAtlas({ apiKey: process.env.TICKATLAS_API_KEY }); const quote = await client.getQuote("EURUSD"); console.log(quote.bid, quote.ask); ``` -------------------------------- ### GET /quote - Example JSON Response Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Example response for GET /quote showing a real-time quote for EURUSD with bid, ask, spread, spread_pips, timestamp, and source fields. ```json {"success":true,"data":{"symbol":"EURUSD","bid":1.16404,"ask":1.16422,"spread":18,"spread_pips":1.8,"timestamp":"2026-05-25T13:56:15.819519+00:00","source":"Equiti Securities"}} ``` -------------------------------- ### Install tickatlas with npm Source: https://github.com/abuzant/tickatlas-sdk/blob/main/javascript/README.md Install the SDK via npm. Requires Node.js 18 or newer or a modern browser. ```bash npm install tickatlas ``` -------------------------------- ### JavaScript CommonJS Quickstart: Get Quote Source: https://github.com/abuzant/tickatlas-sdk/blob/main/javascript/README.md Initializes the TickAtlas client and fetches a real-time quote for EURUSD using CommonJS require syntax. Wrapped in an async IIFE to use await. ```js const { TickAtlas } = require("tickatlas"); (async () => { const client = new TickAtlas({ apiKey: process.env.TICKATLAS_API_KEY }); const quote = await client.getQuote("EURUSD"); console.log(quote.bid, quote.ask); })(); ``` -------------------------------- ### Composer install and test commands Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Commands to install dependencies and run the test suites. The integration suite is skipped unless the required environment variables are set. ```bash composer install composer test # unit + (skipped) integration suites composer test:unit # unit suite only (no network) ``` -------------------------------- ### Install TickAtlas SDK with pip Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Installs the TickAtlas Python SDK from PyPI. Requires Python 3.9 or later. ```bash pip install tickatlas ``` -------------------------------- ### GET /symbols - Example JSON Response Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Example response for GET /symbols listing symbols. Shows a single symbol object with fields like symbol, name, category, base_currency, quote_currency, digits, and tradable, along with pagination info. ```json {"success":true,"data":{"symbols":[{"symbol":"EURUSD","name":null,"category":"forex","base_currency":"EUR","quote_currency":"USD","digits":5,"tradable":true}],"total":149,"pagination":{"offset":0,"limit":100,"total":149,"has_more":true}}} ``` -------------------------------- ### TypeScript Quickstart: Get Quote and RSI Indicator Source: https://github.com/abuzant/tickatlas-sdk/blob/main/javascript/README.md Initializes the TickAtlas client with an API key from the environment, fetches a real-time quote for EURUSD, and retrieves the RSI(14) indicator on the H1 timeframe. Uses the exported Timeframes and Indicators enums. ```ts import { TickAtlas, Indicators, Timeframes } from "tickatlas"; const client = new TickAtlas({ apiKey: process.env.TICKATLAS_API_KEY }); // A single real-time quote const quote = await client.getQuote("EURUSD"); console.log(`${quote.symbol}: ${quote.bid} / ${quote.ask} (spread ${quote.spread_pips} pips)`); // RSI(14) on the H1 timeframe const rsi = await client.getIndicator("EURUSD", Indicators.RSI_14, { timeframe: Timeframes.H1, }); console.log(`RSI: ${rsi.value}`); ``` -------------------------------- ### GET /indicator — single indicator value response example Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Example JSON response for the GET /indicator endpoint, showing a single indicator value (RSI_14) for EURUSD on the H1 timeframe. The response includes bid/ask prices, updated_at epoch timestamp, and server_time. ```json {"success":true,"data":{"symbol":"EURUSD","timeframe":"H1","indicator":"RSI_14","value":58.34,"bid":1.0831,"ask":1.0832,"updated_at":1711548000,"server_time":"2026-03-27T14:00:00"}} ``` -------------------------------- ### Quickstart: Fetch quote and OHLC candles with TickAtlas Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Shows the basic usage of the TickAtlas client: fetching a quote and OHLC candles. The response objects are typed frozen dataclasses, and the original JSON payload is always available on `.raw`. ```python from tickatlas import TickAtlas with TickAtlas() as client: quote = client.get_quote("EURUSD") print(quote.symbol, quote.bid, quote.ask, quote.spread_pips) candles = client.get_ohlc("EURUSD", timeframe="H1", limit=10) for c in candles.candles: print(c.time, c.open, c.high, c.low, c.close, c.volume) ``` -------------------------------- ### Create client and fetch a currency quote in Go Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md This example shows how to create a TickAtlas client, which reads the TICKATLAS_API_KEY from the environment, and fetches a quote for EURUSD. It prints the bid, ask, and spread in pips if the quote is available. The code also demonstrates that every method takes a context.Context as the first argument and returns a typed pointer and an error, and that nullable numeric fields like Bid are pointers to differentiate null from zero values. ```go package main import ( "context" "fmt" "log" tickatlas "github.com/abuzant/tickatlas-sdk/go" ) func main() { client, err := tickatlas.NewClient() // reads TICKATLAS_API_KEY if err != nil { log.Fatal(err) } ctx := context.Background() quote, err := client.Quote(ctx, "EURUSD", nil) if err != nil { log.Fatal(err) } if quote.Bid != nil { fmt.Printf("%s bid=%.5f ask=%.5f spread=%.1f pips\n", quote.Symbol, *quote.Bid, *quote.Ask, *quote.SpreadPips) } } ``` -------------------------------- ### Install TickAtlas PHP SDK via Composer Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Use this command to install the TickAtlas PHP SDK as a dependency in your project. Requires PHP 8.1 or higher. ```bash composer require tickatlas/php-sdk ``` -------------------------------- ### Clone and build the TickAtlas JavaScript SDK Source: https://github.com/abuzant/tickatlas-sdk/blob/main/javascript/README.md Commands to clone the repository, install dependencies, build with tsup, run typecheck, and run unit tests. The unit tests are fully mocked and do not touch the network. ```bash git clone https://github.com/abuzant/tickatlas-sdk.git cd tickatlas-sdk/javascript npm install npm run build # tsup -> dist/ (ESM .mjs + CJS .cjs + .d.ts) npm run typecheck # tsc --noEmit npm test # vitest (unit tests, fully mocked — no network) ``` -------------------------------- ### Get indicators, indicator history, multi, and screen Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Fetch single or all indicators, indicator history (starter+), batch indicators across symbols, and scan symbols by indicator value. ```php // single value $client->getIndicator('EURUSD', 'RSI_14', ['timeframe' => 'H1']); // all indicators for a symbol $client->getIndicators('EURUSD', [ 'timeframe' => 'H1', 'category' => 'oscillator', // trend|oscillator|volatility|volume ]); $set = $client->getIndicators('EURUSD'); $set->value('RSI_14'); // convenience accessor // catalogue $client->listIndicators(); // indicator series (plan: starter+) $client->getIndicatorHistory('EURUSD', 'RSI_14', [ 'timeframe' => 'H1', 'from' => '2026-05-01T00:00:00', 'to' => '2026-05-02T00:00:00', 'limit' => 500, // 1..5000 ]); // batch indicators across symbols (historical mode when from/to supplied) $client->getMulti(['EURUSD', 'GBPUSD'], ['RSI_14', 'SMA_20'], ['timeframe' => 'H1']); // scan symbols by indicator value. // note: minVal/maxVal map to the API's min_val/max_val params. $client->screen('RSI_14', [ 'minVal' => 70, 'maxVal' => null, 'sort' => 'desc', // asc|desc (default asc) 'limit' => 50, // 1..200 ]); ``` -------------------------------- ### Get account and layout Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Retrieves account details (name, plan, daily usage, daily quota) and the current dashboard layout. ```python account = client.get_account() print(account.name, account.plan, account.daily_used, account.daily_quota) layout = client.get_layout() print(layout.layout) ``` -------------------------------- ### Go: Create client and fetch RSI indicator Source: https://github.com/abuzant/tickatlas-sdk/blob/main/README.md Creates a TickAtlas client that reads the TICKATLAS_API_KEY environment variable, then fetches the RSI_14 indicator for EURUSD on the H1 timeframe. The error is ignored in this example. ```go client, _ := tickatlas.NewClient() // reads TICKATLAS_API_KEY rsi, err := client.Indicator(ctx, "EURUSD", "RSI_14", &tickatlas.IndicatorParams{Timeframe: "H1"}) ``` -------------------------------- ### Get account, layout, and save layout Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Retrieve account identity and quota, get saved dashboard layout, and save a new layout (write endpoint, max 60 widgets). ```php $client->getAccount(); // identity & quota: name, plan, prepaid_credits, daily_quota, daily_used $client->getLayout(); // saved dashboard layout (or null) // ADVANCED / WRITE — mutates the authenticated user's saved dashboard (<= 60 widgets). // This is the only write endpoint in the SDK; use deliberately. $client->saveLayout([ ['widget' => 'chart', 'symbol' => 'EURUSD'], ]); ``` -------------------------------- ### Bring your own httpx client Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Shows how to pass a custom httpx.Client to TickAtlas. The SDK will not close a client you pass in, so you are responsible for closing it. This example uses a proxy and disables SSL verification. ```python import httpx from tickatlas import TickAtlas http = httpx.Client(proxies="http://localhost:8080", verify=False) client = TickAtlas(http_client=http) # the SDK will not close a client you pass in ``` -------------------------------- ### Get indicators, history, batch, screener, and summary Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Covers indicator retrieval: single indicator value, list of indicators by category, the indicator catalogue, historical series (starter+), batch indicators across symbols (premium; historical mode is starter+), the screener (premium; bounds are min_val/max_val, default sort is "asc"), and the market-bias summary. Prints the relevant fields for each call. ```python ind = client.get_indicator("EURUSD", "RSI_14", timeframe="H1") print(ind.value, ind.updated_at) all_ind = client.get_indicators("EURUSD", timeframe="H1", category="oscillator") print(all_ind.indicators["RSI_14"]) catalogue = client.list_indicators() print(catalogue.categories, catalogue.timeframes) # Indicator history (starter+). hist = client.get_indicator_history( "EURUSD", "RSI_14", timeframe="H1", start="2026-05-01T00:00:00Z", end="2026-05-02T00:00:00Z", limit=500, ) for point in hist.series: print(point.time, point.value) # Batch indicators across symbols (premium; historical mode is starter+). multi = client.get_multi(["EURUSD", "GBPUSD"], ["RSI_14", "MACD_hist"], timeframe="H4") print(multi.is_historical, multi.data["EURUSD"]["RSI_14"]) # Screener (premium). NOTE: bounds are min_val / max_val, default sort is "asc". screen = client.screen("RSI_14", timeframe="H1", min_val=70, sort="desc", limit=50) for r in screen.results: print(r.symbol, r.value) # Market-bias summary. summary = client.get_summary("EURUSD", timeframe="H4") print(summary.bias, summary.bias_strength, summary.confidence) ``` -------------------------------- ### Get sessions, heatmap, and calendar Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Retrieve market session clock, heatmap data (strength or correlation), and economic calendar events with filters. ```php $client->getSessions(); // market session clock $client->getHeatmap([ 'type' => 'strength', // strength|correlation (default strength) 'timeframe' => 'H4', // H1|H4|D1|W1 (default H4) // 'correlations' => true, // alternative way to force correlation mode ]); $client->getCalendar([ 'from' => '2026-06-15', 'to' => '2026-06-22', // range <= 30 days 'currencies' => ['USD', 'EUR'], // string or list; 'country' is an alias 'impact' => 'high', // high|medium|low 'q' => 'CPI', // title search // 'next_hours' => 24, // 1..168; overrides from/to 'offset' => 0, 'limit' => 100, // 1..500 ]); ``` -------------------------------- ### Screen endpoint with MinVal and Sort Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Screens symbols by an indicator value. The bounds are MinVal/MaxVal fields, not min/max. This example screens for RSI14 with a minimum value of 70 (overbought), sorted descending, limited to 25 results, and prints the total matches. ```go // NOTE: bounds are min_val / max_val (the MinVal/MaxVal fields), not min/max. hits, _ := client.Screen(ctx, tickatlas.RSI14, &tickatlas.ScreenParams{ MinVal: ptr(70.0), // overbought Sort: "desc", Limit: ptr(25), }) fmt.Println(hits.TotalMatches) ``` -------------------------------- ### Get summary and spread Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Retrieve market-bias summary with convenience accessors, and spread data for one or multiple symbols. ```php $client->getSummary('EURUSD', 'H1'); // market-bias summary $summary = $client->getSummary('EURUSD'); $summary->bias; // Bias enum: Bullish|Bearish|Neutral $summary->keyValues['rsi_14']; $client->getSpread('EURUSD', '24h'); // 1h|24h|7d|30d (default 24h) $client->compareSpread(['EURUSD', 'GBPUSD', 'USDJPY'], '24h'); // <= 20 symbols ``` -------------------------------- ### Async usage with AsyncTickAtlas Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Demonstrates using the AsyncTickAtlas client in an async context. Every method is a coroutine, and the client can be used as an async context manager. This example fetches a quote and summary concurrently using asyncio.gather. ```python import asyncio from tickatlas import AsyncTickAtlas async def main(): async with AsyncTickAtlas() as client: quote, summary = await asyncio.gather( client.get_quote("EURUSD"), client.get_summary("EURUSD", timeframe="H4"), ) print(quote.bid, summary.bias) asyncio.run(main()) ``` -------------------------------- ### GET /indicators/list Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Fetches the catalogue of all available indicators, classified by category, and the supported timeframes and categories. ```APIDOC ## GET /indicators/list ### Description Returns the full catalogue of indicators with category, name, description, and supported timeframes. No parameters are required. ### Method GET ### Endpoint /indicators/list ### Parameters No parameters. ### Request Example ``` GET /indicators/list ``` ### Response #### Success Response (200) - **data.indicators** (object) - Object of `` to object of `` -> `` #### Response Example ```json { "success": true, "data": { "indicators": { "trend": { "MA": "Moving average" }, "oscillator": { "RSI": "Relative Strength Index" } }, "timeframes": ["M15", "H1", "H4", "D1"], "categories": ["trend", "oscillator", "volatility", "volume"] } } ``` ### Errors - 400 INVALID_REQUEST (not documented explicitly here) ``` -------------------------------- ### GET /multi Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Fetches batch indicator values across multiple symbols and indicators. Supports real-time and historical modes with plan restrictions. ```APIDOC ## GET /multi ### Description Batch retrieves values for multiple indicators across multiple symbols. Requires `premium` scope; historical mode additionally requires a starter+ plan. In real-time, up to 50 symbols; in historical mode, max 10 symbols. To enable historical mode, provide `from`/`to`. ### Method GET ### Endpoint /multi ### Parameters #### Path Parameters - **symbols** (string) - Required - Comma-separated list of symbols. Max 50 for real-time, 10 for historical - **indicators** (string) - Required - Comma-separated list of indicator names - **timeframe** (string) - Optional - Default: `H1`. From §6 set - **from** (string) - Optional - ISO 8601 start time; presence indicates historical mode - **to** (string) - Optional - ISO 8601 end time; historical mode ### Request Example ``` GET /multi?symbols=EURUSD,GBPUSD&indicators=RSI_14,MA_50&timeframe=H1 GET /multi?symbols=EURUSD&indicators=RSI_14&from=2026-03-01&to=2026-03-27 ``` ### Response #### Success Response (200) Real-time mode: - **data.timeframe** (string) - Timeframe - **data.data** (object) - Object of `` to object of `` -> `number|null` - **data.not_found** (array|null) - Symbols that were not found - **data.updated_at** (int) - Unix epoch timestamp Historical mode: - **data.timeframe** (string) - Timeframe - **data.mode** (string) - `"historical"` - **data.from** (string) - Start time - **data.to** (string) - End time - **data.data** (object) - Object of `` to array of objects with `time`, and `` keys - **data.not_found** (array|null) - Symbols that were not found ### Errors - **400** INVALID_REQUEST - **400** INVALID_TIMEFRAME - **400** TOO_MANY_SYMBOLS Historical mode: - **403** PLAN_UPGRADE_REQUIRED - **404** INDICATOR_NOT_FOUND - **400** INVALID_DATETIME - **400** INVALID_TIME_RANGE - **400** OUTSIDE_RETENTION - **400** RANGE_TOO_LARGE ``` -------------------------------- ### Summary, Spread, and Sessions Source: https://github.com/abuzant/tickatlas-sdk/blob/main/javascript/README.md Fetch market-bias summary, spread statistics, compare spreads across symbols, and get the market session clock. ```typescript await client.getSummary("EURUSD", "H4"); // market-bias summary await client.getSpread("EURUSD", "24h"); // spread statistics await client.compareSpread(["EURUSD", "GBPUSD"], "24h"); await client.getSessions(); // market session clock ``` -------------------------------- ### Handle rate limit with RetryAfter Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Use errors.As to get a *tickatlas.RateLimitError and sleep for the server-advised delay from RetryAfter, which falls back to reset_in_seconds. ```go var rle *tickatlas.RateLimitError if errors.As(err, &rle) { time.Sleep(rle.RetryAfter) // from Retry-After (falls back to reset_in_seconds) } ``` -------------------------------- ### Get real-time quotes and batch quotes Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Fetch a single real-time quote with optional per-broker sources, or batch quotes for 1-100 symbols with optional field projection. ```php // single real-time quote $client->getQuote('EURUSD', [ 'include_sources' => true, // include per-broker sources[] // 'source' => 'Equiti Securities', ]); // batch quotes (1..100 symbols), optional field projection $client->getQuotes(['EURUSD', 'GBPUSD'], ['bid', 'ask']); // fields ⊆ ['bid','ask','spread','spread_pips','timestamp'] (default: all) ``` -------------------------------- ### Get symbols and symbol specification Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Fetches a paginated list of symbols with optional category, search, offset, and limit, then prints total count, pagination flag, and per-symbol attributes. Also retrieves a single symbol's specification and prints its contract size, minimum volume, and trading hours. ```python symbols = client.get_symbols(category="forex", search="EUR", offset=0, limit=100) print(symbols.total, symbols.pagination.has_more) for s in symbols.symbols: print(s.symbol, s.category, s.digits, s.tradable) spec = client.get_symbol("EURUSD") print(spec.contract_size, spec.min_volume, spec.trading_hours) ``` -------------------------------- ### Catch TickAtlas API exceptions in Python Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Shows how to import and catch TickAtlas exceptions when calling the SDK. The example uses client.get_quote("NOPE") and handles NotFoundError, RateLimitError, ValidationError, AuthenticationError, PermissionDeniedError, ServerError, TickAtlasNetworkError, and the catch-all TickAtlasError. Server errors carry attributes like status_code, code, message, details, request_id, and raw; RateLimitError includes retry_after. ```python from tickatlas import ( TickAtlas, TickAtlasError, AuthenticationError, PermissionDeniedError, NotFoundError, ValidationError, RateLimitError, ServerError, TickAtlasNetworkError, ) client = TickAtlas() try: client.get_quote("NOPE") except NotFoundError as e: print(e.status_code, e.code, e.message) # 404 SYMBOL_NOT_FOUND ... print(e.raw.get("available_symbols")) except RateLimitError as e: print("retry after", e.retry_after, "seconds") except ValidationError as e: print(e.details) # 422 VALIDATION_ERROR detail list except AuthenticationError: ... # 401 MISSING_API_KEY / INVALID_API_KEY except PermissionDeniedError: ... # 403 plan gate / disabled key / IP block except ServerError: ... # 5xx except TickAtlasNetworkError as e: print("transport failure:", e.cause) except TickAtlasError: ... # catch-all ``` -------------------------------- ### Run unit tests, vet, and check formatting Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Commands to run unit tests (no network, httptest-based), vet the code, and check formatting with gofmt. The gofmt command should print nothing. ```bash go test ./... # unit tests (no network, httptest-based) go vet ./... gofmt -l . # should print nothing ``` -------------------------------- ### Create TickAtlas client with explicit API key or environment variable Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Shows two ways to instantiate the client: passing an explicit API key or relying on the TICKATLAS_API_KEY environment variable. If neither is present, the constructor throws ConfigurationException. Never hardcode, log, or commit your key. ```php use TickAtlas\Client; // Explicit key $client = new Client('tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); // Or rely on the environment (TICKATLAS_API_KEY) $client = new Client(); ``` -------------------------------- ### Run tests for all SDKs and live integration Source: https://github.com/abuzant/tickatlas-sdk/blob/main/README.md Commands to run unit tests for Python, JavaScript, PHP, and Go SDKs, and to enable live integration tests by setting TICKATLAS_API_KEY and RUN_INTEGRATION=1. ```bash # Python cd python && python -m venv .venv && . .venv/bin/activate && pip install -e ".[dev]" && pytest # JavaScript cd javascript && npm install && npm run build && npm test # PHP cd php && composer install && composer test # Go cd go && go test ./... # Live integration (any language), once you have a key: export TICKATLAS_API_KEY="tk_..." RUN_INTEGRATION=1 ``` -------------------------------- ### Get symbols and symbol details Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Retrieve a list of symbols with optional filters (category, search, offset, limit) and get a full contract spec for a single symbol. ```php $client->getSymbols([ 'category' => 'forex', // or Category::Forex; forex|metals|commodities|indices|crypto|stocks 'search' => 'eur', 'offset' => 0, 'limit' => 100, // 1..500 ]); $client->getSymbol('EURUSD'); // full contract spec ``` -------------------------------- ### Run integration tests with build tag and environment variables Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Runs integration tests against the live API, gated behind the integration build tag and environment variables. Tests are read-only and skip when the gate is not set; the write path (SaveLayout) is not exercised. ```bash RUN_INTEGRATION=1 TICKATLAS_API_KEY=tk_... go test -tags integration ./... ``` -------------------------------- ### GET /indicators Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Returns all available indicators for a given symbol and timeframe. Optionally filters by indicator category and includes OHLCV data. ```APIDOC ## GET /indicators ### Description Retrieves the bid/ask private quote and OHLCV bars for a symbol. Optionally filters the returned indicator set by category (trend/oscillator/volatility/volume). ### Method GET ### Endpoint /indicators ### Parameters #### Path Parameters - **symbol** (string) - Required - Symbol for all indicators - **timeframe** (string) - Optional - Default: `H1`. From §6 set - **category** (string) - Optional - `trend`, `oscillator`, `volatility`, or `volume` ### Request Example (no request body) ### Response #### Success Response (200) - **data.symbol** (string) - Symbol - **data.timeframe** (string) - Timeframe - **data.ohlcv** (object|null) - OHLCV object with `open, high, low, close, volume` fields - **data.bid** (number|null) - Current bid price - **data.ask** (number|null) - Current ask price - **data.indicators** (object) - Object mapping indicator name to numeric value or null - **data.count** (int) - Number of indicators returned - **data.updated_at** (int) - Unix epoch timestamp #### Response Example ```json { "symbol": "EURUSD", "timeframe": "H1", "ohlcv": { "open": 1.0830, "high": 1.0840, "low": 1.0820, "close": 1.0835, "volume": 1000 }, "bid": 1.0831, "ask": 1.0832, "indicators": { "RSI_14": 58.34 }, "count": 1, "updated_at": 1711548000 } ``` ### Errors - **400** INVALID_TIMEFRAME - **400** INVALID_CATEGORY - **404** DATA_NOT_FOUND ``` -------------------------------- ### Create TickAtlas client with API key or environment variable Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Shows two ways to create a TickAtlas client: explicitly with WithAPIKey, or from the TICKATLAS_API_KEY environment variable. The SDK never logs or serializes the key. ```go // Explicit: client, err := tickatlas.NewClient( tickatlas.WithAPIKey("tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"), ) // Or from the environment (recommended — never hardcode keys): // export TICKATLAS_API_KEY="tk_..." client, err := tickatlas.NewClient() ``` -------------------------------- ### GET /indicator Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Retrieves a single indicator value for a specified symbol and indicator. It returns the indicator value along with bid/ask prices and timestamps. ```APIDOC ## GET /indicator ### Description Gets the current value of a single indicator for a symbol, timeframe and (optionally) a broker source. ### Method GET ### Endpoint /indicator ### Parameters #### Path Parameters - **symbol** (string) - Required - Symbol for which indicator is queried - **indicator** (string) - Required - Indicator from §6 catalogue - **timeframe** (string) - Optional - Default: `H1`. From §6 set - **source** (string) - Optional - Force broker source ### Response #### Success Response (200) - **data.symbol** (string) - Symbol - **data.timeframe** (string) - Timeframe - **data.indicator** (string) - Indicator name - **data.value** (number|null) - Indicator value - **data.bid** (number|null) - Bid price - **data.ask** (number|null) - Ask price - **data.updated_at** (int) - Unix epoch timestamp - **data.server_time** (string|null) - Server time (ISO 8601) #### Response Example { "success": true, "data": { "symbol": "EURUSD", "timeframe": "H1", "indicator": "RSI_14", "value": 58.34, "bid": 1.0831, "ask": 1.0832, "updated_at": 1711548000, "server_time": "2026-03-27T14:00:00" } } ### Errors - **400** INVALID_TIMEFRAME - **404** DATA_NOT_FOUND - **404** INDICATOR_NOT_FOUND ``` -------------------------------- ### PHP: Create client and fetch RSI indicator Source: https://github.com/abuzant/tickatlas-sdk/blob/main/README.md Creates a TickAtlas client that reads the TICKATLAS_API_KEY environment variable, then fetches the RSI_14 indicator for EURUSD on the H1 timeframe and echoes its value. ```php use TickAtlas\Client; $client = new Client(); // reads TICKATLAS_API_KEY $rsi = $client->getIndicator('EURUSD', 'RSI_14', ['timeframe' => 'H1']); echo $rsi->value; ``` -------------------------------- ### Generic ptr helper Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md A small generic helper that returns a pointer to its argument. It is used in the examples above to pass pointer values for optional parameters. ```go func ptr[T any](v T) *T { return &v } ``` -------------------------------- ### GET /indicator/history Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Returns the historical time series for a specific indicator for a symbol. Needs a starter plan or higher and supports time range filtering. ```APIDOC ## GET /indicator/history ### Description Fetches the historical indicator series for symbol and indicator within a requested time interval. Requires `historical` scope and a starter+ plan. ### Method GET ### Endpoint /indicator/history ### Parameters #### Path Parameters - **symbol** (string) - Required - Symbol for the indicator series - **indicator** (string) - Required - Indicator name (must be in catalogue §6) - **timeframe** (string) - Optional - Default: `H1`. From §6 set - **from** (string) - Optional - ISO 8601 start time (default: `to − maxwindow`) - **to** (string) - Optional - ISO 8601 end time (default: now) - **limit** (int) - Optional - Default: `500`. Allowed `1..5000` (also capped per timeframe) ### Request Example ``` GET /indicator/history?symbol=EURUSD&indicator=RSI_14&timeframe=H1&from=2026-03-01&to=2026-03-27&limit=500 ``` ### Response #### Success Response (200) - **data.symbol** (string) - Symbol - **data.indicator** (string) - Indicator name - **data.timeframe** (string) - Timeframe - **data.from** (string|null) - Start time - **data.to** (string|null) - End time - **data.count** (int) - Number of data points - **data.max_window_hours** (int|null) - Maximum allowed time window - **data.series** (array) - Array of `{ time, value }` objects where time is string and value is number|null - **data.series.time** (string) - Time string (ISO 8601) - **data.series.value** (number|null) - Indicator value at that time #### Response Example ```json { "success": true, "data": { "symbol": "EURUSD", "indicator": "RSI_14", "timeframe": "H1", "from": "2026-03-26T00:00:00", "to": "2026-03-27T00:00:00", "count": 24, "max_window_hours": 168, "series": [ { "time": "2026-03-26T00:00:00", "value": 52.3 } ] } } ``` ### Errors - **403** PLAN_UPGRADE_REQUIRED - **400** INVALID_TIMEFRAME - **400** INVALID_DATETIME - **400** INVALID_TIME_RANGE - **400** OUTSIDE_RETENTION - **400** RANGE_TOO_LARGE - **404** SYMBOL_NOT_FOUND - **404** INDICATOR_NOT_FOUND ``` -------------------------------- ### Configure TickAtlas client options (timeout, retries, backoff) Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Shows how to pass client options as the third constructor argument. Options include per-request timeout, retry attempts on 429/5xx/network errors (maxRetries is the number of retries, total tries is maxRetries+1), and exponential backoff base and cap. The commented lines show how to inject a Guzzle client/handler or a TickAtlas\Retry\Sleeper for testing. ```php $client = new Client('tk_...', null, [ 'timeout' => 30, // per-request timeout in seconds 'maxRetries' => 3, // retry attempts on 429/5xx/network (4 total tries) 'backoffBase' => 0.5, // base seconds for exponential backoff 'backoffCap' => 30.0, // backoff ceiling in seconds // 'httpClient' => $guzzle, // inject a Guzzle client/handler (testing) // 'sleeper' => $sleeper, // inject a TickAtlas\Retry\Sleeper (testing) ]); ``` -------------------------------- ### GET /screener Source: https://github.com/abuzant/tickatlas-sdk/blob/main/SPEC.md Scans and returns matching symbols based on an indicator's current value within specified minimum and maximum bounds. Requires a premium plan. ```APIDOC ## GET /screener ### Description Filters the universe of symbols by an indicator's current value using inclusive min/max boundaries, sorting, and pagination. Requires `premium` scope. The value bounds are inclusive lower/upper bounds and the parameter names are `min_val` and `max_val` (not `min` or `max`). ### Parameters #### Path Parameters - **indicator** (string) - Required - Indicator to scan for - **timeframe** (string) - Optional - Default: `H1`; validated, bad value gives `400 INVALID_TIMEFRAME` - **min_val** (number) - Optional - Inclusive lower bound for the indicator value (not `min`) - **max_val** (number) - Optional - Inclusive upper bound for the indicator value (not `max`) - **sort** (string) - Optional - `asc` or `desc`; default `asc` - **offset** (int) - Optional - Pagination offset; default `0` - **limit** (int) - Optional - Pagination limit; default `50`, allowed `1..200` ### Request Example ``` GET /screener?indicator=RSI_14&min_val=30&max_val=70&sort=desc&offset=0&limit=20 ``` ### Response #### Success Response (200) - **data.indicator** (string) - Indicator name - **data.timeframe** (string) - Timeframe - **data.filter** (object) - Contains `min` and `max` numbers or null - **data.results** (array) - Array of symbol results with `symbol`, `value`, and `bid` fields - **data.results.symbol** (string) - Symbol - **data.results.value** (number|null) - Indicator value - **data.results.bid** (number|null) - Bid price - **data.total_matches** (int) - Total number of matching symbols - **data.pagination** (object) - Offset, limit, total, and has_more fields - **data.updated_at** (int) - Unix epoch timestamp #### Response Example ```json { "success": true, "data": { "indicator": "RSI_14", "timeframe": "H1", "filter": { "min": 30, "max": 70 }, "results": [ { "symbol": "EURUSD", "value": 58.34, "bid": 1.0831 } ], "total_matches": 1, "pagination": { "offset": 0, "limit": 20, "total": 1, "has_more": false }, "updated_at": 1711548000 } } ``` ### Errors - **400** INVALID_SORT - **400** INVALID_TIMEFRAME ``` -------------------------------- ### Python: Create client and fetch RSI indicator Source: https://github.com/abuzant/tickatlas-sdk/blob/main/README.md Creates a TickAtlas client that reads the TICKATLAS_API_KEY environment variable, then fetches the RSI_14 indicator for EURUSD on the H1 timeframe and prints its value. ```python from tickatlas import TickAtlas client = TickAtlas() # reads TICKATLAS_API_KEY rsi = client.get_indicator("EURUSD", "RSI_14", timeframe="H1") print(rsi.value) ``` -------------------------------- ### Run integration tests with environment variables Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Runs the integration suite only when RUN_INTEGRATION=1 and a valid TICKATLAS_API_KEY are provided; otherwise the suite is skipped. ```bash RUN_INTEGRATION=1 TICKATLAS_API_KEY=tk_xxx composer test:integration ``` -------------------------------- ### Get OHLC and tick data Source: https://github.com/abuzant/tickatlas-sdk/blob/main/php/README.md Retrieve OHLC candles for a symbol with timeframe, date range, and limit. Also fetch tick data (plan: pro/enterprise) with a maximum 1-hour range. ```php $client->getOhlc('EURUSD', [ 'timeframe' => 'H1', // M1,M5,M15,M30,H1,H4,D1 (default H1) 'from' => '2026-05-01T00:00:00Z', 'to' => '2026-05-02T00:00:00Z', 'limit' => 100, // 1..1000 ]); // tick data (plan: pro/enterprise). to - from must be <= 1 hour $client->getTicks('EURUSD', '2026-05-25T13:00:00Z', '2026-05-25T13:30:00Z'); ``` -------------------------------- ### Run integration tests with environment variables Source: https://github.com/abuzant/tickatlas-sdk/blob/main/javascript/README.md Runs the read-only integration suite, which is skipped unless RUN_INTEGRATION=1 and TICKATLAS_API_KEY are set. It never exercises the write endpoint (saveLayout). ```bash RUN_INTEGRATION=1 TICKATLAS_API_KEY=tk_xxx npm run test:integration ``` -------------------------------- ### Branch on error type with predicate helpers Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Use tickatlas.IsNotFound, IsAuth, IsPermissionDenied, IsValidation, IsRateLimit, IsServer, and IsNetwork to handle different error categories. The comments list the corresponding HTTP status codes and error codes. ```go quote, err := client.Quote(ctx, "NOPE", nil) if err != nil { switch { case tickatlas.IsNotFound(err): // 404: SYMBOL_NOT_FOUND, DATA_NOT_FOUND, INDICATOR_NOT_FOUND case tickatlas.IsAuth(err): // 401: MISSING_API_KEY, INVALID_API_KEY case tickatlas.IsPermissionDenied(err): // 403: API_KEY_DISABLED, PLAN_UPGRADE_REQUIRED, ... case tickatlas.IsValidation(err): // 400/422: INVALID_*, RANGE_TOO_LARGE, VALIDATION_ERROR, ... case tickatlas.IsRateLimit(err): // 429 (see RetryAfter below) case tickatlas.IsServer(err): // 5xx case tickatlas.IsNetwork(err): // no HTTP response } } ``` -------------------------------- ### Summary, Spread, CompareSpread, Sessions endpoints Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Covers the Summary, Spread, CompareSpread, and Sessions endpoints. Summary returns bias and confidence; Spread returns current spread in pips; CompareSpread compares spreads across symbols; Sessions returns active sessions. ```go sum, _ := client.Summary(ctx, "EURUSD", tickatlas.TimeframeH1) fmt.Println(sum.Bias, sum.Confidence) sp, _ := client.Spread(ctx, "EURUSD", tickatlas.SpreadPeriod24h) fmt.Println(sp.Current.SpreadPips) cmp, _ := client.CompareSpread(ctx, []string{"EURUSD", "GBPUSD"}, tickatlas.SpreadPeriod24h) _ = cmp sess, _ := client.Sessions(ctx) fmt.Println(sess.ActiveSessions) ``` -------------------------------- ### Get OHLC and ticks Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Fetches OHLC data for a symbol with a timeframe, start/end timestamps, and limit, printing the count and retention. Also retrieves tick data, which requires a pro/enterprise plan and a window of at most 1 hour, printing the tick count. ```python ohlc = client.get_ohlc( "EURUSD", timeframe="H1", start="2026-05-01T00:00:00Z", end="2026-05-02T00:00:00Z", limit=500, ) print(ohlc.count, ohlc.retention) # Ticks require a pro/enterprise plan and a window <= 1 hour. ticks = client.get_ticks( "EURUSD", start="2026-05-01T00:00:00Z", end="2026-05-01T00:30:00Z", ) print(ticks.count) ``` -------------------------------- ### Get sessions, heatmaps, and calendar Source: https://github.com/abuzant/tickatlas-sdk/blob/main/python/README.md Fetches active trading sessions and overlaps, heatmap data for strength or correlation, and economic calendar events filtered by date range, currencies, impact, and limit. Calendar `datetime` values are ISO 8601 with a +00:00 UTC offset; treat them as UTC. ```python sessions = client.get_sessions() print(sessions.active_sessions, sessions.overlaps) strength = client.get_heatmap(type="strength", timeframe="H4") print(strength.strongest, strength.weakest) corr = client.get_heatmap(type="correlation", timeframe="D1") print(corr.available, corr.correlation_matrix) calendar = client.get_calendar( start="2026-06-01", end="2026-06-07", currencies="USD,EUR", impact="high", limit=100, ) for ev in calendar.events: print(ev.datetime, ev.currency, ev.event, ev.impact) ``` -------------------------------- ### Configure TickAtlas client with custom options Source: https://github.com/abuzant/tickatlas-sdk/blob/main/go/README.md Creates a TickAtlas client with a custom base URL, timeout, and retry count. Useful for staging or self-hosted deployments. ```go client, err := tickatlas.NewClient( tickatlas.WithAPIKey("tk_..."), tickatlas.WithBaseURL("https://staging.tickatlas.com/v1"), tickatlas.WithTimeout(15*time.Second), tickatlas.WithMaxRetries(5), ) ```