Origin Protocol protocol API

The protocol API from Origin Protocol — 8 operation(s) for protocol.

OpenAPI Specification

origin-protocol-protocol-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: defi-analytics account protocol API
  description: API for defi-analytics
  version: 1.0.0
servers:
- url: http://localhost:8787
  description: Local server
- url: https://api.originprotocol.com
  description: Production server
tags:
- name: protocol
paths:
  /api/v2/protocol/protocol-fees:
    get:
      responses:
        '200':
          description: Protocol fees
          content:
            application/json:
              schema:
                type: object
                properties:
                  revenue:
                    type: object
                    properties:
                      now:
                        type: number
                      oneDayAgo:
                        type: number
                      twoDaysAgo:
                        type: number
                      oneWeekAgo:
                        type: number
                      twoWeeksAgo:
                        type: number
                      thirtyDaysAgo:
                        type: number
                      sixtyDaysAgo:
                        type: number
                      ninetyDaysAgo:
                        type: number
                    required:
                    - now
                    - oneDayAgo
                    - twoDaysAgo
                    - oneWeekAgo
                    - twoWeeksAgo
                    - thirtyDaysAgo
                    - sixtyDaysAgo
                    - ninetyDaysAgo
                    additionalProperties: false
                  days:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: number
                        revenue:
                          type: number
                      required:
                      - date
                      - revenue
                      additionalProperties: false
                required:
                - revenue
                - days
                additionalProperties: false
      operationId: getApiV2ProtocolProtocol-fees
      tags:
      - protocol
      parameters: []
      description: Get protocol fees
  /api/v2/protocol/cumulative_fees:
    get:
      responses:
        '200':
          description: Cumulative protocol fees
          content:
            application/json:
              schema:
                type: object
                properties:
                  oethETH:
                    type: number
                  oethUSD:
                    type: number
                  ousdETH:
                    type: number
                  ousdUSD:
                    type: number
                  superOethbETH:
                    type: number
                  superOethbUSD:
                    type: number
                  osETH:
                    type: number
                  osUSD:
                    type: number
                  armWethStethETH:
                    type: number
                  armWethStethUSD:
                    type: number
                  armWsOsETH:
                    type: number
                  armWsOsUSD:
                    type: number
                  armWethEethETH:
                    type: number
                  armWethEethUSD:
                    type: number
                  armSusdeUsdeETH:
                    type: number
                  armSusdeUsdeUSD:
                    type: number
                  totalETH:
                    type: number
                  totalUSD:
                    type: number
                required:
                - oethETH
                - oethUSD
                - ousdETH
                - ousdUSD
                - superOethbETH
                - superOethbUSD
                - osETH
                - osUSD
                - armWethStethETH
                - armWethStethUSD
                - armWsOsETH
                - armWsOsUSD
                - armWethEethETH
                - armWethEethUSD
                - armSusdeUsdeETH
                - armSusdeUsdeUSD
                - totalETH
                - totalUSD
                additionalProperties: false
      operationId: getApiV2ProtocolCumulative_fees
      tags:
      - protocol
      parameters:
      - in: query
        name: days
        schema:
          type: number
      description: Get cumulative protocol fees
  /api/v2/protocol/daily_fees:
    get:
      responses:
        '200':
          description: Daily protocol fees
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: number
                  date:
                    type: string
                  oeth:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  ousd:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  superOethb:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  os:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  armWethSteth:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  armWsOs:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  armWethEeth:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  armSusdeUsde:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                      token:
                        type: object
                        properties:
                          id:
                            type: string
                          address:
                            type: string
                          name:
                            type: string
                          chainId:
                            type: number
                          decimals:
                            type: number
                          symbol:
                            type: string
                        required:
                        - id
                        - address
                        - name
                        - chainId
                        - decimals
                        - symbol
                        additionalProperties: false
                      color:
                        type: string
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    - token
                    - color
                    additionalProperties: false
                  total:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    additionalProperties: false
                  avg7:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    additionalProperties: false
                  avg14:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    additionalProperties: false
                  avg30:
                    type: object
                    properties:
                      amount:
                        type: number
                      amountETH:
                        type: number
                      amountUSD:
                        type: number
                    required:
                    - amount
                    - amountETH
                    - amountUSD
                    additionalProperties: false
                required:
                - timestamp
                - date
                - oeth
                - ousd
                - superOethb
                - os
                - armWethSteth
                - armWsOs
                - armWethEeth
                - armSusdeUsde
                - total
                - avg7
                - avg14
                - avg30
                additionalProperties: false
      operationId: getApiV2ProtocolDaily_fees
      tags:
      - protocol
      parameters:
      - in: query
        name: days
        schema:
          type: number
      description: Get daily protocol fees
  /api/v2/protocol/daily_revenue:
    get:
      responses:
        '200':
          description: Daily protocol revenue
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    timestamp:
                      type: number
                    date:
                      type: string
                    oeth:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    ousd:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    superOethb:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    os:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    armWethSteth:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    armWsOs:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    armWethEeth:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    armSusdeUsde:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                        token:
                          type: object
                          properties:
                            id:
                              type: string
                            address:
                              type: string
                            name:
                              type: string
                            chainId:
                              type: number
                            decimals:
                              type: number
                            symbol:
                              type: string
                          required:
                          - id
                          - address
                          - name
                          - chainId
                          - decimals
                          - symbol
                          additionalProperties: false
                        color:
                          type: string
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      - token
                      - color
                      additionalProperties: false
                    total:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      additionalProperties: false
                    avg7:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      additionalProperties: false
                    avg14:
                      type: object
                      properties:
                        amount:
                          type: number
                        amountETH:
                          type: number
                        amountUSD:
                          type: number
                      required:
                      - amount
                      - amountETH
                      - amountUSD
                      additionalProperties: false
                    avg30:
                      type: object
                     

# --- truncated at 32 KB (78 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/origin-protocol/refs/heads/main/openapi/origin-protocol-protocol-api-openapi.yml