Apro Oracle Guide
About APRO
APRO has chosen SOON as their first SVM (Solana Virtual Machine) chain to support oracle services, marking a significant milestone in expanding their cross-chain oracle capabilities.
Overview
APRO is building a secure platform by combining off-chain processing with on-chain verification, extending both data access and computational capabilities. This forms the foundation of APRO Data Service, improving data accuracy and efficiency while offering the flexibility to create custom solutions tailored to the specific needs of DApp businesses.
APRO Data Service supports two data models—Data Push and Data Pull—that deliver real-time Price Feeds and other essential data services, ensuring comprehensive support for all DApp business scenarios. Currently, they support 161 Price Feed services across 15 major blockchain networks.
Data Service Models
-
Data Push: Uses a “Push-Based” data model where decentralized independent node operators continuously gather and push data updates to the blockchain when certain price thresholds or time intervals are met. This improves blockchain scalability and provides timely updates.
-
Data Pull: Uses a “Pull-Based” data model to deliver real-time Price Feed services to dApps. Designed for on-demand access, high-frequency updates, low latency, and cost-effective integration, making it ideal for DeFi protocols and decentralized exchanges.
Key Benefits
-
Combined Off-Chain & On-Chain Architecture
-
Integrates off-chain computing with on-chain verification
-
Extends computing capabilities while ensuring system security
-
-
Customizable Computing Logic
-
DApp businesses can implement custom computing logic
-
Secure business logic processing without compromising security
-
-
Enhanced Security Features
-
Hybrid node approach combining on-chain and off-chain resources
-
Multi-network communication scheme to prevent single-point failures
-
TVWAP price discovery mechanism for fair and accurate data
-
Integration Guide
Program IDs
These are the program IDs for APRO Oracle integration:
Description | Devnet | Testnet |
---|---|---|
Apro_SVM_Oracle | 4Mvy4RKRyJMf4PHavvGUuTj9agoddUZ9atQoFma1tyMY | Coming soon |
Sample_Client | HUJ8ouH6fVonhF1hPV6ENoLid5nbHfyZSpvfujw6X6Hm | Coming soon |
Feed IDs
The following feed IDs are available on the apro testnet:
Name | Feed ID |
---|---|
BTC/USD | 0x0003665949c883f9e0f6f002eac32e00bd59dfe6c34e92a91c37d6a8322d6489 |
ETH/USD | 0x0003555ace6b39aae1b894097d0a9fc17f504c62fea598fa206cc6f5088e6e45 |
SOL/USD | 0x000343ec7f6691d6bf679978bab5c093fa45ee74c0baac6cc75649dc59cc21d3 |
USDT/USD | 0x00039a0c0be4e43cacda1599ac414205651f4a62b614b6be9e5318a182c33eb0 |
USDC/USD | 0x00034b881a0c0fff844177f881a313ff894bfc6093d33b5514e34d7faa41b7ef |
Authentication
Headers
All routes require the following two headers for user authentication:
Header | Description |
---|---|
Authorization | The user’s unique identifier, provided as a UUID (Universally Unique IDentifier). |
X-Authorization-Timestamp | The current timestamp, with precision up to milliseconds. The timestamp must closely synchronize with the server time, allowing a maximum discrepancy of 5 seconds (by default). |
API endpoints
Return a single report at a given timestamp
Endpoint: /api/soon/reports
Type | Description | Parameter(s) |
---|---|---|
HTTP GET | Returns a single report for a given timestamp. | • feedID: A Data Streams feed ID • timestamp: The Unix timestamp for the report |
Sample request:
Sample response:
Return a single report with the latest timestamp
Endpoint: /api/soon/reports/latest
Type | Parameter(s) |
---|---|
HTTP GET | feedID: A Data Streams feed ID |
Sample request:
Return a report for multiple FeedIDs at a given timestamp
Endpoint: /api/soon/reports/bulk
Type | Description | Parameter(s) |
---|---|---|
HTTP GET | Return a report for multiple FeedIDs at a given timestamp. | • feedIDs: A comma-separated list of Data Streams feed IDs • timestamp: The Unix timestamp for the reports • startTimestamp: The Unix timestamp for the first report |
Sample request:
Return multiple sequential reports for a single FeedID
Endpoint: /api/soon/reports/page
Type | Description | Parameter(s) |
---|---|---|
HTTP GET | Return multiple sequential reports for a single FeedID, starting at a given timestamp. | • feedID: A Data Streams feed ID • startTimestamp: The Unix timestamp for the first report • limit (optional): The number of reports to return |
Sample request:
WebSocket Connection
Establish a streaming WebSocket connection that sends reports for the given feedID(s) after they are verified.
Endpoint: /api/soon/ws
Type | Parameter(s) |
---|---|
WebSocket | feedIDs: A comma-separated list of Data Streams feed IDs |
Sample request:
Error Response Codes
Status Code | Description |
---|---|
400 Bad Request | This error is triggered when: • There is any missing/malformed query argument • Required headers are missing or provided with incorrect values |
401 Unauthorized | This error is triggered when: • Authentication fails due to invalid HMAC signature • User requests access to an unauthorized feed |
500 Internal Server | Indicates an unexpected server condition preventing request fulfillment |
206 Partial Content | Indicates partial data availability (bulk endpoint only). Example: When requesting data for feedID1 , feedID2 , and feedID3 , if feedID2 data is unavailable, returns [feedID1 data, feedID3 data] with 206 status |