{
  "openapi": "3.0.3",
  "info": {
    "title": "stake_for_fee_keeper",
    "description": "Stake2Earn indexed read-only API for analytics, vault discovery, vault filtering, and vault detail responses.",
    "license": {
      "name": ""
    },
    "version": "0.1.1"
  },
  "servers": [
    {
      "url": "https://stake-for-fee-api.meteora.ag",
      "description": "Production"
    },
    {
      "url": "https://devnet.stake-for-fee-api.meteora.ag",
      "description": "Devnet"
    }
  ],
  "paths": {
    "/analytics/all": {
      "get": {
        "tags": [
          "analytics"
        ],
        "operationId": "get_all_analytics",
        "responses": {
          "200": {
            "description": "Aggregate Stake2Earn analytics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AggregateAnalyticInfo"
                }
              }
            }
          }
        }
      }
    },
    "/vault/all": {
      "get": {
        "tags": [
          "vault"
        ],
        "operationId": "get_all_vaults",
        "responses": {
          "200": {
            "description": "All indexed Stake2Earn vaults.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/vault/filter": {
      "get": {
        "tags": [
          "vault"
        ],
        "operationId": "filter_vaults",
        "parameters": [
          {
            "name": "pool_address",
            "in": "query",
            "description": "The list of pool addresses. Maximum of 100 pool addresses.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered Stake2Earn vaults.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/vault/{vault_address}": {
      "get": {
        "tags": [
          "vault"
        ],
        "operationId": "get_one_vault",
        "parameters": [
          {
            "name": "vault_address",
            "in": "path",
            "description": "Fee vault address.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One Stake2Earn vault with top-list holders.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultDetailWithLeaderboard"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AggregateAnalyticInfo": {
        "type": "object",
        "required": [
          "total_fee_vaults",
          "total_staked_amount_usd"
        ],
        "properties": {
          "total_fee_vaults": {
            "type": "integer",
            "minimum": 0
          },
          "total_staked_amount_usd": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "Vault": {
        "type": "object",
        "required": [
          "vault_address",
          "pool_address",
          "token_a_mint",
          "token_b_mint",
          "stake_mint",
          "token_a_symbol",
          "token_b_symbol",
          "total_staked_amount",
          "total_staked_amount_usd",
          "current_reward_token_a_usd",
          "current_reward_token_b_usd",
          "current_reward_usd",
          "daily_reward_usd",
          "created_at_slot",
          "created_at_slot_timestamp",
          "created_at_tx_sig",
          "seconds_to_full_unlock",
          "start_fee_distribute_timestamp",
          "marketcap",
          "flags"
        ],
        "properties": {
          "vault_address": {
            "type": "string"
          },
          "pool_address": {
            "type": "string"
          },
          "token_a_mint": {
            "type": "string"
          },
          "token_b_mint": {
            "type": "string"
          },
          "stake_mint": {
            "type": "string"
          },
          "token_a_symbol": {
            "type": "string"
          },
          "token_b_symbol": {
            "type": "string"
          },
          "total_staked_amount": {
            "type": "number",
            "format": "double"
          },
          "total_staked_amount_usd": {
            "type": "number",
            "format": "double"
          },
          "current_reward_token_a_usd": {
            "type": "number",
            "format": "double",
            "description": "Vault total reward in USD value for token A."
          },
          "current_reward_token_b_usd": {
            "type": "number",
            "format": "double",
            "description": "Vault total reward in USD value for token B."
          },
          "current_reward_usd": {
            "type": "number",
            "format": "double",
            "description": "Vault total reward in USD value."
          },
          "daily_reward_usd": {
            "type": "number",
            "format": "double",
            "description": "Vault estimated daily reward based on current reward USD."
          },
          "created_at_slot": {
            "type": "integer",
            "format": "int64"
          },
          "created_at_slot_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "created_at_tx_sig": {
            "type": "string"
          },
          "seconds_to_full_unlock": {
            "type": "integer",
            "format": "int64"
          },
          "start_fee_distribute_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "marketcap": {
            "type": "number",
            "format": "double"
          },
          "flags": {
            "$ref": "#/components/schemas/VaultFlags"
          }
        }
      },
      "VaultDetailWithLeaderboard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Vault"
          },
          {
            "type": "object",
            "required": [
              "top_lists"
            ],
            "properties": {
              "top_lists": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/VaultTopListHolder"
                }
              }
            }
          }
        ]
      },
      "VaultFlags": {
        "type": "object",
        "required": [
          "tvl_usd_threshold_reached",
          "tvl_usd_threshold"
        ],
        "properties": {
          "tvl_usd_threshold": {
            "type": "number",
            "format": "double"
          },
          "tvl_usd_threshold_reached": {
            "type": "boolean"
          }
        }
      },
      "VaultTopListHolder": {
        "type": "object",
        "required": [
          "owner",
          "staked_amount",
          "token_a_accumulated_reward",
          "token_b_accumulated_reward",
          "token_a_accumulated_reward_usd",
          "token_b_accumulated_reward_usd",
          "daily_reward_usd"
        ],
        "properties": {
          "owner": {
            "type": "string"
          },
          "staked_amount": {
            "type": "number",
            "format": "double"
          },
          "token_a_accumulated_reward": {
            "type": "number",
            "format": "double"
          },
          "token_b_accumulated_reward": {
            "type": "number",
            "format": "double"
          },
          "token_a_accumulated_reward_usd": {
            "type": "number",
            "format": "double"
          },
          "token_b_accumulated_reward_usd": {
            "type": "number",
            "format": "double"
          },
          "daily_reward_usd": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "VaultsResponse": {
        "type": "object",
        "required": [
          "total",
          "data"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Vault"
            }
          }
        }
      }
    }
  }
}
