Getting started with the Royco API

1. Get Your API Key

2. Access the API Documentation

Visit our interactive API documentation at api.royco.org for a overview on the endpoints available.

3. Authenticate

  1. Click the "Authorize" button (top-right corner)

  2. Enter your API key in the x-api-key field

  3. Click "Authorize"

  4. Close the modal

API Overview

Base URL

https://api.royco.org

Authentication

All API requests require authentication via one of these methods:

  • Header: x-api-key: YOUR_API_KEY

  • Query 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:

Markets

Positions

Offers

Your First API Call

Let's fetch markets on Ethereum mainnet, by 10 per page.

1. Select the Endpoint

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

  1. Explore the API: Try different endpoints in the interactive docs

  2. Get an API key: Contact https://t.me/royco_support_bot to start the process of getting a key

  3. 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