Getting started with the Royco API
1. Get Your API Key
For Production: Contact the Royco team on telegram at https://t.me/royco_support_bot to receive your API key
For Testing: Use the demo key
ROYCO_DEMO
2. Access the API Documentation
Visit our interactive API documentation at api.royco.org for a overview on the endpoints available.
3. Authenticate
Click the "Authorize" button (top-right corner)
Enter your API key in the
x-api-keyfieldClick "Authorize"
Close the modal
API Overview
Base URL
https://api.royco.orgAuthentication
All API requests require authentication via one of these methods:
Header:
x-api-key: YOUR_API_KEYQuery Parameter:
?apiKey=YOUR_API_KEY
Core Concepts
Market Types
Recipe Markets (Type 0): Automated yield strategies
Vault Markets (Type 1): Lending protocols
Global Market ID
Each market has a unique identifier in the format:
Example:
Global ID:
1_0_0x83c459782b2ff36629401b1a592354fc085f29ae00cf97b803f73cac464d389b
Popular Endpoints
Markets
Get Market Info:
POST/api/v1/market/info/{id}Get all Markets:
POST/api/v1/market/explore
Positions
Recipe Positions:
POST/api/v1/position/recipeVault Positions:
POST/api/v1/position/vaultGlobal Positions:
POST/api/v1/position/global/{accountAddress}
Offers
Recipe Offers:
POST/api/v1/offer/recipeVault Offers:
POST/api/v1/offer/vault
Your First API Call
Let's fetch markets on Ethereum mainnet, by 10 per page.
1. Select the Endpoint
Go to POST api/v1/market/explore in the API docs
2. Add Filters
3. Execute
Click "Try it out"
Paste the JSON above
Click "Execute"
4. Review Response
Common Use Cases
1. Fetch Market Positions
2. Get User's Total Assets
3. Explore Markets by Criteria
Pagination
Most endpoints support pagination with these parameters:
Request
Response
Filtering & Sorting
Filters
Sorting
Next Steps
Explore the API: Try different endpoints in the interactive docs
Get an API key: Contact https://t.me/royco_support_bot to start the process of getting a key
Build Your App: Start integrating the API into your application
Ready to start building? Head over to the API documentation and try your first request!
Last updated