Skip to content

Implement the Network Fees endpoint with caching #20

@AlAfiz

Description

@AlAfiz

Description

The frontend relies on the backend to estimate transaction fees accurately. Querying Horizon directly from the frontend exposes API keys and rate limits. The backend should proxy and cache this.

Acceptance Criteria

  • Implement GET /api/v1/network/fees in a NetworkController.
  • Query the Stellar Horizon /fee_stats endpoint via the StellarService.
  • Parse the response to return simplified baseFee and priorityFee metrics.
  • Implement an in-memory cache (@nestjs/cache-manager) to store this result for 30 seconds, so 1,000 active users only trigger 2 backend requests per minute.

Technical Details

  • Return the exact structure documented in the README: { success: true, data: { baseFee, priorityFee, estimatedTotal } }.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions