> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dialect.to/llms.txt
> Use this file to discover all available pages before exploring further.

# List all markets grouped by type

> Supported providers: MarginFi Lending, Kamino Lending, Kamino Multiply, Kamino Leverage, Lulo. Temporarily without `prediction` type.



## OpenAPI

````yaml /openapi/markets.json get /v0/marketsByType
openapi: 3.1.1
info:
  title: Markets & Positions API (Beta)
  version: 0.0.1
servers:
  - url: https://markets.dial.to/api
security:
  - apiKey: []
paths:
  /v0/marketsByType:
    get:
      tags:
        - Markets
      summary: List all markets grouped by type
      description: >-
        Supported providers: MarginFi Lending, Kamino Lending, Kamino Multiply,
        Kamino Leverage, Lulo. Temporarily without `prediction` type.
      operationId: markets-positions.marketsV0Api.listMarketsGroupedByType
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  lending:
                    type: array
                    items:
                      $ref: '#/components/schemas/LendingMarket'
                  yield:
                    type: array
                    items:
                      $ref: '#/components/schemas/YieldMarket'
                  loop:
                    type: array
                    items:
                      $ref: '#/components/schemas/LoopMarket'
                  perpetual:
                    type: array
                    items:
                      $ref: '#/components/schemas/PerpetualMarket'
                required:
                  - lending
                  - yield
                  - loop
                  - perpetual
components:
  schemas:
    LendingMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: lending
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        token:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        borrowToken:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        depositApy:
          type: number
          description: Total percentage ratio APY **including** rewards
        baseDepositApy:
          type: number
          description: APY percentage ratio excluding rewards
        baseDepositApy30d:
          type: number
          description: 30-day average APY percentage ratio excluding rewards
        baseDepositApy90d:
          type: number
          description: 90-day average APY percentage ratio excluding rewards
        baseDepositApy180d:
          type: number
          description: 180-day average APY percentage ratio excluding rewards
        borrowApy:
          type: number
          description: Total percentage ratio APY **including** rewards
        baseBorrowApy:
          type: number
          description: APY percentage ratio excluding rewards
        baseBorrowApy30d:
          type: number
          description: 30-day average APY percentage ratio excluding rewards
        baseBorrowApy90d:
          type: number
          description: 90-day average APY percentage ratio excluding rewards
        baseBorrowApy180d:
          type: number
          description: 180-day average APY percentage ratio excluding rewards
        totalDeposit:
          type: number
        totalDepositUsd:
          type: number
        totalBorrow:
          type: number
        totalBorrowUsd:
          type: number
        maxDeposit:
          type: number
        maxBorrow:
          type: number
        rewards:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    const: deposit
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Deposit Reward
                description: Reward for depositing
              - type: object
                properties:
                  type:
                    const: borrow
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Borrow Reward
                description: Reward for borrowing
        maxLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Maximum Loan-to-Value allowed when borrowing, expressed as a
            percentage ratio of deposited value
        liquidationLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Loan-to-Value percentage ratio of deposited value at which the
            position becomes liquidatable
        liquidationPenalty:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Percentage ratio of deposited value taken as a penalty and given to
            liquidators when position is liquidated
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            deposit:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdraw:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            borrow:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            repay:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            repayWithCollateral:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            claimRewards:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - token
        - depositApy
        - baseDepositApy
        - borrowApy
        - baseBorrowApy
        - totalDeposit
        - totalBorrow
        - maxBorrow
        - actions
    YieldMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: yield
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        token:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        depositApy:
          type: number
        baseDepositApy:
          type: number
        baseDepositApy30d:
          type: number
        baseDepositApy90d:
          type: number
        baseDepositApy180d:
          type: number
        totalDeposit:
          type: number
        totalDepositUsd:
          type: number
        rewards:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    const: deposit
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Deposit Reward
                description: Reward for depositing
              - type: object
                properties:
                  type:
                    const: borrow
                  apy:
                    type: number
                  token:
                    type: object
                    properties:
                      address:
                        type: string
                      symbol:
                        type: string
                      decimals:
                        type: number
                      icon:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - address
                      - symbol
                      - decimals
                      - icon
                  marketAction:
                    type: string
                required:
                  - type
                  - apy
                  - token
                  - marketAction
                title: Borrow Reward
                description: Reward for borrowing
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            deposit:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdraw:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdrawComplete:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            claimRewards:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - token
        - depositApy
        - baseDepositApy
        - actions
    LoopMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: loop
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        tokenA:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        tokenB:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        depositApy:
          type: number
        depositApy30d:
          type: number
        depositApy90d:
          type: number
        depositApy180d:
          type: number
        maxLeverage:
          type: number
          description: Maximum leverage allowed when depositing, expressed as a multiplier
        maxLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Maximum Loan-to-Value before either full/partial liquidation
            commences (depending on the provider), expressed as a percentage
            ratio of deposited value
        liquidationLtv:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Loan-to-Value percentage ratio of deposited value at which the
            position becomes liquidatable, fully or partially.
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            setup:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            deposit:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            withdraw:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - tokenA
        - tokenB
        - depositApy
        - maxLeverage
        - maxLtv
        - liquidationLtv
        - actions
    PerpetualMarket:
      type: object
      properties:
        id:
          type: string
        type:
          const: perpetual
        productName:
          type: string
        provider:
          type: object
          properties:
            id:
              enum:
                - kamino
                - lulo
                - marginfi
                - jupiter
                - defituna
                - carrot
                - dflow
            name:
              type: string
            icon:
              type: string
          required:
            - id
            - name
            - icon
        tokenA:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        tokenB:
          type: object
          properties:
            address:
              type: string
            symbol:
              type: string
            decimals:
              type: number
            icon:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - address
            - symbol
            - decimals
            - icon
        websiteUrl:
          type: string
          format: uri
        liquidity:
          type: object
          properties:
            longUsd:
              type: number
            shortUsd:
              type: number
          required:
            - longUsd
            - shortUsd
        maxLeverage:
          type: number
        additionalData:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        actions:
          type: object
          properties:
            setup:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            openPosition:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
            closePosition:
              type: object
              properties:
                blinkUrl:
                  type: string
                  pattern: ^blink:.*
              required:
                - blinkUrl
      required:
        - id
        - type
        - productName
        - provider
        - tokenA
        - tokenB
        - liquidity
        - maxLeverage
        - actions
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-dialect-client-key
      in: header
      description: Client key for the Markets API
      x-default: pk_demo

````