---
title: "Batch Calculate Pricing"
method: POST
path: "/api/instruments/calculate"
tags: ["instruments"]
---

# Batch Calculate Pricing

`POST /api/instruments/calculate`

## Request

- Base URL: `https://api.harmoney.in`
- URL: `https://api.harmoney.in/api/instruments/calculate`
- Auth: API key in header `x-api-key`

Calculate bond price from yield or yield from price for multiple instruments.

Each instrument has independent pricing parameters (as_of_date, price/yield, etc.).

## Request body

- BatchPricingCalculationRequest: Request schema for batch pricing calculations.
  - `items` BatchPricingItem[], required: List of instruments with their individual pricing parameters
    - `instrument_id` integer, required: ID of the instrument to price
    - `request` PricingCalculationRequest, required: Request schema for pricing calculations.
      - `as_of_date` string, date, required: Settlement date for pricing calculation
      - `quantum` union: Face value/quantum for calculation. Defaults to instrument's par value if not specified. Cannot be used together with 'quantity'.
        - number
        - string
      - `quantity` union: Number of units traded. If provided, quantum is calculated as quantity * par_value. Cannot be used together with 'quantum'.
        - number
        - string
      - `yield` union: Yield as decimal (e.g., 0.09 for 9%). Specify one of price or yield.
        - number
        - string
      - `price` union: Unit clean price per 100 of par value. Specify one of price or yield.
        - number
        - string
      - `termination_type` 'maturity' | 'call' | 'put': Termination type exposed via datafeed APIs.
      - `calculation_type` 'eay' | 'bey' | 'mmy': Calculation type for yield.
      - `put_date` string, date, nullable: Optional put date to use for put termination calculations.
      - `call_date` string, date, nullable: Optional call date to use for call termination calculations.
      - `benchmark_rate` union: Current benchmark rate for floating/reset rate bonds. Used to calculate future coupon rates as (benchmark_rate + spread).
        - number
        - string

## Response `200`

Successful Response

- BatchPricingResponse: Response schema for batch pricing calculations.
  - `results` BatchPricingResult[], required: Results for each instrument in the batch
    - `instrument_id` integer, required: ID of the instrument
    - `success` boolean, required: Whether pricing calculation succeeded
    - `data` PricingResponse: Response schema for pricing calculations.
      - `as_of_date` string, date, required: Settlement date used for calculation
      - `yield` string, required: Yield as decimal
      - `termination_type` string, required: Termination type (maturity, call, put)
      - `unit_clean_price` string, required: Clean price per 100 of par value
      - `clean_price` string, required: Total clean price for quantum
      - `unit_accrued_interest` string, required: Accrued interest per 100 of par value
      - `accrued_interest` string, required: Accrued interest amount
      - `dirty_price` string, required: Total dirty price (clean price + accrued interest)
      - `accrued_interest_days` integer, nullable, required: Number of days of accrued interest
      - `quantum` string, required: Face value/quantum used
      - `quantity` string, required: Number of units of the security
      - `previous_coupon_date` string, date, nullable, required: Date of previous coupon payment
      - `calculation_type` string, required: Calculation type (EAY, BEY, MMY)
      - `call_date` string, date, nullable: Call date used in calculation (for YTC)
      - `put_date` string, date, nullable: Put date used in calculation (for YTP)
      - `stamp_duty` string, required: Stamp duty amount
    - `error` string, nullable: Error message if failed

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-03** `66687f780824`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/inferedge/apis/india-fixed-income-data-feed/changes/api/instruments/calculate/post.md)

---

[API](https://skmtc.dev/inferedge/apis/india-fixed-income-data-feed.md) - [All operations](https://skmtc.dev/inferedge/apis/india-fixed-income-data-feed/llms.txt) - [OpenAPI document](https://skmtc.dev/inferedge/apis/india-fixed-income-data-feed/revisions/66687f780824?raw)
