{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ibkr",
    "name": "IBKR CLI",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/oscraters/ibkr",
    "canonicalUrl": "https://clawhub.ai/oscraters/ibkr",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/ibkr",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ibkr",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "references/api_reference.md",
      "scripts/get_account_info.py",
      "scripts/get_historical_data.py",
      "scripts/ibkr.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ibkr"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/ibkr",
    "agentPageUrl": "https://openagent3.xyz/skills/ibkr/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ibkr/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ibkr/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "This skill integrates with Interactive Brokers Trader Workstation (TWS) and IB Gateway through ib_insync, exposing operational IBKR workflows through:\n\nA unified Python CLI: scripts/ibkr_cli.py\nA bash CLI wrapper: scripts/ibkr.sh\nCompatibility alias: scripts/openclaw.sh\nBackward-compatible script entrypoints:\n\nscripts/get_account_info.py\nscripts/get_historical_data.py\nscripts/place_order.py"
      },
      {
        "title": "Prerequisites",
        "body": "Interactive Brokers account with API permissions.\nTWS or IB Gateway running with API enabled.\nPython 3.9+ recommended.\nib_insync installed:\n\npip install ib_insync"
      },
      {
        "title": "Connection Configuration",
        "body": "All CLIs support connection overrides using flags or env vars.\n\nEnvironment variables:\n\nIBKR_HOST (default 127.0.0.1)\nIBKR_PORT (default 7497)\nIBKR_CLIENT_ID (default 1)\nIBKR_ACCOUNT (optional)\n\nExamples:\n\nIBKR_PORT=4002 IBKR_CLIENT_ID=14 ./scripts/ibkr.sh account-summary\npython3 scripts/ibkr_cli.py positions --host 127.0.0.1 --port 7496 --account DU123456"
      },
      {
        "title": "Bash CLI",
        "body": "./scripts/ibkr.sh <command> [args]\n\nSupported commands:\n\naccount (account summary + positions)\naccount-summary\npositions\nportfolio\npnl\nquote\nhistorical\nplace-order\ncancel-order\nopen-orders\nexecutions\ncontract-details\nscanner\n\n./scripts/openclaw.sh is an alias to the same CLI surface."
      },
      {
        "title": "Python CLI",
        "body": "python3 scripts/ibkr_cli.py <command> [args]"
      },
      {
        "title": "Account Services",
        "body": "python3 scripts/ibkr_cli.py account-summary --json\npython3 scripts/ibkr_cli.py positions --account DU123456\npython3 scripts/ibkr_cli.py portfolio --json\npython3 scripts/ibkr_cli.py pnl --account DU123456 --wait 2"
      },
      {
        "title": "Market Data Services",
        "body": "python3 scripts/ibkr_cli.py quote --symbol AAPL --sec-type STK --market-data-type 3\npython3 scripts/ibkr_cli.py historical --symbol EURUSD --sec-type CASH --duration \"30 D\" --bar-size \"1 hour\"\n\nNotes:\n\nHistorical requests support full IB-format values via flags, including spaced tokens like \"30 D\".\nFor CASH, default whatToShow is MIDPOINT unless explicitly overridden."
      },
      {
        "title": "Contract Discovery",
        "body": "python3 scripts/ibkr_cli.py contract-details --symbol ES --sec-type FUT --expiry 202606"
      },
      {
        "title": "Trading and Order Lifecycle",
        "body": "python3 scripts/ibkr_cli.py place-order --symbol AAPL --sec-type STK --action BUY --quantity 10 --order-type MKT\npython3 scripts/ibkr_cli.py place-order --symbol AAPL --sec-type STK --action SELL --quantity 10 --order-type LMT --limit-price 250 --tif GTC\npython3 scripts/ibkr_cli.py open-orders\npython3 scripts/ibkr_cli.py cancel-order --order-id 12345\npython3 scripts/ibkr_cli.py executions --json\n\nSupported order types in the CLI:\n\nMKT\nLMT\nSTP\nSTP LMT\n\nplace-order waits for status updates and surfaces API errors collected during placement."
      },
      {
        "title": "Scanner Service",
        "body": "python3 scripts/ibkr_cli.py scanner --instrument STK --location-code STK.US.MAJOR --scan-code TOP_PERC_GAIN --rows 25"
      },
      {
        "title": "Compatibility Scripts",
        "body": "Legacy scripts remain supported and now delegate to the unified CLI:\n\nget_account_info.py\nget_historical_data.py (legacy positional mode still works)\nplace_order.py (legacy positional mode still works)"
      },
      {
        "title": "Error Handling",
        "body": "The CLI returns non-zero exit codes for:\n\nImport/dependency failures\nConnection failures\nContract qualification failures\nInvalid arguments\nMissing open order for cancellation"
      },
      {
        "title": "References",
        "body": "See references/api_reference.md for IBKR and ib_insync documentation links."
      }
    ],
    "body": "IBKR Skill\nOverview\n\nThis skill integrates with Interactive Brokers Trader Workstation (TWS) and IB Gateway through ib_insync, exposing operational IBKR workflows through:\n\nA unified Python CLI: scripts/ibkr_cli.py\nA bash CLI wrapper: scripts/ibkr.sh\nCompatibility alias: scripts/openclaw.sh\nBackward-compatible script entrypoints:\nscripts/get_account_info.py\nscripts/get_historical_data.py\nscripts/place_order.py\nPrerequisites\nInteractive Brokers account with API permissions.\nTWS or IB Gateway running with API enabled.\nPython 3.9+ recommended.\nib_insync installed:\npip install ib_insync\n\nConnection Configuration\n\nAll CLIs support connection overrides using flags or env vars.\n\nEnvironment variables:\n\nIBKR_HOST (default 127.0.0.1)\nIBKR_PORT (default 7497)\nIBKR_CLIENT_ID (default 1)\nIBKR_ACCOUNT (optional)\n\nExamples:\n\nIBKR_PORT=4002 IBKR_CLIENT_ID=14 ./scripts/ibkr.sh account-summary\npython3 scripts/ibkr_cli.py positions --host 127.0.0.1 --port 7496 --account DU123456\n\nBash CLI\n\n./scripts/ibkr.sh <command> [args]\n\nSupported commands:\n\naccount (account summary + positions)\naccount-summary\npositions\nportfolio\npnl\nquote\nhistorical\nplace-order\ncancel-order\nopen-orders\nexecutions\ncontract-details\nscanner\n\n./scripts/openclaw.sh is an alias to the same CLI surface.\n\nPython CLI\n\npython3 scripts/ibkr_cli.py <command> [args]\n\nAccount Services\npython3 scripts/ibkr_cli.py account-summary --json\npython3 scripts/ibkr_cli.py positions --account DU123456\npython3 scripts/ibkr_cli.py portfolio --json\npython3 scripts/ibkr_cli.py pnl --account DU123456 --wait 2\n\nMarket Data Services\npython3 scripts/ibkr_cli.py quote --symbol AAPL --sec-type STK --market-data-type 3\npython3 scripts/ibkr_cli.py historical --symbol EURUSD --sec-type CASH --duration \"30 D\" --bar-size \"1 hour\"\n\n\nNotes:\n\nHistorical requests support full IB-format values via flags, including spaced tokens like \"30 D\".\nFor CASH, default whatToShow is MIDPOINT unless explicitly overridden.\nContract Discovery\npython3 scripts/ibkr_cli.py contract-details --symbol ES --sec-type FUT --expiry 202606\n\nTrading and Order Lifecycle\npython3 scripts/ibkr_cli.py place-order --symbol AAPL --sec-type STK --action BUY --quantity 10 --order-type MKT\npython3 scripts/ibkr_cli.py place-order --symbol AAPL --sec-type STK --action SELL --quantity 10 --order-type LMT --limit-price 250 --tif GTC\npython3 scripts/ibkr_cli.py open-orders\npython3 scripts/ibkr_cli.py cancel-order --order-id 12345\npython3 scripts/ibkr_cli.py executions --json\n\n\nSupported order types in the CLI:\n\nMKT\nLMT\nSTP\nSTP LMT\n\nplace-order waits for status updates and surfaces API errors collected during placement.\n\nScanner Service\npython3 scripts/ibkr_cli.py scanner --instrument STK --location-code STK.US.MAJOR --scan-code TOP_PERC_GAIN --rows 25\n\nCompatibility Scripts\n\nLegacy scripts remain supported and now delegate to the unified CLI:\n\nget_account_info.py\nget_historical_data.py (legacy positional mode still works)\nplace_order.py (legacy positional mode still works)\nError Handling\n\nThe CLI returns non-zero exit codes for:\n\nImport/dependency failures\nConnection failures\nContract qualification failures\nInvalid arguments\nMissing open order for cancellation\nReferences\n\nSee references/api_reference.md for IBKR and ib_insync documentation links."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/oscraters/ibkr",
    "publisherUrl": "https://clawhub.ai/oscraters/ibkr",
    "owner": "oscraters",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ibkr",
    "downloadUrl": "https://openagent3.xyz/downloads/ibkr",
    "agentUrl": "https://openagent3.xyz/skills/ibkr/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ibkr/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ibkr/agent.md"
  }
}