> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scripxhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a firm quote

> Get a firm ScripX quote for a duty credit scrip trade: price one credit by scrip number or a face amount to sell, or a duty requirement to buy, returning price in bps and one all-in paise amount.

A firm price for an exact amount, on either side. Requires the `quote` scope.

This is the call every integration lives on, whether it prices one scrip or a book of them: [list a firm's credits](/api-reference/firms/credits), then take one direct quote per `scrip_no`, one all-in number, with no aggregation or price modelling on your side.

### Sell: price one credit directly

```bash theme={"dark"}
curl -X POST "https://api.scripxhq.com/v1/quote" \
  -H "X-ScripX-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"side": "sell", "scrip_no": "SCRIP204188"}'
```

Or price a face amount without naming a credit: `{"side": "sell", "scheme": "RODTEP", "face_paise": 100000000}`.

```json theme={"dark"}
{
  "side": "sell",
  "scrip_no": "SCRIP204188",
  "scheme": "RODTEP",
  "face_paise": 100000000,
  "price_bps": 9650,
  "all_in_paise": 96500000,
  "valid_until": "2026-07-24T14:32:00+05:30",
  "quote_ref": "qt_01J0…"
}
```

`all_in_paise` is the one number that changes hands, everything included. `valid_until` is the firm window; `quote_ref` is your support reference.

### Buy: cover a duty requirement

<Note>
  Buy-side quotes require the buy side to be active on your key. Write to [amin@eximfiles.io](mailto:amin@eximfiles.io) to have it enabled.
</Note>

```bash theme={"dark"}
curl -X POST "https://api.scripxhq.com/v1/quote" \
  -H "X-ScripX-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"side": "buy", "scheme": "RODTEP", "requirement_paise": 500000000}'
```

```json theme={"dark"}
{
  "side": "buy",
  "scheme": "RODTEP",
  "requirement_paise": 500000000,
  "price_bps": 9700,
  "all_in_paise": 485000000,
  "savings_paise": 15000000,
  "scrip_nos": ["SCRIP204188", "SCRIP204190"],
  "covered_paise": 500000000,
  "residual_paise": 0,
  "fully_covered": true,
  "quote_ref": "qt_01J0…"
}
```

Credits transfer whole, so a buy is covered by a bundle of whole credits; `residual_paise` is any duty left to pay in cash.

<Note>
  When no firm price is available the response is `{"no_quote": true, "reason": "…"}` with one of two stable reasons. Treat it as a normal outcome, show the client a retry, and never interpolate a price of your own.
</Note>

### Errors

* `401` / `403` / `429`, the standard [auth errors](/authentication#authentication-errors).
* `422 unprocessable`, missing or non-positive amounts.

**Terms used here:** [scrip\_no](/annexure/terminology#scrip-number), [scheme](/annexure/terminology#scheme), [face value](/annexure/terminology#face-value), [paise](/annexure/terminology#paise), [bps](/annexure/terminology#basis-point), [firm quote](/annexure/terminology#firm-quote), [all-in price](/annexure/terminology#all-in-price), [requirement](/annexure/terminology#requirement), [residual](/annexure/terminology#residual). Full list in the [terminology annexure](/annexure/terminology).

### Next steps

* [Place the order](/api-reference/trading/orders-create)
* [List a firm's credits](/api-reference/firms/credits), the sell loop's input.


## OpenAPI

````yaml POST /v1/quote
openapi: 3.1.0
info:
  title: ScripX Partner API
  version: 1.2.0
  description: >-
    Automate duty-credit-scrip trading: quote, order, positions, market,
    webhooks. Auth: `X-ScripX-Key: scripx_live_…`. Money = integer paise; price
    = bps of face.
  contact:
    name: ScripX API Support
    email: amin@eximfiles.io
    url: https://scripxhq.com
servers:
  - url: https://api.scripxhq.com
    description: >-
      Production and sandbox share one host; a scripx_test_ key selects the
      sandbox.
security:
  - ApiKeyAuth: []
tags:
  - name: Firms
    description: >-
      client-firm lifecycle: register, verify, authorize, credits, update,
      offboard
  - name: Trading
    description: quote, orders, positions, market
  - name: Group
    description: intra-group netting + positions (enterprise/broker)
  - name: Cross
    description: 'broker cross-desk: block deals + intra-group transfers'
  - name: Webhooks
    description: event subscriptions + delivery
  - name: Account
    description: usage + metering
  - name: Keys
    description: self-serve scoped child keys (sub-accounts)
paths:
  /v1/quote:
    post:
      tags:
        - Trading
      summary: Get a firm two-sided quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    QuoteRequest:
      type: object
      required:
        - side
      properties:
        side:
          type: string
          enum:
            - sell
            - buy
        scheme:
          type: string
          enum:
            - RODTEP
            - ROSCTL
          description: required unless scrip_no is given
        face_paise:
          type: integer
          description: 'sell: face value to price (with scheme)'
        requirement_paise:
          type: integer
          description: 'buy: duty amount to cover (with scheme)'
        scrip_no:
          type: string
          description: 'sell only: price ONE specific credit directly'
      description: >-
        sell: pass scrip_no, OR scheme+face_paise. buy: pass
        scheme+requirement_paise.
    Quote:
      type: object
      description: >-
        Your side only. no_quote:true (with a stable reason) when no firm price
        is available.
      properties:
        side:
          type: string
          enum:
            - sell
            - buy
        scheme:
          type: string
        scrip_no:
          type: string
          description: 'sell by scrip_no only: echoes the credit priced'
        face_paise:
          type: integer
          description: 'sell: the face priced'
        requirement_paise:
          type: integer
          description: 'buy: the duty amount covered'
        price_bps:
          type: integer
          description: your price in bps of face
        all_in_paise:
          type: integer
          description: the one number that changes hands, everything included
        savings_paise:
          type: integer
          description: 'buy: saved vs paying duty in cash'
        scrip_nos:
          type: array
          items:
            type: string
          description: 'buy: the whole credits that cover the requirement'
        covered_paise:
          type: integer
          description: 'buy: duty covered by the bundle'
        residual_paise:
          type: integer
          description: 'buy: duty left to pay in cash'
        fully_covered:
          type: boolean
        valid_until:
          type: string
          description: 'sell: the quote''s firm window (ISO-IST)'
        quote_ref:
          type: string
          description: stable reference for support
        no_quote:
          type: boolean
        reason:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: stable machine code
          enum:
            - bad_request
            - unauthorized
            - forbidden
            - not_found
            - conflict
            - unprocessable
            - rate_limited
            - internal
        message:
          type: string
        detail:
          type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-ScripX-Key
      description: >-
        Your API key, e.g. `scripx_live_…`. Bound to one firm; tenant isolation
        is enforced.

````