{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/woox/json-schema/woox-get-interest-history-response-schema.json",
  "title": "GetInterestHistoryResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/woox-spotmargin-api-openapi.yml#/components/schemas/GetInterestHistoryResponse",
  "allOf": [
    {
      "$ref": "#/$defs/CommonResponse"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The unique identifier for the loan transaction."
                  },
                  "token": {
                    "type": "string",
                    "description": "The token symbol associated with the loan, e.g., 'USDT'."
                  },
                  "side": {
                    "type": "string",
                    "description": "The transaction side, e.g., 'LOAN' for loan transactions.",
                    "enum": [
                      "LOAN",
                      "REPAY",
                      "AUTO_REPAY"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "description": "The transaction status, e.g., 'SUCCEED' for completed transactions.",
                    "enum": [
                      "SUCCEED",
                      "FAILED"
                    ]
                  },
                  "quantity": {
                    "type": "string",
                    "description": "The quantity of the token involved in the loan transaction."
                  },
                  "userId": {
                    "type": "integer",
                    "description": "The unique identifier of the user involved in the transaction."
                  },
                  "applicationId": {
                    "type": "string",
                    "description": "The unique identifier for the application associated with the transaction."
                  },
                  "interest": {
                    "type": "string",
                    "description": "The interest amount incurred on the loan transaction."
                  },
                  "hourlyRate": {
                    "type": "string",
                    "description": "The hourly interest rate for the loan."
                  },
                  "annualRate": {
                    "type": "string",
                    "description": "The annual interest rate for the loan."
                  },
                  "createdTime": {
                    "type": "integer",
                    "description": "The time the loan transaction was created, represented as a Unix timestamp (milliseconds)."
                  },
                  "updatedTime": {
                    "type": "integer",
                    "description": "The time the loan transaction was last updated, represented as a Unix timestamp (milliseconds)."
                  },
                  "loanAmount": {
                    "type": "string",
                    "description": "The total loan amount involved in the transaction."
                  }
                }
              }
            },
            "meta": {
              "$ref": "#/$defs/Meta"
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "CommonResponse": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "true"
        },
        "timestamp": {
          "type": "integer",
          "description": "timestamp"
        }
      }
    },
    "Meta": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Total number of record"
        },
        "recordsPerPage": {
          "type": "integer",
          "description": "Number of records per page"
        },
        "currentPage": {
          "type": "integer",
          "description": "Current page number"
        }
      }
    }
  }
}