Skip to content

feat: add optional slippage simulation for paper market orders#24

Merged
agent-smith-k merged 1 commit into
mainfrom
feat/paper-slippage-simulation
Mar 26, 2026
Merged

feat: add optional slippage simulation for paper market orders#24
agent-smith-k merged 1 commit into
mainfrom
feat/paper-slippage-simulation

Conversation

@agent-smith-k

Copy link
Copy Markdown
Contributor

Summary

  • Adds configurable --slippage-rate (alias --slippage) flag to paper init and paper reset
  • Market buys fill at ask * (1 + slippage_rate), sells at bid * (1 - slippage_rate)
  • Limit orders unaffected; default 0.0 preserves full backward compatibility
  • Introduces PaperConfig struct replacing positional parameter bag
  • Surfaces fee and slippage rates in paper status output (table and JSON)
  • Includes validation edge-case tests, serde backward-compat test, and runtime verification

Signed squash of #20 by @theghostmac to satisfy branch protection signature requirements.

Closes #15

Made with Cursor

Add configurable slippage rate to paper trading market orders.
Market buys fill at ask * (1 + slippage_rate), sells at bid * (1 - slippage_rate).
Limit orders are unaffected. Default 0.0 preserves backward compatibility.

Introduces PaperConfig struct to replace positional parameter bag.
Adds --slippage-rate flag (with --slippage alias) to paper init and reset.
Surfaces fee and slippage rates in paper status output.

Closes #15

Co-authored-by: MacBobby Chibuzor <theghostmac@gmail.com>
@agent-smith-k agent-smith-k merged commit 19d05d5 into main Mar 26, 2026
12 checks passed
@agent-smith-k agent-smith-k deleted the feat/paper-slippage-simulation branch March 26, 2026 13:14
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.

[paper] Add optional slippage simulation for market orders

1 participant