feat: update ingestor and shared packages#14
Merged
FabianSanchezD merged 1 commit intoNeko-Protocol:mainfrom Jan 28, 2026
Merged
Conversation
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.
🚀 Neko Pull Request
Pull Request: Define Raw Price Data Model and Normalization
Issue Reference: #9
Branch:
feat/define-raw-price-data-model-and-normalizationOverview
This pull request introduces a standardized
RawPriceinterface in the shared package and establishes a provider abstraction layer in the ingestor service. These changes ensure consistent data structures across all price data providers and improve maintainability for future integrations.Motivation
Previously, the
RawPriceinterface was defined locally within the ingestor service, limiting reusability across other packages. Additionally, there was no abstraction layer for price data providers, making it difficult to add new data sources in a consistent manner.This PR addresses these architectural gaps by:
Changes Summary
New Files
packages/shared/src/types/raw-price.tsRawPriceinterface definition with JSDoc documentationpackages/shared/src/types/index.tsapps/ingestor/src/providers/provider.interface.tsPriceProviderinterface defining the contract for all data providersapps/ingestor/src/providers/mock.provider.tsapps/ingestor/src/providers/index.tsModified Files
packages/shared/src/index.tsapps/ingestor/package.json@oracle-stocks/sharedas a dependencyapps/ingestor/src/services/price-fetcher.service.tsapps/ingestor/src/controllers/prices.controller.tsRawPricefrom shared packageTechnical Details
RawPrice Interface
The
RawPriceinterface serves as the canonical data structure for all ingested price data:PriceProvider Interface
The
PriceProviderinterface establishes a contract for all price data providers:Architecture Diagram
Breaking Changes
None. This is a backward-compatible refactoring that:
RawPriceinterface to a shared locationTesting
Build Verification
@oracle-stocks/shared@oracle-stocks/ingestor@oracle-stocks/api@oracle-stocks/aggregator@oracle-stocks/signer@oracle-stocks/transactor@oracle-stocks/frontendLint Verification
Manual Testing
To verify the implementation:
Start the ingestor service:
Test the
/prices/rawendpoint:Verify the response conforms to the
RawPriceschema:[ { "symbol": "AAPL", "price": 150.25, "timestamp": 1705916400000, "source": "MockProvider" } ]Checklist
Future Considerations
This architecture enables straightforward integration of additional price providers:
Each new provider simply needs to implement the
PriceProviderinterface and register with thePriceFetcherService.Reviewers
Please review the following areas:
RawPriceinterface covers all necessary fieldsRelated Issues
Thank you for contributing to Neko, you just helped us make RWAs consumer friendly on Stellar! We hope you can continue contributing to this project.