Skip to content

feat(krakenpro): add Kraken Pro EE connector#678

Draft
flemzord wants to merge 2 commits intomainfrom
feat/connector/kraken
Draft

feat(krakenpro): add Kraken Pro EE connector#678
flemzord wants to merge 2 commits intomainfrom
feat/connector/kraken

Conversation

@flemzord
Copy link
Copy Markdown
Member

Summary

  • Add new Enterprise Edition connector krakenpro for Kraken Pro REST API
  • Read-only capabilities: FetchAccounts, FetchBalances, FetchPayments
  • HMAC-SHA512 authentication with configurable endpoint (UAT/prod support)
  • All 16 Kraken ledger types mapped to PSPPayment types
  • Asset normalization: X/Z prefix stripping, suffix handling (.S/.F/.B/.M/.T/.P), XBT→BTC
  • Offset-based pagination with progressive LastSeenTime tracking
  • Credential validation on Install via GetBalance API call
  • Non-secret account reference derived from SHA256(APIKey)
  • 73 unit tests (Ginkgo/gomock)

Files

  • 18 new files in ee/plugins/krakenpro/ (connector + client + tests)
  • 3 modified files: ee/plugins/list.go, enterprise_ce.go, OpenAPI spec
  • Generated files: SDK models, docs, OpenAPI yaml

Test plan

  • go build -tags ee ./... compiles
  • go test -tags ee ./ee/plugins/krakenpro/... — 73 tests pass
  • just pc — full pre-commit passes (tidy, generate, lint, openapi, compile)
  • Manual validation with real Kraken Pro API keys
  • Verify OpenAPI spec renders correctly

Add a new Enterprise Edition connector for Kraken Pro with read-only
capabilities (FetchAccounts, FetchBalances, FetchPayments).

- HMAC-SHA512 API authentication with configurable endpoint (UAT/prod)
- Offset-based pagination with progressive LastSeenTime tracking
- All 16 Kraken ledger types mapped to PSPPayment types
- Asset normalization: X/Z prefix stripping, suffix handling, XBT→BTC
- Credential validation on Install via GetBalance API call
- Non-secret account reference derived from SHA256(APIKey)
- Thread-safe currency lazy init via sync.Once
- OpenAPI spec with V3KrakenproConfig schema
- 73 unit tests (Ginkgo/gomock)
- Remove redundant formattedCurrMap (currencies already uppercase)
- Remove ledgerPageSize alias, use PAGE_SIZE directly
- Merge latestTime tracking into main ledger iteration loop
- Replace strings.Split with strings.IndexByte in truncateToPrecision
- Fix misplaced doc comments in assets.go
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e8f51246-879f-405c-9fb1-4676516af1e4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/connector/kraken
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 66.97674% with 142 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.13%. Comparing base (a1ef879) to head (f61ad6c).

Files with missing lines Patch % Lines
ee/plugins/krakenpro/client/client.go 27.50% 58 Missing ⚠️
ee/plugins/krakenpro/client/client_generated.go 0.00% 24 Missing ⚠️
ee/plugins/krakenpro/payments.go 84.80% 10 Missing and 9 partials ⚠️
ee/plugins/krakenpro/plugin.go 70.76% 16 Missing and 3 partials ⚠️
ee/plugins/krakenpro/balances.go 76.19% 6 Missing and 4 partials ⚠️
ee/plugins/krakenpro/accounts.go 86.20% 2 Missing and 2 partials ⚠️
ee/plugins/krakenpro/assets.go 82.60% 2 Missing and 2 partials ⚠️
ee/plugins/krakenpro/config.go 83.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #678      +/-   ##
==========================================
+ Coverage   63.09%   63.13%   +0.04%     
==========================================
  Files         832      841       +9     
  Lines       37635    38065     +430     
==========================================
+ Hits        23744    24032     +288     
- Misses      12316    12436     +120     
- Partials     1575     1597      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant