{
  "openapi": "3.0.4",
  "info": {
    "title": "WealthArc External API",
    "description": "Read-only access to the portfolios, daily metrics, positions, transactions and assets you hold in WealthArc. The API follows OData v4 conventions: select, filter, sort and page through results with standard query options. Authenticate with your API key in the x-api-key header.",
    "termsOfService": "https://www.wealtharcdatabox.com",
    "contact": {
      "name": "WealthArc API Support",
      "url": "https://www.wealtharcdatabox.com",
      "email": "support@wealtharc.com"
    },
    "license": {
      "name": "Proprietary License",
      "url": "https://www.wealtharcdatabox.com"
    },
    "version": "2.0"
  },
  "paths": {
    "/v2/Assets": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all assets",
        "description": "Returns the assets of all types available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/Assets?$select=id,name,currency\r\n            \r\n/v2/Assets?$filter=currency eq 'CHF'&$orderby=name asc&$top=100",
        "operationId": "GetAssets",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Assets/WealthArc.CashAccount": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all cash accounts",
        "description": "Returns the cash accounts available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/Assets/WealthArc.CashAccount?$select=id,name,currency\r\n            \r\n/v2/Assets/WealthArc.CashAccount?$filter=currency eq 'CHF'&$orderby=name asc&$top=100",
        "operationId": "GetCashAccounts",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashAccountIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Assets/WealthArc.Instrument": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all instruments",
        "description": "Returns the instruments available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/Assets/WealthArc.Instrument?$select=id,name,currency\r\n            \r\n/v2/Assets/WealthArc.Instrument?$filter=currency eq 'CHF'&$orderby=name asc&$top=100",
        "operationId": "GetInstruments",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Assets/WealthArc.Crypto": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all crypto assets",
        "description": "Returns the crypto assets available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/Assets/WealthArc.Crypto?$select=id,name,currency\r\n            \r\n/v2/Assets/WealthArc.Crypto?$filter=currency eq 'CHF'&$orderby=name asc&$top=100",
        "operationId": "GetCryptoAssets",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CryptoIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Assets/{key}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get asset by id",
        "description": "Returns one Asset by its id. Use $select to limit the attributes.\r\n            \r\nExamples:\r\n            \r\n/v2/Assets/25203?$select=id,name,currency",
        "operationId": "GetAssetById",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Asset unique id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Portfolios": {
      "get": {
        "tags": [
          "Portfolios"
        ],
        "summary": "Get all portfolios",
        "description": "Returns the portfolios available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/Portfolios?$select=id,name,currency\r\n            \r\n/v2/Portfolios?$filter=isActive eq true&$orderby=name asc&$top=100",
        "operationId": "GetPortfolios",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Portfolios/{key}": {
      "get": {
        "tags": [
          "Portfolios"
        ],
        "summary": "Get portfolio by id",
        "description": "Returns one Portfolio by its id. Use $select to limit the attributes.\r\n            \r\nExamples:\r\n            \r\n/v2/Portfolios/32662?$select=id,name,currency",
        "operationId": "GetPortfolioById",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Portfolio  unique id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Portfolio"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/PortfoliosDailyMetrics": {
      "get": {
        "tags": [
          "PortfoliosDailyMetrics"
        ],
        "summary": "Get all portfolio daily metrics",
        "description": "Returns the portfolio daily metrics available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/PortfoliosDailyMetrics?$select=id,portfolioId,statementDate\r\n            \r\n/v2/PortfoliosDailyMetrics?$filter=statementDate ge 2026-10-01&$orderby=statementDate desc&$top=100",
        "operationId": "GetPortfolioDailyMetrics",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioDailyMetricsIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/PortfoliosDailyMetrics/{key}": {
      "get": {
        "tags": [
          "PortfoliosDailyMetrics"
        ],
        "summary": "Get portfolio daily metrics by id",
        "description": "Returns one PortfolioDailyMetrics by its id. Use $select to limit the attributes and $expand to include nested collections.\r\n            \r\nExamples:\r\n            \r\n/v2/PortfoliosDailyMetrics/230239?$select=id,portfolioId,statementDate",
        "operationId": "GetPortfolioDailyMetricsById",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Portfolio daily metrics unique id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioDailyMetrics"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Positions": {
      "get": {
        "tags": [
          "Positions"
        ],
        "summary": "Get all positions",
        "description": "Returns the positions available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/Positions?$select=id,portfolioId,assetId,quantity\r\n            \r\n/v2/Positions?$filter=portfolioId eq 32675&$orderby=statementDate desc&$top=100",
        "operationId": "GetPositions",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Positions/{key}": {
      "get": {
        "tags": [
          "Positions"
        ],
        "summary": "Get position by id",
        "description": "Returns one Position by its id. Use $select to limit the attributes and $expand to include nested collections.\r\n            \r\nExamples:\r\n            \r\n/v2/Positions/3988384?$select=id,portfolioId,assetId,quantity",
        "operationId": "GetPositionById",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Position id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Position"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Transactions": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get all transactions",
        "description": "Returns the transactions available to your API key, up to 1,000 per page. Select only the attributes you need: smaller results are faster.\r\n            \r\nExamples:\r\n            \r\n/v2/Transactions?$select=id,portfolioId,type,transactionDate\r\n            \r\n/v2/Transactions?$filter=portfolioId eq 32724 and transactionDate ge 2026-01-01&$orderby=transactionDate desc&$top=100",
        "operationId": "GetTransactions",
        "parameters": [
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Order the results using OData syntax.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "top",
            "in": "query",
            "description": "Maximum number of results to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Whether to include a count of results.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionIEnumerableODataValue"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/v2/Transactions/{key}": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get transaction by id",
        "description": "Returns one Transaction by its id. Use $select to limit the attributes and $expand to include nested collections.\r\n            \r\nExamples:\r\n            \r\n/v2/Transactions/125693?$select=id,portfolioId,type,transactionDate",
        "operationId": "GetTransactionById",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Transaction id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "select",
            "in": "query",
            "description": "Limits the properties returned in the result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Indicates the related entities to be represented inline. The maximum depth is 2.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ODataErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is missing or invalid. The response body is empty.",
            "headers": {
              "WWW-Authenticate": {
                "description": "Authentication scheme used for the challenge (ApiKey or Bearer), when provided by the host.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Tenant request limit exceeded. The response body is empty.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying, when supplied by the rate limiter.",
                "schema": {
                  "minimum": 0,
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Asset": {
        "required": [
          "@odata.type"
        ],
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CashAccount"
          },
          {
            "$ref": "#/components/schemas/Crypto"
          },
          {
            "$ref": "#/components/schemas/Instrument"
          }
        ],
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique WealthArc identifier of the asset. Referenced as assetId by positions and transactions.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the asset, e.g. the security name or cash account label.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency the asset is denominated or quoted in, ISO 4217 code.",
            "nullable": true
          },
          "assetClass": {
            "type": "string",
            "description": "Top level of the asset classification, e.g. Equities or Fixed Income. Classes are configurable per organisation; see Asset class.",
            "nullable": true
          },
          "assetSubClass": {
            "type": "string",
            "description": "Second level of the asset classification within assetClass, e.g. Equity Funds. See Asset class.",
            "nullable": true
          },
          "investmentType": {
            "type": "string",
            "description": "Type of investment product, from WealthArc's list of investment types (see Investment types). The API returns the name, e.g. Equity Funds.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the asset. Applies to all asset types.",
            "nullable": true
          },
          "quotationFactor": {
            "type": "number",
            "description": "Divisor that turns price into value per unit: 1 for prices per unit; 100 for prices quoted in percent of nominal (most bonds, some structured products and funds). Value = quantity × price ÷ quotationFactor.",
            "format": "double",
            "nullable": true
          },
          "interestRate": {
            "type": "number",
            "description": "Nominal interest rate in percent (5 = 5%), for deposits and loans.",
            "format": "double",
            "nullable": true
          },
          "maturityDate": {
            "type": "string",
            "description": "Maturity or expiry date, where applicable (bonds, fixed-term deposits, loans, derivatives).",
            "format": "date",
            "nullable": true
          },
          "riskScore": {
            "maximum": 10,
            "minimum": 1,
            "type": "integer",
            "description": "Risk rating of the asset from 1 (lowest) to 10 (highest), used in suitability and risk reporting.",
            "format": "int32",
            "nullable": true
          },
          "@odata.type": {
            "type": "string",
            "description": "Type discriminator: #WealthArc.CashAccount, #WealthArc.Instrument or #WealthArc.Crypto. Tells which subtype fields are present."
          }
        },
        "description": "Any asset that can be held or booked in a portfolio. Asset is polymorphic: each record is a CashAccount, Instrument or Crypto, identified by @odata.type, and carries the subtype's extra fields in addition to the ones below.",
        "discriminator": {
          "propertyName": "@odata.type",
          "mapping": {
            "#WealthArc.CashAccount": "#/components/schemas/CashAccount",
            "#WealthArc.Crypto": "#/components/schemas/Crypto",
            "#WealthArc.Instrument": "#/components/schemas/Instrument"
          }
        }
      },
      "AssetIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Asset"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "CashAccount": {
        "required": [
          "@odata.type"
        ],
        "type": "object",
        "properties": {
          "iban": {
            "type": "string",
            "description": "IBAN or account number of the cash account, when known.",
            "nullable": true
          },
          "id": {
            "type": "integer",
            "description": "Unique WealthArc identifier of the asset. Referenced as assetId by positions and transactions.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the asset, e.g. the security name or cash account label.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency the asset is denominated or quoted in, ISO 4217 code.",
            "nullable": true
          },
          "assetClass": {
            "type": "string",
            "description": "Top level of the asset classification, e.g. Equities or Fixed Income. Classes are configurable per organisation; see Asset class.",
            "nullable": true
          },
          "assetSubClass": {
            "type": "string",
            "description": "Second level of the asset classification within assetClass, e.g. Equity Funds. See Asset class.",
            "nullable": true
          },
          "investmentType": {
            "type": "string",
            "description": "Type of investment product, from WealthArc's list of investment types (see Investment types). The API returns the name, e.g. Equity Funds.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the asset. Applies to all asset types.",
            "nullable": true
          },
          "quotationFactor": {
            "type": "number",
            "description": "Divisor that turns price into value per unit: 1 for prices per unit; 100 for prices quoted in percent of nominal (most bonds, some structured products and funds). Value = quantity × price ÷ quotationFactor.",
            "format": "double",
            "nullable": true
          },
          "interestRate": {
            "type": "number",
            "description": "Nominal interest rate in percent (5 = 5%), for deposits and loans.",
            "format": "double",
            "nullable": true
          },
          "maturityDate": {
            "type": "string",
            "description": "Maturity or expiry date, where applicable (bonds, fixed-term deposits, loans, derivatives).",
            "format": "date",
            "nullable": true
          },
          "riskScore": {
            "maximum": 10,
            "minimum": 1,
            "type": "integer",
            "description": "Risk rating of the asset from 1 (lowest) to 10 (highest), used in suitability and risk reporting.",
            "format": "int32",
            "nullable": true
          },
          "@odata.type": {
            "enum": [
              "#WealthArc.CashAccount"
            ],
            "type": "string",
            "description": "Type discriminator: #WealthArc.CashAccount, #WealthArc.Instrument or #WealthArc.Crypto. Tells which subtype fields are present."
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.id": {
            "type": "string"
          },
          "@odata.editLink": {
            "type": "string"
          },
          "@odata.readLink": {
            "type": "string"
          },
          "@odata.etag": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A bank cash account (current account, fixed-term deposit or loan account). Inherits all Asset fields."
      },
      "CashAccountIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CashAccount"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "Crypto": {
        "required": [
          "@odata.type"
        ],
        "type": "object",
        "properties": {
          "cryptoSymbol": {
            "type": "string",
            "description": "Ticker symbol of the crypto asset (e.g. BTC, ETH).",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "description": "Exchange, broker or custodian where the crypto asset is held.",
            "nullable": true
          },
          "blockchain": {
            "type": "string",
            "description": "Blockchain network the asset exists on.",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Public address of the wallet holding the asset.",
            "nullable": true
          },
          "temperature": {
            "type": "string",
            "description": "Custody storage type: Cold (offline storage) or Hot (online wallet).",
            "nullable": true
          },
          "selfcustody": {
            "type": "boolean",
            "description": "True if the client holds the private keys (self-custody) instead of a third-party provider.",
            "nullable": true
          },
          "id": {
            "type": "integer",
            "description": "Unique WealthArc identifier of the asset. Referenced as assetId by positions and transactions.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the asset, e.g. the security name or cash account label.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency the asset is denominated or quoted in, ISO 4217 code.",
            "nullable": true
          },
          "assetClass": {
            "type": "string",
            "description": "Top level of the asset classification, e.g. Equities or Fixed Income. Classes are configurable per organisation; see Asset class.",
            "nullable": true
          },
          "assetSubClass": {
            "type": "string",
            "description": "Second level of the asset classification within assetClass, e.g. Equity Funds. See Asset class.",
            "nullable": true
          },
          "investmentType": {
            "type": "string",
            "description": "Type of investment product, from WealthArc's list of investment types (see Investment types). The API returns the name, e.g. Equity Funds.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the asset. Applies to all asset types.",
            "nullable": true
          },
          "quotationFactor": {
            "type": "number",
            "description": "Divisor that turns price into value per unit: 1 for prices per unit; 100 for prices quoted in percent of nominal (most bonds, some structured products and funds). Value = quantity × price ÷ quotationFactor.",
            "format": "double",
            "nullable": true
          },
          "interestRate": {
            "type": "number",
            "description": "Nominal interest rate in percent (5 = 5%), for deposits and loans.",
            "format": "double",
            "nullable": true
          },
          "maturityDate": {
            "type": "string",
            "description": "Maturity or expiry date, where applicable (bonds, fixed-term deposits, loans, derivatives).",
            "format": "date",
            "nullable": true
          },
          "riskScore": {
            "maximum": 10,
            "minimum": 1,
            "type": "integer",
            "description": "Risk rating of the asset from 1 (lowest) to 10 (highest), used in suitability and risk reporting.",
            "format": "int32",
            "nullable": true
          },
          "@odata.type": {
            "enum": [
              "#WealthArc.Crypto"
            ],
            "type": "string",
            "description": "Type discriminator: #WealthArc.CashAccount, #WealthArc.Instrument or #WealthArc.Crypto. Tells which subtype fields are present."
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.id": {
            "type": "string"
          },
          "@odata.editLink": {
            "type": "string"
          },
          "@odata.readLink": {
            "type": "string"
          },
          "@odata.etag": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A crypto asset held with a provider or in self-custody. Inherits all Asset fields."
      },
      "CryptoIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Crypto"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "CustodianPortfolioPerformance": {
        "type": "object",
        "properties": {
          "portfolioId": {
            "type": "integer",
            "description": "Id of the portfolio.",
            "format": "int32",
            "example": 30825
          },
          "statementDate": {
            "type": "string",
            "description": "Business date of the custodian's performance figures.",
            "format": "date",
            "example": "2024-01-26"
          },
          "portfolioCurrency": {
            "type": "string",
            "description": "Currency the custodian used to calculate the performance, ISO 4217 code.",
            "nullable": true,
            "example": "CHF"
          },
          "ytdCalculationStartDate": {
            "type": "string",
            "description": "Date from which the custodian calculates year-to-date performance.",
            "format": "date",
            "nullable": true,
            "example": "2024-01-26"
          },
          "ytdGross": {
            "type": "number",
            "description": "Year-to-date return before fees, as delivered by the custodian bank. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00612063
          },
          "ytdNet": {
            "type": "number",
            "description": "Year-to-date return after fees, as delivered by the custodian bank. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00612063
          },
          "mtdGross": {
            "type": "number",
            "description": "Month-to-date return before fees, as delivered by the custodian bank. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00532612
          },
          "mtdNet": {
            "type": "number",
            "description": "Month-to-date return after fees, as delivered by the custodian bank. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00532612
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "example": "2024-01-26T01:30:20Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "example": "2024-01-26T11:30:45Z"
          }
        },
        "description": "Portfolio performance as reported by the custodian bank, delivered unchanged in the custodian feed. Use it to compare against the WealthArc calculation."
      },
      "Instrument": {
        "required": [
          "@odata.type"
        ],
        "type": "object",
        "properties": {
          "isin": {
            "type": "string",
            "description": "International Securities Identification Number (ISO 6166), 12 characters.",
            "nullable": true
          },
          "valor": {
            "type": "string",
            "description": "Swiss Valor number assigned by SIX Financial Information.",
            "nullable": true
          },
          "region": {
            "type": "string",
            "description": "Country of the instrument written out in full (e.g. Switzerland), matching country.",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country of the instrument, ISO 3166-1 alpha-2 code.",
            "nullable": true
          },
          "sector": {
            "type": "string",
            "description": "GICS sector (level 1) of the issuer.",
            "nullable": true
          },
          "industryGroup": {
            "type": "string",
            "description": "GICS industry group (level 2) of the issuer.",
            "nullable": true
          },
          "industry": {
            "type": "string",
            "description": "GICS industry (level 3) of the issuer.",
            "nullable": true
          },
          "subIndustry": {
            "type": "string",
            "description": "GICS sub-industry (level 4) of the issuer.",
            "nullable": true
          },
          "instrumentInfo": {
            "type": "string",
            "description": "Free-text additional information about the instrument.",
            "nullable": true
          },
          "wkn": {
            "type": "string",
            "description": "German securities identification number (Wertpapierkennnummer), 6 characters.",
            "nullable": true
          },
          "cusip": {
            "type": "string",
            "description": "CUSIP identifier for US and Canadian securities, 9 characters.",
            "nullable": true
          },
          "sedol": {
            "type": "string",
            "description": "SEDOL identifier assigned by the London Stock Exchange.",
            "nullable": true
          },
          "ric": {
            "type": "string",
            "description": "Refinitiv (Reuters) Instrument Code, identifying the instrument on a specific exchange.",
            "nullable": true
          },
          "figi": {
            "type": "string",
            "description": "Financial Instrument Global Identifier (OpenFIGI), 12 characters.",
            "nullable": true
          },
          "optionType": {
            "type": "string",
            "description": "For options: PUT or CALL. Empty for other instruments.",
            "nullable": true
          },
          "underlyingInstrument": {
            "type": "string",
            "description": "For options and other derivatives: name of the underlying instrument.",
            "nullable": true
          },
          "underlyingInstrumentIsin": {
            "type": "string",
            "description": "For options and other derivatives: ISIN of the underlying instrument.",
            "nullable": true
          },
          "strikePrice": {
            "type": "number",
            "description": "For options: strike (exercise) price, in the instrument currency.",
            "format": "double",
            "nullable": true
          },
          "multiplier": {
            "type": "number",
            "description": "For options and other derivatives: number of underlying units per contract.",
            "format": "double",
            "nullable": true
          },
          "instrumentIssuer": {
            "type": "string",
            "description": "Name of the entity that issued the instrument.",
            "nullable": true
          },
          "suitabilityScore": {
            "type": "integer",
            "description": "Score used in suitability checks against the client's investor profile.",
            "format": "int32",
            "nullable": true
          },
          "appropriatenessScore": {
            "type": "integer",
            "description": "Score used in appropriateness checks against the client's knowledge and experience.",
            "format": "int32",
            "nullable": true
          },
          "priceSourceForManualPortfolio": {
            "type": "string",
            "description": "Price source used to value this instrument in manual portfolios.",
            "nullable": true
          },
          "id": {
            "type": "integer",
            "description": "Unique WealthArc identifier of the asset. Referenced as assetId by positions and transactions.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the asset, e.g. the security name or cash account label.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency the asset is denominated or quoted in, ISO 4217 code.",
            "nullable": true
          },
          "assetClass": {
            "type": "string",
            "description": "Top level of the asset classification, e.g. Equities or Fixed Income. Classes are configurable per organisation; see Asset class.",
            "nullable": true
          },
          "assetSubClass": {
            "type": "string",
            "description": "Second level of the asset classification within assetClass, e.g. Equity Funds. See Asset class.",
            "nullable": true
          },
          "investmentType": {
            "type": "string",
            "description": "Type of investment product, from WealthArc's list of investment types (see Investment types). The API returns the name, e.g. Equity Funds.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the asset. Applies to all asset types.",
            "nullable": true
          },
          "quotationFactor": {
            "type": "number",
            "description": "Divisor that turns price into value per unit: 1 for prices per unit; 100 for prices quoted in percent of nominal (most bonds, some structured products and funds). Value = quantity × price ÷ quotationFactor.",
            "format": "double",
            "nullable": true
          },
          "interestRate": {
            "type": "number",
            "description": "Nominal interest rate in percent (5 = 5%), for deposits and loans.",
            "format": "double",
            "nullable": true
          },
          "maturityDate": {
            "type": "string",
            "description": "Maturity or expiry date, where applicable (bonds, fixed-term deposits, loans, derivatives).",
            "format": "date",
            "nullable": true
          },
          "riskScore": {
            "maximum": 10,
            "minimum": 1,
            "type": "integer",
            "description": "Risk rating of the asset from 1 (lowest) to 10 (highest), used in suitability and risk reporting.",
            "format": "int32",
            "nullable": true
          },
          "@odata.type": {
            "enum": [
              "#WealthArc.Instrument"
            ],
            "type": "string",
            "description": "Type discriminator: #WealthArc.CashAccount, #WealthArc.Instrument or #WealthArc.Crypto. Tells which subtype fields are present."
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.id": {
            "type": "string"
          },
          "@odata.editLink": {
            "type": "string"
          },
          "@odata.readLink": {
            "type": "string"
          },
          "@odata.etag": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A security or other financial instrument: share, bond, fund, structured product, option, etc. Inherits all Asset fields."
      },
      "InstrumentIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Instrument"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "ODataErrorBody": {
        "required": [
          "code",
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ODataErrorDetail"
            },
            "nullable": true
          },
          "innererror": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ODataErrorDetail": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ODataErrorResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ODataErrorBody"
          }
        },
        "additionalProperties": false
      },
      "Portfolio": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique WealthArc identifier of the portfolio. Referenced as portfolioId by positions, transactions and daily metrics.",
            "format": "int32",
            "example": 30825
          },
          "name": {
            "type": "string",
            "description": "Portfolio name, usually the client or account holder name.",
            "nullable": true,
            "example": "Yann Sommer"
          },
          "shortName": {
            "type": "string",
            "description": "Abbreviated portfolio name used in lists and reports.",
            "nullable": true,
            "example": "Yann S."
          },
          "custodianId": {
            "type": "string",
            "description": "Identifier of the portfolio at the custodian bank (account or container number), as delivered in the custodian feed. Use it to match WealthArc portfolios with custodian statements.",
            "nullable": true,
            "example": "500273.43"
          },
          "custodian": {
            "type": "string",
            "description": "Name of the custodian bank holding the portfolio, as free text (e.g. Julius Bär, UBS). Empty for portfolios without a custodian, such as most model and consolidated portfolios.",
            "nullable": true,
            "example": "LODH"
          },
          "currency": {
            "type": "string",
            "description": "Reference currency of the portfolio as delivered by the custodian, ISO 4217 code.",
            "nullable": true,
            "example": "EUR"
          },
          "wealthArcCurrency": {
            "type": "string",
            "description": "Reference currency WealthArc uses for valuation, AuM and performance of this portfolio. Usually the same as currency, but it can be set to a different reporting currency.",
            "nullable": true,
            "example": "CHF"
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the portfolio, such as its strategy.",
            "nullable": true,
            "example": "Equity portfolio"
          },
          "additionalInfo": {
            "type": "string",
            "description": "Free-text additional information about the portfolio, such as billing remarks.",
            "nullable": true,
            "example": "No Invoicing"
          },
          "isActive": {
            "type": "boolean",
            "description": "True if the portfolio is active; false if it is closed or deactivated.",
            "example": true
          },
          "inceptionDate": {
            "type": "string",
            "description": "Date the portfolio was opened. Start date for since-inception figures.",
            "format": "date",
            "nullable": true,
            "example": "2024-01-26"
          },
          "endDate": {
            "type": "string",
            "description": "Date the portfolio was closed. Empty while the portfolio is open.",
            "format": "date",
            "nullable": true,
            "example": "2024-01-26"
          },
          "relationshipManager": {
            "type": "string",
            "description": "Name of the relationship manager responsible for the client.",
            "nullable": true,
            "example": "David Gasser"
          },
          "portfolioManager": {
            "type": "string",
            "description": "Name of the portfolio manager responsible for investment decisions.",
            "nullable": true,
            "example": "David Gasser"
          },
          "assistant": {
            "type": "string",
            "description": "Name of the assistant supporting the relationship manager.",
            "nullable": true,
            "example": "Michael Schmit"
          },
          "businessEntity": {
            "type": "string",
            "description": "Business or legal entity of the wealth manager that the portfolio belongs to.",
            "nullable": true,
            "example": "Point A1 LODH"
          },
          "branch": {
            "type": "string",
            "description": "Branch or office that manages the portfolio.",
            "nullable": true,
            "example": "Zürich"
          },
          "profitCenter": {
            "type": "string",
            "description": "Profit center the portfolio's revenues are allocated to.",
            "nullable": true,
            "example": "Switzerland"
          },
          "parentPortfolioId": {
            "type": "integer",
            "description": "Id of the consolidated portfolio this portfolio is aggregated into. Empty if the portfolio is not part of a consolidation.",
            "format": "int32",
            "nullable": true,
            "example": 30820
          },
          "investmentGroup": {
            "type": "string",
            "description": "Investment strategy or grouping assigned to the portfolio (e.g. Growth Equity).",
            "nullable": true,
            "example": "Growth Equity"
          },
          "modelPortfolioId": {
            "type": "integer",
            "description": "Id of the model portfolio assigned to this portfolio, used to compare allocations and rebalance. Empty if none is assigned.",
            "format": "int32",
            "nullable": true,
            "example": 30827
          },
          "mandateType": {
            "enum": [
              "Advisory",
              "Discretionary",
              "ExecutionOnly",
              "OffManagement",
              "ReadOnly",
              "Administrative",
              null
            ],
            "type": "string",
            "description": "Type of mandate agreed with the client.\r\n            \r\n- Advisory: The manager advises; the client takes the investment decisions.\r\n- Discretionary: The manager takes investment decisions on the client's behalf.\r\n- ExecutionOnly: Orders are executed on the client's instruction, without advice.\r\n- OffManagement: Assets not actively managed (e.g. held for reporting only).\r\n- ReadOnly: Data is visible but the portfolio is not managed or traded.\r\n- Administrative: Administrative or technical portfolio.",
            "nullable": true,
            "example": "Advisory"
          },
          "isManual": {
            "type": "boolean",
            "description": "True for a manual portfolio: no custodian feed delivers its positions, so WealthArc derives (simulates) them from manually entered transactions and prices.",
            "example": false
          },
          "type": {
            "enum": [
              "Client",
              "Model",
              "NonFinancial",
              "Consolidated",
              "External",
              "Fund",
              "Benchmark",
              "Subaccount",
              null
            ],
            "type": "string",
            "description": "Kind of portfolio.\r\n            \r\n- Client: Client portfolio held at a custodian.\r\n- Model: Model portfolio defining a target allocation; referenced by modelPortfolioId.\r\n- NonFinancial: Portfolio of non-financial assets (e.g. real estate, art).\r\n- Consolidated: Aggregates several portfolios; referenced by parentPortfolioId.\r\n- External: Portfolio managed by a third party and included for reporting.\r\n- Fund: Portfolio representing an investment fund.\r\n- Benchmark: Portfolio used as a performance benchmark.\r\n- Subaccount: Subaccount of another portfolio.",
            "nullable": true,
            "example": "Client"
          }
        },
        "description": "A portfolio (account or mandate) held at a custodian bank, or a portfolio defined in WealthArc such as a model, consolidated or benchmark portfolio. Positions, transactions and daily metrics all refer to a portfolio by its id."
      },
      "PortfolioAum": {
        "type": "object",
        "properties": {
          "portfolioDailyMetricsId": {
            "type": "integer",
            "description": "Id of the parent PortfolioDailyMetrics record.",
            "format": "int32",
            "example": 30825
          },
          "statementDate": {
            "type": "string",
            "description": "Business date of the AuM figures.",
            "format": "date",
            "example": "2024-01-26"
          },
          "netAmount": {
            "type": "number",
            "description": "Net assets under management: portfolio value with loans and other liabilities deducted.",
            "format": "double",
            "example": 3277457.8
          },
          "grossAmount": {
            "type": "number",
            "description": "Gross assets under management: total value of the portfolio's assets, without deducting loans.",
            "format": "double",
            "example": 3277457.8
          },
          "currency": {
            "type": "string",
            "description": "Currency of netAmount and grossAmount, ISO 4217 code. Each AuM record holds the portfolio's AuM converted into one currency.",
            "nullable": true,
            "example": "CHF"
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "example": "2024-01-26T01:30:20Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "example": "2024-01-26T11:30:45Z"
          }
        },
        "description": "Assets under management of a portfolio on a statement date, as net and gross amounts, converted into one currency. A daily metrics record has one AuM record per reporting currency."
      },
      "PortfolioDailyMetrics": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the daily metrics record. Referenced as portfolioDailyMetricsId by PortfolioAum.",
            "format": "int32",
            "example": 301246
          },
          "portfolioId": {
            "type": "integer",
            "description": "Id of the portfolio the metrics belong to.",
            "format": "int32",
            "example": 30825
          },
          "statementDate": {
            "type": "string",
            "description": "Business date the metrics refer to.",
            "format": "date",
            "example": "2024-01-05"
          },
          "overdraftsCount": {
            "type": "integer",
            "description": "Number of the portfolio's cash accounts with a negative balance on the statement date.",
            "format": "int32",
            "nullable": true,
            "example": 3
          },
          "performances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioPerformance"
            },
            "description": "Performance calculated by WealthArc, one record per statement date. Returned only with $expand=performances.",
            "nullable": true
          },
          "custodianPerformances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustodianPortfolioPerformance"
            },
            "description": "Performance figures reported by the custodian bank. Empty when the custodian delivers none. Returned only with $expand=custodianPerformances.",
            "nullable": true
          },
          "aums": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioAum"
            },
            "description": "AuM figures, one record per reporting currency (the reporting currencies configured for your organisation, plus any other currency the portfolio needs). Returned only with $expand=aums.",
            "nullable": true
          }
        },
        "description": "Portfolio-level figures for one statement date: assets under management, performance (WealthArc and custodian) and the number of overdrawn cash accounts. One record per portfolio per statement date."
      },
      "PortfolioDailyMetricsIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioDailyMetrics"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "PortfolioIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Portfolio"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "PortfolioPerformance": {
        "type": "object",
        "properties": {
          "portfolioId": {
            "type": "integer",
            "description": "Id of the portfolio.",
            "format": "int32",
            "example": 30825
          },
          "statementDate": {
            "type": "string",
            "description": "Business date the performance is calculated up to.",
            "format": "date",
            "example": "2024-01-26"
          },
          "ytdCalculationStartDate": {
            "type": "string",
            "description": "Base date of the year-to-date calculation: the last day of the previous year (e.g. 2025-12-31), or a later date when the portfolio's data starts during the year.",
            "format": "date",
            "nullable": true,
            "example": "2024-01-26"
          },
          "ytdGross": {
            "type": "number",
            "description": "Year-to-date return before fees, in WealthArc portfolio currency. Expressed as a decimal fraction (0.0198 = 1.98%).",
            "format": "double",
            "nullable": true,
            "example": -0.00612063
          },
          "ytdNet": {
            "type": "number",
            "description": "Year-to-date return after fees, in WealthArc portfolio currency. Expressed as a decimal fraction. Never higher than ytdGross.",
            "format": "double",
            "nullable": true,
            "example": -0.00612063
          },
          "mtdGross": {
            "type": "number",
            "description": "Month-to-date return before fees, in WealthArc portfolio currency. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00532612
          },
          "mtdNet": {
            "type": "number",
            "description": "Month-to-date return after fees, in WealthArc portfolio currency. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00532612
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "example": "2024-01-26T01:30:20Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "example": "2024-01-26T11:30:45Z"
          }
        },
        "description": "Portfolio performance calculated by WealthArc (WealthArc methodology), expressed in the WealthArc portfolio currency."
      },
      "Position": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the position record (one portfolio, one asset, one statement date).",
            "format": "int32",
            "example": 601345
          },
          "portfolioId": {
            "type": "integer",
            "description": "Id of the portfolio that holds the position.",
            "format": "int32",
            "example": 25122
          },
          "assetId": {
            "type": "integer",
            "description": "Id of the asset held. Look up details in Assets.",
            "format": "int32",
            "example": 25829
          },
          "statementDate": {
            "type": "string",
            "description": "Business date of the holding snapshot.",
            "format": "date",
            "example": "2024-01-26"
          },
          "quantity": {
            "type": "number",
            "description": "Number of units held; nominal amount for bonds; balance for cash accounts. Negative for overdrawn cash accounts and short positions.",
            "format": "double",
            "example": 50
          },
          "price": {
            "type": "number",
            "description": "Latest available price per unit, in priceCurrency. For assets with quotationFactor 100 (most bonds) the price is in percent of nominal. Position value = quantity × price ÷ quotationFactor, plus accrued interest.",
            "format": "double",
            "nullable": true,
            "example": 1869
          },
          "priceCurrency": {
            "type": "string",
            "description": "Currency of price and of the other *InPriceCurrency fields, ISO 4217 code.",
            "nullable": true,
            "example": "USD"
          },
          "valueDate": {
            "type": "string",
            "description": "Date of the price used to value the position. Equal to or earlier than statementDate; earlier when no newer price is available.",
            "format": "date",
            "nullable": true,
            "example": "2024-01-26"
          },
          "priceSource": {
            "type": "string",
            "description": "Source of the price: the custodian or a market data provider.",
            "nullable": true,
            "example": "LODH"
          },
          "unitCostInPriceCurrency": {
            "type": "number",
            "description": "Average acquisition cost per unit, in price currency. Quoted like price, so in percent of nominal for bonds.",
            "format": "double",
            "nullable": true
          },
          "allocation": {
            "type": "number",
            "description": "Share of this position in the total portfolio value. Expressed as a decimal fraction (0.0716 = 7.16%); sums to 1 across a portfolio's positions.",
            "format": "double",
            "nullable": true,
            "example": 0.1321
          },
          "portfolioCurrency": {
            "type": "string",
            "description": "Reference currency of the portfolio, ISO 4217 code. Currency of the *InPortfolioCurrency fields.",
            "nullable": true,
            "example": "EUR"
          },
          "bookCostInPortfolioCurrency": {
            "type": "number",
            "description": "Total acquisition cost of the position, converted to portfolio currency. PnL is measured against this value.",
            "format": "double",
            "nullable": true,
            "example": 48499.16
          },
          "fxRate": {
            "type": "number",
            "description": "Exchange rate from priceCurrency to portfolioCurrency (1 when they are the same).",
            "format": "double",
            "nullable": true,
            "example": 0.9561
          },
          "fxRateSource": {
            "type": "string",
            "description": "Source of fxRate: the custodian or a market data provider.",
            "nullable": true,
            "example": "LODH"
          },
          "accruedInterestInPriceCurrency": {
            "type": "number",
            "description": "Interest accrued since the last coupon or interest payment, in price currency. Included in the position value. Zero for assets without interest.",
            "format": "double",
            "nullable": true,
            "example": 0
          },
          "accruedInterestInPortfolioCurrency": {
            "type": "number",
            "description": "Accrued interest converted to portfolio currency. Included in the position value.",
            "format": "double",
            "nullable": true,
            "example": 0
          },
          "cumulativeCashflowInPriceCurrency": {
            "type": "number",
            "description": "Sum of cash flows generated by the position (e.g. dividends, coupons), in price currency.",
            "format": "double",
            "nullable": true,
            "example": 150.7
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "example": "2024-01-26T00:00:00Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "example": "2024-01-26T12:30:45Z"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionValue"
            },
            "description": "Market value of the position in each supported currency. Returned only with $expand=values.",
            "nullable": true
          },
          "pnl": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionPnl"
            },
            "description": "Profit and loss of the position. Returned only with $expand=pnl.",
            "nullable": true
          },
          "performances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionPerformance"
            },
            "description": "Performance of the position. Returned only with $expand=performances.",
            "nullable": true
          }
        },
        "description": "Holding of one asset in one portfolio on a statement date (a daily snapshot). Includes quantity, price, cost and FX data; values, profit and loss and performance are available as expandable collections."
      },
      "PositionIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Position"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "PositionPerformance": {
        "type": "object",
        "properties": {
          "positionId": {
            "type": "integer",
            "description": "Id of the position.",
            "format": "int32",
            "example": 25122
          },
          "ytdMarket": {
            "type": "number",
            "description": "Year-to-date return from price movements only, in portfolio currency. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00612063
          },
          "mtdMarket": {
            "type": "number",
            "description": "Month-to-date return from price movements only, in portfolio currency. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00612063
          },
          "ytdCurrencyEffect": {
            "type": "number",
            "description": "Year-to-date contribution of exchange-rate changes to the return. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00532612
          },
          "mtdCurrencyEffect": {
            "type": "number",
            "description": "Month-to-date contribution of exchange-rate changes to the return. Expressed as a decimal fraction (-0.0061 = -0.61%).",
            "format": "double",
            "nullable": true,
            "example": -0.00532612
          },
          "ytdPerformance": {
            "type": "number",
            "description": "Year-to-date total return in portfolio currency, as a decimal fraction: ytdMarket + ytdCurrencyEffect.",
            "format": "double",
            "nullable": true,
            "example": -0.01141415
          },
          "mtdPerformance": {
            "type": "number",
            "description": "Month-to-date total return in portfolio currency, as a decimal fraction: mtdMarket + mtdCurrencyEffect.",
            "format": "double",
            "nullable": true,
            "example": -0.01141415
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "example": "2024-01-26T01:30:20Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "example": "2024-01-26T11:30:45Z"
          }
        },
        "description": "Year-to-date and month-to-date performance of a position in portfolio currency (WealthArc methodology), split into market and currency effects."
      },
      "PositionPnl": {
        "type": "object",
        "properties": {
          "positionId": {
            "type": "integer",
            "description": "Id of the position.",
            "format": "int32",
            "example": 25122
          },
          "portfolioId": {
            "type": "integer",
            "description": "Id of the portfolio holding the position. Same as Position.portfolioId.",
            "format": "int32",
            "example": 25122
          },
          "totalPnL": {
            "type": "number",
            "description": "Unrealised profit or loss in portfolio currency: position value (including accrued interest) minus bookCostInPortfolioCurrency.",
            "format": "double",
            "nullable": true,
            "example": 46023.645
          },
          "totalPnLPercentage": {
            "type": "number",
            "description": "totalPnL divided by book cost, as a decimal fraction (−0.0771 = −7.71%). Equals marketPnLPercentage + pnlCurrencyEffect.",
            "format": "double",
            "nullable": true,
            "example": 0.94895756
          },
          "marketPnL": {
            "type": "number",
            "description": "Profit or loss from price changes, in price currency: quantity × (price − unitCostInPriceCurrency) ÷ quotationFactor, plus accrued interest.",
            "format": "double",
            "nullable": true,
            "example": 42812.46
          },
          "marketPnLPercentage": {
            "type": "number",
            "description": "marketPnL relative to the acquisition cost in price currency (quantity × unit cost ÷ quotationFactor), as a decimal fraction.",
            "format": "double",
            "nullable": true,
            "example": 0.8454688
          },
          "pnlCurrencyEffect": {
            "type": "number",
            "description": "Contribution of exchange-rate changes to totalPnLPercentage, as a decimal fraction: totalPnLPercentage = marketPnLPercentage + pnlCurrencyEffect.",
            "format": "double",
            "nullable": true,
            "example": 0.103488795
          },
          "totalPnLWithCashflow": {
            "type": "number",
            "description": "totalPnL plus cumulativeCashflow (dividends, coupons and other cash received from the position).",
            "format": "double",
            "nullable": true,
            "example": 46023.645
          },
          "totalPnLWithCashflowPercentage": {
            "type": "number",
            "description": "totalPnLWithCashflow as a fraction of the position value.",
            "format": "double",
            "nullable": true,
            "example": 0.94895756
          },
          "cumulativeCashflow": {
            "type": "number",
            "description": "Cumulative cash flows of the position that are added in totalPnLWithCashflow.",
            "format": "double",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "example": "2024-01-26T00:00:00Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "example": "2024-01-26T12:30:45Z"
          }
        },
        "description": "Unrealised profit and loss of a position, split into market and currency effects, with and without cash flows."
      },
      "PositionValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the position value record.",
            "format": "int32"
          },
          "amount": {
            "type": "number",
            "description": "Market value of the position in currency, including accrued interest: quantity × price ÷ quotationFactor plus accrued interest, converted at fxRate.",
            "format": "double",
            "nullable": true,
            "example": 406091.7
          },
          "currency": {
            "type": "string",
            "description": "Currency of amount, ISO 4217 code. A position has one value per reporting currency of your organisation, plus its price currency if that isn't one of them.",
            "nullable": true,
            "example": "USD"
          },
          "fxRateDate": {
            "type": "string",
            "description": "Date of the exchange rate applied in the conversion.",
            "format": "date",
            "nullable": true,
            "example": "2018-08-21"
          },
          "fxRateFrom": {
            "type": "string",
            "description": "Currency the value was converted from (the position's price currency).",
            "nullable": true,
            "example": "GBP"
          },
          "fxRateTo": {
            "type": "string",
            "description": "Currency the value was converted to; equals currency. Empty when no conversion details are available.",
            "nullable": true,
            "example": "CHF"
          },
          "fxRate": {
            "type": "number",
            "description": "Exchange rate applied to convert from fxRateFrom to fxRateTo.",
            "format": "double",
            "nullable": true,
            "example": 1.12572
          },
          "fxRateSource": {
            "type": "string",
            "description": "Source of the exchange rate: a market data provider (e.g. xignite), OneToOne when no conversion is needed, or Calculated.",
            "nullable": true,
            "example": "xignite"
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "example": "2024-01-26T00:00:00Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "example": "2024-01-26T12:30:45Z"
          }
        },
        "description": "Market value of a position, including accrued interest, converted into one currency. A position has one record per reporting currency."
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the transaction.",
            "format": "int32",
            "example": 601345
          },
          "portfolioId": {
            "type": "integer",
            "description": "Id of the portfolio the transaction is booked in.",
            "format": "int32",
            "example": 25122
          },
          "assetId": {
            "type": "integer",
            "description": "Id of the asset affected: the security traded, or the cash account debited or credited.",
            "format": "int32",
            "example": 25829
          },
          "type": {
            "enum": [
              "Unclassified",
              "Buy",
              "Sell",
              "Income",
              "FxTrade",
              "Fees",
              "DepositWithdrawal",
              "Tax",
              "Subscription",
              "Redemption",
              "OperationalFees",
              "CorporateAction",
              "InternalTransfer",
              "Other",
              "AssetTransfer",
              "Expense",
              "OpenDeposit",
              "CloseDeposit",
              "Expiry",
              "Call",
              "Conversion",
              "WithholdingTax",
              "Interest",
              "Dividend",
              "Coupon",
              "BankFee",
              "ManagementFee",
              "PerformanceFee",
              "OpenLoan",
              "CloseLoan",
              "FxSpot",
              "Exchange",
              "Merger",
              "Split",
              "SpinOff",
              "CashInLieu",
              "FxForward",
              "Cancellation",
              "Commission",
              "StampDuty",
              "MarginPayment",
              "Assimilation",
              "BonusIssue",
              "CapitalDecrease",
              "CapitalIncrease",
              "Delisting",
              "NameChange",
              "PartialRedemption",
              "ReverseSplit",
              "OpenLongPosition",
              "OpenShortPosition"
            ],
            "type": "string",
            "description": "Kind of transaction. See TransactionType.",
            "example": "AssetTransfer"
          },
          "description": {
            "type": "string",
            "description": "Booking text, as delivered by the custodian or entered manually.",
            "nullable": true,
            "example": "Stock transaction without cash"
          },
          "transactionDate": {
            "type": "string",
            "description": "Booking date of the transaction.",
            "format": "date",
            "example": "2018-08-21"
          },
          "tradeDate": {
            "type": "string",
            "description": "Date the trade was executed.",
            "format": "date",
            "nullable": true,
            "example": "2018-08-21"
          },
          "valueDate": {
            "type": "string",
            "description": "Settlement (value) date, when cash and securities are exchanged.",
            "format": "date",
            "nullable": true,
            "example": "2018-08-21"
          },
          "quantity": {
            "type": "number",
            "description": "Change in the holding of the asset, signed: positive increases it (buy, deposit, income received), negative decreases it (sell, withdrawal, fees, taxes). On cash-account bookings this is the cash amount.",
            "format": "double",
            "nullable": true,
            "example": 946
          },
          "price": {
            "type": "number",
            "description": "Price per unit, in priceCurrency. 1 on cash-account bookings.",
            "format": "double",
            "nullable": true,
            "example": 145.844
          },
          "priceCurrency": {
            "type": "string",
            "description": "Currency of price, ISO 4217 code.",
            "nullable": true,
            "example": "USD"
          },
          "portfolioCurrency": {
            "type": "string",
            "description": "Reference currency of the portfolio, ISO 4217 code.",
            "nullable": true,
            "example": "EUR"
          },
          "fxRate": {
            "type": "number",
            "description": "Exchange rate between price currency and portfolio currency applied to the transaction.",
            "format": "double",
            "nullable": true,
            "example": 0.8681309
          },
          "fxRateSource": {
            "type": "string",
            "description": "Source of fxRate: the custodian or a market data provider.",
            "nullable": true,
            "example": "LODH"
          },
          "externalOrderId": {
            "type": "string",
            "description": "Order or booking reference from the custodian. Use it to reconcile with custodian statements.",
            "nullable": true,
            "example": "41REF.9730137KN1607053"
          },
          "referencedInstrumentId": {
            "type": "integer",
            "description": "On cash-account bookings, the id of the instrument the cash movement belongs to: the security bought or sold, or the one that paid a dividend, coupon or interest. Empty on the security's own booking.",
            "format": "int32",
            "nullable": true
          },
          "referencedInstrumentQuantity": {
            "type": "number",
            "description": "Quantity of the referenced instrument.",
            "format": "double",
            "nullable": true
          },
          "interest": {
            "type": "number",
            "description": "Accrued interest paid or received with the transaction, e.g. when buying or selling a bond.",
            "format": "double",
            "nullable": true,
            "example": 0.0138
          },
          "isReversal": {
            "type": "boolean",
            "description": "True if this transaction cancels (reverses) an earlier booking; otherwise empty.",
            "nullable": true,
            "example": false
          },
          "isRiskIncreased": {
            "type": "boolean",
            "description": "True if the transaction increases the risk of the portfolio. Used in suitability and compliance checks.",
            "nullable": true,
            "example": true
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-26T00:00:00Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-26T12:30:45Z"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionValue"
            },
            "description": "Transaction amount in each supported currency. Returned only with $expand=values.",
            "nullable": true
          }
        },
        "description": "A booking in a portfolio that affects one asset: a trade, cash movement, income, fee, tax, corporate action or transfer. Trades and payments are booked as two transactions of the same type: one on the instrument (security leg) and one on the cash account (cash leg). The cash leg points to the instrument through referencedInstrumentId."
      },
      "TransactionIEnumerableODataValue": {
        "required": [
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            },
            "nullable": true
          },
          "@odata.context": {
            "type": "string"
          },
          "@odata.count": {
            "minimum": 0,
            "type": "integer",
            "format": "int64"
          },
          "@odata.nextLink": {
            "type": "string"
          }
        }
      },
      "TransactionValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the transaction value record (UUID).",
            "format": "uuid",
            "example": "4459df0d-a90b-4c39-aee9-08db1e01c877"
          },
          "amount": {
            "type": "number",
            "description": "Amount of the transaction in currency, signed like quantity: positive for increases and inflows, negative for decreases and outflows.",
            "format": "double",
            "nullable": true,
            "example": 2450
          },
          "currency": {
            "type": "string",
            "description": "Currency of amount, ISO 4217 code. One value per reporting currency of your organisation.",
            "nullable": true,
            "example": "USD"
          },
          "fxRateDate": {
            "type": "string",
            "description": "Date of the exchange rate applied in the conversion.",
            "format": "date",
            "nullable": true,
            "example": "2018-08-21"
          },
          "fxRateFrom": {
            "type": "string",
            "description": "Currency the amount was converted from, ISO 4217 code.",
            "nullable": true,
            "example": "GBP"
          },
          "fxRateTo": {
            "type": "string",
            "description": "Currency the amount was converted to, ISO 4217 code.",
            "nullable": true,
            "example": "CHF"
          },
          "fxRate": {
            "type": "number",
            "description": "Exchange rate applied to convert from fxRateFrom to fxRateTo.",
            "format": "double",
            "nullable": true,
            "example": 1.12572
          },
          "fxRateSource": {
            "type": "string",
            "description": "Provider of the exchange rate (e.g. xignite or the custodian).",
            "nullable": true,
            "example": "xignite"
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when this record was first stored in WealthArc.",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-26T00:00:00Z"
          },
          "modifiedAt": {
            "type": "string",
            "description": "Timestamp of the last change to this record in WealthArc. Useful for incremental loads, e.g. $filter=modifiedAt gt 2024-01-01T00:00:00Z.",
            "format": "date-time",
            "nullable": true,
            "example": "2024-01-26T12:30:45Z"
          }
        },
        "description": "Amount of a transaction converted into one currency. A transaction has one record per supported currency."
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      },
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    },
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "name": "Assets",
      "description": "Controller for managing assets."
    },
    {
      "name": "Portfolios",
      "description": "Controller for managing portfolios."
    },
    {
      "name": "PortfoliosDailyMetrics",
      "description": "Controller for managing portfolios daily metrics."
    },
    {
      "name": "Positions",
      "description": "Controller for managing positions."
    },
    {
      "name": "Transactions",
      "description": "Controller for managing transactions."
    }
  ],
  "servers": [
    {
      "url": "https://api-vidar-chn-prod-01.azurewebsites.net",
      "description": "sandbox prod"
    },
    {
      "url": "https://sandbox-api.wealtharc.com",
      "description": "sandbox prod"
    },
    {
      "url": "https://sandbox-api.wealtharcdatabox.com",
      "description": "sandbox prod"
    }
  ]
}
