docs(scrypt): check in vendor AsyncAPI spec as reference#3737
Open
TaprootFreak wants to merge 2 commits into
Open
docs(scrypt): check in vendor AsyncAPI spec as reference#3737TaprootFreak wants to merge 2 commits into
TaprootFreak wants to merge 2 commits into
Conversation
The Scrypt integration is built against a non-public WebSocket API that sits behind HTTP Basic Auth at doc.client.scrypt.swiss. Add the rendered AsyncAPI 3.0 spec to src/integration/exchange/docs/ so the spec is discoverable next to the integration code and survives without depending on continued access to the vendor portal. The README captures source URL, fetch date, refresh procedure, and the three non-obvious facts that drive integration choices: Fee="0" defaults, AvgPx exclusion of fees, and RFQ TradedPx all-in semantics.
This was referenced May 21, 2026
Companion to the AsyncAPI WebSocket spec. The FIX API documents
features that are not exposed (or not documented) over WebSocket —
notably:
- OrdType A = LimitAllIn, where the LIMIT price already includes
fees. If Scrypt accepts this over WebSocket too, it is the
cleanest way to bound implicit commission cost.
- CumFee (Tag 4016) in ExecutionReport — cumulative fee tracked
server-side.
- DecisionStatus (Tag 20032) for staged-order lifecycle.
- CancelOnDisconnect (Tag 20030) auto-cancel semantics.
- Order State Change Matrices (Filled / Canceled /
Replace-to-increase / Replace-during-fill).
Also enumerate known FIX-vs-WebSocket divergences in OrdType, ExecType,
and OrdRejReason enums so future contributors don't assume
cross-protocol parity.
PDF source URL kept in the README for re-fetch; the PDF itself is
publicly hosted, no auth needed.
5 tasks
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.
Why
Scrypt's WebSocket API is documented behind HTTP Basic Auth at
doc.client.scrypt.swiss— credentials are in Vaultwarden, not in any developer onboarding doc. Anyone trying to reason aboutscrypt.service.ts,scrypt-websocket-connection.ts, orscrypt.adapter.tstoday has to know the URL exists and get the password before they can see the schema. That has already cost us once: during the 2026-05-21 BTC/EUR fee investigation, the question "does the venue charge a separate fee or embed it in the spread?" could only be answered by fetching the spec live.Check the rendered AsyncAPI 3.0 YAML into the repo next to the integration code so the source-of-record schema is reachable via
grep, survives credential rotation, and lands in clones used by air-gapped reviewers.What
src/integration/exchange/docs/scrypt-asyncapi.yaml— verbatim spec download fromhttps://doc.client.scrypt.swiss/v1/client/customer/documentation/docs/public(130 KB, AsyncAPI 3.0.0, Scrypt WebSocket API v1.0.0)README.md— source URL, fetch date, refresh procedure, and three non-obvious integration-relevant facts pulled from the spec:FeeonTradeandLastFeeonExecutionReportcome back as"0"for our Limit orders; the cost lives in the bid/ask spreadAvgPxdoc string: "Does not include fees"OrdType: RFQTradedPxis "all-in price that includes fees" — different semantics, future RFQ integration needs its own pricing logicNon-changes
Test plan
README.mdclaims against the YAML