Skip to content

bullpen polymarket collection-id

Last updated: July 13, 2026

Calculate a collection ID from condition ID and index set

Usage

bullpen polymarket collection-id [OPTIONS] --condition <CONDITION> --index-set <INDEX_SET>

Live Help

Calculate a collection ID from condition ID and index set

Usage: bullpen polymarket collection-id [OPTIONS] --condition <CONDITION> --index-set <INDEX_SET>

Options:
      --condition <CONDITION>
          Condition ID (0x-prefixed 32-byte hex)

      --output <OUTPUT>
          Output format for command results

          [possible values: table, json]

      --env <ENV>
          Target environment to connect to (overrides config.toml)

          [env: BULLPEN_ENV=]
          [possible values: staging, production]

      --index-set <INDEX_SET>
          Index set bitmask for the displayed outcome slot (commonly 1 for the first binary outcome, 2 for the second)

      --config <CONFIG>
          Path to a custom config.toml file (overrides $BULLPEN_CONFIG and the default location).

          Explicit --config and BULLPEN_CONFIG paths fail closed: if the file is missing, the CLI exits validation instead of silently loading defaults. Credentials still resolve via BULLPEN_HOME, so set BULLPEN_HOME too when isolating a session.

      --parent-collection <PARENT_COLLECTION>
          Parent collection ID (0x-prefixed 32-byte hex, defaults to zero)

          [default: 0x0000000000000000000000000000000000000000000000000000000000000000]

      --offline-formula
          Use the deprecated offline root-position formula instead of on-chain getCollectionId

      --read-only
          Enable read-only mode: blocks all mutating commands

      --non-interactive
          Suppress interactive prompts; does NOT imply --yes for money-moving commands

          [env: BULLPEN_NON_INTERACTIVE=]

  -h, --help
          Print help (see a summary with '-h')

EXAMPLES:
  # Calculate the YES collection ID for a binary condition
  bullpen polymarket collection-id --condition 0x1111111111111111111111111111111111111111111111111111111111111111 --index-set 1

  # Export the NO collection ID calculation with an explicit root parent
  bullpen polymarket collection-id --condition 0x1111111111111111111111111111111111111111111111111111111111111111 --index-set 2 --parent-collection 0x0000000000000000000000000000000000000000000000000000000000000000 --output json

Example Commands

bullpen polymarket collection-id --condition 0x1111111111111111111111111111111111111111111111111111111111111111 --index-set 1
bullpen polymarket collection-id --condition 0x1111111111111111111111111111111111111111111111111111111111111111 --index-set 2 --parent-collection 0x0000000000000000000000000000000000000000000000000000000000000000 --output json

JSON Output

Contract: JSON Output Contract.

This command supports --output json, but this generated reference page intentionally does not include a synthetic success schema or example.

Use the live command in your target environment to inspect command-specific success fields. Error output follows the shared JSON output contract linked above.

Schema version: 1 when a command emits schema_version; otherwise treat the current command shape as contract version 1.

Stability

Patch releases may add nullable or optional fields. Minor releases may add required fields or increment schema_version. Major releases may remove or rename fields.