{"id":303685,"date":"2020-05-15T15:01:01","date_gmt":"2020-05-15T15:01:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=303685"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=303685","title":{"rendered":"\u041a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e js \u0438 google sheets \u0441\u0442\u0430\u0442\u044c \u0441\u043e\u0441\u0435\u0434\u043e\u043c \u0411\u0438\u043b\u043b\u0430 \u0413\u0435\u0439\u0442\u0441\u0430 \u043f\u043e \u0433\u043e\u043b\u044c\u0444 \u043a\u043b\u0443\u0431\u0443"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/501318\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g9\/nh\/do\/g9nhdo-f7en-3uf3tmupt-orzai.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u043e\u0432 \u043f\u0440\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u0438, \u043a\u0430\u043a \u0438\u0442\u043e\u0433, \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u0442\u0440\u043e\u043b\u043b\u0435\u0439\u0431\u0443\u0441\u043e\u0432 \u0438\u0437 \u0431\u0443\u0445\u0430\u043d\u043a\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0445\u0430\u0431\u0430 \u2014 <i>\u0421\u0430\u043c\u043e\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044f<\/i>..<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f \u043f\u043e\u0441\u0432\u044f\u0442\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0441\u0432\u043e\u0438\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u0432 \u0422\u0438\u043d\u044c\u043a\u043e\u0444\u0444 \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u044f\u0445. \u0415\u0441\u0442\u044c 2 \u0442\u0438\u043f\u0430 \u043b\u044e\u0434\u0435\u0439: \u043e\u0434\u043d\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u0442\u0440\u043e\u044f\u0442 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0443 \u0441\u0435\u0431\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u0435, \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u044f\u0441\u044c \u043f\u043e \u043d\u0438\u043c for-\u0446\u0438\u043a\u043b\u043e\u043c \u0432 IPython Notebook, \u0434\u0440\u0443\u0433\u0438\u043c \u0436\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f &quot;\u0449\u0443\u043f\u0430\u0442\u044c&quot; \u0446\u0438\u0444\u0440\u044b, \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044f \u0438\u0445 \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c \u0432 Excel. \u0421\u0435\u0431\u044f \u044f \u043e\u0442\u043d\u043e\u0448\u0443 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0441\u0432\u043e\u0438 \u0441\u0434\u0435\u043b\u043a\u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0437\u0430\u043d\u043e\u0441\u0438\u043b \u0432 Google Sheets.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u044e \u0440\u0443\u0442\u0438\u043d\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Google Apps Script \u0438 API \u043e\u0442 \u0422\u0438\u043d\u044c\u043a\u043e\u0444\u0444 \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0439.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u0443\u0442\u0438, \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u0438\u043a \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><strong>\u0422\u0418<\/strong> \u2014 \u0422\u0438\u043d\u044c\u043a\u043e\u0444\u0444 \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0438<\/li>\n<li><strong>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442<\/strong> \u2014 \u043b\u044e\u0431\u0430\u044f \u0446\u0435\u043d\u043d\u0430\u044f \u0431\u0443\u043c\u0430\u0433\u0430, \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u043a \u0430\u043a\u0446\u0438\u044f, \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u044f \u0438\u043b\u0438 ETF. <\/li>\n<li><strong>Ticker<\/strong> \u2014 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 ID \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0431\u0438\u0440\u0436\u0435. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0431\u0438\u0440\u0436\u0438 \u0437\u043d\u0430\u044e\u0442 \u0442\u0438\u043a\u0435\u0440\u044b \u0442\u0435\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u044e\u0442 \u0438\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u044e\u0442. \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u044f \u0438\u0441\u0445\u043e\u0436\u0443 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0432 \u0441\u0432\u043e\u0451\u043c \u043a\u043e\u0434\u0435<\/li>\n<li><strong>Figi<\/strong> \u2014 Financial Instrument Global Identifier (\u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430). \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c API-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0422\u0418 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438\u043c\u0435\u043d\u043d\u043e figi.<\/li>\n<li><strong>\u0421\u0442\u0430\u043a\u0430\u043d<\/strong> \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0437\u0430\u044f\u0432\u043e\u043a \u043d\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"zadacha\">\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>  <\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u0441\u043e\u0431\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0441\u0434\u0435\u043b\u043e\u043a. \u041a\u043e\u043c\u0443-\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0435\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0440\u043e\u043a\u0435\u0440 \u2014 \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u0438\u043b\u0438 \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0447\u0451\u0442\u044b. \u041c\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0442\u0430\u043a\u043e\u0439: \u044f \u0432\u0435\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0442\u043e\u0440\u0433\u0443\u044e. \u0412 \u044d\u0442\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c\/\u0443\u0431\u044b\u0442\u043e\u043a, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u0438 \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u0443\u0447\u0443\u0441\u044c \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445. <\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u044f \u0437\u0430\u043d\u043e\u0441\u0438\u043b \u0441\u0434\u0435\u043b\u043a\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043f\u0435\u0440\u0435\u043f\u0435\u0447\u0430\u0442\u044b\u0432\u0430\u044f \u0438\u0445 \u0438\u0437 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0422\u0418. \u041c\u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/post\/496722\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u0445\u0430\u0431\u0440\u0430\u044e\u0437\u0435\u0440\u0430 <a href=\"https:\/\/habr.com\/ru\/users\/ovkhabr\/\" class=\"user_link\">OvkHabr<\/a>. \u0418\u0437 \u043d\u0435\u0451 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0431\u0440\u043e\u043a\u0435\u0440 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043c\u043e\u0438 \u043d\u0443\u0436\u0434\u044b \u0438 \u043f\u0440\u0438\u043d\u044f\u043b\u0441\u044f \u0437\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<p>  <\/p>\n<h3 id=\"google-apps-script\">Google Apps Script<\/h3>\n<p>  <\/p>\n<p>\u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 Google Sheets, \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 <code>Tools -&gt; Script editor<\/code>, \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 <a href=\"https:\/\/developers.google.com\/apps-script\/guides\/v8-runtime\" rel=\"nofollow\">JavaScript<\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uj\/9e\/4n\/uj9e4n69f7i_x_xlsoi_i2vafak.png\"><\/p>\n<p>  <\/p>\n<h3 id=\"openapi\">OpenAPI<\/h3>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0422\u0418 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e OpenAPI, \u0430 \u0441\u0430\u043c\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/tinkoffcreditsystems.github.io\/invest-openapi\/swagger-ui\/\" rel=\"nofollow\">swagger-ui<\/a><\/p>\n<p>  <\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 http-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0439 <a href=\"https:\/\/tinkoffcreditsystems.github.io\/invest-openapi\/auth\/\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f http \u043f\u043e\u0445\u043e\u0434\u043e\u0432 \u0432 \u0422\u0418.<br \/>  \u041a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f? <\/p>\n<p>  <\/p>\n<ol>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c figi<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0442\u0430\u043a\u0430\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0446\u0435\u043d\u0443<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0434\u0435\u043b\u043e\u043a, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u044f \u0435\u0433\u043e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442 \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0451\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c \u043a\u043e\u0434\u0435:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">class TinkoffClient<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">class TinkoffClient {   constructor(token) {     this.token = token     this.baseUrl = 'https:\/\/api-invest.tinkoff.ru\/openapi\/'   }    _makeApiCall(methodUrl) {     const url = this.baseUrl + methodUrl     Logger.log(`[API Call] ${url}`)     const params = {'escaping': false, 'headers': {'accept': 'application\/json', &quot;Authorization&quot;: `Bearer ${this.token}`}}     const response = UrlFetchApp.fetch(url, params)     if (response.getResponseCode() == 200)       return JSON.parse(response.getContentText())   }    getInstrumentByTicker(ticker) {     const url = `market\/search\/by-ticker?ticker=${ticker}`     const data = this._makeApiCall(url)     return data.payload.instruments[0]   }    getOrderbookByFigi(figi) {     const url = `market\/orderbook?depth=1&amp;figi=${figi}`     const data = this._makeApiCall(url)     return data.payload   }    getOperations(from, to, figi) {     \/\/ Arguments `from` &amp;&amp; `to` should be in ISO 8601 format     const url = `operations?from=${from}&amp;to=${to}&amp;figi=${figi}`     const data = this._makeApiCall(url)     return data.payload.operations   } }  const tinkoffClient = new TinkoffClient(OPENAPI_TOKEN)<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"poluchenie-ceny-instrumenta\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 \u0447\u0451\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0446\u0435\u043d\u0443 \u0430\u043a\u0446\u0438\u0438 yandex \u0441 \u0442\u0438\u043a\u0435\u0440\u043e\u043c <code>YNDX<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"custom-functions\">Custom Functions<\/h3>\n<p>  <\/p>\n<p>Google Sheets \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <code>AVERAGE<\/code>, <code>SUM<\/code>, \u0438\u043b\u0438 <code>VLOOKUP<\/code>. \u041d\u043e, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u043c <a href=\"https:\/\/developers.google.com\/apps-script\/guides\/sheets\/functions\" rel=\"nofollow\">\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e<\/a>. \u0412\u0441\u0451, \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e, \u2014 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 .gs \u0444\u0430\u0439\u043b\u0435. \u0422\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u044f\u0447\u0435\u0439\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041f\u0440\u0438\u0447\u0451\u043c, \u0435\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u0430 \u0438 \u0441\u043d\u0438\u0437\u0443, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0442\u0430\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044b\u0445 \u043a\u043b\u0435\u0442\u043e\u043a.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e getPriceByTicker, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0446\u0435\u043d\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u0415\u0451 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 (<code>=getPriceByTicker(&quot;YNDX&quot;)<\/code>).<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c figi \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0442\u0430\u043a\u0430\u043d, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0438 \u0432\u044b\u0442\u0430\u0449\u0438\u043c \u0446\u0435\u043d\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">function _getFigiByTicker(ticker) {   const {figi} = tinkoffClient.getInstrumentByTicker(ticker)   return figi }  function getPriceByTicker(ticker) {   const figi = _getFigiByTicker(ticker)   const {lastPrice} = tinkoffClient.getOrderbookByFigi(figi)   return lastPrice }<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/az\/6f\/5_\/az6f5_p9saufhdsi0_pqa6mooz8.gif\">  <\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u043e\u0440\u043e\u0432\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0442\u0443\u043b, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0446\u0435\u043d\u0443 \u0430\u043a\u0446\u0438\u0438, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 \u0440\u0430\u0441\u0447\u0451\u0442\u0430\u0445.<\/p>\n<p>  <\/p>\n<h3 id=\"avtoobnovlenie-formuly\">\u0410\u0432\u0442\u043e\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0430\u0432\u0442\u043e\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u043e\u0439. \u041f\u0440\u044f\u043c\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u0442, \u043d\u043e GAS \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u043e <a href=\"https:\/\/stackoverflow.com\/a\/27656313\" rel=\"nofollow\">\u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0445\u0430\u043a:<\/a><\/p>\n<p>  <\/p>\n<ul>\n<li>\u041c\u044b \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u043c \u044f\u0447\u0435\u0439\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043b\u0438\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e<br \/> \n<pre><code class=\"javascript\">function onEdit(e) {   const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet()   sheet.getRange('Z1').setValue(Math.random()) }<\/code><\/pre>\n<\/li>\n<li>\u042d\u0442\u0443 \u044f\u0447\u0435\u0439\u043a\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0443 \u0442\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0441\u0447\u0451\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>getPriceByTicker<\/code><br \/> \n<pre><code class=\"javascript\">=getPriceByTicker(&quot;YNDX&quot;, Z1)<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"cache-service\">Cache Service<\/h3>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0446\u0435\u043d\u0443 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0430\u0436 2 API-\u0432\u044b\u0437\u043e\u0432\u0430. \u0418 \u0435\u0441\u043b\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0445\u043e\u0434\u0430 \u0437\u0430 \u0441\u0442\u0430\u043a\u0430\u043d\u043e\u043c \u044d\u0442\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0446\u0435\u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e figi \u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439. \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0447\u0443\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0439, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <a href=\"https:\/\/developers.google.com\/apps-script\/reference\/cache\" rel=\"nofollow\">Apps Script Cache Service<\/a>. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 key-value \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441 \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const CACHE = CacheService.getScriptCache()  function _getFigiByTicker(ticker) {   const cached = CACHE.get(ticker)   if (cached != null)      return cached   const {figi} = tinkoffClient.getInstrumentByTicker(ticker)   CACHE.put(ticker, figi)   return figi }<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"poluchenie-spiska-sdelok\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0434\u0435\u043b\u043e\u043a<\/h2>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>getTrades<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e API, \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u0432\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u0438\u043a\u0435\u0440, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0441\u0434\u0435\u043b\u043a\u0438. \u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0431\u043e\u0434\u0430\u0442\u044c\u0441\u044f \u0441 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/ISO_8601\" rel=\"nofollow\">\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c ISO 8601<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 API.<br \/>  Figi \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>_getFigiByTicker<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u044b\u0448\u0435. <\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">function getTrades(ticker, from, to) {   const figi = _getFigiByTicker(ticker)   if (!from) {     from = TRADING_START_AT.toISOString()   }   if (!to) {     const now = new Date()     to = new Date(now + MILLIS_PER_DAY)     to = to.toISOString()   }   const operations = tinkoffClient.getOperations(from, to, figi)   ... }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"vzveshennoe-srednee\">\u0412\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435<\/h3>\n<p>  <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 <a href=\"https:\/\/tinkoffcreditsystems.github.io\/invest-openapi\/swagger-ui\/#\/operations\/get_operations\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, \u043e\u0431\u044a\u0435\u043a\u0442 <code>Operation<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u0432 \u0432\u0438\u0434\u0435:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0431\u044a\u0435\u043a\u0442 Operation<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"json\">&quot;operation&quot;: {     &quot;id&quot;: &quot;string&quot;,     &quot;status&quot;: &quot;Done&quot;,     &quot;trades&quot;: [{         &quot;tradeId&quot;: &quot;string&quot;,         &quot;date&quot;: &quot;2019-08-19T18:38:33.131642+03:00&quot;,         &quot;price&quot;: 0,         &quot;quantity&quot;: 0      }],     &quot;commission&quot;: {       &quot;currency&quot;: &quot;RUB&quot;,       &quot;value&quot;: 0     },     &quot;currency&quot;: &quot;RUB&quot;,     &quot;payment&quot;: 0,     &quot;price&quot;: 0,     &quot;quantity&quot;: 0,     &quot;figi&quot;: &quot;string&quot;,     &quot;instrumentType&quot;: &quot;Stock&quot;,     &quot;isMarginCall&quot;: true,     &quot;date&quot;: &quot;2019-08-19T18:38:33.131642+03:00&quot;,     &quot;operationType&quot;: &quot;Buy&quot;   }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u0443\u043f\u043b\u0438-\u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c\u0438. \u042d\u0442\u043e \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0430\u043c\u0438, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0438\u0440\u0436\u0430: \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u044f 100 \u0430\u043a\u0446\u0438\u0439 <code>YNDX<\/code> \u043f\u043e 2500\u20bd, \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0441\u0435\u0433\u043e 40 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0446\u0435\u043d\u0435 2500\u20bd, \u0438 60 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0446\u0435\u043d\u0435 2499\u20bd. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0438 \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443 <a href=\"https:\/\/habr.com\/ru\/users\/ovkhabr\/\" class=\"user_link\">OvkHabr<\/a>, \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u0434\u0435\u043b\u043a\u0430\u0445 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0431\u0438\u0440\u0436\u0435\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u2014 \u043f\u043e\u0434\u043c\u0430\u0441\u0441\u0438\u0432\u0435 <code>trades<\/code>. <\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u043d\u044f \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0441\u0432\u043e\u0434\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0434\u0435\u043b\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D1%80%D0%B5%D0%B4%D0%BD%D0%B5%D0%B5_%D0%B0%D1%80%D0%B8%D1%84%D0%BC%D0%B5%D1%82%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5_%D0%B2%D0%B7%D0%B2%D0%B5%D1%88%D0%B5%D0%BD%D0%BD%D0%BE%D0%B5\" rel=\"nofollow\">\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u043c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 \u044f\u043d\u0434\u0435\u043a\u0441\u043e\u043c, \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a<\/p>\n<p>  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e5\/e15\/9c2\/3e5e159c2d3b1dd9453ab46a3d6caf11.svg\" alt=\"$Price_w = \\frac{2500 * 40 + 2499 * 60}{100} = 2\u00a0499,4$\" data-tex=\"display\"><\/math><\/p>\n<p>  <\/p>\n<p>\u0410 \u0432 \u043a\u043e\u0434\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">function _calculateTrades(trades) {   let totalSum = 0   let totalQuantity = 0   for (let j in trades) {     const {quantity, price} = trades[j]     totalQuantity += quantity     totalSum += quantity * price   }   const weigthedPrice = totalSum \/ totalQuantity   return [totalQuantity, totalSum, weigthedPrice] }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rabota-s-tablicey\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439<\/h3>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u0435\u0441\u043b\u0438 custom \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0439\u043c\u0443\u0442 \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u0434 \u044f\u0447\u0435\u0439\u043a\u043e\u0439 \u0441 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. <\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u0438 \u0431\u0438\u0440\u0436\u0435\u0432\u044b\u043c \u0441\u0434\u0435\u043b\u043a\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c. \u041d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u043e\u0442\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438, \u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043c\u044b &quot;\u043d\u0430 \u043b\u0435\u0442\u0443&quot; \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c <strong>\u043c\u0438\u043d\u0443\u0441<\/strong> \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 (\u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0451\u0442\u0430) \u0438 <strong>\u043f\u043b\u044e\u0441<\/strong> \u043f\u0440\u043e\u0434\u0430\u0436\u0430\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u0438 (\u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u0442\u043e\u043b\u0431\u0435\u0446)<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const values = [   [&quot;ID&quot;, &quot;Date&quot;, &quot;Operation&quot;, &quot;Ticker&quot;, &quot;Quantity&quot;, &quot;Price&quot;, &quot;Currency&quot;, &quot;SUM&quot;, &quot;Commission&quot;],  ] for (let i=operations.length-1; i&gt;=0; i--) {   const {operationType, status, trades, id, date, currency, commission} = operations[i]   if (operationType == &quot;BrokerCommission&quot; || status == &quot;Decline&quot;)      continue   let [totalQuantity, totalSum, weigthedPrice] = _calculateTrades(trades) \/\/ calculate weighted values   if (operationType == &quot;Buy&quot;) {  \/\/ inverse values in a way, that it will be easier to work with     totalQuantity = -totalQuantity     totalSum = -totalSum   }   values.push([     id, isoToDate(date), operationType, ticker, totalQuantity, weigthedPrice, currency, totalSum, commission.value   ]) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 values. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">getTrades<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">function isoToDate(dateStr){   \/\/ How to format date string so that google scripts recognizes it?   \/\/ https:\/\/stackoverflow.com\/a\/17253060   const str = dateStr.replace(\/-\/,'\/').replace(\/-\/,'\/').replace(\/T\/,' ').replace(\/\\+\/,' \\+').replace(\/Z\/,' +00')   return new Date(str) }  function _calculateTrades(trades) {   let totalSum = 0   let totalQuantity = 0   for (let j in trades) {     const {quantity, price} = trades[j]     totalQuantity += quantity     totalSum += quantity * price   }   const weigthedPrice = totalSum \/ totalQuantity   return [totalQuantity, totalSum, weigthedPrice] }  function getTrades(ticker, from, to) {   const figi = _getFigiByTicker(ticker)   if (!from) {     from = TRADING_START_AT.toISOString()   }   if (!to) {     const now = new Date()     to = new Date(now + MILLIS_PER_DAY)     to = to.toISOString()   }   const operations = tinkoffClient.getOperations(from, to, figi)    const values = [     [&quot;ID&quot;, &quot;Date&quot;, &quot;Operation&quot;, &quot;Ticker&quot;, &quot;Quantity&quot;, &quot;Price&quot;, &quot;Currency&quot;, &quot;SUM&quot;, &quot;Commission&quot;],    ]   for (let i=operations.length-1; i&gt;=0; i--) {     const {operationType, status, trades, id, date, currency, commission} = operations[i]     if (operationType == &quot;BrokerCommission&quot; || status == &quot;Decline&quot;)        continue     let [totalQuantity, totalSum, weigthedPrice] = _calculateTrades(trades) \/\/ calculate weighted values     if (operationType == &quot;Buy&quot;) {  \/\/ inverse values in a way, that it will be easier to work with       totalQuantity = -totalQuantity       totalSum = -totalSum     }     values.push([       id, isoToDate(date), operationType, ticker, totalQuantity, weigthedPrice, currency, totalSum, commission.value     ])   }   return values }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u0431\u043e\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qk\/32\/te\/qk32teudjglrr2h5elg7i0l-it0.gif\">  <\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 API \u0422\u0438\u043d\u044c\u043a\u043e\u0444\u0444 \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0439, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 Google Apps Script, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Google Sheets \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0434\u0435\u043b\u043a\u0430\u043c\u0438 \u0441 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0451\u0442\u0430. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e)<\/p>\n<p>  <\/p>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 how-to \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/ErhoSen\/gas-tinkoff-trades\" rel=\"nofollow\">github<\/a><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043d\u0430 \u0434\u043e\u0440\u043e\u0433\u0443 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u2014 \u043c\u043e\u0433\u0443 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u0443\u0440\u0441 \u043e\u0442 \u0422\u0438\u043d\u044c\u043a\u043e\u0444\u0444 \u0416\u0443\u0440\u043d\u0430\u043b\u0430 <a href=\"https:\/\/journal.tinkoff.ru\/pro\/invest\/\" rel=\"nofollow\">https:\/\/journal.tinkoff.ru\/pro\/invest\/<\/a> \u2014 \u043e\u043d \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438 \u0434\u043e\u0445\u043e\u0434\u0447\u0438\u0432\u044b\u0439. <\/p>\n<p>  <\/p>\n<p>\u0410 \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0451\u0442\u0430 \u0432 \u0422\u0418 \u043f\u043e \u043c\u043e\u0435\u0439 <a href=\"https:\/\/www.tinkoff.ru\/sl\/3AOr3Vpqsk1\" rel=\"nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0430\u043a\u0446\u0438\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0434\u043e 20000 \u0440\u0443\u0431\u043b\u0435\u0439 \u0432 \u043f\u043e\u0434\u0430\u0440\u043e\u043a. <\/p>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<\/div>\n<p> \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\/501318\/\"> https:\/\/habr.com\/ru\/post\/501318\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/501318\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g9\/nh\/do\/g9nhdo-f7en-3uf3tmupt-orzai.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u043e\u0432 \u043f\u0440\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0441\u0430\u043c\u043e\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u0438, \u043a\u0430\u043a \u0438\u0442\u043e\u0433, \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u0442\u0440\u043e\u043b\u043b\u0435\u0439\u0431\u0443\u0441\u043e\u0432 \u0438\u0437 \u0431\u0443\u0445\u0430\u043d\u043a\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0445\u0430\u0431\u0430 \u2014 <i>\u0421\u0430\u043c\u043e\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044f<\/i>..<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f \u043f\u043e\u0441\u0432\u044f\u0442\u0438\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0441\u0432\u043e\u0438\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u0432 \u0422\u0438\u043d\u044c\u043a\u043e\u0444\u0444 \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u044f\u0445. \u0415\u0441\u0442\u044c 2 \u0442\u0438\u043f\u0430 \u043b\u044e\u0434\u0435\u0439: \u043e\u0434\u043d\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u0442\u0440\u043e\u044f\u0442 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0443 \u0441\u0435\u0431\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u0435, \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u044f\u0441\u044c \u043f\u043e \u043d\u0438\u043c for-\u0446\u0438\u043a\u043b\u043e\u043c \u0432 IPython Notebook, \u0434\u0440\u0443\u0433\u0438\u043c \u0436\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f &quot;\u0449\u0443\u043f\u0430\u0442\u044c&quot; \u0446\u0438\u0444\u0440\u044b, \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044f \u0438\u0445 \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c \u0432 Excel. \u0421\u0435\u0431\u044f \u044f \u043e\u0442\u043d\u043e\u0448\u0443 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0441\u0432\u043e\u0438 \u0441\u0434\u0435\u043b\u043a\u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0437\u0430\u043d\u043e\u0441\u0438\u043b \u0432 Google Sheets.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u044e \u0440\u0443\u0442\u0438\u043d\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Google Apps Script \u0438 API \u043e\u0442 \u0422\u0438\u043d\u044c\u043a\u043e\u0444\u0444 \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0439.<\/p>\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-303685","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303685","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=303685"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303685\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}