XRPL venue
The engine's Venue trait over the XRP Ledger's built-in order book, on the test network only.
Testnet only
The only HTTP constructor talks to the public XRPL testnet server over HTTPS, with no redirects. On connect, the venue refuses any server whose network id is not 1 and any account data for a different account. Mainnet is not built.
How orders become transactions
An engine limit order becomes an OfferCreate signed locally with an Ed25519 wallet; the secret never leaves the process. A sell sets the sell flag; IOC sets immediate-or-cancel. Every transaction carries a LastLedgerSequence. Market orders, including released stops, become IOC limits capped 1% through the last quote. Cancels become OfferCancel.
Rules the venue keeps
- No fill without ledger evidence: fills come only from the balance changes of a validated transaction, a resting offer the ledger shows smaller, or the offer's deleted-node record in a validated transaction.
- No lost state: a failed request leaves every pending transaction and resting offer as it was, to be retried.
- Expiry is definitive only: a transaction counts as expired only when the server reports it not found after searching every ledger up to its LastLedgerSequence.
- Sequence resync after an expiry, a tef result, terPRE_SEQ or an uncertain submit; nothing is signed until the resync succeeds.
- Cancels are kept: a cancel sent while the order is pending is applied once the offer rests, and retried after transient errors.
- Whole lots only: fills are whole lots of the instrument's size precision (at most 6); remainders carry to the next fill.
- Fill prices from balance changes are rounded against the trader: buys up, sells down.
Two live testnet transactions
Each was named in advance and approved before it was signed by the crate's own code. Both were accepted by the XRPL testnet (network id 1) from testnet account rJWjrBU6GGnbAMbNrmfibaS5m4xDsCkKU.
| Transaction | Hash | Ledger | Result |
|---|---|---|---|
TrustSet: a token with currency code RLUSD from testnet issuer rKmPxq4hD4m27cVy7kqRmwnV59rXVwWML7, limit 100, no-ripple | FA33A759C5EF43E97B0783973EEE475D1E4F6643C08441AB710517FC317DB2C7 | 22230071 | tesSUCCESS |
OfferCreate through the engine and this venue: sell 1 XRP, IOC, limit 1.0400 | F8F4A0633246D35EEB257A50E3752FDC220B269B5AA24C9E3B0FAD48AAD50EF2 | 22230075 | tesSUCCESS |
Independent check of the order
- Engine view: submitted, accepted, filled 1.000000 XRP at 1.0475, position minus 1 XRP.
- Ledger view: XRP balance 100.000000 to 98.999976, which is 1 XRP sold plus two fees of 12 drops.
- Token received: 1.04751062461. The engine's fill price of 1.0475 is that amount rounded down for a sell, never better than the ledger.
- Account sequence moved from 22230005 to 22230007: two transactions.
Read this before trusting the token
The token's issuer is a testnet account. It is not verified to be the issuer of the RLUSD stablecoin, and testnet tokens have no value.
Never reuse a testnet wallet on mainnet
XRPL transactions for networks 0 and 1 carry no network field, so a transaction signed for testnet is also valid on mainnet for the same account and sequence. A mainnet path, when it exists, must use a wallet that has never been used on testnet.
Still open
- Live failure paths were not exercised on testnet; reviewers used a scripted mock built on real response shapes.
- No live capture yet of an
OfferCanceldeleted-node record. - The race between queued transactions and the account sequence.
- Account history paging past 200 entries: an offer deleted further back stays tracked.
- There is no cancel-rejected event, so a strategy is not told while a cancel is being retried.