Introduction to the Precog Data API
We are excited to announce the official launch of the Precog Data API, providing direct access to the sophisticated intelligence generated by our subnet. This API signifies a pivotal advancement, transforming our forecasting competition into a robust and accessible product for a wider range of end-users. This initial release offers Precog community members a 30-day window into historical miner forecasts for in-depth analysis, testing, and potential integration into proprietary price signaling strategies.
Accessing the API
A dedicated Python client has been developed to facilitate interaction with our REST API, available on GitHub: https://github.com/coinmetrics/precog-api-utility. The repository provides comprehensive instructions and example usage.
The authentication process is structured as follows:
- Authentication Challenge Request: Initiate a request to the
/auth/
endpoint for an authentication challenge. - Wallet Signature: Sign the received challenge using a qualifying Bittensor wallet.
- Token Issuance: Upon successful signature, the API server will issue an Access Token and a Refresh Token.
- The Access Token serves as the API key for accessing data endpoints (
/historical/
and/recent/
). - The Refresh Token enables the acquisition of a new Access Token upon expiration, eliminating the need for repeated wallet signatures.
- Access Tokens are valid for 24 hours, and Refresh Tokens are valid for 30 days. The data is paginated and will require several calls if querying many results.
- The Access Token serves as the API key for accessing data endpoints (
Innovative Access Model
Our access model for the Precog Data API is uniquely designed to eliminate direct fees for data consumption. This initial API version leverages a user’s wallet balance for authentication rather than requiring the expenditure of tokens. This way we incentivize users to analyze, build on, and investigate the data being produced by Precog; and hopefully generate content demonstrating the value of what our miners are accomplishing.
Specifically, we utilize the Alpha tokens, introduced with the dTao launch, as a mechanism to mitigate spam and ensure user commitment to the development of our subnet. By staking the required TAO, users can access Precog forecasts without paying upfront, giving them a chance to explore the data before committing further.The initial balance requirement for launch is 750.0 Subnet 55 Alpha tokens. This threshold may be adjusted as needed to manage usage effectively.
Data Inclusions
Authenticated users will be able to retrieve every miner’s prediction for every epoch over the past 30 days. The data schema closely mirrors the information presented on the Miner Leaderboard within the dashboard at precog.coinmetrics.io. While the option of providing a pre-aggregated summary of forecasts was considered, the dynamic nature and sheer volume of miner contributions offer diverse possibilities for combining these forecasts. We feel by providing the data in its rawest possible form, we empower users with the flexibility to devise their own strategies. These could be utilizing the best miner from a specific epoch, an average of all miners, a median of the top 50, or other sophisticated approaches for determining optimal collective point and interval predictions.
Future Plans
In the near term we want to focus on functionality, ensure the API is stable, and soothe any pain points. In the longer term, we may look at segmenting and aggregating the data, providing different resolutions, and ultimately charging a fee for some portion of the outputs. The long term vision is to create a recurring income stream using this data and share those proceeds with the Precog Community to attract the best miners possible.
Beyond commercial plans, we are also researching how to incorporate additional forecast types into the incentive mechanism. Our eye is on adding TAO price forecasts to our existing BTC forecasts, but we are also discussing other data types and time horizons, so stay tuned.
Terms and Conditions
All data and engagement with the Precog API is subject to the same terms as our Coin Metrics Community Data: https://coinmetrics.io/terms-of-use/
Stay Updated
Keep in the loop of all things Precog! You can find us on: