{ "openapi": "3.0.0", "paths": { "/api/v1/auth/register": { "post": { "operationId": "AuthController_register", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialsDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "tags": [ "auth" ] } }, "/api/v1/auth/login": { "post": { "operationId": "AuthController_login", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CredentialsDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "tags": [ "auth" ] } }, "/api/v1/auth/refresh": { "post": { "operationId": "AuthController_refresh", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticationDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "tags": [ "auth" ] } }, "/api/v1/auth/logout": { "post": { "operationId": "AuthController_logout", "parameters": [], "responses": { "204": { "description": "" }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "tags": [ "auth" ] } }, "/api/v1/auth/me": { "get": { "operationId": "AuthController_me", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "auth" ] } }, "/api/v1/bank-cards": { "get": { "operationId": "BankCardsController_list", "parameters": [ { "name": "includeArchived", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BankCardDto" } } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] }, "post": { "operationId": "BankCardsController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBankCardDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankCardDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/categories": { "get": { "operationId": "BankCardsController_categories", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExpenseCategoryDto" } } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] }, "post": { "operationId": "BankCardsController_createCategory", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryNameDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExpenseCategoryDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/categories/{id}": { "patch": { "operationId": "BankCardsController_updateCategory", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateExpenseCategoryDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExpenseCategoryDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/summary": { "get": { "operationId": "BankCardsController_summary", "parameters": [ { "name": "month", "required": false, "in": "query", "description": "Use month or both from and to, exclusively.", "schema": { "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$", "type": "string" } }, { "name": "from", "required": false, "in": "query", "description": "Inclusive start date; requires to.", "schema": { "format": "date", "type": "string" } }, { "name": "to", "required": false, "in": "query", "description": "Inclusive end date; requires from.", "schema": { "format": "date", "type": "string" } }, { "name": "cardId", "required": false, "in": "query", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankSummaryDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/operations": { "post": { "operationId": "BankCardsController_createOperation", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBankOperationDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankOperationDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/operations/{id}": { "get": { "operationId": "BankCardsController_operation", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankOperationDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] }, "patch": { "operationId": "BankCardsController_updateOperation", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBankOperationDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankOperationDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] }, "delete": { "operationId": "BankCardsController_deleteOperation", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "version", "required": true, "in": "query", "schema": { "minimum": 1, "type": "number" } } ], "responses": { "204": { "description": "" }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/{id}/operations": { "get": { "operationId": "BankCardsController_history", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "page", "required": false, "in": "query", "schema": { "minimum": 1, "default": 1, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "minimum": 1, "maximum": 100, "default": 50, "type": "number" } }, { "name": "month", "required": false, "in": "query", "description": "Use month or both from and to, exclusively.", "schema": { "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$", "type": "string" } }, { "name": "from", "required": false, "in": "query", "description": "Inclusive start date; requires to.", "schema": { "format": "date", "type": "string" } }, { "name": "to", "required": false, "in": "query", "description": "Inclusive end date; requires from.", "schema": { "format": "date", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankOperationsPageDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/{id}/expenses": { "get": { "operationId": "BankCardsController_expenses", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "page", "required": false, "in": "query", "schema": { "minimum": 1, "default": 1, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "minimum": 1, "maximum": 100, "default": 50, "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankOperationsPageDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/bank-cards/{id}": { "get": { "operationId": "BankCardsController_get", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankCardDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] }, "patch": { "operationId": "BankCardsController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBankCardDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BankCardDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "409": { "description": "BANK_CARD_ARCHIVED, BANK_VERSION_CONFLICT, BANK_INTENT_CONFLICT, BANK_REFUND_LIMIT, BANK_DEPENDENT_REFUNDS, BANK_DUPLICATE_CATEGORY or BANK_WRITE_CONFLICT", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "410": { "description": "BANK_OPERATION_DELETED: creation replay refers to a deleted operation", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bank-cards" ] } }, "/api/v1/brokerage-accounts": { "get": { "operationId": "BrokerageAccountsController_list", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrokerageAccountsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/all/portfolio": { "get": { "operationId": "PortfolioController_all", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/{accountId}/portfolio": { "get": { "operationId": "PortfolioController_get", "parameters": [ { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/all/operations": { "get": { "operationId": "BrokerageOperationsController_all", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "instrumentUid", "required": false, "in": "query", "description": "Instrument UID. Without from, includes history since the earliest available account opening.", "schema": { "format": "uuid", "type": "string" } }, { "name": "from", "required": false, "in": "query", "schema": { "format": "date-time", "type": "string" } }, { "name": "to", "required": false, "in": "query", "schema": { "format": "date-time", "type": "string" } }, { "name": "categories", "required": false, "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "trade", "income", "tax", "fee", "transfer", "other" ] } } }, { "name": "cursor", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "limit", "required": false, "in": "query", "schema": { "minimum": 1, "maximum": 1000, "default": 100, "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrokerageOperationsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/{accountId}/operations": { "get": { "operationId": "BrokerageOperationsController_get", "parameters": [ { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "instrumentUid", "required": false, "in": "query", "description": "Instrument UID. Without from, includes history since the earliest available account opening.", "schema": { "format": "uuid", "type": "string" } }, { "name": "from", "required": false, "in": "query", "schema": { "format": "date-time", "type": "string" } }, { "name": "to", "required": false, "in": "query", "schema": { "format": "date-time", "type": "string" } }, { "name": "categories", "required": false, "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "trade", "income", "tax", "fee", "transfer", "other" ] } } }, { "name": "cursor", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "limit", "required": false, "in": "query", "schema": { "minimum": 1, "maximum": 1000, "default": 100, "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrokerageOperationsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/all/income-summary": { "get": { "operationId": "IncomeAnalyticsController_allSummary", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IncomeSummaryResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/all/income-analytics": { "get": { "operationId": "IncomeAnalyticsController_allAnalytics", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "from", "required": false, "in": "query", "description": "Inclusive calendar date in Europe/Moscow. Supply both from/to or neither.", "schema": { "format": "date", "type": "string" } }, { "name": "to", "required": false, "in": "query", "description": "Inclusive calendar date in Europe/Moscow, no later than today. Supply both from/to or neither.", "schema": { "format": "date", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IncomeAnalyticsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/{accountId}/income-summary": { "get": { "operationId": "IncomeAnalyticsController_summary", "parameters": [ { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IncomeSummaryResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/{accountId}/income-analytics": { "get": { "operationId": "IncomeAnalyticsController_analytics", "parameters": [ { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "from", "required": false, "in": "query", "description": "Inclusive calendar date in Europe/Moscow. Supply both from/to or neither.", "schema": { "format": "date", "type": "string" } }, { "name": "to", "required": false, "in": "query", "description": "Inclusive calendar date in Europe/Moscow, no later than today. Supply both from/to or neither.", "schema": { "format": "date", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IncomeAnalyticsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/all/events": { "get": { "operationId": "UpcomingEventsController_all", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "from", "required": false, "in": "query", "description": "Inclusive UTC calendar start date (YYYY-MM-DD). May be supplied independently; defaults to today in UTC.", "schema": { "format": "date", "type": "string" } }, { "name": "to", "required": false, "in": "query", "description": "Inclusive UTC calendar end date (YYYY-MM-DD). May be supplied independently; defaults to 30 days after from. Timestamp queries use the start of the following UTC day as the exclusive end.", "schema": { "format": "date", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpcomingEventsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/brokerage-accounts/{accountId}/events": { "get": { "operationId": "UpcomingEventsController_get", "parameters": [ { "name": "accountId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "from", "required": false, "in": "query", "description": "Inclusive UTC calendar start date (YYYY-MM-DD). May be supplied independently; defaults to today in UTC.", "schema": { "format": "date", "type": "string" } }, { "name": "to", "required": false, "in": "query", "description": "Inclusive UTC calendar end date (YYYY-MM-DD). May be supplied independently; defaults to 30 days after from. Timestamp queries use the start of the following UTC day as the exclusive end.", "schema": { "format": "date", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpcomingEventsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "brokerage-accounts" ] } }, "/api/v1/stocks": { "get": { "operationId": "StockController_search", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "query", "required": true, "in": "query", "schema": { "minLength": 2, "maxLength": 80, "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockSearchResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/stocks/by-ticker/{ticker}": { "get": { "operationId": "StockController_getByTicker", "parameters": [ { "name": "ticker", "required": true, "in": "path", "schema": { "minLength": 1, "maxLength": 80, "pattern": "^[A-Za-z0-9][A-Za-z0-9._@+-]*$", "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/stocks/{uid}": { "get": { "operationId": "StockController_get", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/stocks/{uid}/quote": { "get": { "operationId": "StockController_quote", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockQuoteResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/stocks/{uid}/candles": { "get": { "operationId": "StockController_candles", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "period", "required": false, "in": "query", "schema": { "default": "month", "type": "string", "enum": [ "month", "halfYear", "year", "all" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockCandlesResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/stocks/{uid}/position": { "get": { "operationId": "StockController_position", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockPositionResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/stocks/{uid}/company": { "get": { "operationId": "StockController_company", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockCompanyResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/stocks/{uid}/dividends": { "get": { "operationId": "StockController_dividends", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockDividendsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "stocks" ] } }, "/api/v1/bonds/{uid}/metrics": { "get": { "operationId": "BondController_metrics", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondMetricsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/bonds": { "get": { "operationId": "BondController_search", "parameters": [ { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "query", "required": true, "in": "query", "schema": { "minLength": 2, "maxLength": 80, "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondSearchResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/bonds/by-ticker/{ticker}": { "get": { "operationId": "BondController_getByTicker", "parameters": [ { "name": "ticker", "required": true, "in": "path", "schema": { "minLength": 1, "maxLength": 80, "pattern": "^[A-Za-z0-9][A-Za-z0-9._@+-]*$", "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/bonds/{uid}": { "get": { "operationId": "BondController_get", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/bonds/{uid}/quote": { "get": { "operationId": "BondController_quote", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondQuoteResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/bonds/{uid}/candles": { "get": { "operationId": "BondController_candles", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } }, { "name": "period", "required": false, "in": "query", "schema": { "default": "month", "type": "string", "enum": [ "month", "halfYear", "year", "all" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondCandlesResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/bonds/{uid}/position": { "get": { "operationId": "BondController_position", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondPositionResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/bonds/{uid}/coupons": { "get": { "operationId": "BondController_coupons", "parameters": [ { "name": "uid", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "sync", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "observe" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BondCouponsResourceDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "bonds" ] } }, "/api/v1/tbank-connection": { "get": { "operationId": "TbankConnectionController_status", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TbankConnectionStatusDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "tbank-connection" ] }, "put": { "operationId": "TbankConnectionController_put", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PutTbankConnectionDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TbankConnectionStatusDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "tbank-connection" ] }, "delete": { "operationId": "TbankConnectionController_delete", "parameters": [], "responses": { "204": { "description": "" }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "tbank-connection" ] } }, "/api/v1/tbank-sync": { "post": { "operationId": "TbankSyncController_request", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/IncomeInvestmentScreenDto" }, { "$ref": "#/components/schemas/EventsInvestmentScreenDto" }, { "$ref": "#/components/schemas/TimestampInvestmentScreenDto" } ], "discriminator": { "propertyName": "screen", "mapping": { "income": "#/components/schemas/IncomeInvestmentScreenDto", "events": "#/components/schemas/EventsInvestmentScreenDto", "accounts": "#/components/schemas/TimestampInvestmentScreenDto", "account": "#/components/schemas/TimestampInvestmentScreenDto", "operations": "#/components/schemas/TimestampInvestmentScreenDto", "stocks": "#/components/schemas/TimestampInvestmentScreenDto", "bonds": "#/components/schemas/TimestampInvestmentScreenDto", "stock": "#/components/schemas/TimestampInvestmentScreenDto", "bond": "#/components/schemas/TimestampInvestmentScreenDto" } } } } } }, "responses": { "202": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TbankSyncAcceptedDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "tbank-sync" ] } }, "/api/v1/tbank-sync/{id}": { "get": { "operationId": "TbankSyncController_status", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TbankSyncStatusDto" } } } }, "400": { "description": "Invalid request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "401": { "description": "Authentication required", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "404": { "description": "Resource not found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "500": { "description": "Internal server error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } }, "503": { "description": "Upstream service unavailable", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetailsDto" } } } } }, "security": [ { "bearer": [] } ], "tags": [ "tbank-sync" ] } } }, "info": { "title": "WealthLedger API", "description": "", "version": "v1", "contact": {} }, "tags": [], "servers": [], "components": { "schemas": { "ProblemDetailsDto": { "type": "object", "properties": { "status": { "type": "number", "example": 401 }, "code": { "type": "string", "example": "UNAUTHORIZED" }, "errors": { "example": [ { "pointer": "#/email", "detail": "must be a valid email address" } ], "type": "array", "items": { "type": "string" } } }, "required": [ "status", "code" ] }, "CredentialsDto": { "type": "object", "properties": { "email": { "type": "string", "example": "user@example.com" }, "password": { "type": "string", "minLength": 12, "maxLength": 72, "example": "a secure password" } }, "required": [ "email", "password" ] }, "UserDto": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" } }, "required": [ "id", "email" ] }, "AuthenticationDto": { "type": "object", "properties": { "accessToken": { "type": "string" }, "user": { "$ref": "#/components/schemas/UserDto" } }, "required": [ "accessToken", "user" ] }, "MoneyDto": { "type": "object", "properties": { "currency": { "type": "string" }, "value": { "type": "string" } }, "required": [ "currency", "value" ] }, "BankCardDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "bankName": { "type": "string", "nullable": true }, "lastFour": { "type": "string", "nullable": true }, "paymentSystem": { "type": "string", "enum": [ "mir", "visa", "mastercard" ], "nullable": true }, "openingBalance": { "$ref": "#/components/schemas/MoneyDto" }, "openingDate": { "type": "string" }, "balance": { "$ref": "#/components/schemas/MoneyDto" }, "archivedAt": { "type": "string", "nullable": true }, "version": { "type": "number" } }, "required": [ "id", "name", "bankName", "lastFour", "paymentSystem", "openingBalance", "openingDate", "balance", "archivedAt", "version" ] }, "RubMoneyInputDto": { "type": "object", "properties": { "currency": { "type": "string", "enum": [ "RUB" ] }, "value": { "type": "string", "pattern": "^-?[0-9]+(\\.[0-9]{1,2})?$" } }, "required": [ "currency", "value" ] }, "CreateBankCardDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "bankName": { "type": "string", "nullable": true, "maxLength": 100 }, "lastFour": { "type": "string", "nullable": true, "pattern": "^[0-9]{4}$" }, "paymentSystem": { "type": "string", "enum": [ "mir", "visa", "mastercard" ], "nullable": true }, "openingBalance": { "$ref": "#/components/schemas/RubMoneyInputDto" }, "openingDate": { "type": "string", "format": "date" } }, "required": [ "id", "name", "openingBalance", "openingDate" ] }, "ExpenseCategoryDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "isDefault": { "type": "boolean" }, "version": { "type": "number" } }, "required": [ "id", "name", "isDefault", "version" ] }, "CategoryNameDto": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 } }, "required": [ "name" ] }, "UpdateExpenseCategoryDto": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "version": { "type": "number", "minimum": 1 } }, "required": [ "name", "version" ] }, "BankSummaryCategoryDto": { "type": "object", "properties": { "categoryId": { "type": "string" }, "categoryName": { "type": "string" }, "expenses": { "$ref": "#/components/schemas/MoneyDto" }, "refunds": { "$ref": "#/components/schemas/MoneyDto" }, "net": { "$ref": "#/components/schemas/MoneyDto" } }, "required": [ "categoryId", "categoryName", "expenses", "refunds", "net" ] }, "BankSummaryDto": { "type": "object", "properties": { "month": { "type": "string" }, "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "cardId": { "type": "string", "nullable": true }, "expenses": { "$ref": "#/components/schemas/MoneyDto" }, "refunds": { "$ref": "#/components/schemas/MoneyDto" }, "net": { "$ref": "#/components/schemas/MoneyDto" }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/BankSummaryCategoryDto" } } }, "required": [ "cardId", "expenses", "refunds", "net", "categories" ] }, "CreateBankOperationDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "kind": { "type": "string", "enum": [ "expense", "topup", "transfer", "refund" ] }, "cardId": { "type": "string", "format": "uuid" }, "targetCardId": { "type": "string", "format": "uuid" }, "categoryId": { "type": "string", "format": "uuid" }, "originalExpenseId": { "type": "string", "format": "uuid" }, "amount": { "$ref": "#/components/schemas/RubMoneyInputDto" }, "date": { "type": "string", "format": "date" }, "description": { "type": "string", "maxLength": 500 } }, "required": [ "id", "kind", "cardId", "amount", "date" ] }, "BankOperationDto": { "type": "object", "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "expense", "topup", "transfer", "refund" ] }, "cardId": { "type": "string" }, "cardName": { "type": "string" }, "targetCardId": { "type": "string", "nullable": true }, "targetCardName": { "type": "string", "nullable": true }, "categoryId": { "type": "string", "nullable": true }, "categoryName": { "type": "string", "nullable": true }, "originalExpenseId": { "type": "string", "nullable": true }, "amount": { "$ref": "#/components/schemas/MoneyDto" }, "availableRefund": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "date": { "type": "string" }, "description": { "type": "string", "nullable": true }, "version": { "type": "number" }, "createdAt": { "type": "string" } }, "required": [ "id", "kind", "cardId", "cardName", "targetCardId", "targetCardName", "categoryId", "categoryName", "originalExpenseId", "amount", "availableRefund", "date", "description", "version", "createdAt" ] }, "UpdateBankOperationDto": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "expense", "topup", "transfer", "refund" ] }, "cardId": { "type": "string", "format": "uuid" }, "targetCardId": { "type": "string", "format": "uuid" }, "categoryId": { "type": "string", "format": "uuid" }, "originalExpenseId": { "type": "string", "format": "uuid" }, "amount": { "$ref": "#/components/schemas/RubMoneyInputDto" }, "date": { "type": "string", "format": "date" }, "description": { "type": "string", "maxLength": 500 }, "version": { "type": "number", "minimum": 1 } }, "required": [ "version" ] }, "BankOperationsPageDto": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/BankOperationDto" } }, "page": { "type": "number" }, "total": { "type": "number" }, "hasNext": { "type": "boolean" } }, "required": [ "items", "page", "total", "hasNext" ] }, "UpdateBankCardDto": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "bankName": { "type": "string", "nullable": true, "maxLength": 100 }, "lastFour": { "type": "string", "nullable": true, "pattern": "^[0-9]{4}$" }, "paymentSystem": { "type": "string", "enum": [ "mir", "visa", "mastercard" ], "nullable": true }, "openingBalance": { "$ref": "#/components/schemas/RubMoneyInputDto" }, "openingDate": { "type": "string", "format": "date" }, "version": { "type": "number", "minimum": 1 }, "archived": { "type": "boolean" } }, "required": [ "version" ] }, "PortfolioSummaryDto": { "type": "object", "properties": { "totalsByCurrency": { "type": "array", "items": { "$ref": "#/components/schemas/MoneyDto" } }, "stockPositionCount": { "type": "integer", "minimum": 0, "description": "Number of non-zero stock positions, not the number of units." }, "bondPositionCount": { "type": "integer", "minimum": 0, "description": "Number of non-zero bond positions, not the number of units." } }, "required": [ "totalsByCurrency", "stockPositionCount", "bondPositionCount" ] }, "BrokerageAccountDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string", "enum": [ "BROKERAGE", "INDIVIDUAL_INVESTMENT", "INVEST_BOX", "MONEY_MARKET_FUND" ] }, "openedOn": { "type": "string", "nullable": true, "format": "date" }, "portfolioSummary": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/PortfolioSummaryDto" } ] } }, "required": [ "id", "name", "type", "openedOn", "portfolioSummary" ] }, "InvestmentRangeDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "from": { "type": "string", "format": "date-time" }, "to": { "type": "string", "format": "date-time" } }, "required": [ "from", "to" ] }, "InvestmentCoverageDto": { "type": "object", "properties": { "requested": { "type": "array", "items": { "$ref": "#/components/schemas/InvestmentRangeDto" } }, "completeRanges": { "type": "array", "items": { "$ref": "#/components/schemas/InvestmentRangeDto" } }, "missingRanges": { "type": "array", "items": { "$ref": "#/components/schemas/InvestmentRangeDto" } }, "asOf": { "type": "string", "nullable": true, "format": "date-time" }, "historyBoundary": { "type": "string", "enum": [ "known", "unknown" ] }, "historyState": { "type": "string", "enum": [ "missing", "loading", "partial", "complete", "failed" ] } }, "required": [ "requested", "completeRanges", "missingRanges", "asOf", "historyBoundary", "historyState" ] }, "InvestmentSyncDto": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "state": { "type": "string", "enum": [ "idle", "queued", "running", "failed" ] }, "errorCode": { "type": "string", "nullable": true } }, "required": [ "id", "state", "errorCode" ] }, "InvestmentDependencyDto": { "type": "object", "properties": { "dataRevision": { "type": "string" }, "stateVersion": { "type": "string" }, "unavailableReason": { "type": "string" }, "coverage": { "$ref": "#/components/schemas/InvestmentCoverageDto" }, "resourceKey": { "type": "string" }, "availability": { "type": "string", "enum": [ "missing", "partial", "complete" ] }, "freshness": { "type": "string", "enum": [ "unknown", "fresh", "stale" ] }, "lastSuccessfulAt": { "type": "string", "format": "date-time", "nullable": true }, "sync": { "$ref": "#/components/schemas/InvestmentSyncDto" } }, "required": [ "dataRevision", "stateVersion", "resourceKey", "availability", "freshness", "lastSuccessfulAt", "sync" ] }, "InvestmentResourceMetaDto": { "type": "object", "properties": { "dataRevision": { "type": "string" }, "stateVersion": { "type": "string" }, "unavailableReason": { "type": "string" }, "coverage": { "$ref": "#/components/schemas/InvestmentCoverageDto" }, "resourceKey": { "type": "string" }, "availability": { "type": "string", "enum": [ "missing", "partial", "complete" ] }, "freshness": { "type": "string", "enum": [ "unknown", "fresh", "stale" ] }, "lastSuccessfulAt": { "type": "string", "format": "date-time", "nullable": true }, "sync": { "$ref": "#/components/schemas/InvestmentSyncDto" }, "dependencies": { "type": "array", "items": { "$ref": "#/components/schemas/InvestmentDependencyDto" } } }, "required": [ "dataRevision", "stateVersion", "resourceKey", "availability", "freshness", "lastSuccessfulAt", "sync" ] }, "BrokerageAccountsResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/BrokerageAccountDto" } }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "AccountReferenceDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "PortfolioPositionDto": { "type": "object", "properties": { "instrumentUid": { "type": "string", "nullable": true }, "account": { "$ref": "#/components/schemas/AccountReferenceDto" }, "figi": { "type": "string", "nullable": true }, "displayName": { "type": "string" }, "type": { "type": "string", "enum": [ "STOCK", "BOND", "FUND", "CURRENCY", "FUTURE", "OPTION", "STRUCTURED_NOTE", "DIGITAL_FINANCIAL_ASSET", "OTHER" ] }, "quantity": { "type": "string" }, "currentValue": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "averagePurchasePrice": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "absoluteReturn": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "isin": { "type": "string", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true } }, "required": [ "figi", "displayName", "type", "quantity", "currentValue", "averagePurchasePrice", "absoluteReturn", "isin", "ticker", "logoName" ] }, "PortfolioStructureCategoryDto": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "STOCK", "BOND", "OTHER", "CASH" ] }, "value": { "type": "string", "description": "Exact known value as a decimal string." }, "sharePercent": { "type": "string", "nullable": true, "description": "Percentage including cash, rounded to six decimal places. Null for incomplete, negative or zero-total compositions." } }, "required": [ "type", "value", "sharePercent" ] }, "PortfolioStructureCurrencyDto": { "type": "object", "properties": { "currency": { "type": "string" }, "totalValue": { "type": "string" }, "hasNegativeValues": { "type": "boolean", "description": "Any negative constituent, even if netted positive." }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioStructureCategoryDto" } } }, "required": [ "currency", "totalValue", "hasNegativeValues", "categories" ] }, "PortfolioUnvaluedCategoryDto": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "STOCK", "BOND", "OTHER" ] }, "count": { "type": "number", "minimum": 1 } }, "required": [ "type", "count" ] }, "PortfolioStructureDto": { "type": "object", "properties": { "currencies": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioStructureCurrencyDto" } }, "unvaluedCategories": { "description": "Positions without current value and known valuation currency. Shares are unavailable across all currencies when nonempty.", "type": "array", "items": { "$ref": "#/components/schemas/PortfolioUnvaluedCategoryDto" } } }, "required": [ "currencies", "unvaluedCategories" ] }, "PortfolioDto": { "type": "object", "properties": { "lastSuccessfulAt": { "type": "string", "format": "date-time" }, "isStale": { "type": "boolean" }, "totalsByCurrency": { "type": "array", "items": { "$ref": "#/components/schemas/MoneyDto" } }, "positions": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioPositionDto" } }, "cashBalances": { "type": "array", "items": { "$ref": "#/components/schemas/MoneyDto" } }, "structure": { "$ref": "#/components/schemas/PortfolioStructureDto" } }, "required": [ "lastSuccessfulAt", "isStale", "totalsByCurrency", "positions", "cashBalances", "structure" ] }, "PortfolioResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/PortfolioDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BrokerageOperationDto": { "type": "object", "properties": { "account": { "$ref": "#/components/schemas/AccountReferenceDto" }, "id": { "type": "string" }, "occurredAt": { "type": "string", "format": "date-time" }, "type": { "type": "string" }, "category": { "type": "string", "enum": [ "trade", "income", "tax", "fee", "transfer", "other" ] }, "description": { "type": "string" }, "figi": { "type": "string", "nullable": true }, "instrumentUid": { "type": "string", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "instrumentType": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "payment": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "quantity": { "type": "string", "nullable": true }, "price": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "accruedInterest": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "commission": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] } }, "required": [ "id", "occurredAt", "type", "category", "description", "figi", "instrumentUid", "ticker", "instrumentType", "logoName", "payment", "quantity", "price", "accruedInterest", "commission" ] }, "BrokerageOperationsPageDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/BrokerageOperationDto" } }, "nextCursor": { "type": "string", "nullable": true }, "hasNext": { "type": "boolean" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "accountId", "items", "nextCursor", "hasNext", "observedAt" ] }, "BrokerageOperationsResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BrokerageOperationsPageDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "IncomePeriodDto": { "type": "object", "properties": { "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" } }, "required": [ "from", "to" ] }, "IncomeCurrencySummaryDto": { "type": "object", "properties": { "currency": { "type": "string" }, "coupon": { "$ref": "#/components/schemas/MoneyDto" }, "dividend": { "$ref": "#/components/schemas/MoneyDto" }, "total": { "$ref": "#/components/schemas/MoneyDto" } }, "required": [ "currency", "coupon", "dividend", "total" ] }, "IncomeSummaryDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "period": { "$ref": "#/components/schemas/IncomePeriodDto" }, "totalsByCurrency": { "type": "array", "items": { "$ref": "#/components/schemas/IncomeCurrencySummaryDto" } }, "calculatedAt": { "type": "string", "format": "date-time" } }, "required": [ "accountId", "period", "totalsByCurrency", "calculatedAt" ] }, "IncomeSummaryResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/IncomeSummaryDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "IncomeComparisonCurrencyDto": { "type": "object", "properties": { "currency": { "type": "string" }, "selected": { "$ref": "#/components/schemas/IncomeCurrencySummaryDto" }, "compared": { "$ref": "#/components/schemas/IncomeCurrencySummaryDto" }, "difference": { "$ref": "#/components/schemas/IncomeCurrencySummaryDto" } }, "required": [ "currency", "selected", "compared", "difference" ] }, "IncomeComparisonDto": { "type": "object", "properties": { "period": { "$ref": "#/components/schemas/IncomePeriodDto" }, "totalsByCurrency": { "type": "array", "items": { "$ref": "#/components/schemas/IncomeComparisonCurrencyDto" } } }, "required": [ "period", "totalsByCurrency" ] }, "IncomeBucketDto": { "type": "object", "properties": { "period": { "$ref": "#/components/schemas/IncomePeriodDto" }, "totalsByCurrency": { "type": "array", "items": { "$ref": "#/components/schemas/IncomeCurrencySummaryDto" } } }, "required": [ "period", "totalsByCurrency" ] }, "IncomeInstrumentDto": { "type": "object", "properties": { "key": { "type": "string" }, "figi": { "type": "string", "nullable": true }, "instrumentUid": { "type": "string", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "instrumentType": { "type": "string", "nullable": true }, "displayName": { "type": "string" }, "coupon": { "$ref": "#/components/schemas/MoneyDto" }, "dividend": { "$ref": "#/components/schemas/MoneyDto" }, "total": { "$ref": "#/components/schemas/MoneyDto" }, "receiptCount": { "type": "number" } }, "required": [ "key", "figi", "instrumentUid", "ticker", "instrumentType", "displayName", "coupon", "dividend", "total", "receiptCount" ] }, "IncomeAnalyticsEntryDto": { "type": "object", "properties": { "account": { "$ref": "#/components/schemas/AccountReferenceDto" }, "id": { "type": "string" }, "occurredAt": { "type": "string", "format": "date-time" }, "type": { "type": "string" }, "category": { "type": "string", "enum": [ "trade", "income", "tax", "fee", "transfer", "other" ] }, "description": { "type": "string" }, "figi": { "type": "string", "nullable": true }, "instrumentUid": { "type": "string", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "instrumentType": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "payment": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "quantity": { "type": "string", "nullable": true }, "price": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "accruedInterest": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "commission": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "instrumentKey": { "type": "string" } }, "required": [ "id", "occurredAt", "type", "category", "description", "figi", "instrumentUid", "ticker", "instrumentType", "logoName", "payment", "quantity", "price", "accruedInterest", "commission", "instrumentKey" ] }, "IncomeAnalyticsDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "period": { "$ref": "#/components/schemas/IncomePeriodDto" }, "totalsByCurrency": { "type": "array", "items": { "$ref": "#/components/schemas/IncomeCurrencySummaryDto" } }, "calculatedAt": { "type": "string", "format": "date-time" }, "previous": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/IncomeComparisonDto" } ] }, "yearComparison": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/IncomeComparisonDto" } ] }, "bucketGranularity": { "type": "string", "enum": [ "day", "week", "month" ] }, "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/IncomeBucketDto" } }, "instruments": { "type": "array", "items": { "$ref": "#/components/schemas/IncomeInstrumentDto" } }, "entries": { "type": "array", "items": { "$ref": "#/components/schemas/IncomeAnalyticsEntryDto" } } }, "required": [ "accountId", "period", "totalsByCurrency", "calculatedAt", "previous", "yearComparison", "bucketGranularity", "buckets", "instruments", "entries" ] }, "IncomeDependencyDto": { "type": "object", "properties": { "dataRevision": { "type": "string" }, "stateVersion": { "type": "string" }, "unavailableReason": { "type": "string" }, "coverage": { "$ref": "#/components/schemas/InvestmentCoverageDto" }, "resourceKey": { "type": "string" }, "availability": { "type": "string", "enum": [ "missing", "partial", "complete" ] }, "freshness": { "type": "string", "enum": [ "unknown", "fresh", "stale" ] }, "lastSuccessfulAt": { "type": "string", "format": "date-time", "nullable": true }, "sync": { "$ref": "#/components/schemas/InvestmentSyncDto" }, "role": { "type": "string", "enum": [ "selected", "previous", "year" ] } }, "required": [ "dataRevision", "stateVersion", "resourceKey", "availability", "freshness", "lastSuccessfulAt", "sync", "role" ] }, "IncomeAnalyticsMetaDto": { "type": "object", "properties": { "dataRevision": { "type": "string" }, "stateVersion": { "type": "string" }, "unavailableReason": { "type": "string" }, "coverage": { "$ref": "#/components/schemas/InvestmentCoverageDto" }, "resourceKey": { "type": "string" }, "availability": { "type": "string", "enum": [ "missing", "partial", "complete" ] }, "freshness": { "type": "string", "enum": [ "unknown", "fresh", "stale" ] }, "lastSuccessfulAt": { "type": "string", "format": "date-time", "nullable": true }, "sync": { "$ref": "#/components/schemas/InvestmentSyncDto" }, "dependencies": { "description": "Dependencies identified by role, not array order or resourceKey. A missing role is unavailable.", "type": "array", "items": { "$ref": "#/components/schemas/IncomeDependencyDto" } } }, "required": [ "dataRevision", "stateVersion", "resourceKey", "availability", "freshness", "lastSuccessfulAt", "sync", "dependencies" ] }, "IncomeAnalyticsResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/IncomeAnalyticsDto" } ] }, "meta": { "$ref": "#/components/schemas/IncomeAnalyticsMetaDto" } }, "required": [ "data", "meta" ] }, "UpcomingEventDto": { "type": "object", "properties": { "account": { "$ref": "#/components/schemas/AccountReferenceDto" }, "type": { "type": "string", "enum": [ "coupon", "dividend", "maturity", "offer" ] }, "date": { "type": "string", "format": "date" }, "dateKind": { "type": "string", "enum": [ "event", "registry" ] }, "figi": { "type": "string", "nullable": true }, "instrumentUid": { "type": "string", "nullable": true }, "ticker": { "type": "string" }, "displayName": { "type": "string" }, "isin": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "projectedAmount": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] } }, "required": [ "type", "date", "dateKind", "figi", "instrumentUid", "ticker", "displayName", "isin", "logoName", "projectedAmount" ] }, "UpcomingEventsDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "calculatedAt": { "type": "string", "format": "date-time" }, "events": { "type": "array", "items": { "$ref": "#/components/schemas/UpcomingEventDto" } }, "incomeTotalsByCurrency": { "type": "array", "items": { "$ref": "#/components/schemas/MoneyDto" } } }, "required": [ "accountId", "calculatedAt", "events", "incomeTotalsByCurrency" ] }, "UpcomingEventsResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/UpcomingEventsDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "StockSearchResultDto": { "type": "object", "properties": { "instrumentUid": { "type": "string", "format": "uuid" }, "slug": { "type": "string", "description": "Unambiguous ticker URL segment, or the exact instrument UID." }, "name": { "type": "string" }, "isin": { "type": "string", "nullable": true }, "classCode": { "type": "string", "nullable": true }, "realExchange": { "type": "string", "nullable": true }, "apiTradeAvailable": { "type": "boolean", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "currency": { "type": "string", "nullable": true }, "shareType": { "type": "string", "nullable": true }, "sector": { "type": "string", "nullable": true }, "lot": { "type": "number", "nullable": true }, "historyFrom": { "type": "string", "nullable": true, "format": "date-time" }, "price": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "priceAt": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "instrumentUid", "slug", "name", "isin", "classCode", "realExchange", "apiTradeAvailable", "ticker", "logoName", "currency", "shareType", "sector", "lot", "historyFrom", "price", "priceAt" ] }, "StockSearchResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/StockSearchResultDto" } }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "StockDto": { "type": "object", "properties": { "instrumentUid": { "type": "string", "format": "uuid" }, "slug": { "type": "string", "description": "Unambiguous ticker URL segment, or the exact instrument UID." }, "name": { "type": "string" }, "isin": { "type": "string", "nullable": true }, "classCode": { "type": "string", "nullable": true }, "realExchange": { "type": "string", "nullable": true }, "apiTradeAvailable": { "type": "boolean", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "currency": { "type": "string", "nullable": true }, "shareType": { "type": "string", "nullable": true }, "sector": { "type": "string", "nullable": true }, "lot": { "type": "number", "nullable": true }, "historyFrom": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "instrumentUid", "slug", "name", "isin", "classCode", "realExchange", "apiTradeAvailable", "ticker", "logoName", "currency", "shareType", "sector", "lot", "historyFrom" ] }, "StockResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/StockDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "StockQuoteDto": { "type": "object", "properties": { "price": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "priceAt": { "type": "string", "nullable": true, "format": "date-time" }, "tradingStatus": { "type": "string", "nullable": true }, "change": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "changePercent": { "type": "string", "nullable": true }, "previousCloseDate": { "type": "string", "nullable": true, "format": "date" }, "previousClose": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "unavailable": { "type": "array", "items": { "type": "string" } }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "price", "priceAt", "tradingStatus", "change", "changePercent", "previousCloseDate", "previousClose", "unavailable", "observedAt" ] }, "StockQuoteResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/StockQuoteDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "StockCandleDto": { "type": "object", "properties": { "time": { "type": "string", "format": "date-time" }, "close": { "type": "string" }, "isComplete": { "type": "boolean" } }, "required": [ "time", "close", "isComplete" ] }, "StockCandlesDto": { "type": "object", "properties": { "candles": { "type": "array", "items": { "$ref": "#/components/schemas/StockCandleDto" } }, "currency": { "type": "string", "nullable": true }, "historyFrom": { "type": "string", "nullable": true, "format": "date-time" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "candles", "currency", "historyFrom", "observedAt" ] }, "StockCandlesResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/StockCandlesDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "StockPositionRowDto": { "type": "object", "properties": { "instrumentUid": { "type": "string", "nullable": true }, "account": { "$ref": "#/components/schemas/AccountReferenceDto" }, "figi": { "type": "string", "nullable": true }, "displayName": { "type": "string" }, "type": { "type": "string", "enum": [ "STOCK", "BOND", "FUND", "CURRENCY", "FUTURE", "OPTION", "STRUCTURED_NOTE", "DIGITAL_FINANCIAL_ASSET", "OTHER" ] }, "quantity": { "type": "string" }, "currentValue": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "averagePurchasePrice": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "absoluteReturn": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "isin": { "type": "string", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "returnPercent": { "type": "string", "nullable": true } }, "required": [ "figi", "displayName", "type", "quantity", "currentValue", "averagePurchasePrice", "absoluteReturn", "isin", "ticker", "logoName", "returnPercent" ] }, "StockPositionDto": { "type": "object", "properties": { "quantity": { "type": "string" }, "currentValue": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "averagePurchasePrice": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "absoluteReturn": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "returnPercent": { "type": "string", "nullable": true }, "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/StockPositionRowDto" } }, "isStale": { "type": "boolean" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "quantity", "currentValue", "averagePurchasePrice", "absoluteReturn", "returnPercent", "accounts", "isStale", "observedAt" ] }, "StockPositionResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/StockPositionDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "StockMetricDto": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "number" }, "unit": { "type": "string", "enum": [ "money", "ratio", "percent" ] }, "currency": { "type": "string", "nullable": true }, "period": { "type": "string", "nullable": true, "enum": [ "TTM", "MRQ" ] } }, "required": [ "key", "value", "unit", "currency", "period" ] }, "StockCompanyDto": { "type": "object", "properties": { "description": { "type": "string", "nullable": true }, "metrics": { "type": "array", "items": { "$ref": "#/components/schemas/StockMetricDto" } }, "unavailable": { "type": "array", "items": { "type": "string" } }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "description", "metrics", "unavailable", "observedAt" ] }, "StockCompanyResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/StockCompanyDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "StockDividendDto": { "type": "object", "properties": { "perShare": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "recordDate": { "type": "string", "nullable": true, "format": "date" }, "lastBuyDate": { "type": "string", "nullable": true, "format": "date" }, "paymentDate": { "type": "string", "nullable": true, "format": "date" }, "timing": { "type": "string", "enum": [ "upcoming", "past", "undated" ] }, "estimatedAmount": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] } }, "required": [ "perShare", "recordDate", "lastBuyDate", "paymentDate", "timing", "estimatedAmount" ] }, "StockDividendsDto": { "type": "object", "properties": { "dividends": { "type": "array", "items": { "$ref": "#/components/schemas/StockDividendDto" } }, "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "observedAt": { "type": "string", "format": "date-time" }, "positionAt": { "type": "string", "nullable": true, "format": "date-time" }, "estimateUnavailable": { "type": "boolean" }, "positionIsStale": { "type": "boolean" } }, "required": [ "dividends", "from", "to", "observedAt", "positionAt", "estimateUnavailable", "positionIsStale" ] }, "StockDividendsResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/StockDividendsDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BondCreditRatingDto": { "type": "object", "properties": { "agency": { "type": "string", "enum": [ "NCR" ] }, "value": { "type": "string", "nullable": true }, "status": { "type": "string", "enum": [ "active", "withdrawn" ] }, "date": { "type": "string", "format": "date" }, "sourceUrl": { "type": "string", "format": "uri" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "agency", "value", "status", "date", "sourceUrl", "observedAt" ] }, "BondYieldDto": { "type": "object", "properties": { "value": { "type": "string", "description": "MOEX effective annual yield in percent." }, "pricePercent": { "type": "string" }, "date": { "type": "string", "format": "date" }, "dateType": { "type": "string", "nullable": true, "description": "MOEX yield target, e.g. MATDATE or OFFERDATE." }, "tradeAt": { "type": "string", "format": "date-time" } }, "required": [ "value", "pricePercent", "date", "dateType", "tradeAt" ] }, "BondMetricsDto": { "type": "object", "properties": { "creditRating": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondCreditRatingDto" } ] }, "coupon": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "couponDate": { "type": "string", "nullable": true, "format": "date" }, "couponType": { "type": "string", "nullable": true }, "couponPeriodDays": { "type": "number", "nullable": true }, "couponYieldPercent": { "type": "string", "nullable": true, "description": "Next coupon × 365 / period days / indicative clean price × 100. Not yield to maturity." }, "couponYieldPriceAt": { "type": "string", "nullable": true, "format": "date-time" }, "effectiveYield": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondYieldDto" } ] }, "unavailable": { "type": "array", "items": { "type": "string" } }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "creditRating", "coupon", "couponDate", "couponType", "couponPeriodDays", "couponYieldPercent", "couponYieldPriceAt", "effectiveYield", "unavailable", "observedAt" ] }, "BondMetricsResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondMetricsDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BondSearchResultDto": { "type": "object", "properties": { "instrumentUid": { "type": "string", "format": "uuid" }, "slug": { "type": "string", "description": "Unambiguous ticker URL segment, or the exact instrument UID." }, "name": { "type": "string" }, "isin": { "type": "string", "nullable": true }, "classCode": { "type": "string", "nullable": true }, "realExchange": { "type": "string", "nullable": true }, "apiTradeAvailable": { "type": "boolean", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "currency": { "type": "string", "nullable": true }, "sector": { "type": "string", "nullable": true }, "lot": { "type": "number", "nullable": true }, "historyFrom": { "type": "string", "nullable": true, "format": "date-time" }, "nominal": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "initialNominal": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "aci": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "maturityDate": { "type": "string", "nullable": true }, "callDate": { "type": "string", "nullable": true }, "bondType": { "type": "string", "nullable": true }, "riskLevel": { "type": "string", "nullable": true }, "couponQuantityPerYear": { "type": "number", "nullable": true }, "floatingCoupon": { "type": "boolean", "nullable": true }, "perpetual": { "type": "boolean", "nullable": true }, "amortization": { "type": "boolean", "nullable": true }, "subordinated": { "type": "boolean", "nullable": true }, "pricePercent": { "type": "string", "nullable": true, "description": "Clean price in percent of nominal, not money." }, "priceAt": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "instrumentUid", "slug", "name", "isin", "classCode", "realExchange", "apiTradeAvailable", "ticker", "logoName", "currency", "sector", "lot", "historyFrom", "nominal", "initialNominal", "aci", "maturityDate", "callDate", "bondType", "riskLevel", "couponQuantityPerYear", "floatingCoupon", "perpetual", "amortization", "subordinated", "pricePercent", "priceAt" ] }, "BondSearchResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "array", "items": { "$ref": "#/components/schemas/BondSearchResultDto" } }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BondDto": { "type": "object", "properties": { "instrumentUid": { "type": "string", "format": "uuid" }, "slug": { "type": "string", "description": "Unambiguous ticker URL segment, or the exact instrument UID." }, "name": { "type": "string" }, "isin": { "type": "string", "nullable": true }, "classCode": { "type": "string", "nullable": true }, "realExchange": { "type": "string", "nullable": true }, "apiTradeAvailable": { "type": "boolean", "nullable": true }, "ticker": { "type": "string", "nullable": true }, "logoName": { "type": "string", "nullable": true }, "currency": { "type": "string", "nullable": true }, "sector": { "type": "string", "nullable": true }, "lot": { "type": "number", "nullable": true }, "historyFrom": { "type": "string", "nullable": true, "format": "date-time" }, "nominal": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "initialNominal": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "aci": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "maturityDate": { "type": "string", "nullable": true }, "callDate": { "type": "string", "nullable": true }, "bondType": { "type": "string", "nullable": true }, "riskLevel": { "type": "string", "nullable": true }, "couponQuantityPerYear": { "type": "number", "nullable": true }, "floatingCoupon": { "type": "boolean", "nullable": true }, "perpetual": { "type": "boolean", "nullable": true }, "amortization": { "type": "boolean", "nullable": true }, "subordinated": { "type": "boolean", "nullable": true } }, "required": [ "instrumentUid", "slug", "name", "isin", "classCode", "realExchange", "apiTradeAvailable", "ticker", "logoName", "currency", "sector", "lot", "historyFrom", "nominal", "initialNominal", "aci", "maturityDate", "callDate", "bondType", "riskLevel", "couponQuantityPerYear", "floatingCoupon", "perpetual", "amortization", "subordinated" ] }, "BondResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BondQuoteDto": { "type": "object", "properties": { "pricePercent": { "type": "string", "nullable": true }, "cleanPrice": { "nullable": true, "description": "Indicative clean value at the current nominal; no FX conversion.", "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "aci": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "dirtyPrice": { "nullable": true, "description": "Indicative clean value plus current accrued interest, excluding fees.", "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "changePercentagePoints": { "type": "string", "nullable": true }, "previousCloseDate": { "type": "string", "nullable": true }, "tradingStatus": { "type": "string", "nullable": true }, "priceAt": { "type": "string", "nullable": true, "format": "date-time" }, "unavailable": { "type": "array", "items": { "type": "string" } }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "pricePercent", "cleanPrice", "aci", "dirtyPrice", "changePercentagePoints", "previousCloseDate", "tradingStatus", "priceAt", "unavailable", "observedAt" ] }, "BondQuoteResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondQuoteDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BondCandlesDto": { "type": "object", "properties": { "candles": { "type": "array", "items": { "$ref": "#/components/schemas/StockCandleDto" } }, "currency": { "type": "string", "nullable": true }, "historyFrom": { "type": "string", "nullable": true, "format": "date-time" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "candles", "currency", "historyFrom", "observedAt" ] }, "BondCandlesResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondCandlesDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BondPositionDto": { "type": "object", "properties": { "quantity": { "type": "string" }, "currentValue": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "averagePurchasePrice": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "absoluteReturn": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "returnPercent": { "type": "string", "nullable": true }, "accounts": { "type": "array", "items": { "$ref": "#/components/schemas/StockPositionRowDto" } }, "isStale": { "type": "boolean" }, "observedAt": { "type": "string", "format": "date-time" } }, "required": [ "quantity", "currentValue", "averagePurchasePrice", "absoluteReturn", "returnPercent", "accounts", "isStale", "observedAt" ] }, "BondPositionResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondPositionDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "BondCouponDto": { "type": "object", "properties": { "number": { "type": "string", "nullable": true }, "paymentDate": { "type": "string", "nullable": true }, "recordDate": { "type": "string", "nullable": true }, "couponType": { "type": "string", "nullable": true }, "periodDays": { "type": "number", "nullable": true }, "perBond": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "estimatedAmount": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/MoneyDto" } ] }, "timing": { "type": "string", "enum": [ "upcoming", "past", "undated" ] } }, "required": [ "number", "paymentDate", "recordDate", "couponType", "periodDays", "perBond", "estimatedAmount", "timing" ] }, "BondCouponsDto": { "type": "object", "properties": { "coupons": { "type": "array", "items": { "$ref": "#/components/schemas/BondCouponDto" } }, "from": { "type": "string" }, "to": { "type": "string" }, "observedAt": { "type": "string" }, "positionAt": { "type": "string", "nullable": true }, "estimateUnavailable": { "type": "boolean" }, "positionIsStale": { "type": "boolean" } }, "required": [ "coupons", "from", "to", "observedAt", "positionAt", "estimateUnavailable", "positionIsStale" ] }, "BondCouponsResourceDto": { "type": "object", "properties": { "data": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/BondCouponsDto" } ] }, "meta": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } }, "required": [ "data", "meta" ] }, "TbankConnectionStatusDto": { "type": "object", "properties": { "connected": { "type": "boolean" }, "connectedAt": { "type": "string", "nullable": true, "format": "date-time" } }, "required": [ "connected", "connectedAt" ] }, "PutTbankConnectionDto": { "type": "object", "properties": { "token": { "type": "string", "writeOnly": true } }, "required": [ "token" ] }, "IncomeInvestmentScreenDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "screen": { "type": "string", "enum": [ "income" ] }, "from": { "type": "string", "format": "date", "description": "Inclusive start calendar date in Europe/Moscow (YYYY-MM-DD). Supply both from and to, or neither for the current Moscow month." }, "to": { "type": "string", "format": "date", "description": "Inclusive end calendar date in Europe/Moscow (YYYY-MM-DD). Supply both from and to, or neither. Timestamp queries use the start of the following Moscow day as the exclusive end, capped at now." } }, "required": [ "accountId", "screen" ] }, "EventsInvestmentScreenDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "screen": { "type": "string", "enum": [ "events" ] }, "from": { "type": "string", "format": "date", "description": "Inclusive UTC calendar start date (YYYY-MM-DD). May be supplied independently; defaults to today in UTC." }, "to": { "type": "string", "format": "date", "description": "Inclusive UTC calendar end date (YYYY-MM-DD). May be supplied independently; defaults to 30 days after from. Timestamp queries use the start of the following UTC day as the exclusive end." } }, "required": [ "accountId", "screen" ] }, "SyncCandleRangeDto": { "type": "object", "properties": { "from": { "type": "string", "format": "date-time" }, "to": { "type": "string", "format": "date-time" } }, "required": [ "from", "to" ] }, "TimestampInvestmentScreenDto": { "type": "object", "properties": { "accountId": { "type": "string" }, "instrumentUid": { "type": "string", "format": "uuid" }, "query": { "type": "string" }, "candlePeriod": { "type": "string", "enum": [ "month", "halfYear", "year", "all" ] }, "candleRange": { "$ref": "#/components/schemas/SyncCandleRangeDto" }, "categories": { "type": "array", "items": { "type": "string", "enum": [ "trade", "income", "tax", "fee", "transfer", "other" ] } }, "limit": { "type": "number", "minimum": 1, "maximum": 1000 }, "screen": { "type": "string", "enum": [ "accounts", "account", "operations", "stocks", "bonds", "stock", "bond" ] }, "from": { "type": "string", "format": "date-time", "description": "Start instant for operations." }, "to": { "type": "string", "format": "date-time", "description": "End instant for operations." } }, "required": [ "screen" ] }, "TbankSyncAcceptedDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "scope": { "oneOf": [ { "$ref": "#/components/schemas/IncomeInvestmentScreenDto" }, { "$ref": "#/components/schemas/EventsInvestmentScreenDto" }, { "$ref": "#/components/schemas/TimestampInvestmentScreenDto" } ], "discriminator": { "propertyName": "screen", "mapping": { "income": "#/components/schemas/IncomeInvestmentScreenDto", "events": "#/components/schemas/EventsInvestmentScreenDto", "accounts": "#/components/schemas/TimestampInvestmentScreenDto", "account": "#/components/schemas/TimestampInvestmentScreenDto", "operations": "#/components/schemas/TimestampInvestmentScreenDto", "stocks": "#/components/schemas/TimestampInvestmentScreenDto", "bonds": "#/components/schemas/TimestampInvestmentScreenDto", "stock": "#/components/schemas/TimestampInvestmentScreenDto", "bond": "#/components/schemas/TimestampInvestmentScreenDto" } } }, "now": { "type": "string", "format": "date-time" } }, "required": [ "id", "scope", "now" ] }, "TbankSyncProgressDto": { "type": "object", "properties": { "completed": { "type": "number" }, "total": { "type": "number" }, "discovering": { "type": "boolean" } }, "required": [ "completed", "total", "discovering" ] }, "TbankSyncStatusDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "scope": { "oneOf": [ { "$ref": "#/components/schemas/IncomeInvestmentScreenDto" }, { "$ref": "#/components/schemas/EventsInvestmentScreenDto" }, { "$ref": "#/components/schemas/TimestampInvestmentScreenDto" } ], "discriminator": { "propertyName": "screen", "mapping": { "income": "#/components/schemas/IncomeInvestmentScreenDto", "events": "#/components/schemas/EventsInvestmentScreenDto", "accounts": "#/components/schemas/TimestampInvestmentScreenDto", "account": "#/components/schemas/TimestampInvestmentScreenDto", "operations": "#/components/schemas/TimestampInvestmentScreenDto", "stocks": "#/components/schemas/TimestampInvestmentScreenDto", "bonds": "#/components/schemas/TimestampInvestmentScreenDto", "stock": "#/components/schemas/TimestampInvestmentScreenDto", "bond": "#/components/schemas/TimestampInvestmentScreenDto" } }, "nullable": true }, "now": { "type": "string", "format": "date-time" }, "state": { "type": "string", "enum": [ "running", "succeeded", "failed", "cancelled" ] }, "errorCode": { "type": "string", "nullable": true }, "progress": { "$ref": "#/components/schemas/TbankSyncProgressDto" }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/InvestmentResourceMetaDto" } } }, "required": [ "id", "scope", "now", "state", "errorCode", "progress", "resources" ] } } } }