feat(book+ux): deep limit order book (thousands of orders) + CEX-style advanced trading UI + load tests #102
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The on-chain order book is currently surfaced via
limit-book-shallow(default 10 levels, max 20 perLIMIT_BOOK_SHALLOW_DEPTH_MAXinindexer/src/api/pairs.rs) and a minimal list UI inLimitOrdersPage. Product requirement: support thousands of resting orders with a full-depth (or paged) book API, performance-tested indexer/LCD access patterns, and an advanced trading UI comparable to what centralized spot exchanges offer for pro users.CEX / pro spot trading: reference feature set (research baseline)
Typical advanced spot interfaces include (varying by venue): L2 / depth book (aggregated price levels or full order row depth), time & sales (tape) with filters, last price and 24h stats, order entry with limit/market (and sometimes stop-limit, post-only / maker, TIF/IOC/FOK-style where applicable — many are not on-chain in Cosmos; map honestly to cl8y capabilities), open orders and order history with cancel/replace, trades (user fills) and fees breakdown, chart integration (tradingview-style) with intervals and crosshair sync to book price, watchlists / favorites, depth chart (historical or cumulative depth visualization), hotkeys for power users, layout persistence (save panels), and export (CSV) for tax/analytics. Not all CEX features apply to on-chain; each item needs a “supported / out of scope / off-chain only” decision in implementation issues.
Requirements
Backend (indexer + LCD)
order_book_head+nexttraversal, level aggregation by price tick, or keyset pagination with documented caps.Frontend (advanced trading)
Testing
Acceptance criteria
limit-book-shallowsuperseded or extended; max 20 no longer a hard product ceiling for “advanced” (even if a per-request cap remains for a single HTTP call, pagination must allow thousands cumulative).docs/limit-orders.mdandADR 0002updated to match new behavior.References
indexer/src/api/pairs.rs—get_pair_limit_book_shallow,LIMIT_BOOK_SHALLOW_DEPTH_MAXdocs/limit-orders.md— shallow walk documentationfrontend-dapp/src/pages/LimitOrdersPage.tsx—getPairLimitBookShallowusageLabels suggested
frontend,indexer,limit-orders,ux,performance,testing,launch-blockermentioned in issue #107
mentioned in commit
844607a438mentioned in issue #106
mentioned in commit
fc75387c38mentioned in commit
9de855211fImplemented GitLab #102 (deep limit book + advanced trade UI). @brouie please verify when you can.
Indexer
GET /api/v1/pairs/{addr}/limit-bookwith keyset pagination (limitdefault 50, max 100; optionalafter_order_idfromnext_after_order_id). Shared LCD walk inindexer/src/api/limit_book_lcd.rs;limit-book-shallowkept as legacy preview.indexer/tests/api_limit_book_deep.rs(deep chain, bad cursor, side mismatch, concurrent page fetches;serial_test+ wiremock). Existing shallow mock tests unchanged.Frontend
/tradeand/trade/:pairAddrwithreact-resizable-panels(desktop): order book (load-more depth), chart, trades tape, limit ticket. Mobile: stacked layout.getPairLimitBookPage+ types; Limits page uses paginated preview (20 levels) and removes "shallow" UX copy.Docs
docs/limit-orders.md, ADR 0002,docs/indexer-invariants.mdupdated for pagination and SLO-style LCD cost notes.Merged to
mainand pushed. CI: indexer tests need Postgres (TEST_DATABASE_URL/ GHA service).mentioned in issue #114
mentioned in issue #194