Repository navigation
Conversation
`kraken order buy --oflags viqc` buys a quote amount on the live venue, but `kraken paper buy` had no way to express it, and `order buy --oflags viqc` in a paper workspace was refused. So the paper engine could not rehearse the order a dollar-cost-averaging agent places for real; the DCA skill had agents compute base volume with `bc` instead. `paper buy`/`paper sell` gain `--oflags`. Only `viqc` is simulated, and only for market buys, matching the API rule; any other flag, and viqc on a sell or a limit order, is refused by name. The engine converts the quote amount to base volume at the fill price (slippage included), truncated to 8 decimals so the cost never exceeds the amount, then fills through the existing market-order path, so the funds check and fee model are unchanged. In a paper workspace, `order buy --oflags viqc` now maps onto this path, and a `--validate` receipt reports the converted base volume. A live workspace still refuses `--oflags`: its allocation ledger prices and reserves volume in the base asset. The journal records the flag on the command and on any rejection, so a logged volume is read in the right currency, and replay shows it. README, AGENTS.md, the DCA skill and the changelog describe the flag and its limit: a viqc strategy does not yet survive promotion to live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
kraken paper buygains--oflags, and simulatesviqc: the volume is a quote-currency amount, as on the live venue.kraken paper buy BTCUSD 30 --oflags viqc # buys $30 of BTC on paperIn a paper workspace,
kraken order buy ... --oflags viqcnow maps onto the same path instead of being refused.Why
A dollar-cost-averaging agent places
order buy BTCUSD 30 --type market --oflags viqcfor real, but paper had no way to rehearse that order. The DCA skill told agents thatpaper buytakes base volume and had them compute it withbc. While testing kraken-mcp with a Claude agent in paper mode, converting dollars to volume, and getting the rounding and minimums right, was where it was most likely to slip.Behavior
viqcis simulated, and only on market buys, matching the API rule ("supported only for buy market orders"). A sell, a limit order, or any other flag is refused by name, in the existing "honest validation" style.--oflags. Its allocation ledger prices and reserves volume in the base asset, so a quote amount must not reach it. A test driveslive_order_atwithviqcand asserts zeroAddOrdercalls.oflags: "viqc"on the command and on any rejection, andkraken replayshows it, so a loggedvolumeis never misread as base. Old journals still load (the field is optional).--validatereceipt reports the converted base volume.viqcstrategy does not yet survive promotion to live.Open question
Paper charges the fee on top of the quote amount, as for every paper fill. I could not confirm from the docs whether the live venue's
viqctakes the fee out of the amount instead. If it does, the paper fill should match.Checks
cargo +nightly-2026-08-20 fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo doc -D warnings, the catalog check, prettier and markdownlint on the changed docs, andcargo test --workspaceall pass. I also exercised it end to end against live prices in a paper workspace.Written with help from Claude Code, then reviewed and tested.