Skip to content

feat: six adapter#4805

Open
cll-dawid wants to merge 10 commits intomainfrom
feat/six-adapter
Open

feat: six adapter#4805
cll-dawid wants to merge 10 commits intomainfrom
feat/six-adapter

Conversation

@cll-dawid
Copy link
Copy Markdown

@cll-dawid cll-dawid commented Apr 3, 2026

Closes CM-1575

Description

New External Adapter for SIX Exchange and BME equity market data. Connects to SIX Web API via GraphQL subscriptions over WebSocket with mTLS certificate authentication. Streams real-time price data (last, bid, ask, mid, volume) for Swiss (SMI) and Spanish (IBEX) equities.

Supports the Chainlink DataLink pilot with SIX Exchange and BME, initially covering 4 instruments (ABBN, ALC on SIX Swiss Exchange; ANA, ANE on BME), scaling to 57.

Changes

  • New source adapter @chainlink/six-adapter using V3 framework (WebSocketTransport)
  • mTLS authentication via Base64-encoded cert/key environment variables (CERT_BASE64, KEY_BASE64)
  • GraphQL subscription queries with configurable conflation period (CONFLATION_PERIOD, default PT1S)
  • Ripcord mechanism: triggers 502 on SIX stream errors (entitlement failures, invalid instruments) and stale data (>5 min old)
  • Reconnect tuning: WS_SUBSCRIPTION_UNRESPONSIVE_TTL set to 30s (SIX disconnects after 60s inactivity)
  • Unit tests for query builders and timestamp conversion
  • Integration tests with mocked WebSocket: success flow, ripcord on entitlement error, ripcord on stale data, alias parameter resolution

Steps to Test

  1. Build: cd packages/sources/six && yarn build
  2. Unit tests: yarn jest packages/sources/six/test/unit
  3. Integration tests: yarn jest packages/sources/six/test/integration
  4. Live test (requires SIX mTLS certificate with REAL_TIME entitlements):
    cd packages/sources/six
    CERT_BASE64=$(base64 < /path/to/signed-certificate.pem) \
    KEY_BASE64=$(base64 < /path/to/private-key.pem) \
    yarn start
    curl -X POST http://localhost:8080 \
      -H 'Content-Type: application/json' \
      -d '{"data":{"ticker":"ANA","bc":"1058"}}'

Quality Assurance

  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 3, 2026

🦋 Changeset detected

Latest commit: 42522c5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chainlink/six-adapter Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mxiao-cll mxiao-cll requested a review from a team April 7, 2026 12:24
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.

3 participants