{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whitebit/json-schema/whitebit-investment-schema.json",
  "title": "Investment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whitebit-crypto-lending-fixed-api-openapi.yml#/components/schemas/Investment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Investment identifier"
    },
    "plan": {
      "$ref": "#/$defs/FixedPlan",
      "description": "Investment plan (similar to Get plans response)"
    },
    "status": {
      "type": "integer",
      "description": "Investment status (1 - active, 2 - closed)"
    },
    "created": {
      "type": "integer",
      "description": "Timestamp of investment creation"
    },
    "updated": {
      "type": "integer",
      "description": "Timestamp of investment update"
    },
    "paymentTime": {
      "type": "integer",
      "description": "Timestamp of the payment time"
    },
    "amount": {
      "type": "string",
      "description": "Investment amount"
    },
    "interestPaid": {
      "type": "string",
      "description": "Interest paid amount"
    }
  },
  "$defs": {
    "FixedPlan": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Invest plan identifier"
        },
        "ticker": {
          "type": "string",
          "description": "Source currency ticker"
        },
        "status": {
          "type": "integer",
          "description": "Status (1 - active, 2 - no coins left, 3 - inactive, 4 - pause)"
        },
        "percent": {
          "type": "string",
          "description": "Interest percent"
        },
        "duration": {
          "type": "integer",
          "description": "Investment duration (in minutes)"
        },
        "interestTicker": {
          "type": "string",
          "description": "Target currency ticker"
        },
        "interestRatio": {
          "type": "string",
          "description": "Target currency to source currency ratio"
        },
        "minInvestment": {
          "type": "string",
          "description": "Minimum investment amount"
        },
        "maxInvestment": {
          "type": "string",
          "description": "Maximum investment amount"
        },
        "maxPossibleInvestment": {
          "type": "string",
          "description": "Maximum investment amount due to current invest plan state"
        }
      }
    }
  }
}