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

# Get live refinance rates for a given state

> Get live refinance rates for a given state from the latest scraping run



## OpenAPI

````yaml https://api.hapi.so/openapi.json get /rates/refinance
openapi: 3.1.0
info:
  title: h.api API
  version: 0.1.0
servers:
  - url: https://api.hapi.so/
    description: h.api
security: []
paths:
  /rates/refinance:
    get:
      tags:
        - Interest Rates
      summary: Get live refinance rates for a given state
      description: Get live refinance rates for a given state from the latest scraping run
      operationId: Get_Refinance_Rates_rates_refinance_get
      parameters:
        - name: state
          in: query
          required: true
          schema:
            type: string
            maxLength: 2
            minLength: 2
            title: State
            description: The 2 letter state for which to get the interest rate
          description: The 2 letter state for which to get the interest rate
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMortgageRatesResDto'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
components:
  schemas:
    GetMortgageRatesResDto:
      properties:
        state:
          type: string
          maxLength: 2
          minLength: 2
          title: State
          description: The 2 letter state for which to get the interest rate
        loan_purpose:
          $ref: '#/components/schemas/LoanPurpose'
          description: The loan purpose. Can be either PURCHASE or REFINANCE.
        forty_year_fixed:
          anyOf:
            - type: number
            - type: 'null'
          title: Forty Year Fixed
          description: The current average 40 year fixed interest rate
        thirty_year_fixed:
          type: number
          title: Thirty Year Fixed
          description: The current average 30 year fixed interest rate
        twenty_year_fixed:
          type: number
          title: Twenty Year Fixed
          description: The current average 20 year fixed interest rate
        fifteen_year_fixed:
          type: number
          title: Fifteen Year Fixed
          description: The current average 15 year fixed interest rate
        ten_year_fixed:
          anyOf:
            - type: number
            - type: 'null'
          title: Ten Year Fixed
          description: The current average 10 year fixed interest rate
        seven_year_arm:
          anyOf:
            - type: number
            - type: 'null'
          title: Seven Year Arm
          description: The current average 7 year ARM interest rate
        five_year_arm:
          anyOf:
            - type: number
            - type: 'null'
          title: Five Year Arm
          description: The current average 5 year ARM interest rate
        three_year_arm:
          anyOf:
            - type: number
            - type: 'null'
          title: Three Year Arm
          description: The current average 3 year ARM interest rate
        thirty_year_fixed_fha:
          anyOf:
            - type: number
            - type: 'null'
          title: Thirty Year Fixed Fha
          description: The current average 30 year fixed FHA interest rate
        fifteen_year_fixed_fha:
          anyOf:
            - type: number
            - type: 'null'
          title: Fifteen Year Fixed Fha
          description: The current average 15 year fixed FHA interest rate
        thirty_year_fixed_va:
          anyOf:
            - type: number
            - type: 'null'
          title: Thirty Year Fixed Va
          description: The current average 30 year fixed VA interest rate
        fifteen_year_fixed_va:
          anyOf:
            - type: number
            - type: 'null'
          title: Fifteen Year Fixed Va
          description: The current average 15 year fixed VA interest rate
        thirty_year_fixed_jumbo:
          anyOf:
            - type: number
            - type: 'null'
          title: Thirty Year Fixed Jumbo
          description: The current average 30 year fixed jumbo interest rate
        fifteen_year_fixed_jumbo:
          anyOf:
            - type: number
            - type: 'null'
          title: Fifteen Year Fixed Jumbo
          description: The current average 15 year fixed jumbo interest rate
        seven_year_arm_jumbo:
          anyOf:
            - type: number
            - type: 'null'
          title: Seven Year Arm Jumbo
          description: The current average 7 year ARM jumbo interest rate
        five_year_arm_jumbo:
          anyOf:
            - type: number
            - type: 'null'
          title: Five Year Arm Jumbo
          description: The current average 5 year ARM jumbo interest rate
        three_year_arm_jumbo:
          anyOf:
            - type: number
            - type: 'null'
          title: Three Year Arm Jumbo
          description: The current average 3 year ARM jumbo interest rate
        event_datetime:
          type: string
          format: date-time
          title: Event Datetime
          description: The date and time the rates were posted
      type: object
      required:
        - state
        - loan_purpose
        - thirty_year_fixed
        - twenty_year_fixed
        - fifteen_year_fixed
        - event_datetime
      title: GetMortgageRatesResDto
      description: >-
        Public response shape for /rates/v2. Mirrors the hapi.mortgage_rates
        table but

        excludes internal fields (run_id) that the API consumer should not see.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LoanPurpose:
      type: string
      enum:
        - PURCHASE
        - REFINANCE
      title: LoanPurpose
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key

````