Morpho API

View Programs

Get a list of reward programs.

GET
/v1/programs

Query Parameters

assets?string

Comma-separated list of asset addresses

Pattern"^0x[a-fA-F0-9]{40}(,0x[a-fA-F0-9]{40})*$"
chains?string

Comma-separated list of chain IDs

Pattern"^[0-9]+(,[0-9]+)*$"
creators?string

Comma-separated list of creator addresses

Pattern"^0x[a-fA-F0-9]{40}(,0x[a-fA-F0-9]{40})*$"
markets?string

Comma-separated list of market IDs

Pattern"^0x[a-fA-F0-9]{64}(,0x[a-fA-F0-9]{64})*$"
vaults?string

Comma-separated list of vault addresses

Pattern"^0x[a-fA-F0-9]{40}(,0x[a-fA-F0-9]{40})*$"
funded?boolean & string & string

Filter by funded status

active?boolean & string & string

Filter by active status

active_after?string

Filter programs active after timestamp

active_before?string

Filter programs active before timestamp

type?string

Filter by program type

Value in"market-reward" | "vault-reward" | "uniform-reward" | "airdrop-reward"
sort?string

Sort by registration timestamp

Value in"registration_timestamp"

Response Body

Successful response

TypeScript Definitions

Use the response body type in TypeScript.

timestampstring

Response timestamp

paginationobject

Pagination information

dataarray<object | object | object | object>

List of programs

Bad request

TypeScript Definitions

Use the response body type in TypeScript.

errorstring

Error message

detailsarray<object>

Validation error details

curl -X GET "https://rewards.morpho.org/v1/programs"
fetch("https://rewards.morpho.org/v1/programs")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://rewards.morpho.org/v1/programs"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://rewards.morpho.org/v1/programs"

response = requests.request("GET", url)

print(response.text)
{
  "timestamp": "string",
  "pagination": {
    "per_page": 0,
    "page": 0,
    "total_pages": 0,
    "next": "string",
    "prev": "string"
  },
  "data": [
    {
      "type": "market-reward",
      "id": "market_reward_1",
      "start": "1000000000000000000",
      "end": "1000000000000000000",
      "created_at": "1000000000000000000",
      "distributor": {
        "id": "string",
        "address": "0x1234567890123456789012345678901234567890",
        "chain_id": 1
      },
      "asset": {
        "id": "string",
        "address": "0x1234567890123456789012345678901234567890",
        "chain_id": 1
      },
      "market_id": "market_1",
      "supply_rate_per_year": "1000000000000000000",
      "borrow_rate_per_year": "1000000000000000000",
      "collateral_rate_per_year": "1000000000000000000",
      "chain_id": 1,
      "creator": "0x1234567890123456789012345678901234567890"
    }
  ]
}
{
  "error": "Invalid query parameters",
  "details": [
    {
      "code": "invalid_type",
      "message": "Expected string, received number",
      "path": [
        "chains"
      ]
    }
  ]
}
Edit on GitHub

Last updated on