Skip to content

Feature/issue 167 pool timestamp#200

Open
Agencybuilds wants to merge 2 commits into
AnchorNet-Org:mainfrom
Agencybuilds:feature/issue-167-pool-timestamp
Open

Feature/issue 167 pool timestamp#200
Agencybuilds wants to merge 2 commits into
AnchorNet-Org:mainfrom
Agencybuilds:feature/issue-167-pool-timestamp

Conversation

@Agencybuilds

Copy link
Copy Markdown

Closes #167

Description: This PR adds the ability for clients to determine how recently the underlying entries of an aggregated liquidity pool were updated, without requiring them to fetch all /entries separately.

Changes Made:

Core Interface: Added lastUpdated?: string to the Pool interface.
Aggregation Logic: Updated LiquidityRepository.pools() to compute the maximum updatedAt from the contributing LiquidityEntry records on the fly, with no extra full-table pass required.
Documentation: Updated the static OpenAPI specification (src/openapi.ts) for /api/v1/liquidity and /api/v1/liquidity/{asset} responses to describe the new lastUpdated field.
Tests: Expanded repository, service, and routing tests to assert that lastUpdated accurately propagates. Existing endpoint functionality and test assumptions remain unbroken.
Security Notes: No security implications. This acts strictly as read-only freshness metadata appended over already-exposed aggregate data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a lastUpdated timestamp to the Pool interface in models/liquidity.ts so clients can tell how fresh aggregated data is

1 participant