Unified Broker API

One endpoint set for 13 Indian brokers.

Integrate one contract and switch brokers with a parameter: link an account, then read normalized DEMAT holdings that come back in the same shape on every broker. Zerodha, Angel One, Dhan, Upstox, Groww, Motilal Oswal, Fyers, Shoonya, Flattrade, Zebu, TradeSmart, Arrow, and one XTS provider that covers six more white-label brokers. Grappi vaults each connection's credentials and handles the daily-token headache behind one rotate call. A sandbox connection with test funds lets you build the whole flow before any broker account exists. Live use is switched on after a business check.

APIs
6 you can call
Consent
Bound to every read
Audit
Every call in a hash-chained log

APIs in Unified Broker API

Every API shares the same key, error format and audit log. Each one is switched on for your account separately.

  • Unified broker connect

    Link a broker account — 13 brokers behind one contract, the broker is just a parameter. Sandbox needs no credentials.

    POST /v1/broker/connectReference
  • Connect LIVE account (real data)

    Pass your own broker API credentials to get REAL holdings/orders. Groww: token from groww.in → Settings → Trading APIs. Dhan: web.dhan.co. Credentials are vault-encrypted.

    POST /v1/broker/connectReference
  • Holdings

    Normalized DEMAT holdings + P&L, same shape for every broker.

    GET /v1/broker/holdingsReference
  • List connections

    Every linked broker account. Credentials are never returned.

    GET /v1/broker/connectionsReference
  • Rotate daily token

    One uniform call for every broker's daily access-token expiry.

    POST /v1/broker/connections/:id/tokenReference
  • Revoke connection

    Revoke a linked account and hard-delete its vaulted credentials.

    DELETE /v1/broker/connections/:idReference

How you get Unified Broker API

From a new account to a live call in four steps.

  1. Create your account

    Sign up with your work email and create an app and its key. No API is active on a new account.

  2. Pay and subscribe

    Add money to your wallet, then subscribe to this API in Dashboard → API access. We switch it on for your account after your payment.

  3. Make your first call

    Once the API is activated, send the sample request to /v1/broker/holdings with your key and read back the JSON.

  4. Go live

    Use a live key in production. Every call is checked against the APIs activated for you, drawn from your prepaid wallet, and recorded in a hash-chained audit trail.

Call holdings

The main call for this product. Use your own key once this API is switched on for your account.

GET /v1/broker/holdings
curl https://grappi.ai/v1/broker/holdings?connection_id=&broker=zerodha \
-H "Authorization: Bearer $GRAPPI_API_KEY"

Developer ready

Docs, MCP, and a prompt that does the work

Every product ships with an integration guide, an MCP server for AI agents, and a ready-to-paste prompt, so your first Unified Broker API call takes minutes, not days.

Integration guide

The quickstart covers keys, auth, idempotency, the error envelope, and paise money units. The catalog documents every Unified Broker API endpoint with a live sample you can run from the playground.

MCP server for AI agents

grappi-mcp exposes the API as agent tools over the same gateway, so every tool call keeps auth, consent, metering, and audit. Drop this into your MCP client config.

mcp.json
{
  "mcpServers": {
    "grappi": {
      "command": "npx",
      "args": ["grappi-mcp"],
      "env": {
        "GRAPPI_API_BASE": "https://grappi.ai",
        "GRAPPI_API_KEY": "your-api-key"
      }
    }
  }
}

Prompt-ready integration

Paste this into your coding assistant or agent. It carries the real contract rules, so the generated client matches the gateway on the first try.

integrate-broker-depository.prompt
Integrate the Grappi Unified Broker API API into my app.

Endpoints:
- POST /v1/broker/connect (Unified broker connect)
- POST /v1/broker/connect (Connect LIVE account (real data))
- GET /v1/broker/holdings (Holdings)
- GET /v1/broker/connections (List connections)
- POST /v1/broker/connections/:id/token (Rotate daily token)
- DELETE /v1/broker/connections/:id (Revoke connection)

Contract rules: send the key as a Bearer token in the Authorization header, treat all money as integer paise (100 paise is one rupee), send an Idempotency-Key on every POST, and branch on the error envelope error.code (handle 402 insufficient_balance, 403 api_not_activated, 403 consent_required, 422 validation_failed, 429 rate_limited, 503 api_unavailable).

Write a small typed client for these endpoints plus one worked call, with validation and error handling, in my project's language.

Questions

How do I start?

Create an account and add money to your wallet. Then subscribe to this API in your dashboard and we switch it on for your account.

What comes with every API?

Auth, idempotency, consent and metering hooks, a unified error envelope, and a hash-chained audit trail, identical across every API on the platform.

What do I need to go live?

Subscribe to the API in your dashboard and we switch it on for your account after your payment. The request and reply format is the same in test and in production.

Is this compliant for regulated use?

Reads are consent-bound and DPDP and RBI-AA aligned. Every call lands in a hash-chained audit trail, and every API is switched on for your account individually.