Skip to content

Add a protocol status endpoint returning global trading pause state and protocol configuration #848

Description

@Chucks1093

Summary

The client needs a single endpoint to check whether global trading is paused and retrieve protocol-wide config values. A GET /protocol/status endpoint reading from the get_protocol_status contract view function should be added.

Scope

  • Add GET /protocol/status endpoint (no auth required)
  • Call the get_protocol_status contract view function and return globalTradingPaused, protocolFeeBps, treasuryAddress, lockupDurationSeconds, and minInvestmentAmount
  • Cache the response in Redis for 30 seconds
  • Invalidate the cache when an admin updates any protocol config value
  • Return the pausedAt timestamp from the database when globalTradingPaused is true

Acceptance Criteria

  • All required fields returned correctly
  • globalTradingPaused reflects current contract state
  • pausedAt included in response when paused
  • Redis cache served within 30-second TTL
  • Cache invalidated on any protocol config update

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions