Add pyth lazer latest price surface - #137
Open
jaspersagent wants to merge 3 commits into
Open
Conversation
jaspersagent
force-pushed
the
feat/pp-proxy-unify
branch
from
May 29, 2026 17:31
bd29a91 to
17b5347
Compare
jaspersagent
marked this pull request as ready for review
June 1, 2026 13:56
jaspersagent
force-pushed
the
feat/pp-proxy-unify
branch
from
June 1, 2026 14:10
31d01b6 to
925a683
Compare
jaspersagent
force-pushed
the
feat/pp-proxy-unify
branch
from
June 1, 2026 14:13
925a683 to
af81443
Compare
hacheigriega
reviewed
Jun 2, 2026
hacheigriega
left a comment
Member
There was a problem hiding this comment.
Looks good to me. I did wonder if it makes sense to have handlePathRequest be a part of the module but not handleLegacyLatestPriceRequest. But ultimately I didn't see a good reason against it.
The legacy latest_price surface forwarded raw cached feeds, so a feed missing optional fields produced an irregular shape. Map each feed through a fixed compat field set that fills absent values with null, matching the seda-oracle-programs pyth_pro fetcher's expected response.
The latest_price surface ignored the channel in the request body and served every feed from the single module-level subscription, so an op asking for a fixed-rate price could receive a real_time one. Key the subscription registry and price cache by (priceFeedId, channel), route inbound frames back to their channel via the subscriptionId they carry, and let the latest_price body select its channel, defaulting to the module channel. The path surface keeps using the module default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/v1/latest_pricepyth-lazer surface expected by deployed pyth_pro oracle programs./price/:symbolsarray surface backed by the same websocket cache.parsed.timestampUsis derived from the returned feeds, not unrelated updates.Validation
bun test workspace/data-proxy/src/modules/pyth-lazer/pyth-lazer.test.tsbunx biome check workspace/data-proxy/src/config/pyth-lazer-module-config.ts workspace/data-proxy/src/controllers/proxy/handle-proxy-request.ts workspace/data-proxy/src/modules/pyth-lazer/pyth-lazer.ts workspace/data-proxy/src/modules/pyth-lazer/pyth-lazer.test.tsbun run check-tsbun test