Implement limit book visibility per design (indexer API and/or frontend LCD) #71

Closed
opened 2026-04-09 03:23:53 +00:00 by PlasticDigits · 11 comments
PlasticDigits commented 2026-04-09 03:23:53 +00:00 (Migrated from gitlab.com)

Type

missing-implementation

Evidence

  • Depends on design #70

Dependencies

  • #70 (design accepted)

Acceptance criteria

  • Ship per ADR: REST proxy and/or typed LCD client + user-visible book/head

Epic

#58

## Type **missing-implementation** ## Evidence - Depends on design #70 ## Dependencies - **#70** (design accepted) ## Acceptance criteria - [ ] Ship per ADR: REST proxy and/or typed LCD client + user-visible book/head ## Epic #58
PlasticDigits commented 2026-04-09 03:23:53 +00:00 (Migrated from gitlab.com)

marked this issue as related to #58

marked this issue as related to #58
PlasticDigits commented 2026-04-09 03:23:54 +00:00 (Migrated from gitlab.com)

marked this issue as related to #70

marked this issue as related to #70
PlasticDigits commented 2026-04-09 03:23:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #72

mentioned in issue #72
PlasticDigits commented 2026-04-13 04:51:37 +00:00 (Migrated from gitlab.com)

Indexer exposes order-book-head and limit-book-shallow (LCD proxy); /limits shows shallow bid/ask books with loading/error states; client.ts adds typed fetchers. @brouie please verify against a running indexer + LocalTerra that the book lists match LCD expectations.

Indexer exposes `order-book-head` and `limit-book-shallow` (LCD proxy); `/limits` shows shallow bid/ask books with loading/error states; `client.ts` adds typed fetchers. @brouie please verify against a running indexer + LocalTerra that the book lists match LCD expectations.
PlasticDigits commented 2026-04-13 04:51:46 +00:00 (Migrated from gitlab.com)

mentioned in issue #58

mentioned in issue #58
Brouie commented 2026-04-20 06:06:50 +00:00 (Migrated from gitlab.com)

@PlasticDigits Code-level implementation verified on current main:

Indexer side:

  • indexer/src/api/mod.rs routes at lines 327 (order-book-head) and 331 (limit-book-shallow)
  • indexer/src/api/pairs.rs handlers at lines 822 and 885
  • Depth cap documented at line 18

Frontend side:

  • client.ts typed fetchers (lines 208, 218)
  • types/index.ts response types defined
  • LimitOrdersPage.tsx consumes both endpoints with react-query, invalidates on mutations (lines 65, 72, 111, 148)

Full ADR 0002 implementation wired. Holding close until I run the live indexer + LocalTerra stack and confirm book display matches LCD output. Will update once verified live.

@PlasticDigits Code-level implementation verified on current main: **Indexer side:** - indexer/src/api/mod.rs routes at lines 327 (order-book-head) and 331 (limit-book-shallow) - indexer/src/api/pairs.rs handlers at lines 822 and 885 - Depth cap documented at line 18 **Frontend side:** - client.ts typed fetchers (lines 208, 218) - types/index.ts response types defined - LimitOrdersPage.tsx consumes both endpoints with react-query, invalidates on mutations (lines 65, 72, 111, 148) Full ADR 0002 implementation wired. Holding close until I run the live indexer + LocalTerra stack and confirm book display matches LCD output. Will update once verified live.
Brouie commented 2026-04-20 06:08:38 +00:00 (Migrated from gitlab.com)

@PlasticDigits Code-level implementation verified on current main:

Indexer side:

  • indexer/src/api/mod.rs routes at lines 327 (order-book-head) and 331 (limit-book-shallow)
  • indexer/src/api/pairs.rs handlers at lines 822 and 885
  • Depth cap documented at line 18

Frontend side:

  • client.ts typed fetchers (lines 208, 218)
  • types/index.ts response types defined
  • LimitOrdersPage.tsx consumes both endpoints with react-query, invalidates on mutations (lines 65, 72, 111, 148)

Full ADR 0002 implementation wired. Holding close until I run the live indexer + LocalTerra stack and confirm book display matches LCD output. Will update once verified live.

@PlasticDigits Code-level implementation verified on current main: **Indexer side:** - indexer/src/api/mod.rs routes at lines 327 (order-book-head) and 331 (limit-book-shallow) - indexer/src/api/pairs.rs handlers at lines 822 and 885 - Depth cap documented at line 18 **Frontend side:** - client.ts typed fetchers (lines 208, 218) - types/index.ts response types defined - LimitOrdersPage.tsx consumes both endpoints with react-query, invalidates on mutations (lines 65, 72, 111, 148) Full ADR 0002 implementation wired. Holding close until I run the live indexer + LocalTerra stack and confirm book display matches LCD output. Will update once verified live.
Brouie commented 2026-04-20 06:43:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #79

mentioned in issue #79
Brouie commented 2026-04-20 06:53:58 +00:00 (Migrated from gitlab.com)

mentioned in issue #86

mentioned in issue #86
Brouie commented 2026-04-20 08:51:09 +00:00 (Migrated from gitlab.com)

@PlasticDigits Live verification complete on current main. Stack: LocalTerra + Postgres (:5433) + indexer (:3001) with 23 deployed pairs indexed.

Endpoint tests

GET /api/v1/pairs/{addr}/order-book-head?side=bid (empty book):

{ "head_order_id": null }

GET /api/v1/pairs/{addr}/limit-book-shallow?side=bid&depth=5 (empty book):

{ "side": "bid", "orders": [] }

GET /api/v1/pairs/{unknown}/order-book-head?side=bid (404 test):

HTTP 404: 'Pair not found'

Response shapes match ADR 0002 spec. Empty-book returns null/[] correctly (no LCD errors surfaced). 404 handling works for unknown pairs. Indexer correctly proxies LCD queries via withSolanaReadFallback equivalent for Terra.

ADR 0002 implementation verified end-to-end. Closing.

@PlasticDigits Live verification complete on current main. Stack: LocalTerra + Postgres (:5433) + indexer (:3001) with 23 deployed pairs indexed. ## Endpoint tests **GET /api/v1/pairs/{addr}/order-book-head?side=bid** (empty book): ``` { "head_order_id": null } ``` **GET /api/v1/pairs/{addr}/limit-book-shallow?side=bid&depth=5** (empty book): ``` { "side": "bid", "orders": [] } ``` **GET /api/v1/pairs/{unknown}/order-book-head?side=bid** (404 test): ``` HTTP 404: 'Pair not found' ``` Response shapes match ADR 0002 spec. Empty-book returns null/[] correctly (no LCD errors surfaced). 404 handling works for unknown pairs. Indexer correctly proxies LCD queries via withSolanaReadFallback equivalent for Terra. ADR 0002 implementation verified end-to-end. Closing.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-20 08:51:16 +00:00
PlasticDigits commented 2026-05-26 07:59:51 +00:00 (Migrated from gitlab.com)

mentioned in issue #194

mentioned in issue #194
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#71
No description provided.