One endpoint set for Zerodha, Angel One, Dhan, Upstox, and Groww.

Unified Broker API

Integrate one contract and switch brokers with a parameter: holdings, positions, funds, quotes, and full order placement return the same normalized shape on every broker. Grappi vaults each connection's credentials and handles the daily-token headache behind one rotate call. Every connection starts in a free sandbox with ₹1,00,000 of test cash, so the whole flow demos before any broker account exists. Live use needs a verified business.

Verified businessVerified business. Grantable in sandbox, live use needs KYB.
14
endpoints in this rail
KYB
access tier
Consent
bound on every read
Audit
hash-chained trail

Endpoints

Every endpoint shares auth, idempotency, consent and metering hooks, a unified error envelope, and a hash-chained audit trail.

POST
Unified broker connect
/v1/broker/connect

Link a broker account (Zerodha/Angel/Dhan/Upstox/Groww). Sandbox needs no credentials.

POST
Connect LIVE account (real data)
/v1/broker/connect

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.

GET
Holdings
/v1/broker/holdings

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

GET
Positions
/v1/broker/positions

Open positions with product, quantity, and live P&L.

GET
Funds and margins
/v1/broker/funds

Available, used, and total margin in minor units.

GET
Order book
/v1/broker/orders

Every order in one normalized shape, broker-native payload attached as raw.

POST
Place order
/v1/broker/orders

One order schema for every broker: market/limit/SL, delivery/intraday.

GET
Market quotes
/v1/broker/quotes

LTP, OHLC, and change percent for up to 25 symbols per call.

GET
Order by id
/v1/broker/orders/:id

One order's live status by id, same shape on every broker.

PUT
Modify order
/v1/broker/orders/:id

Change price, quantity, or type of an open order.

DELETE
Cancel order
/v1/broker/orders/:id

Cancel an open order on any broker.

GET
List connections
/v1/broker/connections

Every linked broker account. Credentials are never returned.

POST
Rotate daily token
/v1/broker/connections/:id/token

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

DELETE
Revoke connection
/v1/broker/connections/:id

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

How it works

From signup to a live Unified Broker API call in four steps.

1

Create a free account

Sign up and get a prefunded sandbox key in seconds. No card required.

2

Unlock the rail

Grant the scope on a sandbox key instantly. Live use unlocks after business verification.

3

Make your first call

Send the sample request to /v1/broker/orders with your sandbox key and read back live JSON.

4

Go live

Swap the sandbox key for a live key. Every call is metered, itemized, and audit-chained.

Call place order

The flagship call for this rail. Swap the sandbox key for your own and you are live.

post-broker-place-order.sh
curl -X POST https://api.grappi.in/v1/broker/orders \
-H "x-api-key: sk_sandbox_••••" \
-H "content-type: application/json" \
-d '{"broker":"zerodha","symbol":"RELIANCE","side":"buy","quantity":1,"order_type":"market","product":"delivery"}'

Developer ready

Docs, MCP, and a prompt that does the work

Every rail 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://api.grappi.in",
        "GRAPPI_API_KEY": "sk_sandbox_••••"
      }
    }
  }
}

Prompt-ready integration

Paste this into Claude, Cursor, or any coding 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/positions (Positions)
- GET /v1/broker/funds (Funds and margins)
- GET /v1/broker/orders (Order book)
- POST /v1/broker/orders (Place order)
- GET /v1/broker/quotes (Market quotes)
- GET /v1/broker/orders/:id (Order by id)
- PUT /v1/broker/orders/:id (Modify order)
- DELETE /v1/broker/orders/:id (Cancel order)
- 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 the x-api-key header, treat all money as integer paise (₹1.00 = 100), send an Idempotency-Key on every POST, and branch on the error envelope error.code (handle 402 insufficient_balance, 403 consent_required, 422 validation_failed, 429 rate_limited).

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

Frequently asked questions

Can I try it for free?

Yes. Signing up creates a sandbox key, so you can call this rail immediately without a card. Sandbox calls run against test data, not production.

What comes with every endpoint?

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

What do I need to go live?

Verified business. Grantable in sandbox, live use needs KYB. Once live, the same key and the same contract carry over from sandbox.

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 regulated rails stay locked until an access request is approved.

Get started

Start building with Unified Broker API

Create a free sandbox account, get a prefunded key, and call Unified Broker API on the same contract as every other rail.

  • Instant sandbox key, no card required
  • One key works across every rail
  • Open rails are live the moment you sign up
Consent-bound on every read. DPDP and RBI-AA aligned.