Arthalekh Developers

Bring Arthalekh’s return-forensics engine into your own product.

Use the official TypeScript SDK and versioned API to fetch unadjusted prices, corporate actions, IPO metadata, manual bonuses, operational health, and portfolio simulations that stay aligned with the app.

Why teams ship faster
Package
@arthalekh/sdk
Best for
Broker apps, investor tools, research workflows
Strongest flow
analysis.bundle for UI, runMany for research, health for operations
Show, don’t tell

See the API call, the response, and the widget it powers.

DEMO.BSE turns ₹10,000 into ₹33,373 with ₹263 in cash dividends, 210.5263 shares held, and CAGR N/A. Below, the sample request hits the authenticated analysis API, the JSON excerpt shows the real shape developers receive, and the widget demonstrates how quickly that payload becomes a product feature.

Sample source: demo
Sample curl

Copy this request to reproduce the same flow with your own API key.

Expand
bash
curl -X POST 'https://arthalekh.com/api/v1/analysis' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "symbol": "DEMO.BSE",
    "initialInvestment": 10000,
    "includeDividends": true
  }'
Sample response excerpt

Trimmed for readability. Actual responses include the full price and simulation arrays.

Expand
json
{
  "data": {
    "symbol": "DEMO.BSE",
    "source": "demo",
    "resolvedInputs": {
      "ipoDate": "2024-01-02",
      "ipoPrice": 95,
      "initialInvestment": 10000,
      "includeDividends": true
    },
    "latestQuote": {
      "date": "2024-03-04",
      "close": 157.27
    },
    "prices": [
      {
        "date": "2024-01-02",
        "close": 100.9
      },
      {
        "date": "2024-01-03",
        "close": 102.16
      }
    ],
    "actions": {
      "dividends": [
        {
          "date": "2024-02-10",
          "dividendPerShare": 2.5
        }
      ],
      "splits": [
        {
          "date": "2024-02-24",
          "splitCoefficient": 2
        }
      ],
      "bonuses": [
        {
          "date": "2024-03-16",
          "numerator": 1,
          "denominator": 1
        }
      ]
    },
    "simulation": {
      "finalValue": 33372.63157894737,
      "totalDividends": 263.1578947368421,
      "sharesHeld": 210.52631578947367,
      "growthX": 3.3372631578947365,
      "cagr": null,
      "series": [
        {
          "date": "2024-01-02",
          "close": 100.9,
          "shares": 105.26315789473684,
          "cash": 0,
          "value": 10621.052631578947
        },
        {
          "date": "2024-03-04",
          "close": 157.27,
          "shares": 210.52631578947367,
          "cash": 263.1578947368421,
          "value": 33372.63157894737
        }
      ]
    }
  },
  "source": "demo",
  "requestId": "req_example_123"
}
Live Widget

Build a real widget from one analysis response.

This demo uses the same analysis shape your app receives from Arthalekh. Change the symbol or investment and the widget refreshes with new server-side results.

Source: demo
Final value
₹33,373
Growth
3.34× growth
Dividends
₹263
Shares held
210.5263
CAGR
N/A
Portfolio value curve
2024-01-02 to 2024-03-04
45 points
Resolved inputs
IPO date: 2024-01-02
IPO price: ₹95
Latest close: ₹157
Corporate actions
1 dividends1 splits1 bonuses3 total events
What this proves

One response gives you the ingredients to render a meaningful investor widget: resolved IPO assumptions, the latest quote, corporate actions, and a full value curve.

Quick SDK Example
ts
import { createArthalekhClient } from '@arthalekh/sdk';

const client = createArthalekhClient({
  apiKey: process.env.ARTHALEKH_API_KEY!,
});

const bundle = await client.analysis.bundle({
  symbol: 'WIPRO.NSE',
  initialInvestment: 10000,
  includeDividends: true,
});

console.log(bundle.data.summary.finalValueLabel);
console.log(bundle.data.markers.price.bonuses);
console.log(bundle.data.analysis.simulation.totalDividends);
App-parity analysis

Return the same unadjusted price history, action overlays, and cash-dividend-aware portfolio math used inside Arthalekh.

UI-ready output

Use analysis.bundle to get summary labels and chart marker sets without rebuilding client-side formatting logic.

Batch-safe workflows

Run bounded-concurrency symbol batches for research tools, portfolio screens, and editorial workflows.

Contract confidence

Ship against a versioned REST surface and a live OpenAPI document instead of reverse engineering app routes.

Built for real workflows

Start with the SDK, then move deeper into docs, OpenAPI, and operational checks.

Open full docs
Broker or wealth dashboards

Show a truthful value curve that separates raw price movement from dividends, splits, and bonus-led share growth.

Research and content engines

Generate symbol explainers, “what if” stories, and internal research tables from one normalized workflow.

Internal operations tools

Backfill IPO assumptions, review manual bonuses, and verify provider health before publishing analytics to users.

Most useful methods

The shortest path to a useful integration

Treat this like a launch lane, not a reference dump. Most teams start with one call for the UI, one for batch workflows, and one for operational confidence.

Step 01
2 methods

Ship the first user-facing answer

Start with a single analysis call for the screen that matters most, then upgrade to bundle when you want chart markers and ready-made summary copy.

client.analysis.run(input)client.analysis.bundle(input)
Step 02
1 method

Scale to research and batch jobs

Once the UI path works, run symbol batches with bounded concurrency so editors, research tools, and internal screens stay predictable.

client.analysis.runMany(inputs, { concurrency })
Step 03
2 methods

Add health and contract checks

Before other teams depend on the integration, wire in health checks and the live OpenAPI contract so failures are visible and recoverable.

client.health.get()client.openapi.get()
Fastest useful call
client.analysis.run(input)
01
ApiResult<AnalysisResult>Best for app parity

One-call workflow for prices, actions, IPO resolution, and portfolio simulation.

UI-ready response
client.analysis.bundle(input)
02
ApiResult<AnalysisBundle>Best for charts and summaries

Same as run, plus chart-ready markers and formatted summary strings for UI use.

Batch workflow
client.analysis.runMany(inputs, { concurrency })
03
Promise<BatchAnalysisResult[]>Best for research pipelines

Batch analysis with bounded concurrency and per-input success or error output.

Operational check
client.health.get()
04
ApiResult<HealthSnapshot>Best for uptime visibility

Check Arthalekh API availability, environment, and cache footprint with your current key.

Contract check
client.openapi.get()
05
Promise<OpenApiDocument>Best for generated clients

Fetch the raw live OpenAPI document that describes the public API contract.

Documentation

Start with the quick path, then go deeper into auth, REST, workflow logic, and failures.