Skip to content

fix(trade): unfreeze Kraken buys; buy only where there is cash - #77

Merged
ralyodio merged 1 commit into
masterfrom
fix/kraken-buys-blocked
Nov 8, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/kraken-buys-blocked

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Kraken was blocked from buying by 4 liquidations that could never run (XLTC-USD, SOL.S-USD, INJ.B-USD, HYPE.B-USD). Fixed the asset mapping, skip locked balances, gate only on executable liquidations, and mute venues that fail a buy for lack of cash (10 min); DEX uses real wallet balance. typecheck + test 68/68 (crypto-trade 151).

🤖 Generated with Claude Code

Kraken never bought despite $372 USD: hydration queued XLTC-USD,
SOL.S-USD, INJ.B-USD and HYPE.B-USD for liquidation. None is a real
market, so they were never evaluated or cleared, and any pending
liquidation on an exchange skips every buy there.

- Map legacy Kraken codes (XLTC, XETC, XMLN, XREP); trade .F auto-earn
  balances as the base asset; skip .S/.B/.M/.P staked or locked balances.
- The exchange gate only counts liquidations the engine can execute
  (market has live prices).
- Buy only where there is cash: a venue that fails a buy for lack of
  funds is muted for 10 min; DEX venues use the real wallet balance when
  an executor is wired instead of the flat fallback budget.

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

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

11 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 7

Severity Rule Location
HIGH secret-private-key apps/cli/src/setup.ts:109
HIGH secret-private-key apps/web/src/app/settings/sections/cex.tsx:138
HIGH secret-private-key packages/source-crypto-arb/src/feeds/coinbase-pem.ts:61
HIGH secret-private-key packages/source-crypto-arb/src/feeds/coinbase-pem.ts:80
MEDIUM js-timing-unsafe-mac-compare apps/daemon/src/user-config.ts:491
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:117
MEDIUM js-unescaped-html-sink apps/web/src/app/page.tsx:435
MEDIUM js-open-redirect apps/web/src/app/store/install-button.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/components/pit-footer.tsx:17
MEDIUM js-dynamic-code-execution packages/core/src/runtime-cache.ts:248
MEDIUM js-dynamic-code-execution packages/core/src/runtime-cache.ts:268

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 5bee496 into master Nov 8, 2026
7 checks passed
@ralyodio
ralyodio deleted the fix/kraken-buys-blocked branch November 8, 2026 03:42
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.

1 participant