STP orders actually reach CCXT venues — round-3 dogfood catch#332
Merged
Conversation
Round-3 dogfood (multi-op commit: entry + separate protective stop)
caught the next layer: ibkrOrderTypeToCcxt lowercased STP into a
literal ordType "stp" — okx rejected it with 51000, which meant the
"place a separate stop" path recommended by the TPSL refusal gate
didn't work either. There was NO functioning stop-loss route on okx.
CCXT's actual convention: conditional orders keep the BASE type
(market/limit) and carry params.triggerPrice; ccxt routes each venue
to its algo endpoint. STP → market+trigger, STP LMT → limit+trigger.
Live-verified on okx demo: accepted (algo namespace), tracked as
working across poller passes (the {stop:true} getOrder fallback finds
it; absence from the regular listing does NOT mis-terminal it), and
cancellable through trading-as-git. TRAIL/TRAIL LIMIT now refuse
loudly until venue-verified — same rule as attached TP/SL.
Also observed: okx algo orders are invisible even to
fetchOpenOrders({trigger:true}) with default params — reinforces the
ANG-103 trigger-namespace work.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
ibkrOrderTypeToCcxtlowercasedSTPinto a literal ordType"stp"→ okx 51000 — so the "place a separate stop" path that the TPSL refusal gate recommends was also broken. Caught by a multi-op commit dogfood (entry + protective stop in one approval): entry filled, stop rejected, loud mixed-result narration (the state machine behaved exactly as designed).params.triggerPrice; ccxt routes per-venue. STP → market+trigger, STP LMT → limit+trigger. Live-verified on okx demo: accepted into the algo namespace, tracked assubmittedacross poller passes (the{stop:true}getOrder fallback finds it — absence from the regular listing does not mis-terminal it), and cancellable through the TaG flow.fetchOpenOrders({trigger:true})with default params — the trigger-namespace listing work is confirmed necessary.Test plan
pnpm test1895 passingBoundary touch
CCXT order-type mapping (order entry path).
🤖 Generated with Claude Code