> ## 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.

# List a firm's credits

> List a connected ScripX client firm's duty credit inventory: scrip numbers, scheme, face and balance in paise, expiry and status, the input to the direct-quote loop.

The connected firm's complete credit inventory, cursor-paginated. This is the data your platform **displays in its own UI** so a client sees every credit they hold: number, scheme, face, unused balance, validity and status. It carries **no price**, an inventory is not a quote; you [quote each `scrip_no`](/api-reference/trading/quote) only when the client is ready to sell.

The loop your platform builds on it: **list the firm's credits → show them → quote a credit on demand → sell at ScripX's price**. Every row has an `expiry_date` and a `sellable` flag, so an expiry radar for your clients (idle, near-expiry credit worth selling now) is one sort away.

### Request example

```bash theme={"dark"}
curl "https://api.scripxhq.com/v1/firms/0512345678/credits" \
  -H "X-ScripX-Key: <YOUR_API_KEY>"
```

### Response example

```json theme={"dark"}
{
  "credits": [
    {
      "scrip_no": "SCRIP204188",
      "scheme": "RODTEP",
      "face_paise": 100000000,
      "balance_paise": 100000000,
      "issue_date": "2026-04-01",
      "expiry_date": "2027-03-31",
      "status": "issued",
      "sellable": true
    }
  ],
  "count": 1
}
```

`balance_paise` is the unused balance (face minus what has been utilized against duty). `status` is one of `issued`, `utilized`, `transferred`, `cancelled`, `expired`. `sellable` is `true` exactly when the credit is `issued` with a positive balance, ready to quote and sell; surface it directly in your UI.

<Note>
  In [sandbox](/environments), a firm with an empty book returns two deterministic simulated credits, so your inventory UI builds end to end before anything is live.
</Note>

### Errors

* `409 conflict`, the firm is not `connected` yet ([verify](/api-reference/firms/verify) first).
* `404 not_found`, no such firm on your desk.

**Terms used here:** [scrip\_no](/annexure/terminology#scrip-number), [scheme](/annexure/terminology#scheme), [face value](/annexure/terminology#face-value), [balance](/annexure/terminology#balance), [expiry](/annexure/terminology#validity-and-expiry), [connection state](/annexure/terminology#connection-state), [paise](/annexure/terminology#paise), [order](/annexure/terminology#order), [sellable](/annexure/terminology#sellable). Full list in the [terminology annexure](/annexure/terminology).

### Next steps

* [Quote a credit](/api-reference/trading/quote) by `scrip_no`, then [place the order](/api-reference/trading/orders-create).


## OpenAPI

````yaml GET /v1/firms/{iec}/credits
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/firms/{iec}/credits:
    get:
      tags:
        - Firms
      summary: List a connected firm's credit inventory (feeds the direct-quote loop)
      parameters:
        - name: iec
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            maximum: 500
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: opaque offset from a prior response's next_cursor
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirmCredits'
        '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:
    FirmCredits:
      type: object
      properties:
        credits:
          type: array
          items:
            $ref: '#/components/schemas/Credit'
        count:
          type: integer
    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
    Credit:
      type: object
      description: one duty credit held by the firm, its full lifecycle record
      properties:
        scrip_no:
          type: string
          description: the credit's number
        scheme:
          type: string
          enum:
            - RODTEP
            - ROSCTL
        face_paise:
          type: integer
          description: duty-paying power at issue
        balance_paise:
          type: integer
          description: unused balance (face minus what has been utilized)
        issue_date:
          type: string
        expiry_date:
          type: string
          description: credit lapses after this date
        status:
          type: string
          enum:
            - issued
            - utilized
            - transferred
            - cancelled
            - expired
        sellable:
          type: boolean
          description: issued with a positive balance, ready to quote and sell
  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.

````