Skip to main content

Documentation Index

Fetch the complete documentation index at: https://casparser.in/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Contract notes are daily trade confirmations from brokers. CAS Parser extracts structured trade data from these PDFs.

Supported Brokers

BrokerAuto-detectedPassword
ZerodhaPAN number
GrowwPAN number
UpstoxPAN number
ICICI DirectPAN number
The API auto-detects the broker — no need to specify which broker issued the contract note.

Parse a contract note

import requests

response = requests.post(
    "https://api.casparser.in/v4/contract_note/parse",
    headers={"x-api-key": "YOUR_API_KEY"},
    files={"pdf_file": open("contract_note.pdf", "rb")},
    data={"password": "ABCDE1234F"}
)

result = response.json()
if result["status"] == "success":
    data = result["data"]
    for txn in data["equity_transactions"]:
        print(f"{txn['security_symbol']}: {txn['buy_quantity']} @ ₹{txn['buy_wap']}")

Response format

{
  "status": "success",
  "msg": "success",
  "data": {
    "contract_note_info": {
      "contract_note_number": "CNT-25/26-73436720",
      "trade_date": "2025-08-05",
      "settlement_number": "2025149",
      "settlement_date": "2025-08-06"
    },
    "broker_info": {
      "broker_type": "zerodha",
      "name": "Zerodha Broking Limited",
      "sebi_registration": "INZ000031633"
    },
    "client_info": {
      "name": "JOHN DOE",
      "pan": "ABCDE1234F",
      "ucc": "AB1234",
      "place_of_supply": "DELHI",
      "gst_state_code": "7"
    },
    "equity_transactions": [
      {
        "isin": "INE002A01018",
        "security_name": "RELIANCE",
        "security_symbol": "RELIANCE",
        "buy_quantity": 10,
        "buy_wap": 2450.50,
        "buy_total_value": 24505.00,
        "sell_quantity": 0,
        "sell_wap": 0,
        "sell_total_value": 0,
        "net_obligation": 24547.43
      }
    ],
    "derivatives_transactions": [],
    "detailed_trades": [
      {
        "order_number": "1000000042939390",
        "order_time": "13:13:13",
        "trade_number": "4006567",
        "trade_time": "13:13:13",
        "security_description": "RELIANCE-EQ/INE002A01018",
        "buy_sell": "B",
        "exchange": "NSE",
        "quantity": 10,
        "brokerage": 12.25,
        "net_rate_per_unit": 2450.50,
        "closing_rate_per_unit": 2450.50,
        "net_total": 24547.43
      }
    ],
    "charges_summary": {
      "pay_in_pay_out_obligation": 24505.00,
      "taxable_value_brokerage": 12.25,
      "exchange_transaction_charges": 5.00,
      "cgst": 1.10,
      "sgst": 1.10,
      "igst": 0,
      "securities_transaction_tax": 24.51,
      "sebi_turnover_fees": 0.25,
      "stamp_duty": 2.45,
      "net_amount_receivable_payable": 24547.43
    }
  }
}

Response Fields

Contract Note Info

FieldDescription
contract_note_numberContract note reference number
trade_dateDate when trades were executed
settlement_numberSettlement reference
settlement_dateSettlement date

Equity Transactions (Summary)

FieldDescription
isinISIN code of the security
security_nameName of the security
security_symbolTrading symbol
buy_quantityTotal quantity purchased
buy_wapWeighted Average Price for buys
buy_total_valueTotal buy value
sell_quantityTotal quantity sold
sell_wapWeighted Average Price for sells
sell_total_valueTotal sell value
net_obligationNet amount payable/receivable

Detailed Trades

FieldDescription
order_numberOrder reference number
trade_numberTrade reference number
security_descriptionSecurity with exchange and ISIN
buy_sellB (Buy) or S (Sell)
exchangeNSE, BSE, etc.
quantityQuantity traded
brokerageBrokerage for this trade
net_rate_per_unitNet rate per unit
net_totalNet total for this trade

Charges Summary

FieldDescription
pay_in_pay_out_obligationNet pay-in/pay-out
taxable_value_brokerageTaxable brokerage amount
securities_transaction_taxSTT amount
stamp_dutyStamp duty charges
cgst / sgst / igstGST components
net_amount_receivable_payableFinal settlement amount

Credit usage

OperationCredits
Parse contract note0.5
Contract notes cost half a credit compared to CAS parsing (1 credit).

Use cases

  • Portfolio tracking — Automatically import trades into your app
  • Tax calculation — Extract capital gains data for ITR filing
  • Trade analytics — Analyze trading patterns and costs
  • Reconciliation — Match broker records with demat statements

Next steps

Parsing CAS

Parse portfolio statements

API Reference

View all endpoints