{"id":339601,"date":"2022-10-12T15:00:59","date_gmt":"2022-10-12T15:00:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=339601"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=339601","title":{"rendered":"<span>\u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u0430\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u0434\u043b\u044f NodeJS<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0435\u0441\u043d\u043e\u0439 2022 \u0433. \u044f \u043d\u0430\u0447\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/t.me\/flanker_pay_bot\" rel=\"noopener noreferrer nofollow\">Flanker<\/a> &#8212; \u0431\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043a\u0430\u0440\u0442\u0443 Visa USA \u0441 \u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u043e\u0439.<\/p>\n<p>\u041c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438, \u0441 \u043b\u0435\u0433\u043a\u0438\u043c API \u0438 \u0431\u0435\u0437 GUI. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u044f \u043d\u0430\u0448\u0435\u043b <a href=\"https:\/\/www.npmjs.com\/package\/medici\" rel=\"noopener noreferrer nofollow\">medici<\/a> &#8212; \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 mongoDB, \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u0438\u0439. \u0415\u043c\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u044f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0439\u0434\u0435\u0442, \u0438 \u0432\u043d\u0435\u0434\u0440\u0438\u043b \u0435\u0433\u043e \u0443 \u0441\u0435\u0431\u044f.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432, \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u044b\u0440\u043e\u0441, \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0441 \u0431\u043b\u0435\u043a\u0434\u0436\u0435\u043a\u043e\u043c, \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u043d\u0430 \u0440\u043e\u0434\u043d\u043e\u0439 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0432\u044f\u0437\u043a\u0435 Sequelize + Postgres.<\/p>\n<p><strong>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c: <\/strong><a href=\"https:\/\/www.npmjs.com\/package\/fledger\" rel=\"noopener noreferrer nofollow\"><strong>Fledger<\/strong><\/a><\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0441\u0444\u0435\u0440\u0435 \u043a\u0440\u0438\u043f\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. <\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u0441\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0441 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e (double ledger).<\/p>\n<p>\u041b\u044e\u0434\u044f\u043c, \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0441 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0438 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>\u042f \u043b\u0438\u0447\u043d\u043e \u0432\u0438\u0434\u0435\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0442\u044c &#171;\u043f\u043e\u043f\u0440\u043e\u0449\u0435&#187;, \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u0443\u0442 \u0436\u0435 \u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u043b\u0438. \u042d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u0432\u044b\u0441\u0442\u0440\u0435\u043b \u0432 \u043d\u043e\u0433\u0443. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e, \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0435\u0435 &#8212; \u0441\u043b\u043e\u0436\u043d\u043e, \u043e\u043d\u0430 \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<h2>\u0414\u0432\u043e\u0439\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c<\/h2>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0443\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u0440\u043d\u044f\u043c\u0438 \u0432 \u043a\u043e\u043d\u0435\u0446 15 \u0432\u0435\u043a, \u0432 \u0438\u0442\u0430\u043b\u044c\u044f\u043d\u0441\u043a\u0438\u0435 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0435 \u0433\u043e\u0440\u043e\u0434\u0430.<\/p>\n<p>\u041e\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0441\u0442\u0438\u043d\u0443: \u0434\u0435\u043d\u044c\u0433\u0438 \u043d\u0435 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u043d\u0438\u043e\u0442\u043a\u0443\u0434\u0430, \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u0432\u0430\u044e\u0442\u0441\u044f, \u043e\u043d\u0438 \u043b\u0438\u0448\u044c \u043f\u0435\u0440\u0435\u0442\u0435\u043a\u0430\u044e\u0442 \u0438\u0437 \u043a\u0430\u0440\u043c\u0430\u043d\u0430 \u0432 \u043a\u0430\u0440\u043c\u0430\u043d (\u0441\u043e \u0441\u0447\u0451\u0442\u0430 \u043d\u0430 \u0441\u0447\u0451\u0442). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u044e\u0431\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043d\u0435\u0433 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e (\u043c\u0438\u043d\u0438\u043c\u0443\u043c) \u043d\u0430 \u0434\u0432\u0443\u0445 \u0441\u0447\u0435\u0442\u0430\u0445 &#8212; \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0443\u0448\u043b\u043e, \u0438 \u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u043e. \u0415\u0441\u043b\u0438 \u043f\u043e-\u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443, \u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0431\u0435\u0442, \u0430 \u0443\u0445\u043e\u0434 &#8212; \u043a\u0440\u0435\u0434\u0438\u0442. \u0414\u0435\u0431\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d \u043a\u0440\u0435\u0434\u0438\u0442\u0443 \u043a\u0430\u043a \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u0434\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0441\u0435\u0439 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c &#171;\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u043a\u043e\u043d \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438&#187;, \u0438\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0441 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Fledger, \u0441\u043e\u0432\u0435\u0442\u0443\u044e <a href=\"https:\/\/www.npmjs.com\/package\/fledger\" rel=\"noopener noreferrer nofollow\">\u0438\u0437\u0443\u0447\u0438\u0442\u044c README<\/a>, \u0442\u043a \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u044b \u043c\u0435\u043b\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438. \u0417\u0434\u0435\u0441\u044c \u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430 \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"https:\/\/t.me\/flanker_pay_bot\" rel=\"noopener noreferrer nofollow\">Flanker<\/a>, \u0442\u043a \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0435\u0439\u0441 \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u0441\u0447\u0451\u0442 \u043d\u0430 100 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 &#8212; \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 100 USDT \u043d\u0430 \u043d\u0430\u0448 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>Account<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Assets:usdt<\/p>\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">UserBalances:1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u0435\u0431\u0438\u0442 &#8212; \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>Assets:usdt<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0438\u043f\u0442\u043e\u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430. \u041a\u0440\u0435\u0434\u0438\u0442 &#8212; \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>UserBalances:1<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0447\u0451\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 <code>id=1<\/code>.<\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 API Fledger:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:usdt', 10000, {type: 'userDeposit'})   .credit('UserBalances:1', 10000, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0441\u0443\u043c\u043c\u044b \u0432\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0435 \u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u0430\u0445, \u0430 \u0432 \u0446\u0435\u043d\u0442\u0430\u0445. \u0412\u0441\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445, \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445. \u042f \u0432\u043e\u043e\u0431\u0449\u0435 \u0445\u0440\u0430\u043d\u044e \u043d\u0435 \u0432 \u0446\u0435\u043d\u0442\u0430\u0445, \u0430 \u0432 \u0441\u0430\u0442\u043e\u0448\u0438 (10^-8);<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 meta-info <code>{type: 'userDeposit'}<\/code>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u044b \u0443\u0434\u043e\u0431\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u043e \u0441\u0447\u0435\u0442\u0430 <code>Assets:usdt<\/code> \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u0447\u0435\u0442\u0430 \u0438 \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u0430<\/h2>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/fledger\" rel=\"noopener noreferrer nofollow\">Fledger<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0434\u043b\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0447\u0451\u0442 <code>UserBalances<\/code>, \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u0430 <code>UserBalances:1<\/code> \u0438 <code>UserBalances:2<\/code>.<\/p>\n<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u0438\u043b\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441\u0447\u0435\u0442\u0430 <code>UserBalances<\/code>, Fledger \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441 \u0438\u043b\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430 \u0418 \u0432\u0441\u0435\u0445 \u0435\u0433\u043e \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u043e\u0432. \u0422\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u0432\u0441\u0435\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u043d\u0430 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0435, \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432\/\u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0445 \u0441\u0447\u0435\u0442\u043e\u0432 \u043f\u043e\u0434 \u0441\u0447\u0451\u0442\u043e\u043c <code>Assets<\/code><\/p>\n<h2>\u041a\u043e\u043c\u0438\u0441\u0441\u0438\u044f<\/h2>\n<p>\u0423\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440. \u0421\u043a\u0430\u0436\u0435\u043c, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u044e\u0437\u0435\u0440\u0430 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438 \u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>Accounts<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Assets:usdt<\/p>\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">UserBalances:1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">95<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Income:fees<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u043b\u0438 \u0432 API Fledger:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:usdt', 10000, {type: 'userDeposit'})   .credit('UserBalances:1', 9500, {type: 'userDeposit'})   .credit('Income:fees', 500, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0432\u0443\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 (\u0432 \u0442\u0435\u043e\u0440\u0438\u0438 &#8212; \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e). \u041d\u043e \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u0431\u0430\u043b\u0430\u043d\u0441\u0435!<\/p>\n<h2>\u041a\u0430\u043a \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0443\u0434\u0430 \u0434\u0435\u0431\u0435\u0442, \u0430 \u043a\u0443\u0434\u0430 \u043a\u0440\u0435\u0434\u0438\u0442?<\/h2>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>Assets<\/code> \u0430 \u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>UserBalances<\/code>. \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0430 \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442?<\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0444\u0438\u0440\u043c\u044b, \u0432\u0441\u0435 \u0441\u0447\u0435\u0442\u0430 \u0432 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 4 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u0430:<\/p>\n<ul>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u044b (Assets)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0441\u0441\u0438\u0432\u044b \u0438\u043b\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 (Liabilities)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0445\u043e\u0434\u044b (Incomes)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0445\u043e\u0434\u044b (Expenses)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e-\u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442.<\/p>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u044b<\/strong> &#8212; \u044d\u0442\u043e \u043d\u0438\u0448\u0442\u044f\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u043d\u0430\u0448\u0430 \u0444\u0438\u0440\u043c\u0430. \u041a\u043e\u0448\u0435\u043b\u0435\u043a \u0441 \u043a\u0440\u0438\u043f\u0442\u043e\u0439 &#8212; \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u0430\u043a\u0442\u0438\u0432, \u0432\u0435\u0434\u044c \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0435\u0441\u0442\u044c, \u0447\u0435\u043c \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 <strong>\u0440\u043e\u0441\u0442<\/strong> <strong>\u0430\u043a\u0442\u0438\u0432\u043e\u0432<\/strong>, \u0442\u043e \u044d\u0442\u043e <strong>\u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 \u0430\u043a\u0442\u0438\u0432\u0430 <\/strong>(\u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 &#8212; \u043a\u0440\u0435\u0434\u0438\u0442)<\/p>\n<p><strong>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043f\u0430\u0441\u0441\u0438\u0432\u044b<\/strong> &#8212; \u044d\u0442\u043e \u043e\u0442\u0441\u0442\u043e\u0439. \u042d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 (\u044e\u0437\u0435\u0440\u0430\u043c, \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c, \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0443). \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 <strong>\u0440\u043e\u0441\u0442<\/strong> <strong>\u043f\u0430\u0441\u0441\u0438\u0432\u043e\u0432<\/strong>, \u0442\u043e \u044d\u0442\u043e <strong>\u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 \u043f\u0430\u0441\u0441\u0438\u0432\u0430 <\/strong>(\u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0438\u0432\u043e\u0432 &#8212; \u0434\u0435\u0431\u0435\u0442).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:usdt', 10000, {type: 'userDeposit'})   .credit('UserBalances:1', 9500, {type: 'userDeposit'})   .credit('Income:fees', 500, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u042e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u043d\u0430\u0448 \u043a\u0440\u0438\u043f\u0442\u043e\u043a\u043e\u0448\u0435\u043b\u0435\u043a. \u042d\u0442\u043e \u0440\u043e\u0441\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0430? \u0414\u0430. \u0417\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e \u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>Assets:usdt<\/code>.<\/p>\n<p>\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u044e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u0431\u0430\u043b\u0430\u043d\u0441 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (<code>UserBalances:1<\/code>). \u0421\u0447\u0451\u0442 <code>UserBalances<\/code> &#8212; \u044d\u0442\u043e \u043d\u0430\u0448\u0438 <strong>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/strong> \u043f\u0435\u0440\u0435\u0434 \u044e\u0437\u0435\u0440\u0430\u043c\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>UserBalances:1<\/code>.<\/p>\n<p>\u042d\u0442\u0438 <strong>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/strong> \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u043d\u0430\u0448 <strong>\u0430\u043a\u0442\u0438\u0432<\/strong>. \u0427\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442\u0435? \u0417\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0410\u043a\u0442\u0438\u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u044b \u043f\u0430\u0441\u0441\u0438\u0432\u0430\u043c! \u0410\u043a\u0442\u0438\u0432\u044b \u0444\u0438\u0440\u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0440\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0430\u0441\u0441\u0438\u0432\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0430\u043b\u0430\u043d\u0441 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u043c!<\/p>\n<p><strong>\u041f\u0440\u0438\u0445\u043e\u0434\u044b (Incomes)<\/strong>. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438: <code>credit('Income:fees', 500, {type: 'userDeposit'})<\/code>. \u0421\u0447\u0451\u0442 <code>Income:fees<\/code> \u044d\u0442\u043e \u0441\u0447\u0451\u0442 \u041f\u0440\u0438\u0445\u043e\u0434\u0430. \u041c\u044b \u0441\u043f\u0438\u0441\u0430\u043b\u0438 \u0441 \u044e\u0437\u0435\u0440\u0430 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e 5 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432, \u0443 \u043d\u0430\u0448\u0435\u0439 \u0444\u0438\u0440\u043c\u044b \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043d\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043a\u0443\u0434\u0430-\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u0440\u0435\u0434\u0438\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u043d\u0443\u0436\u043d\u044b \u0441\u0447\u0435\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f Income. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u043c\u044b \u0433\u043b\u044f\u043d\u0435\u043c \u043a\u0440\u0435\u0434\u0438\u0442\u044b \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443, \u0438 \u0443\u0432\u0438\u0434\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c (\u0433\u0440\u044f\u0437\u043d\u044b\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0431\u0435\u0437 \u0432\u044b\u0447\u0435\u0442\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432). <strong>\u0420\u043e\u0441\u0442<\/strong> <strong>\u043f\u0440\u0438\u0445\u043e\u0434\u043e\u0432<\/strong> &#8212; \u044d\u0442\u043e <strong>\u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u043e\u0432.<\/strong><\/p>\n<p><strong>\u0420\u0430\u0441\u0445\u043e\u0434\u044b (Expenses)<\/strong>. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433. \u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438? \u041c\u044b \u043f\u043b\u0430\u0442\u0438\u043c \u0434\u0435\u043d\u044c\u0433\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0447\u0451\u0442\u0430 <code>Assets:bank<\/code>). \u042d\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>Assets:bank<\/code>. \u0410 \u0432\u0437\u0430\u043c\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u043a\u0438\u0439 \u043d\u0435\u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043a\u0442\u0438\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0441\u044f\u0446 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0447\u0435\u0442\u0430 <code>Expenses<\/code>. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>Expenses<\/code>. <strong>\u0420\u043e\u0441\u0442<\/strong> <strong>\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432<\/strong> &#8212; \u044d\u0442\u043e <strong>\u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432.<\/strong><\/p>\n<h2>\u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0434\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0447\u0451\u0442 \u0440\u0443\u0431\u043b\u044f\u043c\u0438. \u0421\u0447\u0451\u0442 \u0443 \u043d\u0430\u0441, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432\u044b\u0439. \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f. \u0412\u043e\u0442 \u043a\u0430\u043a \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"203\" width=\"203\">\n<p align=\"left\"><strong>Account<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Exchange rate<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"203\" width=\"203\">\n<p align=\"left\">Assets:AlfaBank (RUB)<\/p>\n<\/td>\n<td>\n<p align=\"left\">6000<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">60.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"203\" width=\"203\">\n<p align=\"left\">UserBalances:1 (USD)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u043b\u0438 \u0432 API Fledger:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:AlfaBank ', 6000, {type: 'userDeposit'}, 60.0)   \/\/ \u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 -----------------------------------------^   .credit('UserBalances:1', 100, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u0441\u0447\u0435\u0442\u043e\u0432 \u043d\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0430\u043b\u044e\u0442\u0435 &#8212; \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>\u0434\u0438\u0432\u0438\u0437\u043e\u0440\u043e\u043c. <\/em>\u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0443\u043c\u043c\u0443 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435, \u0441\u0443\u043c\u043c\u0430 \u0432 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435 <em>\u0434\u0435\u043b\u0438\u0442\u0441\u044f<\/em> \u043d\u0430 \u043a\u0443\u0440\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u0431\u0438\u0442 \u0438 \u043a\u0440\u0435\u0434\u0438\u0442 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0437\u0434\u0435\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u0447\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 (trading balance account)<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0432\u0430\u043b\u044e\u0442\u0430\u043c\u0438, \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"222\" width=\"222\">\n<p align=\"left\"><strong>Account<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Exchange rate<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"222\" width=\"222\">\n<p align=\"left\">Assets:AlfaBank (RUB)<\/p>\n<\/td>\n<td>\n<p align=\"left\">6000<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">60.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"222\" width=\"222\">\n<p align=\"left\">UserBalances:1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u042d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438, \u0442\u0430\u043a \u0438 \u0432\u0441\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 (\u0430\u043a\u0442\u0438\u0432\u044b \u0440\u0430\u0432\u043d\u044b \u043f\u0430\u0441\u0441\u0438\u0432\u0430\u043c).<\/p>\n<p>\u041f\u0440\u043e\u0448\u043b\u043e 10 \u043c\u0438\u043d\u0443\u0442, \u043a\u0443\u0440\u0441 RUBUSD \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0441\u0442\u0430\u043b, \u0441\u043a\u0430\u0436\u0435\u043c 80.0 (\u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u0443\u0440\u0441\u0443!)<\/p>\n<p>\u0411\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u0440\u0443\u0431\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u0446\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u0438 \u0430\u043a\u0442\u0438\u0432\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u043f\u0430\u0441\u0441\u0438\u0432\u0430\u043c. \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/p>\n<p>\u041d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 Trading Balance Account, \u0438\u043b\u0438 \u0421\u0447\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430. \u0422\u0435\u043c\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u0440\u043e\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/www.mathstat.dal.ca\/~selinger\/accounting\/tutorial.html#2\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u041f\u0438\u0442\u0435\u0440\u0430 \u0421\u0435\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 <\/a><\/p>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0442\u043e \u0421\u0447\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 &#8212; \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043e\u0441\u043e\u0431\u044b\u0439 \u0442\u0438\u043f \u0441\u0447\u0435\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u043c, \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u041e\u043d \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0433\u043e \u043e\u0446\u0435\u043d\u043a\u0443 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435 (\u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442), \u043e\u043d \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441. \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c &#171;\u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043e\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0432\u0430\u043b\u044e\u0442&#187;, \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 &#8212; &#171;\u043f\u043e\u0442\u0435\u0440\u0438 \u043e\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0432\u0430\u043b\u044e\u0442&#187;.<\/p>\n<p>\u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u044d\u0442\u043e\u0442 \u0441\u0447\u0451\u0442 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043e\u0444\u0444\u0441\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0443 Fledger \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0421\u0447\u0435\u0442\u0430 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">\/\/ query change of Trading Account state for last month: let tb = await book.tradingBalance({   startDate: moment().subtract(1, 'month').toDate(),   endDate: new Date() })  \/\/ query current state of Trading Account (for all time): let tb = await book.tradingBalance()  \/\/ returns object: \/\/ { \/\/   base: &lt;change of trading balance converted to base currency, in string>, \/\/   currency: { \/\/     USD: &lt;USD trading balance in string>, \/\/     THB: &lt;THB trading balance in string> \/\/   } \/\/ }<\/code><\/pre>\n<p>\u0411\u0430\u043b\u0430\u043d\u0441 \u044d\u0442\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430 \u043d\u0435 \u043a\u0435\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 <code>book.tradingBalance()<\/code> \u0440\u0430\u0432\u043d\u043e\u0441\u0438\u043b\u0435\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0437\u0430 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f. \u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u044d\u0442\u043e\u0433\u043e, \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435 \u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043a\u0440\u0430\u0442\u043a\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0433\u0440\u043e\u043c\u0438\u0441\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0431\u043e\u043b\u044c\u043d\u043e, \u0438 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0441 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0435\u0435 \u0443 \u0441\u0435\u0431\u044f. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0433\u043b\u0443\u0431\u0436\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043a\u0435\u0439\u0441\u044b, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f. \u0414\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 \u044d\u0442\u043e &#171;\u0434\u044b\u043c \u0438 \u0437\u0435\u0440\u043a\u0430\u043b\u0430&#187;, \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0438\u0445 \u0440\u0430\u0437\u0432\u0435\u044f\u0442\u044c.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u044e\u0437\u0435\u0440\u043e\u0432, \u0445\u0440\u0430\u043d\u044f\u0449\u0443\u044e \u0438\u0445 \u0431\u0430\u043b\u0430\u043d\u0441\u044b, \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0438\u0448\u044c&#8230;:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u044e\u0437\u0435\u0440\u0430 (\u043a\u0443\u0434\u0430 \u0434\u0435\u0431\u0438\u0442, \u043a\u0443\u0434\u0430 \u043a\u0440\u0435\u0434\u0438\u0442), \u0438 \u043a\u0430\u043a \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0441\u0445\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441 \u0441\u0447\u0435\u0442\u0430 \u044e\u0437\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 API Fledger (\u0438\u0437\u0438);<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a\u0443\u044e \u043c\u0435\u0442\u0430\u0438\u043d\u0444\u0443 \u043b\u0443\u0447\u0448\u0435 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c (\u0441\u043b\u0430\u0439\u0441\u0438\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 book.ledger)<\/p>\n<\/li>\n<\/ul>\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\/692612\/\"> https:\/\/habr.com\/ru\/post\/692612\/<\/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 article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0435\u0441\u043d\u043e\u0439 2022 \u0433. \u044f \u043d\u0430\u0447\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/t.me\/flanker_pay_bot\" rel=\"noopener noreferrer nofollow\">Flanker<\/a> &#8212; \u0431\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043a\u0430\u0440\u0442\u0443 Visa USA \u0441 \u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u043e\u0439.<\/p>\n<p>\u041c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438, \u0441 \u043b\u0435\u0433\u043a\u0438\u043c API \u0438 \u0431\u0435\u0437 GUI. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u044f \u043d\u0430\u0448\u0435\u043b <a href=\"https:\/\/www.npmjs.com\/package\/medici\" rel=\"noopener noreferrer nofollow\">medici<\/a> &#8212; \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 mongoDB, \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u0438\u0439. \u0415\u043c\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u044f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0439\u0434\u0435\u0442, \u0438 \u0432\u043d\u0435\u0434\u0440\u0438\u043b \u0435\u0433\u043e \u0443 \u0441\u0435\u0431\u044f.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432, \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u044b\u0440\u043e\u0441, \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0441 \u0431\u043b\u0435\u043a\u0434\u0436\u0435\u043a\u043e\u043c, \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u043d\u0430 \u0440\u043e\u0434\u043d\u043e\u0439 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0432\u044f\u0437\u043a\u0435 Sequelize + Postgres.<\/p>\n<p><strong>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c: <\/strong><a href=\"https:\/\/www.npmjs.com\/package\/fledger\" rel=\"noopener noreferrer nofollow\"><strong>Fledger<\/strong><\/a><\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0441\u0444\u0435\u0440\u0435 \u043a\u0440\u0438\u043f\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. <\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u0441\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0441 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e (double ledger).<\/p>\n<p>\u041b\u044e\u0434\u044f\u043c, \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0441 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0438 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>\u042f \u043b\u0438\u0447\u043d\u043e \u0432\u0438\u0434\u0435\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0442\u044c &#171;\u043f\u043e\u043f\u0440\u043e\u0449\u0435&#187;, \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u0443\u0442 \u0436\u0435 \u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u043b\u0438. \u042d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u0432\u044b\u0441\u0442\u0440\u0435\u043b \u0432 \u043d\u043e\u0433\u0443. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e, \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0435\u0435 &#8212; \u0441\u043b\u043e\u0436\u043d\u043e, \u043e\u043d\u0430 \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<h2>\u0414\u0432\u043e\u0439\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c<\/h2>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0443\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u0440\u043d\u044f\u043c\u0438 \u0432 \u043a\u043e\u043d\u0435\u0446 15 \u0432\u0435\u043a, \u0432 \u0438\u0442\u0430\u043b\u044c\u044f\u043d\u0441\u043a\u0438\u0435 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0435 \u0433\u043e\u0440\u043e\u0434\u0430.<\/p>\n<p>\u041e\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0441\u0442\u0438\u043d\u0443: \u0434\u0435\u043d\u044c\u0433\u0438 \u043d\u0435 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u043d\u0438\u043e\u0442\u043a\u0443\u0434\u0430, \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u0432\u0430\u044e\u0442\u0441\u044f, \u043e\u043d\u0438 \u043b\u0438\u0448\u044c \u043f\u0435\u0440\u0435\u0442\u0435\u043a\u0430\u044e\u0442 \u0438\u0437 \u043a\u0430\u0440\u043c\u0430\u043d\u0430 \u0432 \u043a\u0430\u0440\u043c\u0430\u043d (\u0441\u043e \u0441\u0447\u0451\u0442\u0430 \u043d\u0430 \u0441\u0447\u0451\u0442). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u044e\u0431\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043d\u0435\u0433 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e (\u043c\u0438\u043d\u0438\u043c\u0443\u043c) \u043d\u0430 \u0434\u0432\u0443\u0445 \u0441\u0447\u0435\u0442\u0430\u0445 &#8212; \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0443\u0448\u043b\u043e, \u0438 \u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u043e. \u0415\u0441\u043b\u0438 \u043f\u043e-\u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443, \u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0431\u0435\u0442, \u0430 \u0443\u0445\u043e\u0434 &#8212; \u043a\u0440\u0435\u0434\u0438\u0442. \u0414\u0435\u0431\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d \u043a\u0440\u0435\u0434\u0438\u0442\u0443 \u043a\u0430\u043a \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043e\u0434\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0441\u0435\u0439 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c &#171;\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u043a\u043e\u043d \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438&#187;, \u0438\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e \u0441 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0439 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Fledger, \u0441\u043e\u0432\u0435\u0442\u0443\u044e <a href=\"https:\/\/www.npmjs.com\/package\/fledger\" rel=\"noopener noreferrer nofollow\">\u0438\u0437\u0443\u0447\u0438\u0442\u044c README<\/a>, \u0442\u043a \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u044b \u043c\u0435\u043b\u043a\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438. \u0417\u0434\u0435\u0441\u044c \u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430 \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438.<\/p>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"https:\/\/t.me\/flanker_pay_bot\" rel=\"noopener noreferrer nofollow\">Flanker<\/a>, \u0442\u043a \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0435\u0439\u0441 \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u0441\u0447\u0451\u0442 \u043d\u0430 100 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 &#8212; \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 100 USDT \u043d\u0430 \u043d\u0430\u0448 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>Account<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Assets:usdt<\/p>\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">UserBalances:1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u0435\u0431\u0438\u0442 &#8212; \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>Assets:usdt<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0438\u043f\u0442\u043e\u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430. \u041a\u0440\u0435\u0434\u0438\u0442 &#8212; \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>UserBalances:1<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0447\u0451\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 <code>id=1<\/code>.<\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 API Fledger:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:usdt', 10000, {type: 'userDeposit'})   .credit('UserBalances:1', 10000, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0441\u0443\u043c\u043c\u044b \u0432\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0435 \u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u0430\u0445, \u0430 \u0432 \u0446\u0435\u043d\u0442\u0430\u0445. \u0412\u0441\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445, \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445. \u042f \u0432\u043e\u043e\u0431\u0449\u0435 \u0445\u0440\u0430\u043d\u044e \u043d\u0435 \u0432 \u0446\u0435\u043d\u0442\u0430\u0445, \u0430 \u0432 \u0441\u0430\u0442\u043e\u0448\u0438 (10^-8);<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 meta-info <code>{type: 'userDeposit'}<\/code>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u044b \u0443\u0434\u043e\u0431\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u043e \u0441\u0447\u0435\u0442\u0430 <code>Assets:usdt<\/code> \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u0447\u0435\u0442\u0430 \u0438 \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u0430<\/h2>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/fledger\" rel=\"noopener noreferrer nofollow\">Fledger<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0434\u043b\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0447\u0451\u0442 <code>UserBalances<\/code>, \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u0430 <code>UserBalances:1<\/code> \u0438 <code>UserBalances:2<\/code>.<\/p>\n<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u0438\u043b\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441\u0447\u0435\u0442\u0430 <code>UserBalances<\/code>, Fledger \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441 \u0438\u043b\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430 \u0418 \u0432\u0441\u0435\u0445 \u0435\u0433\u043e \u0441\u0443\u0431\u0441\u0447\u0435\u0442\u043e\u0432. \u0422\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u0432\u0441\u0435\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u043d\u0430 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0435, \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432\/\u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0445 \u0441\u0447\u0435\u0442\u043e\u0432 \u043f\u043e\u0434 \u0441\u0447\u0451\u0442\u043e\u043c <code>Assets<\/code><\/p>\n<h2>\u041a\u043e\u043c\u0438\u0441\u0441\u0438\u044f<\/h2>\n<p>\u0423\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440. \u0421\u043a\u0430\u0436\u0435\u043c, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u044e\u0437\u0435\u0440\u0430 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438 \u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>Accounts<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Assets:usdt<\/p>\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">UserBalances:1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">95<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Income:fees<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">5<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u043b\u0438 \u0432 API Fledger:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:usdt', 10000, {type: 'userDeposit'})   .credit('UserBalances:1', 9500, {type: 'userDeposit'})   .credit('Income:fees', 500, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0432\u0443\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 (\u0432 \u0442\u0435\u043e\u0440\u0438\u0438 &#8212; \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e). \u041d\u043e \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u0431\u0430\u043b\u0430\u043d\u0441\u0435!<\/p>\n<h2>\u041a\u0430\u043a \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0443\u0434\u0430 \u0434\u0435\u0431\u0435\u0442, \u0430 \u043a\u0443\u0434\u0430 \u043a\u0440\u0435\u0434\u0438\u0442?<\/h2>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>Assets<\/code> \u0430 \u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>UserBalances<\/code>. \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0430 \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442?<\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0444\u0438\u0440\u043c\u044b, \u0432\u0441\u0435 \u0441\u0447\u0435\u0442\u0430 \u0432 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 4 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u0430:<\/p>\n<ul>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u044b (Assets)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0441\u0441\u0438\u0432\u044b \u0438\u043b\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 (Liabilities)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0445\u043e\u0434\u044b (Incomes)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0445\u043e\u0434\u044b (Expenses)<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e-\u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442.<\/p>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u044b<\/strong> &#8212; \u044d\u0442\u043e \u043d\u0438\u0448\u0442\u044f\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u043d\u0430\u0448\u0430 \u0444\u0438\u0440\u043c\u0430. \u041a\u043e\u0448\u0435\u043b\u0435\u043a \u0441 \u043a\u0440\u0438\u043f\u0442\u043e\u0439 &#8212; \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u0430\u043a\u0442\u0438\u0432, \u0432\u0435\u0434\u044c \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0435\u0441\u0442\u044c, \u0447\u0435\u043c \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 <strong>\u0440\u043e\u0441\u0442<\/strong> <strong>\u0430\u043a\u0442\u0438\u0432\u043e\u0432<\/strong>, \u0442\u043e \u044d\u0442\u043e <strong>\u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 \u0430\u043a\u0442\u0438\u0432\u0430 <\/strong>(\u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 &#8212; \u043a\u0440\u0435\u0434\u0438\u0442)<\/p>\n<p><strong>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043f\u0430\u0441\u0441\u0438\u0432\u044b<\/strong> &#8212; \u044d\u0442\u043e \u043e\u0442\u0441\u0442\u043e\u0439. \u042d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u043c\u0443 \u043c\u0438\u0440\u0443 (\u044e\u0437\u0435\u0440\u0430\u043c, \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c, \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0443). \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 <strong>\u0440\u043e\u0441\u0442<\/strong> <strong>\u043f\u0430\u0441\u0441\u0438\u0432\u043e\u0432<\/strong>, \u0442\u043e \u044d\u0442\u043e <strong>\u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 \u043f\u0430\u0441\u0441\u0438\u0432\u0430 <\/strong>(\u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0438\u0432\u043e\u0432 &#8212; \u0434\u0435\u0431\u0435\u0442).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:usdt', 10000, {type: 'userDeposit'})   .credit('UserBalances:1', 9500, {type: 'userDeposit'})   .credit('Income:fees', 500, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u042e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u043d\u0430\u0448 \u043a\u0440\u0438\u043f\u0442\u043e\u043a\u043e\u0448\u0435\u043b\u0435\u043a. \u042d\u0442\u043e \u0440\u043e\u0441\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0430? \u0414\u0430. \u0417\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e \u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>Assets:usdt<\/code>.<\/p>\n<p>\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u044e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u0431\u0430\u043b\u0430\u043d\u0441 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (<code>UserBalances:1<\/code>). \u0421\u0447\u0451\u0442 <code>UserBalances<\/code> &#8212; \u044d\u0442\u043e \u043d\u0430\u0448\u0438 <strong>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/strong> \u043f\u0435\u0440\u0435\u0434 \u044e\u0437\u0435\u0440\u0430\u043c\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>UserBalances:1<\/code>.<\/p>\n<p>\u042d\u0442\u0438 <strong>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/strong> \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044e\u0437\u0435\u0440 \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u043d\u0430\u0448 <strong>\u0430\u043a\u0442\u0438\u0432<\/strong>. \u0427\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442\u0435? \u0417\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0410\u043a\u0442\u0438\u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u044b \u043f\u0430\u0441\u0441\u0438\u0432\u0430\u043c! \u0410\u043a\u0442\u0438\u0432\u044b \u0444\u0438\u0440\u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0440\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0430\u0441\u0441\u0438\u0432\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0430\u043b\u0430\u043d\u0441 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u043c!<\/p>\n<p><strong>\u041f\u0440\u0438\u0445\u043e\u0434\u044b (Incomes)<\/strong>. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438: <code>credit('Income:fees', 500, {type: 'userDeposit'})<\/code>. \u0421\u0447\u0451\u0442 <code>Income:fees<\/code> \u044d\u0442\u043e \u0441\u0447\u0451\u0442 \u041f\u0440\u0438\u0445\u043e\u0434\u0430. \u041c\u044b \u0441\u043f\u0438\u0441\u0430\u043b\u0438 \u0441 \u044e\u0437\u0435\u0440\u0430 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e 5 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432, \u0443 \u043d\u0430\u0448\u0435\u0439 \u0444\u0438\u0440\u043c\u044b \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043d\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043a\u0443\u0434\u0430-\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u0440\u0435\u0434\u0438\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u043d\u0443\u0436\u043d\u044b \u0441\u0447\u0435\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f Income. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u043c\u044b \u0433\u043b\u044f\u043d\u0435\u043c \u043a\u0440\u0435\u0434\u0438\u0442\u044b \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443, \u0438 \u0443\u0432\u0438\u0434\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c (\u0433\u0440\u044f\u0437\u043d\u044b\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0431\u0435\u0437 \u0432\u044b\u0447\u0435\u0442\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432). <strong>\u0420\u043e\u0441\u0442<\/strong> <strong>\u043f\u0440\u0438\u0445\u043e\u0434\u043e\u0432<\/strong> &#8212; \u044d\u0442\u043e <strong>\u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u043e\u0432.<\/strong><\/p>\n<p><strong>\u0420\u0430\u0441\u0445\u043e\u0434\u044b (Expenses)<\/strong>. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433. \u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438? \u041c\u044b \u043f\u043b\u0430\u0442\u0438\u043c \u0434\u0435\u043d\u044c\u0433\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0447\u0451\u0442\u0430 <code>Assets:bank<\/code>). \u042d\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0440\u0435\u0434\u0438\u0442 \u043f\u043e \u0441\u0447\u0451\u0442\u0443 <code>Assets:bank<\/code>. \u0410 \u0432\u0437\u0430\u043c\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u043a\u0438\u0439 \u043d\u0435\u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043a\u0442\u0438\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0441\u044f\u0446 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0447\u0435\u0442\u0430 <code>Expenses<\/code>. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 <code>Expenses<\/code>. <strong>\u0420\u043e\u0441\u0442<\/strong> <strong>\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432<\/strong> &#8212; \u044d\u0442\u043e <strong>\u0434\u0435\u0431\u0435\u0442 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432.<\/strong><\/p>\n<h2>\u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0434\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0447\u0451\u0442 \u0440\u0443\u0431\u043b\u044f\u043c\u0438. \u0421\u0447\u0451\u0442 \u0443 \u043d\u0430\u0441, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432\u044b\u0439. \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f. \u0412\u043e\u0442 \u043a\u0430\u043a \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u044c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"203\" width=\"203\">\n<p align=\"left\"><strong>Account<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Exchange rate<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"203\" width=\"203\">\n<p align=\"left\">Assets:AlfaBank (RUB)<\/p>\n<\/td>\n<td>\n<p align=\"left\">6000<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">60.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"203\" width=\"203\">\n<p align=\"left\">UserBalances:1 (USD)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u043b\u0438 \u0432 API Fledger:<\/p>\n<pre><code class=\"javascript\">await book.entry('User 1 deposit')   .debit('Assets:AlfaBank ', 6000, {type: 'userDeposit'}, 60.0)   \/\/ \u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 -----------------------------------------^   .credit('UserBalances:1', 100, {type: 'userDeposit'})   .commit()<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u043b\u044f \u0441\u0447\u0435\u0442\u043e\u0432 \u043d\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0430\u043b\u044e\u0442\u0435 &#8212; \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>\u0434\u0438\u0432\u0438\u0437\u043e\u0440\u043e\u043c. <\/em>\u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0443\u043c\u043c\u0443 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435, \u0441\u0443\u043c\u043c\u0430 \u0432 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435 <em>\u0434\u0435\u043b\u0438\u0442\u0441\u044f<\/em> \u043d\u0430 \u043a\u0443\u0440\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u0431\u0438\u0442 \u0438 \u043a\u0440\u0435\u0434\u0438\u0442 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0437\u0434\u0435\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u0443\u0440\u0441 \u043e\u0431\u043c\u0435\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u0447\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 (trading balance account)<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0432\u0430\u043b\u044e\u0442\u0430\u043c\u0438, \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"222\" width=\"222\">\n<p align=\"left\"><strong>Account<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Debit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Credit<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Exchange rate<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"222\" width=\"222\">\n<p align=\"left\">Assets:AlfaBank (RUB)<\/p>\n<\/td>\n<td>\n<p align=\"left\">6000<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">60.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"222\" width=\"222\">\n<p align=\"left\">UserBalances:1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\">100<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u042d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438, \u0442\u0430\u043a \u0438 \u0432\u0441\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 (\u0430\u043a\u0442\u0438\u0432\u044b \u0440\u0430\u0432\u043d\u044b \u043f\u0430\u0441\u0441\u0438\u0432\u0430\u043c).<\/p>\n<p>\u041f\u0440\u043e\u0448\u043b\u043e 10 \u043c\u0438\u043d\u0443\u0442, \u043a\u0443\u0440\u0441 RUBUSD \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0441\u0442\u0430\u043b, \u0441\u043a\u0430\u0436\u0435\u043c 80.0 (\u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u0443\u0440\u0441\u0443!)<\/p>\n<p>\u0411\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u0440\u0443\u0431\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u0446\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u0438 \u0430\u043a\u0442\u0438\u0432\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u043f\u0430\u0441\u0441\u0438\u0432\u0430\u043c. \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/p>\n<p>\u041d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 Trading Balance Account, \u0438\u043b\u0438 \u0421\u0447\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430. \u0422\u0435\u043c\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u0440\u043e\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/www.mathstat.dal.ca\/~selinger\/accounting\/tutorial.html#2\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u041f\u0438\u0442\u0435\u0440\u0430 \u0421\u0435\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 <\/a><\/p>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0442\u043e \u0421\u0447\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 &#8212; \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043e\u0441\u043e\u0431\u044b\u0439 \u0442\u0438\u043f \u0441\u0447\u0435\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u043c, \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u041e\u043d \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0433\u043e \u043e\u0446\u0435\u043d\u043a\u0443 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435 (\u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442), \u043e\u043d \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441. \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c &#171;\u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043e\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0432\u0430\u043b\u044e\u0442&#187;, \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 &#8212; &#171;\u043f\u043e\u0442\u0435\u0440\u0438 \u043e\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0432\u0430\u043b\u044e\u0442&#187;.<\/p>\n<p>\u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u044d\u0442\u043e\u0442 \u0441\u0447\u0451\u0442 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043e\u0444\u0444\u0441\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u044e.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0443 Fledger \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0421\u0447\u0435\u0442\u0430 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">\/\/ query change of Trading Account state for last month: let tb = await book.tradingBalance({   startDate: moment().subtract(1, 'month').toDate(),   endDate: new Date() })  \/\/ query current state of Trading Account (for all time): let tb = await book.tradingBalance()  \/\/ returns object: \/\/ { \/\/   base: &lt;change of trading balance converted to base currency, in string>, \/\/   currency: { \/\/     USD: &lt;USD trading balance in string>, \/\/     THB: &lt;THB trading balance in string> \/\/   } \/\/ }<\/code><\/pre>\n<p>\u0411\u0430\u043b\u0430\u043d\u0441 \u044d\u0442\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430 \u043d\u0435 \u043a\u0435\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 <code>book.tradingBalance()<\/code> \u0440\u0430\u0432\u043d\u043e\u0441\u0438\u043b\u0435\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0437\u0430 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f. \u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u044d\u0442\u043e\u0433\u043e, \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435 \u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043a\u0440\u0430\u0442\u043a\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e<\/p>\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-339601","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339601","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=339601"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339601\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}