Skip to content

feat: GET /premium/:assetA/:assetB with staleness enforcement - #567

Open
mansur-codes wants to merge 1 commit into
Divinity-Labs:mainfrom
mansur-codes:feat/issue-217-premium-endpoint
Open

mansur-codes wants to merge 1 commit into
Divinity-Labs:mainfrom
mansur-codes:feat/issue-217-premium-endpoint

Conversation

@mansur-codes

Copy link
Copy Markdown

Summary

Adds GET /premium/:assetA/:assetB — returns the most recent on-chain price and best CEX price for a pair, the spread in basis points, and both sources and timestamps. Refuses to answer when either side is older than a configurable staleness bound (PREMIUM_STALENESS_SECONDS), naming which side was stale. Network is required via ?network= and validated on every request. OpenAPI spec updated and env drift guard satisfied.

Related issue

Closes #217

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Docs
  • Tests
  • CI / tooling

Checklist

  • I have read CONTRIBUTING.md
  • npx tsc --noEmit passes
  • npm run build passes
  • I added / updated tests where relevant
  • I updated docs where relevant

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@mansur-codes Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

CEX prices are ingested and nothing compares them to the chain

1 participant