copybot: one-shot 10s re-quote retry for FAK no-match OPENs
'no orders found to match with FAK order' is the #1 miss class (13 of the last 48h's misses) — the copy lands in the crater the sharp just swept, before makers requote. Instead of recording the miss at the first rejection, hand the OPEN to Copybot.fak_requote_retry: sleep fak_retry_s (default 10, 0 disables) OUTSIDE the bot lock, then re-run the whole gated buy path (fresh quote, price guard, depth gate) exactly once, mirroring the webhook call site's fill drain so a retry fill books lag + bet rows. A second rejection records the miss tagged 'twice (re-quote retry)'. Paper-parity: the hook is installed in both modes, and PaperExecutor's FAK model re-decides on the fresh book. tests/test_fak_retry.py covers hook scheduling, no-double-count sizing (their_size=0 re-entry), ADD and non-FAK bypasses, and the end-to-end retry thread. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
"bankroll_usd": 66.42,
|
||||
"bankroll_pct": 0.04,
|
||||
"price_guard_abs": 0.05,
|
||||
"fak_retry_s": 10,
|
||||
"taker_fee_rate": 0.03,
|
||||
"discord_webhook": "",
|
||||
"follow": {
|
||||
|
||||
Reference in New Issue
Block a user