Interactive Brokers · Capability

Interactive Brokers Web API — Contracts

Interactive Brokers Web API — Contracts. 1 operations. Lead operation: Search contracts. Self-contained Naftiko capability covering one Interactive Brokers business surface.

Run with Naftiko Interactive BrokersContracts

What You Can Do

POST
Searchcontracts — Search contracts
/v1/iserver/secdef/search

MCP Tools

search-contracts

Search contracts

read-only

Capability Spec

web-contracts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Interactive Brokers Web API — Contracts
  description: 'Interactive Brokers Web API — Contracts. 1 operations. Lead operation: Search contracts. Self-contained Naftiko
    capability covering one Interactive Brokers business surface.'
  tags:
  - Interactive Brokers
  - Contracts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    INTERACTIVE_BROKERS_API_KEY: INTERACTIVE_BROKERS_API_KEY
capability:
  consumes:
  - type: http
    namespace: web-contracts
    baseUri: https://localhost:5000/v1/api
    description: Interactive Brokers Web API — Contracts business capability. Self-contained, no shared references.
    resources:
    - name: iserver-secdef-search
      path: /iserver/secdef/search
      operations:
      - name: searchcontracts
        method: POST
        description: Search contracts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.INTERACTIVE_BROKERS_API_KEY}}'
  exposes:
  - type: rest
    namespace: web-contracts-rest
    port: 8080
    description: REST adapter for Interactive Brokers Web API — Contracts. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/iserver/secdef/search
      name: iserver-secdef-search
      description: REST surface for iserver-secdef-search.
      operations:
      - method: POST
        name: searchcontracts
        description: Search contracts
        call: web-contracts.searchcontracts
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: web-contracts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Interactive Brokers Web API — Contracts. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: search-contracts
      description: Search contracts
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: web-contracts.searchcontracts
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.