{"id":329123,"date":"2022-02-05T15:00:47","date_gmt":"2022-02-05T15:00:47","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=329123"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=329123","title":{"rendered":"<span>TINKOFF-INVEST. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u043e\u0431\u043e\u0442\u0430 \u043d\u0430 JAVA. \u0427\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<blockquote>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u0433 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d \u043f\u0435\u0440\u0432\u044b\u0439; \u0432\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u0433 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0434\u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e (\u0424\u044d\u043d \u0426\u0437\u0438\u0446\u0430\u0439, \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 \u00ab\u041f\u043e\u043b\u0435\u0442 \u0434\u0443\u0448\u0438\u00bb)<\/p>\n<\/blockquote>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u043b\u0435\u0442\u0438\u0442 \u0432\u0440\u0435\u043c\u044f&#8230; \u041f\u0440\u043e\u0448\u043b\u043e \u043f\u043e\u0447\u0442\u0438 2 \u043c\u0435\u0441\u044f\u0446\u0430 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 TINKOFF INVEST API \u2013 <a href=\"https:\/\/habr.com\/ru\/post\/592093\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u043e\u0431\u043e\u0442\u0430 \u043d\u0430 JAVA. \u0427\u0430\u0441\u0442\u044c\u00a01<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0441\u0432\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u043c \u0422\u0418\u041d\u042c\u041a\u041e\u0424\u0424.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u0440\u0436\u0435\u0432\u044b\u0445 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043d\u0435\u043c\u0438\u043d\u0443\u0435\u043c\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c API \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0438\u0445 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0432 \u043a\u043e\u0434 \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0442\u0430\u0442\u044c \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443 &#171;<a href=\"#%D0%B4%D0%B5%D0%BC%D0%BE%D0%BD%D1%81%D1%82%D1%80%D0%BE%D1%86%D0%B8%D1%8F\" rel=\"noopener noreferrer nofollow\">\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>&#171;.<\/p>\n<p>\u0412\u0441\u0435\u043c \u043d\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043d\u043e \u0443\u0432\u044b, \u0436\u0438\u0437\u043d\u044c \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0438 \u043a\u0430\u043a \u0431\u044b \u043c\u043d\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0441\u043a\u043e\u0447\u0438\u0442\u044c \u043a \u0444\u0438\u043d\u0430\u043b\u0443 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0442\u043e\u0440\u0433\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0437\u0430\u0442\u0440\u0430\u0442\u0438\u0432 \u043d\u0430 \u0435\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0441\u0438\u043b, \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0432 \u0445\u043e\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h2>\n<blockquote>\n<p>\u0421\u0442\u044e\u0430\u0440\u0434\u0435\u0441\u0441\u0430 \u0432 \u0441\u0430\u043b\u043e\u043d\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043b\u0430\u0439\u043d\u0435\u0440\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0435:<\/p>\n<p>&#8212; \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0430\u043b\u0443\u0431\u0435 &#8212; \u0431\u0430\u0433\u0430\u0436, \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u0431\u0430\u0440, \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 &#8212; \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0433\u043e\u043b\u044c\u0444\u0430, \u043d\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0431\u0430\u0441\u0441\u0435\u0439\u043d.<\/p>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442:<\/p>\n<p>&#8212; \u0410 \u0442\u0435\u043f\u0435\u0440\u044c, \u0433\u043e\u0441\u043f\u043e\u0434\u0430, \u043f\u0440\u0438\u0441\u0442\u0435\u0433\u043d\u0438\u0442\u0435\u0441\u044c. \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u043e \u0432\u0441\u0435\u0439 \u044d\u0442\u043e\u0439 \u0444\u0438\u0433\u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c.<\/p>\n<\/blockquote>\n<p>\u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>SPRING FRAMEWORK \u2013 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>SPRING DATA \u2013 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0411\u0414;<\/p>\n<\/li>\n<li>\n<p>FLYWAY \u2013 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u0411\u0414;<\/p>\n<\/li>\n<li>\n<p>H2 \u2013 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0430\u044f \u0421\u0423\u0411\u0414, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u043d\u0430\u044f \u043d\u0430 JAVA;<\/p>\n<\/li>\n<li>\n<p>MODELMAPPER \u2013 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>SPRING SHELL \u2013 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f CLI-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (\u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430).<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 maven (pom.xml) \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<details class=\"spoiler\">\n<summary>pom.xml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?> &lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"          xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">     &lt;modelVersion>4.0.0&lt;\/modelVersion>     &lt;parent>         &lt;groupId>org.springframework.boot&lt;\/groupId>         &lt;artifactId>spring-boot-starter-parent&lt;\/artifactId>         &lt;version>2.5.7&lt;\/version>         &lt;relativePath\/>      &lt;\/parent>      &lt;groupId>ru.dsci&lt;\/groupId>     &lt;artifactId>stockdock&lt;\/artifactId>     &lt;version>0.0.1-SNAPSHOT&lt;\/version>     &lt;name>stockdock&lt;\/name>     &lt;description>stockdock&lt;\/description>     &lt;properties>         &lt;java.version>11&lt;\/java.version>     &lt;\/properties>      &lt;dependencies>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-data-jpa&lt;\/artifactId>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter&lt;\/artifactId>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-web&lt;\/artifactId>             &lt;exclusions>                 &lt;exclusion>                     &lt;groupId>org.springframework.boot&lt;\/groupId>                     &lt;artifactId>spring-boot-starter-logging&lt;\/artifactId>                 &lt;\/exclusion>             &lt;\/exclusions>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.projectlombok&lt;\/groupId>             &lt;artifactId>lombok&lt;\/artifactId>             &lt;optional>true&lt;\/optional>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-test&lt;\/artifactId>             &lt;scope>test&lt;\/scope>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>ru.tinkoff.invest&lt;\/groupId>             &lt;artifactId>openapi-java-sdk-core&lt;\/artifactId>             &lt;version>0.5.1&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>ru.tinkoff.invest&lt;\/groupId>             &lt;artifactId>openapi-java-sdk-java8&lt;\/artifactId>             &lt;version>0.5.1&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>com.squareup.okhttp3&lt;\/groupId>             &lt;artifactId>okhttp&lt;\/artifactId>             &lt;version>4.10.0-RC1&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>com.h2database&lt;\/groupId>             &lt;artifactId>h2&lt;\/artifactId>             &lt;version>1.4.200&lt;\/version>             &lt;scope>runtime&lt;\/scope>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.flywaydb&lt;\/groupId>             &lt;artifactId>flyway-core&lt;\/artifactId>             &lt;version>8.2.3&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.shell&lt;\/groupId>             &lt;artifactId>spring-shell-starter&lt;\/artifactId>             &lt;version>2.0.0.RELEASE&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.modelmapper&lt;\/groupId>             &lt;artifactId>modelmapper&lt;\/artifactId>             &lt;version>3.0.0&lt;\/version>         &lt;\/dependency>     &lt;\/dependencies>      &lt;build>         &lt;plugins>             &lt;plugin>                 &lt;groupId>org.springframework.boot&lt;\/groupId>                 &lt;artifactId>spring-boot-maven-plugin&lt;\/artifactId>                 &lt;configuration>                     &lt;excludes>                         &lt;exclude>                             &lt;groupId>org.projectlombok&lt;\/groupId>                             &lt;artifactId>lombok&lt;\/artifactId>                         &lt;\/exclude>                     &lt;\/excludes>                 &lt;\/configuration>             &lt;\/plugin>         &lt;\/plugins>     &lt;\/build>  &lt;\/project> <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0435\u0433\u043e \u0432\u0435\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e SPRING. \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0421\u0423\u0411\u0414 \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u043b \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0443\u044e H2, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 IN-MEMORY-\u0440\u0435\u0436\u0438\u043c\u0435, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 DDL (Data Definition Language), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0438\u0433\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0411\u0414 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u043c\u0438 FLYWAY. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0421\u0423\u0411\u0414 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. SPRING SHELL \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<p>\u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445. \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 application-dev.yml. \u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 &lt;host>:8800 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e localhost:8800), \u043b\u043e\u0433\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u043f\u0443\u0442\u0438 logs\/dev\/stockdock.log, \u0440\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0421\u0423\u0411\u0414  \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (jdbc:h2:<strong>mem<\/strong>:mydatabase), \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u043f\u0443\u0442\u0438 &lt;host>\/h2 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e localhost:8800\/h2). <\/p>\n<details class=\"spoiler\">\n<summary>application-dev.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">server:   port: 8800  spring:   output:     ansi:       enabled: detect   datasource:     driver-class-name: org.h2.Driver     url: jdbc:h2:mem:mydatabase;MODE=PostgreSQL;DB_CLOSE_DELAY=-1     username: sa     password:   jpa:     show-sql: false     properties:       hibernate:         dialect: org.hibernate.dialect.H2Dialect         ddl-auto: none   h2:     console:       enabled: true       settings:         web-allow-others: false       path: \/h2  logging:   level.ru.dsci.stockdock.* : debug   pattern:     console: \"%d{yyyy-MM-dd HH:mm:ss} [%thread]: %msg%n\"     file: \"%d{yyyy-MM-dd HH:mm:ss.sss} [%thread] %-5level %logger{36}: %msg%n\"   file:     name: logs\/dev\/stockdock.log     path: logs\/dev<\/code><\/pre>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0%20%D0%B1%D0%B4\" id=\"\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0434\"><\/a><\/p>\n<h2>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414<\/h2>\n<blockquote>\n<p>\u0415\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0438\u0441\u0442\u043e\u0449\u0438\u043c\u043e\u0435 \u0441\u043e\u043a\u0440\u043e\u0432\u0438\u0449\u0435 \u2014 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 (\u041f\u044c\u0435\u0440 \u0411\u0443\u0430\u0441\u0442 \u2013 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439 \u043b\u0435\u043a\u0441\u0438\u043a\u043e\u0433\u0440\u0430\u0444)<\/p>\n<\/blockquote>\n<p>\u0422\u043e\u0440\u0433\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0435, \u0433\u0434\u0435 \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u2013 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0433\u0434\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u2013 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043e\u0434\u043d\u0430 \u043d\u0435\u0440\u0435\u0448\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2013 \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c? \u0418 \u0442\u0443\u0442 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0441\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <\/p>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<ul>\n<li>\n<p>instrument_type \u2013 \u0442\u0438\u043f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 (\u0430\u043a\u0446\u0438\u0438, \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438, \u0444\u043e\u043d\u0434\u044b, \u0432\u0430\u043b\u044e\u0442\u044b);<\/p>\n<\/li>\n<li>\n<p>instrument \u2013 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 (\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430);<\/p>\n<\/li>\n<li>\n<p>timeframe \u2013 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c (\u043c\u0438\u043d\u0443\u0442\u0430, \u0447\u0430\u0441, \u0434\u0435\u043d\u044c, \u0438 \u0442.\u0434.);<\/p>\n<\/li>\n<li>\n<p>candlestick \u2013 \u0441\u0432\u0435\u0447\u0430 (\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0430\u0445).<\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0411\u0414 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 (V1__init_tables.sql), \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DDL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0421\u0423\u0411\u0414 \u043f\u043e\u043b\u0443\u0447\u0438\u043c, \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u0430\u0437\u0443. \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 (V2__init_data.sql). \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u044b.<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>V1__init_tables.sql<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">-- INSTRUMENT_TYPE ---------------------------------------- drop table if exists insrtrument_type; create table instrument_type (     id        serial primary key,     code      varchar(256) not null,     name      varchar(255) ); create unique index instrument_type_code_uindex     on instrument_type(code); -----------------------------------------------------------  -- INSTRUMENT --------------------------------------------- drop table if exists instrument cascade; create table instrument (     id                 serial primary key,     figi               varchar(255) not null,     isin               varchar(255),     ticker             varchar(255) not null,     currency           varchar(255) not null,     increment          numeric(19, 4),     name               varchar(255),     CHECK (increment >= 0),     lot                integer      not null,     instrument_type_id varchar(255) not null,     foreign key (instrument_type_id) references instrument_type (id) ); create unique index instrument_figi_uindex     on instrument (figi); create index instrument_ticker_index     on instrument (ticker); create index instrument_isin_index     on instrument(isin); create index instrument_currency_index     on instrument (currency); create index instrument_type_id_index     on instrument (instrument_type_id); -----------------------------------------------------------  -- TIMEFRAME ---------------------------------------------- drop table if exists timeframe cascade; create table timeframe (     id   serial primary key,     code varchar(64) not null,     name varchar(256) ); create unique index timeframe_code_uindex     on timeframe(code); -----------------------------------------------------------  -- CANDLESTICK -------------------------------------------- drop table if exists candlestick; create table candlestick (     id            serial primary key,     maximum_value numeric(20, 10),     CHECK (maximum_value >= minimum_value),     minimum_value numeric(20, 10),     opened_value  numeric(20, 10),     closed_value  numeric(20, 10),     volume        integer CHECK (volume >= 0),     since         timestamp not null,     timeframe_id  integer,     instrument_id integer,     foreign key (timeframe_id) references timeframe (id),     foreign key (instrument_id) references instrument (id) ); create unique index candlestick_ticker_timeframe_since     on candlestick (instrument_id, timeframe_id, since); ----------------------------------------------------------- <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>V2__init_data.sql<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">INSERT INTO INSTRUMENT_TYPE (id, code, name) VALUES (1, 'currency', '\u0432\u0430\u043b\u044e\u0442\u0430'),        (2, 'stock', '\u0430\u043a\u0446\u0438\u044f'),        (3, 'bond', '\u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u044f'),        (4, 'etf', '\u0431\u0438\u0440\u0436\u0435\u0432\u043e\u0439 \u0444\u043e\u043d\u0434');  INSERT INTO TIMEFRAME (id, code, name) VALUES (1,  'MIN1', '1 \u043c\u0438\u043d\u0443\u0442\u0430'),        (2,  'MIN2', '2 \u043c\u0438\u043d\u0443\u0442\u044b'),        (3,  'MIN5', '5 \u043c\u0438\u043d\u0443\u0442'),        (4,  'MIN10', '10 \u043c\u0438\u043d\u0443\u0442'),        (5,  'MIN15', '15 \u043c\u0438\u043d\u0443\u0442'),        (6,  'MIN30', '30 \u043c\u0438\u043d\u0443\u0442'),        (7,  'HOUR1', '1 \u0447\u0430\u0441'),        (8,  'DAY1', '\u0434\u0435\u043d\u044c'),        (9,  'WEEK1', '\u043d\u0435\u0434\u0435\u043b\u044f'),        (10, 'MON1', '\u043c\u0435\u0441\u044f\u0446'); <\/code><\/pre>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"%D1%81%D1%83%D1%89%D0%BD%D0%BE%D1%81%D1%82%D0%B8\" id=\"\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438\"><\/a><\/p>\n<h2>\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0438<\/h2>\n<blockquote>\n<p>\u042f \u043f\u043e\u0441\u0442\u0440\u043e\u044e \u0441\u0432\u043e\u0439 \u043b\u0443\u043d\u0430-\u043f\u0430\u0440\u043a, \u0441 \u0431\u043b\u0435\u043a\u0434\u0436\u0435\u043a\u043e\u043c \u0438 \u0448\u043b\u044e\u0445\u0430\u043c\u0438! (\u0440\u043e\u0431\u043e\u0442 \u0411\u0435\u043d\u0434\u0435\u0440, \u043c\u0443\u043b\u044c\u0442\u0444\u0438\u043b\u044c\u043c \u00ab\u0424\u0443\u0442\u0443\u0440\u0430\u043c\u0430\u00bb)<\/p>\n<\/blockquote>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 SPRING \u0434\u043b\u044f \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ORM (Object Relation Model), \u0434\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0411\u0414 \u0438 \u0438\u0445 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0432\u044f\u0437\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043e\u043d\u0438 \u0436\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043e\u043d\u0438 \u0436\u0435 entity).<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0411\u0414 insrtrument_type, instrument, timeframe, candlestick \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043a\u043b\u0430\u0441\u0441\u044b InstrumentType, Instrument, Timeframe \u0438 Candlestick, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u042d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u0430\u043a \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414, \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Tinkoff Invest API, \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a \u043f\u043e \u0440\u044f\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d, \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u2013 \u044d\u0442\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0442\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<details class=\"spoiler\">\n<summary>InstrumentType.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.models.entities;  import lombok.AccessLevel; import lombok.Data; import lombok.Setter;  import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id;  @Entity @Data public class InstrumentType {      @Id     @GeneratedValue(strategy = GenerationType.IDENTITY)     @Setter(value = AccessLevel.PRIVATE)     private Long id;      private String code;      private String name;      @Override     public String toString() {         return this.code;     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Instrument.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.models.entities;  import lombok.AccessLevel; import lombok.Data; import lombok.Setter;  import javax.persistence.*; import java.math.BigDecimal;  @Entity @Data public class Instrument {      @Id     @GeneratedValue(strategy = GenerationType.IDENTITY)     @Setter(value = AccessLevel.PRIVATE)     private Long id;      private String figi;      private String isin;      private String ticker;      private String currency;      private String name;      private BigDecimal increment;      private int lot;      @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.MERGE)     @JoinColumn(name = \"instrument_type_id\")     private InstrumentType instrumentType;      @Override     public String toString() {         return String.format(\"%s [%s] (%s)\", this.ticker, this.figi, this.instrumentType.getCode());     }  } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Timeframe.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.models.entities;  import lombok.AccessLevel; import lombok.Data; import lombok.Setter;  import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id;  @Entity @Data public class Timeframe {      @Id     @GeneratedValue(strategy = GenerationType.IDENTITY)     @Setter(value = AccessLevel.PRIVATE)     private Long id;      private String code;      private String name;      @Override     public String toString() {         return this.code;     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Candlestick.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.models.entities;  import lombok.AccessLevel; import lombok.Data; import lombok.Setter; import ru.dsci.stockdock.core.tools.DateTimeTools;  import javax.persistence.*; import java.math.BigDecimal; import java.time.ZonedDateTime;  @Entity @Data public class Candlestick {      @Id     @GeneratedValue(strategy = GenerationType.IDENTITY)     @Setter(value = AccessLevel.PRIVATE)     private Long id;      @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.MERGE)     @JoinColumn(name = \"timeframe_id\")     private Timeframe timeframe;      @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.MERGE)     @JoinColumn(name = \"instrument_id\")     private Instrument instrument;      private BigDecimal maximumValue;      private BigDecimal minimumValue;      private BigDecimal openedValue;      private BigDecimal closedValue;      private int volume;      private ZonedDateTime since;      @Override     public String toString() {         return String.format(\"%s [%s] %s: %.4f\",                 this.instrument.getTicker(),                 this.timeframe.getCode(),                 DateTimeTools.getTimeFormatted(this.since),                 this.closedValue);     }  }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u2013 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u0422\u0418\u041d\u042c\u041a\u041e\u0424\u0424, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043a \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.<\/p>\n<p><a class=\"anchor\" name=\"%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BA%D0%B0\" id=\"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430\"><\/a><\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<blockquote>\n<p>\u0412\u0437\u044f\u0442\u044c \u0432\u0441\u0451, \u0434\u0430\u00a0\u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c! (\u0428\u0430\u0440\u0438\u043a\u043e\u0432, \u043f\u043e\u0432\u0435\u0441\u0442\u044c \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u0410\u0444\u0430\u043d\u0430\u0441\u044c\u0435\u0432\u0438\u0447\u0430 \u0411\u0443\u043b\u0433\u0430\u043a\u043e\u0432\u0430 \u00ab\u0421\u043e\u0431\u0430\u0447\u044c\u0435 \u0421\u0435\u0440\u0434\u0446\u0435\u00bb)<\/p>\n<\/blockquote>\n<p>\u041a\u0430\u043a \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c TINKOFF NVEST API \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/592093\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e, \u0440\u0430\u0437\u0432\u0435, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a API (ApiConnector) \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 (ContextProvider) \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u044b \u0432 TcsApiConnector \u0438 TcsContextProvider, \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043b\u0430\u0441\u0441 TcsContextProvider \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043c\u0435\u0442\u043e\u0434 getCandles, \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u2013 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>TcsApiConnector.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.tcs;  import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import ru.dsci.stockdock.core.Parameters; import ru.tinkoff.invest.openapi.OpenApi; import ru.tinkoff.invest.openapi.model.rest.SandboxRegisterRequest; import ru.tinkoff.invest.openapi.okhttp.OkHttpOpenApi;  @Slf4j @Component public class TcsApiConnector implements AutoCloseable {      private final Parameters parameters;     private OpenApi openApi;      public TcsApiConnector(Parameters parameters) {         this.parameters = parameters;     }      public OpenApi getOpenApi() throws Exception {         if (openApi == null) {             close();             openApi = new OkHttpOpenApi(parameters.getToken(), parameters.isSandBoxMode());             if (openApi.isSandboxMode()) {                 openApi.getSandboxContext().performRegistration(new SandboxRegisterRequest()).join();             }         }         return openApi;     }      @Override     public void close() throws Exception {         if (openApi != null) {             openApi.close();         }     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>TcsContextProvider.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.tcs;  import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.modelmapper.ModelMapper; import org.springframework.stereotype.Component; import ru.dsci.stockdock.models.entities.Instrument; import ru.dsci.stockdock.models.entities.Timeframe; import ru.tinkoff.invest.openapi.OpenApi; import ru.tinkoff.invest.openapi.model.rest.CandleResolution; import ru.tinkoff.invest.openapi.model.rest.Candles; import ru.tinkoff.invest.openapi.model.rest.MarketInstrumentList;  import java.time.ZonedDateTime; import java.util.Optional;  @Slf4j @Component @AllArgsConstructor public class TcsContextProvider {      private final TcsApiConnector tcsApiConnector;     private final ModelMapper modelMapper;      public MarketInstrumentList getStocks() throws Exception {         return getOpenApi().getMarketContext().getMarketStocks().join();     }      public MarketInstrumentList getBonds() throws Exception {         return getOpenApi().getMarketContext().getMarketBonds().join();     }      public MarketInstrumentList getEtfs() throws Exception {         return getOpenApi().getMarketContext().getMarketEtfs().join();     }      public MarketInstrumentList getCurrencies() throws Exception {         return getOpenApi().getMarketContext().getMarketCurrencies().join();     }      public Optional&lt;Candles> getCandles(             Instrument instrument, Timeframe timeframe, ZonedDateTime begPeriod, ZonedDateTime endPeriod)             throws Exception {         return getOpenApi().getMarketContext().getMarketCandles(                 instrument.getFigi(),                 begPeriod.toOffsetDateTime(),                 endPeriod.toOffsetDateTime(),                 modelMapper.map(timeframe, CandleResolution.class)).join();     }      private OpenApi getOpenApi() throws Exception {         return tcsApiConnector.getOpenApi();     }  } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0442\u043e\u0438\u0442 \u0437\u0430\u043e\u0441\u0442\u0440\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u0435 TINKOFF INVEST API getMarketCandles, \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 Candles, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430 getCandles \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 Candle, \u043e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u043d\u0430\u043c \u0441\u0432\u0435\u0447\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>Candle.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.tinkoff.invest.openapi.model.rest;  import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.Objects;  public class Candle {     @JsonProperty(\"figi\")     private String figi = null;     @JsonProperty(\"interval\")     private CandleResolution interval = null;     @JsonProperty(\"o\")     private BigDecimal o = null;     @JsonProperty(\"c\")     private BigDecimal c = null;     @JsonProperty(\"h\")     private BigDecimal h = null;     @JsonProperty(\"l\")     private BigDecimal l = null;     @JsonProperty(\"v\")     private Integer v = null;     @JsonProperty(\"time\")     private OffsetDateTime time = null;      public Candle() {     }      public Candle figi(String figi) {         this.figi = figi;         return this;     }      @Schema(         required = true,         description = \"\"     )     public String getFigi() {         return this.figi;     }      public void setFigi(String figi) {         this.figi = figi;     }      public Candle interval(CandleResolution interval) {         this.interval = interval;         return this;     }      @Schema(         required = true,         description = \"\"     )     public CandleResolution getInterval() {         return this.interval;     }      public void setInterval(CandleResolution interval) {         this.interval = interval;     }      public Candle o(BigDecimal o) {         this.o = o;         return this;     }      @Schema(         required = true,         description = \"\"     )     public BigDecimal getO() {         return this.o;     }      public void setO(BigDecimal o) {         this.o = o;     }      public Candle c(BigDecimal c) {         this.c = c;         return this;     }      @Schema(         required = true,         description = \"\"     )     public BigDecimal getC() {         return this.c;     }      public void setC(BigDecimal c) {         this.c = c;     }      public Candle h(BigDecimal h) {         this.h = h;         return this;     }      @Schema(         required = true,         description = \"\"     )     public BigDecimal getH() {         return this.h;     }      public void setH(BigDecimal h) {         this.h = h;     }      public Candle l(BigDecimal l) {         this.l = l;         return this;     }      @Schema(         required = true,         description = \"\"     )     public BigDecimal getL() {         return this.l;     }      public void setL(BigDecimal l) {         this.l = l;     }      public Candle v(Integer v) {         this.v = v;         return this;     }      @Schema(         required = true,         description = \"\"     )     public Integer getV() {         return this.v;     }      public void setV(Integer v) {         this.v = v;     }      public Candle time(OffsetDateTime time) {         this.time = time;         return this;     }      @Schema(         required = true,         description = \"ISO8601\"     )     public OffsetDateTime getTime() {         return this.time;     }      public void setTime(OffsetDateTime time) {         this.time = time;     }      public boolean equals(Object o) {         if (this == o) {             return true;         } else if (o != null &amp;&amp; this.getClass() == o.getClass()) {             Candle candle = (Candle)o;             return Objects.equals(this.figi, candle.figi) &amp;&amp; Objects.equals(this.interval, candle.interval) &amp;&amp; Objects.equals(this.o, candle.o) &amp;&amp; Objects.equals(this.c, candle.c) &amp;&amp; Objects.equals(this.h, candle.h) &amp;&amp; Objects.equals(this.l, candle.l) &amp;&amp; Objects.equals(this.v, candle.v) &amp;&amp; Objects.equals(this.time, candle.time);         } else {             return false;         }     }      public int hashCode() {         return Objects.hash(new Object[]{this.figi, this.interval, this.o, this.c, this.h, this.l, this.v, this.time});     }      public String toString() {         StringBuilder sb = new StringBuilder();         sb.append(\"class Candle {\\n\");         sb.append(\"    figi: \").append(this.toIndentedString(this.figi)).append(\"\\n\");         sb.append(\"    interval: \").append(this.toIndentedString(this.interval)).append(\"\\n\");         sb.append(\"    o: \").append(this.toIndentedString(this.o)).append(\"\\n\");         sb.append(\"    c: \").append(this.toIndentedString(this.c)).append(\"\\n\");         sb.append(\"    h: \").append(this.toIndentedString(this.h)).append(\"\\n\");         sb.append(\"    l: \").append(this.toIndentedString(this.l)).append(\"\\n\");         sb.append(\"    v: \").append(this.toIndentedString(this.v)).append(\"\\n\");         sb.append(\"    time: \").append(this.toIndentedString(this.time)).append(\"\\n\");         sb.append(\"}\");         return sb.toString();     }      private String toIndentedString(Object o) {         return o == null ? \"null\" : o.toString().replace(\"\\n\", \"\\n    \");     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0422\u0438\u043d\u044c\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 Candle \u0438 \u043c\u043e\u0439 Candlestick \u0441\u043b\u0443\u0436\u0430\u0442 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043d\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c Candle \u0432 Candlestick? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 ModelMapper. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 TcsModelMapper. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u043d\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 map(&lt;src_entity>,&lt;target_class>) \u0431\u0438\u043d\u0430 modelPapper. \u0421\u0430\u043c \u0431\u0438\u043d modelMapper \u0438 \u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0435-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f StockDockConfiguration, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Parameters, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 API.<\/p>\n<details class=\"spoiler\">\n<summary>TcsMapper.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.tcs;  import lombok.AllArgsConstructor; import lombok.Data; import org.modelmapper.Converter; import org.modelmapper.ModelMapper; import org.modelmapper.spi.MappingContext; import org.springframework.stereotype.Component; import ru.dsci.stockdock.models.entities.Candlestick; import ru.dsci.stockdock.models.entities.Instrument; import ru.dsci.stockdock.models.entities.Timeframe; import ru.dsci.stockdock.services.impl.InstrumentServiceImpl; import ru.dsci.stockdock.services.impl.InstrumentTypeServiceImpl; import ru.dsci.stockdock.services.impl.TimeFrameServiceImpl; import ru.tinkoff.invest.openapi.model.rest.Candle; import ru.tinkoff.invest.openapi.model.rest.CandleResolution; import ru.tinkoff.invest.openapi.model.rest.MarketInstrument;  import javax.annotation.PostConstruct;  @Component @Data @AllArgsConstructor public class TcsMapper {      private final ModelMapper modelMapper;     private final InstrumentTypeServiceImpl instrumentTypeService;     private final InstrumentServiceImpl instrumentService;     private final TimeFrameServiceImpl timeFrameService;      @PostConstruct     public void init() {          modelMapper.createTypeMap(CandleResolution.class, Timeframe.class).setConverter(new Converter&lt;CandleResolution, Timeframe>() {             @Override             public Timeframe convert(MappingContext&lt;CandleResolution, Timeframe> mappingContext) {                 String timeframeCode;                 switch (mappingContext.getSource()) {                     case _1MIN:                         timeframeCode = \"MIN1\";                         break;                     case _2MIN:                         timeframeCode = \"MIN2\";                         break;                     case _3MIN:                         timeframeCode = \"MIN3\";                         break;                     case _5MIN:                         timeframeCode = \"MIN5\";                         break;                     case _10MIN:                         timeframeCode = \"MIN10\";                         break;                     case _15MIN:                         timeframeCode = \"MIN15\";                         break;                     case _30MIN:                         timeframeCode = \"MIN30\";                         break;                     case HOUR:                         timeframeCode = \"HOUR1\";                         break;                     case DAY:                         timeframeCode = \"DAY1\";                         break;                     case WEEK:                         timeframeCode = \"WEEK1\";                         break;                     case MONTH:                         timeframeCode = \"MON1\";                         break;                     default:                         timeframeCode = null;                 }                 return timeFrameService.getByCode(timeframeCode);             }         });          modelMapper.createTypeMap(Timeframe.class, CandleResolution.class).setConverter(new Converter&lt;Timeframe, CandleResolution>() {             @Override             public CandleResolution convert(MappingContext&lt;Timeframe, CandleResolution> mappingContext) {                 switch (mappingContext.getSource().getCode()) {                     case \"MIN1\":                         return CandleResolution._1MIN;                     case \"MIN2\":                         return CandleResolution._2MIN;                     case \"MIN3\":                         return CandleResolution._3MIN;                     case \"MIN5\":                         return CandleResolution._5MIN;                     case \"MIN10\":                         return CandleResolution._10MIN;                     case \"MIN15\":                         return CandleResolution._15MIN;                     case \"MIN30\":                         return CandleResolution._30MIN;                     case \"HOUR1\":                         return CandleResolution.HOUR;                     case \"DAY1\":                         return CandleResolution.DAY;                     case \"WEEK1\":                         return CandleResolution.WEEK;                     case \"MONTH1\":                         return CandleResolution.MONTH;                     default:                         return null;                 }             }         });          modelMapper.createTypeMap(Candle.class, Candlestick.class).setConverter(new Converter&lt;Candle, Candlestick>() {             @Override             public Candlestick convert(MappingContext&lt;Candle, Candlestick> mappingContext) {                 Candle candle = mappingContext.getSource();                 Candlestick candlestick = new Candlestick();                 candlestick.setTimeframe(modelMapper.map(candle.getInterval(), Timeframe.class));                 candlestick.setInstrument(instrumentService.getByFigi(candle.getFigi()));                 candlestick.setSince(candle.getTime().toZonedDateTime());                 candlestick.setOpenedValue(candle.getO());                 candlestick.setClosedValue(candle.getC());                 candlestick.setMaximumValue(candle.getH());                 candlestick.setMinimumValue(candle.getL());                 candlestick.setVolume(candle.getV());                 return candlestick;             }         });          modelMapper.createTypeMap(MarketInstrument.class, Instrument.class).setConverter(new Converter&lt;MarketInstrument, Instrument>() {             @Override             public Instrument convert(MappingContext&lt;MarketInstrument, Instrument> mappingContext) {                 Instrument instrument = new Instrument();                 MarketInstrument marketInstrument = mappingContext.getSource();                 instrument.setCurrency(marketInstrument.getCurrency().getValue());                 instrument.setTicker(marketInstrument.getTicker());                 instrument.setFigi(marketInstrument.getFigi());                 instrument.setIsin(marketInstrument.getIsin());                 instrument.setName(marketInstrument.getName());                 instrument.setLot(marketInstrument.getLot());                 instrument.setIncrement(marketInstrument.getMinPriceIncrement());                 instrument.setInstrumentType(instrumentTypeService.getByCode(marketInstrument.getType().toString()));                 return instrument;             }         });     } }<\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>StockDockConfiguration.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock;  import org.modelmapper.ModelMapper; import org.modelmapper.convention.MatchingStrategies; import org.springframework.boot.ApplicationArguments; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import ru.dsci.stockdock.core.Parameters;  import static org.modelmapper.config.Configuration.AccessLevel.PRIVATE;  @Configuration @ComponentScan public class StockDockConfiguration {      @Bean     public ModelMapper modelMapper() {         ModelMapper modelMapper = new ModelMapper();         modelMapper.getConfiguration()                 .setMatchingStrategy(MatchingStrategies.STRICT)                 .setFieldMatchingEnabled(true)                 .setSkipNullEnabled(true)                 .setFieldAccessLevel(PRIVATE);         return modelMapper;     }      @Bean     public Parameters parameters(ApplicationArguments arguments) {         return new Parameters(arguments.getSourceArgs());     }  } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0430\u043a\u0446\u0438\u044f\u043c \u0421\u0431\u0435\u0440\u0430 \u0437\u0430 2022 \u0433\u043e\u0434. \u0418 \u0431\u042f\u0434\u0430&#8230; \u0431\u042f\u0434\u0430&#8230; \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>2022-02-03 23:18:45 [main]: ru.tinkoff.invest.openapi.exceptions.OpenApiException: [to]: Bad candle interval: from=2021-12-31T21:00:00Z to=2022-02-03T21:00:00Z expected  from 1 minute to 1 day<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0432 \u0447\u0435\u043c \u0436\u0435 \u0434\u0435\u043b\u043e? \u0410 \u0432\u043e\u0442 \u0432 \u0447\u0435\u043c! \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 TINKOFF INVEST API \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u043e \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043a\u0430\u043a \u0432\u043e\u0434\u0438\u0442\u0441\u044f, \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0432 \u0436\u0438\u0437\u043d\u044c \u0441\u0432\u043e\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c.<\/p>\n<p><a class=\"anchor\" name=\"%D0%BE%D0%B3%D1%80%D0%B0%D0%BD%D0%B8%D1%87%D0%B5%D0%BD%D0%B8%D1%8F\" id=\"\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\"><\/a><\/p>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>\u0422\u0430\u0439\u043c \u0444\u0440\u0435\u0439\u043c<\/p>\n<\/td>\n<td>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1 \u043c\u0438\u043d\u0443\u0442\u0430<\/p>\n<\/td>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2 \u043c\u0438\u043d\u0442\u044b<\/p>\n<\/td>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3 \u043c\u0438\u043d\u0443\u0442\u044b<\/p>\n<\/td>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>5 \u043c\u0438\u043d\u0443\u0442<\/p>\n<\/td>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>10 \u043c\u0438\u043d\u0443\u0442<\/p>\n<\/td>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>15 \u043c\u0438\u043d\u0443\u0442<\/p>\n<\/td>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>30 \u043c\u0438\u043d\u0443\u0442<\/p>\n<\/td>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1 \u0447\u0430\u0441<\/p>\n<\/td>\n<td>\n<p>7 \u0434\u043d\u0435\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1 \u0434\u0435\u043d\u044c<\/p>\n<\/td>\n<td>\n<p>1 \u0433\u043e\u0434<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1 \u043d\u0435\u0434\u0435\u043b\u044f<\/p>\n<\/td>\n<td>\n<p>2 \u0433\u043e\u0434\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1 \u043c\u0435\u0441\u044f\u0446<\/p>\n<\/td>\n<td>\n<p>10 \u043b\u0435\u0442<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418 \u0447\u0442\u043e \u0436\u0435 \u043d\u0430\u043c \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u043c\u0435\u0441\u044f\u0446? \u042f \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u0442 \u043f\u0435\u0440\u0438\u043e\u0434, \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435, \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432 \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043b\u0430\u0441\u0441 TimeInterval, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 TcsTools, \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f  \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u0430\u043c\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 DateTimeTools.<\/p>\n<details class=\"spoiler\">\n<summary>TcsTools.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.tcs;  import ru.dsci.stockdock.core.tools.DateTimeTools; import ru.dsci.stockdock.core.tools.TimeInterval; import ru.dsci.stockdock.models.entities.Timeframe; import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit; import java.util.List;  public class TcsTools {     public static List&lt;TimeInterval> splitPeriod (             Timeframe timeFrame, ZonedDateTime begPeriod, ZonedDateTime endPeriod) {          ChronoUnit chronoUnit;         int chronoSize;         switch (timeFrame.getCode()) {             case \"MON1\":                 chronoUnit = ChronoUnit.YEARS;                 chronoSize = 10;                 break;             case \"WEEK1\":                 chronoUnit = ChronoUnit.YEARS;                 chronoSize = 2;                 break;             case \"DAY1\":                 chronoUnit = ChronoUnit.YEARS;                 chronoSize = 1;                 break;             case \"HOUR1\":                 chronoUnit = ChronoUnit.DAYS;                 chronoSize = 7;                 break;             default:                 chronoUnit = ChronoUnit.DAYS;                 chronoSize = 1;         }         return DateTimeTools.splitInterval(chronoUnit, chronoSize, begPeriod, endPeriod);     }  } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>TimeInteerval.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.core.tools;  import lombok.Data; import lombok.NonNull;  import java.time.ZonedDateTime;  @Data public class TimeInterval {      private ZonedDateTime begInterval;     private ZonedDateTime endInterval;      @Override     public String toString() {         return String.format(\"%s-%s\",                 DateTimeTools.getTimeFormatted(begInterval),                 DateTimeTools.getTimeFormatted(endInterval));     }      public TimeInterval(@NonNull ZonedDateTime begInterval, @NonNull ZonedDateTime endInterval) {         DateTimeTools.checkInterval(begInterval, endInterval);         this.begInterval = begInterval;         this.endInterval = endInterval;     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>DateTimeTools.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.core.tools;  import java.time.DateTimeException; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.chrono.ChronoZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List;  public class DateTimeTools {      public static ZoneId DEFAULT_ZONE_ID = ZoneId.of(\"Europe\/Moscow\");      public static ZoneId zoneId = DEFAULT_ZONE_ID;      public static final String DATE_PATTERN = \"dd.MM.yyyy\";     public static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter             .ofPattern(DATE_PATTERN)             .withZone(zoneId);     public static final String DATE_TIME_PATTERN = \"dd.MM.yyyy HH:mm:ss\";     public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter             .ofPattern(DATE_TIME_PATTERN)             .withZone(zoneId);      public static String getTimeFormatted(ZonedDateTime dateTime) {         return dateTime.format(DATE_TIME_FORMATTER);     }      public static String getDateFormatted(ZonedDateTime dateTime) {         return dateTime.format(DATE_FORMATTER);     }      public static void checkInterval(ZonedDateTime begInterval, ZonedDateTime endInterval) {         if (endInterval.isBefore(begInterval))             throw new DateTimeException(String.format(\"Invalid date interval: %s - %s\",                     getTimeFormatted(begInterval),                     getTimeFormatted(endInterval)));     }      public static List&lt;TimeInterval> splitInterval(             ChronoUnit chronoUnit, int chronoSize, ZonedDateTime begInterval, ZonedDateTime endInterval) {         checkInterval(begInterval, endInterval);         if (chronoSize &lt;= 0)             throw new DateTimeException(String.format(\"Invalid interval: %d\", chronoSize));         List&lt;TimeInterval> intervals = new ArrayList&lt;>();         ChronoZonedDateTime[] periodTmp = new ChronoZonedDateTime[2];         periodTmp[0] = begInterval;         while (periodTmp[0].isBefore(endInterval)) {             periodTmp[1] = periodTmp[0].plus(chronoSize, chronoUnit);             if (periodTmp[1].isAfter(endInterval))                 periodTmp[1] = endInterval;             intervals.add(new TimeInterval((ZonedDateTime) periodTmp[0], (ZonedDateTime) periodTmp[1]));             periodTmp[0] = periodTmp[0]                     .plus(chronoSize, chronoUnit)                     .plus(1, ChronoUnit.MICROS);         }         return intervals;     }      public static ZonedDateTime parseDate(String textDate) {         ZonedDateTime date;         try {             String[] dateArray = textDate.split(\"\\\\.\");             if (dateArray.length &lt; 3)                 throw new IllegalArgumentException(String.format(\"Incorrect date: %s\", textDate));             int day = Integer.parseInt(dateArray[0]);             int month = Integer.parseInt(dateArray[1]);             int year = Integer.parseInt(dateArray[2]);             date = ZonedDateTime.of(year, month, day, 0, 0, 0, 0, DEFAULT_ZONE_ID);         } catch (Throwable e) {             throw new DateTimeException(                     String.format(\"Can't parse '%s' into date: %s\", textDate, e.getMessage()));         }         return date;     }  } <\/code><\/pre>\n<\/div>\n<\/details>\n<h2>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<blockquote>\n<p>\u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u0437\u0430\u043d\u044f\u0442\u044c \u0438 \u0446\u0435\u043d\u043e\u0439 \u043a\u0430\u043a\u0438\u0445 \u0443\u0433\u043e\u0434\u043d\u043e \u043f\u043e\u0442\u0435\u0440\u044c \u0443\u0434\u0435\u0440\u0436\u0430\u0442\u044c &#8212; \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u0444, \u0436\u0435\u043b\u0435\u0437\u043d\u043e\u0434\u043e\u0440\u043e\u0436\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0438 \u043c\u043e\u0441\u0442\u044b. (\u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440 \u0418\u043b\u044c\u0438\u0447 \u041b\u0435\u043d\u0438\u043d, \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f)<\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \/ \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b SPRING DATA. \u0412\u0441\u0435 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0435 \u2013 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 (\u0441\u043b\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c), \u0441\u0435\u0440\u0432\u0438\u0441 (\u0441\u043b\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438), \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c (\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430).<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u0441\u0435\u0440\u0432\u0438\u0441<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>InstrumentTypeRepository<\/p>\n<\/td>\n<td>\n<p>InstrumentTypeService<\/p>\n<\/td>\n<td>\n<p>InstrumentType<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>InstrumentRepository<\/p>\n<\/td>\n<td>\n<p>InstrumentService<\/p>\n<\/td>\n<td>\n<p>Instrument<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>TimeframeRepository<\/p>\n<\/td>\n<td>\n<p>TimeframeService<\/p>\n<\/td>\n<td>\n<p>Timeframe<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>CandlestickRepository<\/p>\n<\/td>\n<td>\n<p>CandlestickService<\/p>\n<\/td>\n<td>\n<p>Candlestick<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0423\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0442\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<details class=\"spoiler\">\n<summary>InstrumentTypeRepository.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.repositories;  import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import ru.dsci.stockdock.models.entities.InstrumentType;  @Repository public interface InstrumentTypeRepository extends JpaRepository&lt;InstrumentType, Long> {      InstrumentType findByCodeIgnoreCase(String code);  } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>InstrumentTypeServiceImpl.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>package ru.dsci.stockdock.services.impl;  import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import ru.dsci.stockdock.exceptions.EntityNotFoundException; import ru.dsci.stockdock.models.entities.InstrumentType; import ru.dsci.stockdock.repositories.InstrumentTypeRepository; import ru.dsci.stockdock.services.InstrumentTypeService;  import java.util.List;  @Service @AllArgsConstructor public class InstrumentTypeServiceImpl implements InstrumentTypeService {      private InstrumentTypeRepository instrumentTypeRepository;      @Override     public List&lt;InstrumentType> getAll() {         return instrumentTypeRepository.findAll();     }      @Override     public InstrumentType getById(Long id) {         return instrumentTypeRepository                 .findById(id)                 .orElseThrow(() -> new EntityNotFoundException(InstrumentType.class, id));     }      @Override     public InstrumentType getByCode(String code) {         return instrumentTypeRepository.findByCodeIgnoreCase(code);     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>InstrumentRepository.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.repositories;  import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import ru.dsci.stockdock.models.entities.Instrument;  @Repository public interface InstrumentRepository extends JpaRepository&lt;Instrument, Long> {      Instrument findByFigiIgnoreCase(String figi);      Instrument findByTickerIgnoreCase(String ticker);      Instrument findByFigiIgnoreCaseOrTickerIgnoreCase(String figi, String ticker);      boolean existsInstrumentByFigiIgnoreCase(String figi);  } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>InstrumentServiceImpl.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.services.impl;  import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import ru.dsci.stockdock.exceptions.EntityNotFoundException; import ru.dsci.stockdock.models.entities.Instrument; import ru.dsci.stockdock.repositories.InstrumentRepository; import ru.dsci.stockdock.services.InstrumentService;  import javax.transaction.Transactional; import java.util.List;  @Service @AllArgsConstructor public class InstrumentServiceImpl implements InstrumentService {      private InstrumentRepository instrumentRepository;      @Override     public List&lt;Instrument> getAll() {         return instrumentRepository.findAll();     }      @Override     public Instrument getById(Long id) {         return instrumentRepository                 .findById(id)                 .orElseThrow(() -> new EntityNotFoundException(Instrument.class, id));     }      @Override     public Instrument getByTicker(String ticker) {         return instrumentRepository.findByTickerIgnoreCase(ticker);     }      @Override     public Instrument getByFigiOrTicker(String identifier) {         return instrumentRepository.findByFigiIgnoreCaseOrTickerIgnoreCase(identifier, identifier);     }      @Override     public Instrument getByFigi(String isin) {         return instrumentRepository.findByFigiIgnoreCase(isin);     }      @Override     public void saveAllIfNotExists(List&lt;Instrument> instruments) {         instruments.forEach(this::saveIfNotExists);     }      @Override     @Transactional     public void saveIfNotExists(Instrument instrument) {         if (!instrumentRepository.existsInstrumentByFigiIgnoreCase(instrument.getFigi()))             instrumentRepository.saveAndFlush(instrument);     }  } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>TimeframeRepository.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.repositories;  import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import ru.dsci.stockdock.models.entities.Timeframe;  @Repository public interface TimeframeRepository extends JpaRepository&lt;Timeframe, Long> {      Timeframe findByCodeIgnoreCase(String code);  } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>TimeframeServiceImpl.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.services.impl;  import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import ru.dsci.stockdock.exceptions.EntityNotFoundException; import ru.dsci.stockdock.models.entities.Timeframe; import ru.dsci.stockdock.repositories.TimeframeRepository; import ru.dsci.stockdock.services.TimeFrameService;  import java.util.List;  @Service @AllArgsConstructor public class TimeFrameServiceImpl implements TimeFrameService {      private TimeframeRepository periodRepository;      @Override     public List&lt;Timeframe> getAll() {         return periodRepository.findAll();     }      @Override     public Timeframe getById(Long id) {         return periodRepository                 .findById(id)                 .orElseThrow(() -> new EntityNotFoundException(Timeframe.class, id));     }      @Override     public Timeframe getByCode(String code) {         return periodRepository.findByCodeIgnoreCase(code);     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>CandlestickRepository.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.repositories;  import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import ru.dsci.stockdock.models.entities.Candlestick; import ru.dsci.stockdock.models.entities.Instrument; import ru.dsci.stockdock.models.entities.Timeframe;  import java.time.ZonedDateTime; import java.util.List;  @Repository public interface CandlestickRepository extends JpaRepository&lt;Candlestick, Long> {      List&lt;Candlestick> getCandlestickByInstrumentAndTimeframeAndSinceBetweenOrderBySince(             Instrument instrument, Timeframe timeframe, ZonedDateTime begPeriod, ZonedDateTime endPeriod);      boolean existsByInstrumentAndTimeframeAndSince(Instrument instrument, Timeframe timeframe, ZonedDateTime since);  } <\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>CandlestickServiceImpl.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.services.impl;  import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import ru.dsci.stockdock.core.GlobalContext; import ru.dsci.stockdock.core.tools.DateTimeTools; import ru.dsci.stockdock.models.entities.Candlestick; import ru.dsci.stockdock.models.entities.Instrument; import ru.dsci.stockdock.models.entities.Timeframe; import ru.dsci.stockdock.repositories.CandlestickRepository; import ru.dsci.stockdock.services.CandlestickService;  import javax.transaction.Transactional; import java.time.ZonedDateTime; import java.util.List;  @Service @AllArgsConstructor public class CandlestickServiceImpl implements CandlestickService {      private CandlestickRepository candlestickRepository;      @Override     public Candlestick getById(Long id) {         return candlestickRepository.getById(id);     }      @Override     public List&lt;Candlestick> getCandlesticks(Instrument instrument, Timeframe timeframe) {         return getCandlesticks(instrument, timeframe, null, null);     }      @Override     public List&lt;Candlestick> getCandlesticks(Instrument instrument, Timeframe timeframe, ZonedDateTime begPeriod) {         return getCandlesticks(instrument, timeframe, begPeriod);     }      @Override     public List&lt;Candlestick> getCandlesticks(             Instrument instrument, Timeframe timeframe, ZonedDateTime begPeriod, ZonedDateTime endPeriod) {         if (begPeriod == null)             begPeriod = GlobalContext.BEG_DATE;         if (endPeriod == null)             endPeriod = ZonedDateTime.now();         DateTimeTools.checkInterval(begPeriod, endPeriod);         return candlestickRepository.getCandlestickByInstrumentAndTimeframeAndSinceBetweenOrderBySince(                 instrument, timeframe, begPeriod, endPeriod);     }      @Override     @Transactional     public void saveAllIfNotExists(Candlestick candlestick) {         if (!candlestickRepository.existsByInstrumentAndTimeframeAndSince(                 candlestick.getInstrument(), candlestick.getTimeframe(), candlestick.getSince()))             candlestickRepository.saveAndFlush(candlestick);     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>Entites \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"#%D1%81%D1%83%D1%89%D0%BD%D0%BE%D1%81%D1%82%D0%B8\" rel=\"noopener noreferrer nofollow\">\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438<\/a>.<\/p>\n<p><a class=\"anchor\" name=\"cli\" id=\"cli\"><\/a><\/p>\n<h2>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/h2>\n<blockquote>\n<p>\u042f \u0432\u0430\u043c\u00a0\u043f\u043e\u043c\u043e\u0433\u0443, \u0440\u0435\u0431\u044f\u0442\u0430. \u042f\u00a0\u0431\u0443\u0434\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0432\u0430\u0442\u044c! (\u041a\u0430\u0440 \u041a\u0430\u0440\u044b\u0447, \u043c\u0443\u043b\u044c\u0442\u0444\u0438\u043b\u044c\u043c \u00ab\u0421\u043c\u0435\u0448\u0430\u0440\u0438\u043a\u0438\u00bb)<\/p>\n<\/blockquote>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 SPRING SHELL, \u0432 \u0447\u0435\u043c \u0441\u043c\u044b\u0441\u043b \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f? \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043c\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 SPRING, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435? \u041a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c? \u041a\u0430\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c? \u0414\u0435\u0440\u0433\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0447\u0435\u0440\u0435\u0437 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Postman? \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0432 \u043f\u043e\u0441\u0432\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438? \u0417\u0434\u043e\u0440\u043e\u0432\u043e? \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0434\u0430! \u041a\u0442\u043e-\u0442\u043e \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442 \u043c\u043d\u0435, \u043c\u043e\u043b, \u0432\u043e\u0442 \u0435\u0449\u0435, \u044d\u0442\u043e \u0436\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 CLI, \u0438 \u043e\u0442\u0447\u0430\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0430\u0432\u044b. \u041d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0442\u0435\u043e\u0444\u0435\u0439\u0441\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c? \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SPRING SHELL \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043d\u043e\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>ui (update instruments) \u2013 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438\u0437 TINKOFF INVEST API \u043f\u0443\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u043d\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442).<\/p>\n<p><em>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/em>:<\/p>\n<p>ui [[-t][&lt;type_list>], \u0433\u0434\u0435 \u0433\u0434\u0435: <\/p>\n<p>type_list \u2013 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 (etf, bond, stock, currency) \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u044f\u0442\u0430\u044f, \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432;<\/p>\n<p>-t \u2013 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p><em>\u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/em>:<\/p>\n<ul>\n<li>\n<p>ui \u2013 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b;<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>ui stock,etf (ui -t stock,etf) \u2013 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>uc (update candlesticks) \u2013 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u0440\u043e\u0433\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e (\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438\u0437 TINKOFF INVEST API \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443, \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0438\u0445 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442).<\/p>\n<p><em>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435:<\/em><\/p>\n<p>uc [-i] &lt;identifier> [-t] &lt;timeframe> [[-b]&lt;beg_period>] [[-e]&lt;end_period>], \u0433\u0434\u0435:<\/p>\n<ul>\n<li>\n<p>identifier \u2013 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 (ticker \u0438\u043b\u0438 figi), \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a (\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u044f\u0442\u0430\u044f, \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432);<\/p>\n<\/li>\n<li>\n<p>timeframe \u2013 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430 (min1,min2,min5,min10,min15,min30,hour1,day1,week1,mon1), \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a (\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u044f\u0442\u0430\u044f, \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432);<\/p>\n<\/li>\n<li>\n<p>beg_period \u2013 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 GlobalContext.BEG_DATE (01.01.2020);<\/p>\n<\/li>\n<li>\n<p>end_period \u2013 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f<\/p>\n<\/li>\n<li>\n<p>-i, -t, -b, -e \u2013 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430, \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p><em>\u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/em><\/p>\n<\/li>\n<li>\n<p>uc tatn,luk day1,hour1 01.01.2020 31.12.2021 \u2013 \u0434\u043b\u044f \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u043e\u0432 \u0422\u0430\u0442\u043d\u0435\u0444\u0442\u044c \u0438 \u041b\u0443\u043a\u043e\u0438\u043b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u0438 \u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 2021 \u0438 2022 \u0433\u043e\u0434\u044b;<\/p>\n<\/li>\n<li>\n<p>uc tatn hour1 01.01.2022 \u2013 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u0443 \u0422\u0430\u0442\u043d\u0435\u0444\u0442\u044c \u0441 01.01.2022 \u2013 \u043f\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>\n<p>help [&lt;command>] \u2013 \u0432\u044b\u0437\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0438 [\u0441\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435];<\/p>\n<\/li>\n<li>\n<p>stacktrace \u2013 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441\u0430 \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0435;<\/p>\n<\/li>\n<li>\n<p>clear \u2013 \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u043a\u043e\u043d\u0441\u043e\u043b\u044c;<\/p>\n<\/li>\n<li>\n<p>exit, quit \u2013 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 shell;<\/p>\n<\/li>\n<li>\n<p>script \u2013 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b help \u043d\u0438\u0436\u0435:<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>help<\/summary>\n<div class=\"spoiler__content\">\n<p>Built-In Commands<br \/> clear: Clear the shell screen.<br \/> exit, quit: Exit the shell.<br \/> help: Display help about available commands.<br \/> script: Read and execute commands from a file.<br \/> stacktrace: Display the full stacktrace of the last error.<\/p>\n<p>Cli Processor<br \/> uc: update candlesticks<br \/> ui: update instruments<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>help ui<\/summary>\n<div class=\"spoiler__content\">\n<p>NAME<br \/> ui &#8212; update instruments<\/p>\n<p>SYNOPSYS<br \/> ui [[-t] string]<\/p>\n<p>OPTIONS<br \/> -t or &#8212;type  string<br \/> data type to update (instruments [bond,etf,currency,stock])<br \/> [Optional, default = ]<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>help uc<\/summary>\n<div class=\"spoiler__content\">\n<p>SYNOPSYS<br \/> uc [-i] string  [[-t] string]  [[-b] string]  [[-e] string]<\/p>\n<p>OPTIONS<br \/> -i or &#8212;id  string<br \/> instrument identifier (ticker or figi)<br \/> [Mandatory]<\/p>\n<p>-t or &#8212;tf  string timeframe (min1,min2,min5,min10,min15,min30,hour1,day1,week1,mon1) [Optional, default = day1] <\/p>\n<p>-b or &#8212;bp  string the beginning of period [Optional, default = &lt;none>]<\/p>\n<p> -e or &#8212;ep  string the end of period [Optional, default = &lt;none>]<\/p>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u044f \u0432\u044b\u043d\u0435\u0441 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b CliProcessor, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0438 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, SPRING SHELL \u0441\u043e\u0431\u0435\u0440\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0431\u0435\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u0438\u044f.<\/p>\n<details class=\"spoiler\">\n<summary>CliProcessor.java<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"java\">package ru.dsci.stockdock.core;  import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.shell.standard.ShellComponent; import org.springframework.shell.standard.ShellMethod; import org.springframework.shell.standard.ShellOption; import org.springframework.stereotype.Component; import ru.dsci.stockdock.core.tools.DateTimeTools; import ru.dsci.stockdock.models.entities.Instrument; import ru.dsci.stockdock.models.entities.Timeframe; import ru.dsci.stockdock.services.InstrumentService; import ru.dsci.stockdock.services.impl.DataServiceImpl; import ru.dsci.stockdock.services.impl.TimeFrameServiceImpl;  import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit;  @Component @ShellComponent @AllArgsConstructor @Slf4j public class CliProcessor {      private final DataServiceImpl dataService;     private final InstrumentService instrumentService;     private final TimeFrameServiceImpl timeFrameService;      @ShellMethod(key = \"ui\", value = \"update instruments\")     public void updateInstruments(             @ShellOption(value = {\"-t\", \"--type\"},                     help = \"data type to update (instruments [bond,etf,currency,stock])\",                     defaultValue = ShellOption.NULL)                     String type)             throws Exception {         if (type != null) {             String[] types = type.split(\",\");             for (int i = 0; i &lt; types.length; i++)                 dataService.updateInstruments(types[i]);         } else             dataService.updateInstruments();     }      @ShellMethod(key = \"uc\", value = \"update candlesticks\")     public void updateCandlesticks(             @ShellOption(value = {\"-i\", \"--id\"},                     help = \"instrument identifier (ticker or figi)\")                     String iIdentifier,             @ShellOption(value = {\"-t\", \"--tf\"},                     help = \"timeframe (min1,min2,min5,min10,min15,min30,hour1,day1,week1,mon1)\",                     defaultValue = \"day1\")                     String iTimeFrame,             @ShellOption(value = {\"-b\", \"--bp\"},                     help = \"the beginning of period\",                     defaultValue = ShellOption.NULL)                     String iBegPeriod,             @ShellOption(value = {\"-e\", \"--ep\"},                     help = \"the end of period\",                     defaultValue = ShellOption.NULL)                     String iEndPeriod) {         ZonedDateTime begPeriod = iBegPeriod == null ?                 GlobalContext.BEG_DATE :                 DateTimeTools.parseDate(iBegPeriod);         ZonedDateTime endPeriod = iEndPeriod == null ?                 ZonedDateTime.now().truncatedTo(ChronoUnit.DAYS).plusDays(1) :                 DateTimeTools.parseDate(iEndPeriod);         if (begPeriod != null &amp;&amp; endPeriod != null)             DateTimeTools.checkInterval(begPeriod, endPeriod);         String[] identifiers = iIdentifier.split(\",\");         String[] timeframes = iTimeFrame.split(\",\");         for (int i = 0; i &lt; identifiers.length; i++) {             for (int j = 0; j &lt; timeframes.length; j++) {                 Instrument instrument = instrumentService.getByFigiOrTicker(identifiers[i]);                 if (instrument == null)                     throw new IllegalArgumentException(String.format(                             \"Unknown instrument identifier: %s, try update instruments first (ui)\", identifiers[i]));                 Timeframe timeframe = timeFrameService.getByCode(timeframes[j]);                 if (timeframe == null)                     throw new IllegalArgumentException(String.format(\"Unsupported timeframe: %s\", timeframes[j]));                 dataService.updateCandlesticks(instrument, timeframe, begPeriod, endPeriod);             }         }     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"%D0%B4%D0%B5%D0%BC%D0%BE%D0%BD%D1%81%D1%82%D1%80%D0%B0%D1%86%D0%B8%D1%8F\" id=\"\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f\"><\/a><\/p>\n<h2>\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u043e\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<blockquote>\n<p>\u0414\u0435\u0442\u0438, \u0437\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440. \u041b\u044f\u0436\u0435\u0442\u0435 \u0441\u043f\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0441\u043a\u0430\u0436\u0435\u0442. (\u0413\u043e\u043c\u0435\u0440 \u0421\u0438\u043c\u043f\u0441\u043e\u043d, \u043c\u0443\u043b\u044c\u0442\u0444\u0438\u043b\u044c\u043c \u00ab\u0421\u0438\u043c\u043f\u0441\u043e\u043d\u044b\u00bb)<\/p>\n<\/blockquote>\n<p>\u0412 \u0432\u0438\u0434\u0435\u043e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c, \u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0441 \u043d\u0435\u0433\u043e.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61fe5cbf6ea11f3bbbaf21b0\" data-style=\"\" id=\"61fe5cbf6ea11f3bbbaf21b0\" width=\"\"><\/div>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<blockquote>\n<p>\u041d\u0438\u043a\u0442\u043e \u0438\u0437 \u043d\u0430\u0441 \u043d\u0435 \u0443\u043c\u043d\u0435\u0435 \u0432\u0441\u0435\u0445 \u043d\u0430\u0441 \u0432\u043c\u0435\u0441\u0442\u0435. (\u041a\u0435\u043d \u0411\u043b\u0430\u043d\u0448\u0430\u0440 \u2013 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0442 \u043f\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u043c\u0435\u043d\u0442\u0443 \u0438 \u0430\u0432\u0442\u043e\u0440 \u043a\u043d\u0438\u0433)<\/p>\n<\/blockquote>\n<p>\u041c\u044b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u043d\u043e \u0432\u0435\u0440\u043d\u043e \u0434\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0432\u043f\u0435\u0440\u0435\u0434. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 <a href=\"#%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0%20%D0%B1%D0%B4\" rel=\"noopener noreferrer nofollow\">\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>, \u0438 <a href=\"#%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BA%D0%B0\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0435\u0433\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/a>, \u0432\u044b\u044f\u0432\u0438\u043b\u0438 <a href=\"#%D0%BE%D0%B3%D1%80%D0%B0%D0%BD%D0%B8%D1%87%D0%B5%D0%BD%D0%B8%D1%8F\" rel=\"noopener noreferrer nofollow\">\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 <\/a>\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u043f\u0443\u0442\u0438 \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0445\u043e\u0434\u0430, \u0430 \u0435\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <a href=\"#cli\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/a> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041d\u0443 \u0430 \u043f\u043e\u043a\u0430, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/SkyZion-public\/stockdock-public\" rel=\"noopener noreferrer nofollow\"><strong>\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u0441 GitHub<\/strong><\/a>, \u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0430\u0437\u0443 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187;, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u043d\u043d\u043e\u0435, \u0447\u0435\u0433\u043e \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430 \u0432\u0430\u0441 \u2013 \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u043e\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0422\u0418\u041d\u042c\u041a\u041e\u0424\u0424.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e \u043c\u043d\u0435 \u0432\u043b\u0438\u0447\u043a\u0443 \u0425\u0430\u0431\u0440\u0430 \u0438 \u0432 \u0422\u0435\u043b\u0435\u0433\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0436\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0438\u0434\u0435\u0438. \u0420\u0435\u0431\u044f\u0442\u0430, \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0412\u0430\u043c, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u044f \u0434\u043e\u0439\u0434\u0443 \u0434\u043e \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u0432\u0430\u0448\u0438 \u043c\u044b\u0441\u043b\u0438 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442 \u0431\u0443\u0434\u0443\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b, \u043f\u0438\u0448\u0438\u0442\u0435, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0443. <\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u044f \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0440\u0435\u043c\u044f \u0438 \u0432 \u043e\u0434\u0438\u043d\u043e\u0447\u043a\u0443. \u0412\u0432\u0438\u0434\u0443 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0442\u043e-\u0442\u043e \u043c\u043e\u0433\u0443 \u0443\u043f\u0443\u0441\u0442\u044c, \u043d\u0435\u0442 \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e\u0432\u0435\u0440\u043e\u0432 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u043e\u0432,  \u043f\u043e \u043f\u0440\u0430\u0432\u0434\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u043e\u043b\u043a\u043e\u043c \u0435\u0449\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c&#8230; \u0412\u0441\u0435 \u044d\u0442\u043e \u043d\u0435\u043c\u0438\u043d\u0443\u043c\u044b\u0435 \u0441\u0430\u0439\u0434-\u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0438\u043d\u0434\u0438-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430\u0439\u0442\u0438 \u0435\u0434\u0438\u043d\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432, \u0442\u0430\u043a \u0447\u0442\u043e, \u0412\u044b, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438, \u0438 \u0435\u0441\u0442\u044c \u043c\u043e\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u044f \u043e\u0447\u0435\u043d\u044c \u0446\u0435\u043d\u044e \u0432\u0430\u0448\u0438 \u043e\u0442\u043a\u043b\u0438\u043a\u0438! \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043a\u0440\u0438\u0442\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f, \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0438 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044f\u0445 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>P.S: \u0417\u0430\u0431\u0430\u0432\u043d\u043e, \u043d\u043e \u043f\u043e\u043a\u0430 \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u0443\u0432\u0438\u0434\u0435\u043b \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e \u0434\u043d\u044f \u043d\u0430 \u0434\u0435\u043d\u044c \u0432\u044b\u0439\u0434\u0443\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 SDK \u0434\u043b\u044f TINKOFF INVEST API v 2.0, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u043e\u0432\u044b\u0445 \u0441\u0447\u0435\u0442\u043e\u0432, \u0442\u043e\u0440\u0433\u043e\u0432\u0430\u0442\u044c \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430\u043c\u0438, \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043b\u044e\u0448\u0435\u043a. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u043e\u0432\u043e\u0435 API, \u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e. \u041e\u0431 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u044f \u0442\u043e\u0447\u043d\u043e \u043d\u0430\u043f\u0438\u0448\u0443 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/649407\/\"> https:\/\/habr.com\/ru\/post\/649407\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<blockquote>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u0433 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d \u043f\u0435\u0440\u0432\u044b\u0439; \u0432\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u0433 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0434\u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e (\u0424\u044d\u043d \u0426\u0437\u0438\u0446\u0430\u0439, \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 \u00ab\u041f\u043e\u043b\u0435\u0442 \u0434\u0443\u0448\u0438\u00bb)<\/p>\n<\/blockquote>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u043b\u0435\u0442\u0438\u0442 \u0432\u0440\u0435\u043c\u044f&#8230; \u041f\u0440\u043e\u0448\u043b\u043e \u043f\u043e\u0447\u0442\u0438 2 \u043c\u0435\u0441\u044f\u0446\u0430 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 TINKOFF INVEST API \u2013 <a href=\"https:\/\/habr.com\/ru\/post\/592093\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u043e\u0431\u043e\u0442\u0430 \u043d\u0430 JAVA. \u0427\u0430\u0441\u0442\u044c\u00a01<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0441\u0432\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u043c \u0422\u0418\u041d\u042c\u041a\u041e\u0424\u0424.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u0440\u0436\u0435\u0432\u044b\u0445 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043d\u0435\u043c\u0438\u043d\u0443\u0435\u043c\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c API \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0438\u0445 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0432 \u043a\u043e\u0434 \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0442\u0430\u0442\u044c \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443 &#171;<a href=\"#%D0%B4%D0%B5%D0%BC%D0%BE%D0%BD%D1%81%D1%82%D1%80%D0%BE%D1%86%D0%B8%D1%8F\" rel=\"noopener noreferrer nofollow\">\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>&#171;.<\/p>\n<p>\u0412\u0441\u0435\u043c \u043d\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043d\u043e \u0443\u0432\u044b, \u0436\u0438\u0437\u043d\u044c \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0438 \u043a\u0430\u043a \u0431\u044b \u043c\u043d\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0441\u043a\u043e\u0447\u0438\u0442\u044c \u043a \u0444\u0438\u043d\u0430\u043b\u0443 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0442\u043e\u0440\u0433\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0437\u0430\u0442\u0440\u0430\u0442\u0438\u0432 \u043d\u0430 \u0435\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0441\u0438\u043b, \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b, \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0432 \u0445\u043e\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h2>\n<blockquote>\n<p>\u0421\u0442\u044e\u0430\u0440\u0434\u0435\u0441\u0441\u0430 \u0432 \u0441\u0430\u043b\u043e\u043d\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043b\u0430\u0439\u043d\u0435\u0440\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0435:<\/p>\n<p>&#8212; \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0430\u043b\u0443\u0431\u0435 &#8212; \u0431\u0430\u0433\u0430\u0436, \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u0431\u0430\u0440, \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 &#8212; \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0433\u043e\u043b\u044c\u0444\u0430, \u043d\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0431\u0430\u0441\u0441\u0435\u0439\u043d.<\/p>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442:<\/p>\n<p>&#8212; \u0410 \u0442\u0435\u043f\u0435\u0440\u044c, \u0433\u043e\u0441\u043f\u043e\u0434\u0430, \u043f\u0440\u0438\u0441\u0442\u0435\u0433\u043d\u0438\u0442\u0435\u0441\u044c. \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u043e \u0432\u0441\u0435\u0439 \u044d\u0442\u043e\u0439 \u0444\u0438\u0433\u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c.<\/p>\n<\/blockquote>\n<p>\u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>SPRING FRAMEWORK \u2013 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>SPRING DATA \u2013 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0411\u0414;<\/p>\n<\/li>\n<li>\n<p>FLYWAY \u2013 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u0411\u0414;<\/p>\n<\/li>\n<li>\n<p>H2 \u2013 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0430\u044f \u0421\u0423\u0411\u0414, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043d\u043d\u0430\u044f \u043d\u0430 JAVA;<\/p>\n<\/li>\n<li>\n<p>MODELMAPPER \u2013 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>SPRING SHELL \u2013 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f CLI-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (\u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430).<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 maven (pom.xml) \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<details class=\"spoiler\">\n<summary>pom.xml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?> &lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"          xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">     &lt;modelVersion>4.0.0&lt;\/modelVersion>     &lt;parent>         &lt;groupId>org.springframework.boot&lt;\/groupId>         &lt;artifactId>spring-boot-starter-parent&lt;\/artifactId>         &lt;version>2.5.7&lt;\/version>         &lt;relativePath\/>      &lt;\/parent>      &lt;groupId>ru.dsci&lt;\/groupId>     &lt;artifactId>stockdock&lt;\/artifactId>     &lt;version>0.0.1-SNAPSHOT&lt;\/version>     &lt;name>stockdock&lt;\/name>     &lt;description>stockdock&lt;\/description>     &lt;properties>         &lt;java.version>11&lt;\/java.version>     &lt;\/properties>      &lt;dependencies>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-data-jpa&lt;\/artifactId>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter&lt;\/artifactId>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-web&lt;\/artifactId>             &lt;exclusions>                 &lt;exclusion>                     &lt;groupId>org.springframework.boot&lt;\/groupId>                     &lt;artifactId>spring-boot-starter-logging&lt;\/artifactId>                 &lt;\/exclusion>             &lt;\/exclusions>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.projectlombok&lt;\/groupId>             &lt;artifactId>lombok&lt;\/artifactId>             &lt;optional>true&lt;\/optional>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-test&lt;\/artifactId>             &lt;scope>test&lt;\/scope>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>ru.tinkoff.invest&lt;\/groupId>             &lt;artifactId>openapi-java-sdk-core&lt;\/artifactId>             &lt;version>0.5.1&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>ru.tinkoff.invest&lt;\/groupId>             &lt;artifactId>openapi-java-sdk-java8&lt;\/artifactId>             &lt;version>0.5.1&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>com.squareup.okhttp3&lt;\/groupId>             &lt;artifactId>okhttp&lt;\/artifactId>             &lt;version>4.10.0-RC1&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>com.h2database&lt;\/groupId>             &lt;artifactId>h2&lt;\/artifactId>             &lt;version>1.4.200&lt;\/version>             &lt;scope>runtime&lt;\/scope>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.flywaydb&lt;\/groupId>             &lt;artifactId>flyway-core&lt;\/artifactId>             &lt;version>8.2.3&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.shell&lt;\/groupId>             &lt;artifactId>spring-shell-starter&lt;\/artifactId>             &lt;version>2.0.0.RELEASE&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.modelmapper&lt;\/groupId>             &lt;artifactId>modelmapper&lt;\/artifactId>             &lt;version>3.0.0&lt;\/version>         &lt;\/dependency>     &lt;\/dependencies>      &lt;build>         &lt;plugins>             &lt;plugin>                 &lt;groupId>org.springframework.boot&lt;\/groupId>                 &lt;artifactId>spring-boot-maven-plugin&lt;\/artifactId>                 &lt;configuration>                     &lt;excludes>                         &lt;exclude>                             &lt;groupId>org.projectlombok&lt;\/groupId>                             &lt;artifactId>lombok&lt;\/artifactId>                         &lt;\/exclude>                     &lt;\/excludes>                 &lt;\/configuration>             &lt;\/plugin>         &lt;\/plugins>     &lt;\/build>  &lt;\/project> <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0435\u0433\u043e \u0432\u0435\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e SPRING. \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0421\u0423\u0411\u0414 \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u043b \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0443\u044e H2, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 IN-MEMORY-\u0440\u0435\u0436\u0438\u043c\u0435, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 DDL (Data Definition Language), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0438\u0433\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0411\u0414 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u043c\u0438 FLYWAY. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0421\u0423\u0411\u0414 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. SPRING SHELL \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<p>\u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445. \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 application-dev.yml. \u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 &lt;host>:8800 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e localhost:8800), \u043b\u043e\u0433\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u043f\u0443\u0442\u0438 logs\/dev\/stockdock.log, \u0440\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0421\u0423\u0411\u0414  \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (jdbc:h2:<strong>mem<\/strong>:mydatabase), \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u043f\u0443\u0442\u0438 &lt;host>\/h2 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e localhost:8800\/h2). <\/p>\n<details class=\"spoiler\">\n<summary>application-dev.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">server:   port: 8800  spring:   output:     ansi:       enabled: detect   datasource:     driver-class-name: org.h2.Driver     url: jdbc:h2:mem:mydatabase;MODE=PostgreSQL;DB_CLOSE_DELAY=-1     username: sa     password:   jpa:     show-sql: false     properties:       hibernate:         dialect: org.hibernate.dialect.H2Dialect         ddl-auto: none   h2:     console:       enabled: true       settings:         web-allow-others: false       path: \/h2  logging:   level.ru.dsci.stockdock.* : debug   pattern:     console: \"%d{yyyy-MM-dd HH:mm:ss} [%thread]: %msg%n\"     file: \"%d{yyyy-MM-dd HH:mm:ss.sss} [%thread] %-5level %logger{36}: %msg%n\"   file:     name: logs\/dev\/stockdock.log     path: logs\/dev<\/code><\/pre>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0%20%D0%B1%D0%B4\" id=\"\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0434\">\u0440\u0430 \u0431\u0434&#187;><\/a><\/p>\n<h2>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414<\/h2>\n<blockquote>\n<p>\u0415\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0438\u0441\u0442\u043e\u0449\u0438\u043c\u043e\u0435 \u0441\u043e\u043a\u0440\u043e\u0432\u0438\u0449\u0435 \u2014 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 (\u041f\u044c\u0435\u0440 \u0411\u0443\u0430\u0441\u0442 \u2013 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439 \u043b\u0435\u043a\u0441\u0438\u043a\u043e\u0433\u0440\u0430\u0444)<\/p>\n<\/blockquote>\n<p>\u0422\u043e\u0440\u0433\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0435, \u0433\u0434\u0435 \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u2013 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0433\u0434\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u2013 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043e\u0434\u043d\u0430 \u043d\u0435\u0440\u0435\u0448\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2013 \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c? \u0418 \u0442\u0443\u0442 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0441\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <\/p>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<ul>\n<li>\n<p>instrument_type \u2013 \u0442\u0438\u043f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 (\u0430\u043a\u0446\u0438\u0438, \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438, \u0444\u043e\u043d\u0434\u044b, \u0432\u0430\u043b\u044e\u0442\u044b);<\/p>\n<\/li>\n<li>\n<p>instrument \u2013 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 (\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430);<\/p>\n<\/li>\n<li>\n<p>timeframe \u2013 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c (\u043c\u0438\u043d\u0443\u0442\u0430, \u0447\u0430\u0441, \u0434\u0435\u043d\u044c, \u0438 \u0442.\u0434.);<\/p>\n<\/li>\n<li>\n<p>candlestick \u2013 \u0441\u0432\u0435\u0447\u0430 (\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0430\u0445).<\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0411\u0414 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 (V1__init_tables.sql), \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DDL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0421\u0423\u0411\u0414 \u043f\u043e\u043b\u0443\u0447\u0438\u043c, \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u0430\u0437\u0443. \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 (V2__init_data.sql). \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u044b.<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>V1__init_tables.sql<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">-- INSTRUMENT_TYPE ---------------------------------------- drop table if exists insrtrument_type; create table instrument_type (     id        serial primary key,     code      varchar(256) not null,     name      varchar(255) ); create unique index instrument_type_code_uindex     on instrument_type(code); -----------------------------------------------------------  -- INSTRUMENT --------------------------------------------- drop table if exists instrument cascade; create table instrument (     id                 serial primary key,     figi               varchar(255) not null,     isin               varchar(255),     ticker             varchar(255) not null,     currency           varchar(255) not null,     increment          numeric(19, 4),     name               varchar(255),     CHECK (increment >= 0),     lot                integer      not null,     instrument_type_id varchar(255) not null,     foreign key (instrument_type_id) references instrument_type (id) ); create unique index instrument_figi_uindex     on instrument (figi); create index instrument_ticker_index     on instrument (ticker); create index instrument_isin_index     on instrument(isin); create index instrument_currency_index     on instrument (currency); create index instrument_type_id_index     on instrument (instrument_type_id);<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-329123","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=329123"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329123\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=329123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=329123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=329123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}