Skip to content

feat: add chainlink_api_key option - #420

Merged
kartojal merged 8 commits into
mainfrom
feat/chainlink-api-key
Nov 16, 2026
Merged

kartojal merged 8 commits into
mainfrom
feat/chainlink-api-key

Conversation

@kartojal

@kartojal kartojal commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Changes realtime auth and connection pooling for price streams; secrets are handled via repr=False but still sent over the wire on authenticate.

Overview
Adds optional provider_api_key on authenticated price subscription specs (CryptoPriceSpec, CryptoTwapPriceSpec, EquityPriceSpec, EquityTwapPriceSpec) for Chainlink. The key is validated, omitted from repr, and only used when provider="chainlink".

Realtime wiring now partitions WebSocket sessions by Chainlink API key (not just provider) and sends chainlink_api_key on the auth frame. The client surfaces server rejections with the new RealtimeErrorCode.CHAINLINK_KEY_REQUIRED code.

Reviewed by Cursor Bugbot for commit c0c268d. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/polymarket/_internal/context.py Resolved
kartojal and others added 3 commits November 13, 2026 16:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

kartojal and others added 2 commits November 13, 2026 19:05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bc98c30. Configure here.

kartojal and others added 2 commits November 16, 2026 09:36
Price specs now raise UserInputError when provider_api_key is set without
provider="chainlink", matching the TypeScript SDK. Internally the key is
api_key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Price specs accept provider_api_key with any provider and use it only with
provider="chainlink", matching the TypeScript SDK runtime behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kartojal
kartojal merged commit 91f4b54 into main Nov 16, 2026
7 checks passed
@kartojal
kartojal deleted the feat/chainlink-api-key branch November 16, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants