SOON Chain Integration Guide
Last updated
Last updated
APRO Oracle Data Pull is a pull mode oracle product for those who require low-latency data feed service.
Following process chart is how pull mode works:
This doc is the integration guide for projects on SOON Devnet.
REST Endpoint to query specific reports
Apro_SVM_Oracle
4Mvy4RKRyJMf4PHavvGUuTj9agoddUZ9atQoFma1tyMY
4Mvy4RKRyJMf4PHavvGUuTj9agoddUZ9atQoFma1tyMY
Sample_Client
HUJ8ouH6fVonhF1hPV6ENoLid5nbHfyZSpvfujw6X6Hm
HUJ8ouH6fVonhF1hPV6ENoLid5nbHfyZSpvfujw6X6Hm
All routes require the following two headers for user authentication:
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). For a value of 10 digits, it is multiplied directly by 1000 to milliseconds.
To get authorization, please contact our BD Team:
Email: bd@apro.com
Return a single report at a given timestamp
Endpoint
/api/soon/reports
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
GET /api/soon/reports?feedID=<feedID>×tamp=<timestamp>
Sample response
Return a single report with the latest timestamp
Endpoint
/api/soon/reports/latest
HTTP GET
feedID: A Data Streams feed ID.
Sample request
GET /api/soon/reports/latest?feedID=<feedID>
Sample response
Return a report for multiple FeedIDs at a given timestamp
Endpoint
/api/soon/reports/bulk
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 first report or the string 'latest' for getting the latest report.
Sample request
GET /api/soon/reports/bulk?feedIDs=<feedID1>,<feedID2>,...×tamp=<timestamp>
GET /api/soon/reports/bulk?feedIDs=<feedID1>,<feedID2>,...×tamp=latest
Sample response
Return multiple sequential reports for a single FeedID, starting at a given timestamp
Endpoint
/api/soon/reports/page
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
GET /api/soon/reports/page?feedID=<FeedID>&startTimestamp=<StartTimestamp>&limit=<Limit>
Sample response
WebSocket Connection
Establish a streaming WebSocket connection that sends reports for the given feedID(s) after they are verified.
Endpoint
/api/soon/ws
WebSocket
feedIDs: A comma-separated list of Data Streams feed IDs.
Sample request
GET /api/soon/ws?feedIDs=<feedID1>,<feedID2>,...
Sample response
Devnet:
BTC/USD
ID: 0x0003665949c883f9e0f6f002eac32e00bd59dfe6c34e92a91c37d6a8322d6489
Decimals: 18
oracle_state_ID: 1
ETH/USD
ID: 0x0003555ace6b39aae1b894097d0a9fc17f504c62fea598fa206cc6f5088e6e45
Decimals: 18
oracle_state_ID: 2
SOL/USD
ID: 0x000343ec7f6691d6bf679978bab5c093fa45ee74c0baac6cc75649dc59cc21d3
Decimals: 18
oracle_state_ID: 3
BONK/USD
ID: 0x00032b250dddd30d526b4ae66d170e1ab204ab0567531798d3bbd09737f6c3c6
Decimals: 18
oracle_state_ID: 4
Mainnet:
BTC/USD
ID: 0x0003665949c883f9e0f6f002eac32e00bd59dfe6c34e92a91c37d6a8322d6489
Decimals: 18
oracle_state_ID: 1
ETH/USD
ID: 0x0003555ace6b39aae1b894097d0a9fc17f504c62fea598fa206cc6f5088e6e45
Decimals: 18
oracle_state_ID: 2
Valueless_Test/USD
ID: 0x000369f643e4e5d9b9d04863249c07c15937d0b36af803dd8d213827b0badd5c
Decimals: 18
oracle_state_ID: 3
USDT/USD
ID: 0x00039a0c0be4e43cacda1599ac414205651f4a62b614b6be9e5318a182c33eb0
Decimals: 18
oracle_state_ID: 4
USDC/USD
ID: 0x00034b881a0c0fff844177f881a313ff894bfc6093d33b5514e34d7faa41b7ef
Decimals: 18
oracle_state_ID: 5
BONK/USD
ID: 0x00032b250dddd30d526b4ae66d170e1ab204ab0567531798d3bbd09737f6c3c6
Decimals: 18
oracle_state_ID: 10
SOL/USD
ID: 0x000343ec7f6691d6bf679978bab5c093fa45ee74c0baac6cc75649dc59cc21d3
Decimals: 18
oracle_state_ID: 11
WEETH/USD
ID: 0x0003a41091252f838042a1ebb32e545788f0760743eb2aa129d55a6ceb53a716
Decimals: 18
oracle_state_ID: 12
EIGEN/USD
ID: 0x000345b536c6b8307db63d95fb38e0bd27996f9be48fb224cc8d5c24a8d00640
Decimals: 18
oracle_state_ID: 13
PUFETH/USD
ID: 0x00031a3a47d0230c312ab9f3a453a6d828464b582c754226233f4c5e86d0ed8d
Decimals: 18
oracle_state_ID: 14
RSETH/USD
ID: 0x0003468783dab63735ffee9fe08084240acb16e81ca93ee2eb78ab81388c32ea
Decimals: 18
oracle_state_ID: 15
METH/USD
ID: 0x0003f815ffeb0d25f8945e0263bd3ce6c31311351a3dde2e90bc01539a5b06bb
Decimals: 18
oracle_state_ID: 16
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 User
This error is triggered when:
Authentication fails, typically because the HMAC signature provided by the client doesn't match the one expected by the server.
A user requests access to a feed without the appropriate permission or that does not exist.
500 Internal Server
Indicates an unexpected condition encountered by the server, preventing it from fulfilling the request. This error typically points to issues on the server side.
206 Missing data (/bulk endpoint only)
Indicates that at least one feed ID data is missing from the report. E.g., you requested a report for feed IDs <feedID1>, <feedID2>, and <feedID3> at a given timestamp. If data for <feedID2> is missing from the report (not available yet at the specified timestamp), you get [<feedID1 data>, <feedID3 data>] and a 206 response.
Telegram: