@woodger/t-invest-node-sdk 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +611 -0
- package/LICENSE +21 -0
- package/THIRD_PARTY_NOTICES.md +307 -0
- package/certificates/russian-trusted-root-ca.pem +33 -0
- package/dist/application/dto/t-invest-options.d.ts +30 -0
- package/dist/application/dto/t-invest-options.js +11 -0
- package/dist/application/dto/t-invest-services.d.ts +168 -0
- package/dist/application/dto/t-invest-services.js +12 -0
- package/dist/application/errors/sdk-error.d.ts +47 -0
- package/dist/application/errors/sdk-error.js +84 -0
- package/dist/application/reports/accounts.report.d.ts +26 -0
- package/dist/application/reports/accounts.report.js +11 -0
- package/dist/application/reports/accrued-interests.report.d.ts +22 -0
- package/dist/application/reports/accrued-interests.report.js +11 -0
- package/dist/application/reports/asset.report.d.ts +72 -0
- package/dist/application/reports/asset.report.js +11 -0
- package/dist/application/reports/bond-coupons.report.d.ts +31 -0
- package/dist/application/reports/bond-coupons.report.js +11 -0
- package/dist/application/reports/bond.report.d.ts +82 -0
- package/dist/application/reports/bond.report.js +11 -0
- package/dist/application/reports/brands.report.d.ts +24 -0
- package/dist/application/reports/brands.report.js +11 -0
- package/dist/application/reports/broker-report.report.d.ts +74 -0
- package/dist/application/reports/broker-report.report.js +11 -0
- package/dist/application/reports/cancel-order.report.d.ts +14 -0
- package/dist/application/reports/cancel-order.report.js +11 -0
- package/dist/application/reports/cancel-stop-order.report.d.ts +14 -0
- package/dist/application/reports/cancel-stop-order.report.js +11 -0
- package/dist/application/reports/candles.report.d.ts +26 -0
- package/dist/application/reports/candles.report.js +11 -0
- package/dist/application/reports/close-prices.report.d.ts +20 -0
- package/dist/application/reports/close-prices.report.js +11 -0
- package/dist/application/reports/countries.report.d.ts +20 -0
- package/dist/application/reports/countries.report.js +11 -0
- package/dist/application/reports/currency.report.d.ts +58 -0
- package/dist/application/reports/currency.report.js +11 -0
- package/dist/application/reports/dividends-foreign-issuer.report.d.ts +51 -0
- package/dist/application/reports/dividends-foreign-issuer.report.js +11 -0
- package/dist/application/reports/dividends.report.d.ts +33 -0
- package/dist/application/reports/dividends.report.js +11 -0
- package/dist/application/reports/etf.report.d.ts +62 -0
- package/dist/application/reports/etf.report.js +11 -0
- package/dist/application/reports/favorites.report.d.ts +24 -0
- package/dist/application/reports/favorites.report.js +11 -0
- package/dist/application/reports/find-instrument.report.d.ts +34 -0
- package/dist/application/reports/find-instrument.report.js +11 -0
- package/dist/application/reports/future.report.d.ts +66 -0
- package/dist/application/reports/future.report.js +11 -0
- package/dist/application/reports/futures-margin.report.d.ts +21 -0
- package/dist/application/reports/futures-margin.report.js +11 -0
- package/dist/application/reports/index.d.ts +50 -0
- package/dist/application/reports/index.js +66 -0
- package/dist/application/reports/instrument.report.d.ts +47 -0
- package/dist/application/reports/instrument.report.js +11 -0
- package/dist/application/reports/last-prices.report.d.ts +20 -0
- package/dist/application/reports/last-prices.report.js +11 -0
- package/dist/application/reports/last-trades.report.d.ts +24 -0
- package/dist/application/reports/last-trades.report.js +11 -0
- package/dist/application/reports/margin-attributes.report.d.ts +25 -0
- package/dist/application/reports/margin-attributes.report.js +11 -0
- package/dist/application/reports/money.report.d.ts +15 -0
- package/dist/application/reports/money.report.js +11 -0
- package/dist/application/reports/operations-by-cursor.report.d.ts +65 -0
- package/dist/application/reports/operations-by-cursor.report.js +11 -0
- package/dist/application/reports/operations.report.d.ts +40 -0
- package/dist/application/reports/operations.report.js +11 -0
- package/dist/application/reports/option.report.d.ts +76 -0
- package/dist/application/reports/option.report.js +11 -0
- package/dist/application/reports/order-book.report.d.ts +38 -0
- package/dist/application/reports/order-book.report.js +11 -0
- package/dist/application/reports/order-mutation.report.d.ts +45 -0
- package/dist/application/reports/order-mutation.report.js +11 -0
- package/dist/application/reports/order-state.report.d.ts +12 -0
- package/dist/application/reports/order-state.report.js +11 -0
- package/dist/application/reports/orders.report.d.ts +53 -0
- package/dist/application/reports/orders.report.js +11 -0
- package/dist/application/reports/portfolio.report.d.ts +54 -0
- package/dist/application/reports/portfolio.report.js +11 -0
- package/dist/application/reports/positions.report.d.ts +45 -0
- package/dist/application/reports/positions.report.js +11 -0
- package/dist/application/reports/post-stop-order.report.d.ts +14 -0
- package/dist/application/reports/post-stop-order.report.js +11 -0
- package/dist/application/reports/sandbox-account.report.d.ts +20 -0
- package/dist/application/reports/sandbox-account.report.js +11 -0
- package/dist/application/reports/share.report.d.ts +66 -0
- package/dist/application/reports/share.report.js +11 -0
- package/dist/application/reports/stop-orders.report.d.ts +34 -0
- package/dist/application/reports/stop-orders.report.js +11 -0
- package/dist/application/reports/trading-schedules.report.d.ts +44 -0
- package/dist/application/reports/trading-schedules.report.js +11 -0
- package/dist/application/reports/trading-status.report.d.ts +19 -0
- package/dist/application/reports/trading-status.report.js +11 -0
- package/dist/application/reports/trading-statuses.report.d.ts +12 -0
- package/dist/application/reports/trading-statuses.report.js +11 -0
- package/dist/application/reports/user-info.report.d.ts +16 -0
- package/dist/application/reports/user-info.report.js +11 -0
- package/dist/application/reports/user-tariff.report.d.ts +28 -0
- package/dist/application/reports/user-tariff.report.js +11 -0
- package/dist/application/reports/withdraw-limits.report.d.ts +16 -0
- package/dist/application/reports/withdraw-limits.report.js +11 -0
- package/dist/application/services/unary-limiter.d.ts +44 -0
- package/dist/application/services/unary-limiter.js +138 -0
- package/dist/bootstrap/args/command-options.d.ts +43 -0
- package/dist/bootstrap/args/command-options.js +125 -0
- package/dist/bootstrap/args/index.d.ts +1 -0
- package/dist/bootstrap/args/index.js +5 -0
- package/dist/bootstrap/args/instrument-id-options.d.ts +24 -0
- package/dist/bootstrap/args/instrument-id-options.js +47 -0
- package/dist/bootstrap/args/instruments-args.d.ts +49 -0
- package/dist/bootstrap/args/instruments-args.js +89 -0
- package/dist/bootstrap/args/sdk-options.d.ts +19 -0
- package/dist/bootstrap/args/sdk-options.js +40 -0
- package/dist/bootstrap/args/side-effect-args.d.ts +20 -0
- package/dist/bootstrap/args/side-effect-args.js +50 -0
- package/dist/bootstrap/cli/contract.d.ts +16 -0
- package/dist/bootstrap/cli/contract.js +15 -0
- package/dist/bootstrap/cli/domains.d.ts +260 -0
- package/dist/bootstrap/cli/domains.js +631 -0
- package/dist/bootstrap/cli/error.d.ts +15 -0
- package/dist/bootstrap/cli/error.js +40 -0
- package/dist/bootstrap/cli/help.d.ts +751 -0
- package/dist/bootstrap/cli/help.js +1789 -0
- package/dist/bootstrap/cli/registry.d.ts +2102 -0
- package/dist/bootstrap/cli/registry.js +186 -0
- package/dist/bootstrap/cli/runner.d.ts +10 -0
- package/dist/bootstrap/cli/runner.js +151 -0
- package/dist/bootstrap/cli/version.d.ts +17 -0
- package/dist/bootstrap/cli/version.js +26 -0
- package/dist/bootstrap/commands/accounts/cli.d.ts +63 -0
- package/dist/bootstrap/commands/accounts/cli.js +50 -0
- package/dist/bootstrap/commands/accounts/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/accounts/reporter.js +50 -0
- package/dist/bootstrap/commands/accrued-interests/cli.d.ts +129 -0
- package/dist/bootstrap/commands/accrued-interests/cli.js +80 -0
- package/dist/bootstrap/commands/accrued-interests/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/accrued-interests/reporter.js +43 -0
- package/dist/bootstrap/commands/asset/cli.d.ts +99 -0
- package/dist/bootstrap/commands/asset/cli.js +64 -0
- package/dist/bootstrap/commands/asset/reporter.d.ts +16 -0
- package/dist/bootstrap/commands/asset/reporter.js +122 -0
- package/dist/bootstrap/commands/assets/cli.d.ts +102 -0
- package/dist/bootstrap/commands/assets/cli.js +78 -0
- package/dist/bootstrap/commands/assets/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/assets/reporter.js +27 -0
- package/dist/bootstrap/commands/bond/cli.d.ts +83 -0
- package/dist/bootstrap/commands/bond/cli.js +53 -0
- package/dist/bootstrap/commands/bond/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/bond/reporter.js +123 -0
- package/dist/bootstrap/commands/bond-coupons/cli.d.ts +129 -0
- package/dist/bootstrap/commands/bond-coupons/cli.js +80 -0
- package/dist/bootstrap/commands/bond-coupons/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/bond-coupons/reporter.js +64 -0
- package/dist/bootstrap/commands/bonds/cli.d.ts +73 -0
- package/dist/bootstrap/commands/bonds/cli.js +53 -0
- package/dist/bootstrap/commands/bonds/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/bonds/reporter.js +27 -0
- package/dist/bootstrap/commands/brand/cli.d.ts +99 -0
- package/dist/bootstrap/commands/brand/cli.js +64 -0
- package/dist/bootstrap/commands/brand/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/brand/reporter.js +37 -0
- package/dist/bootstrap/commands/brands/cli.d.ts +63 -0
- package/dist/bootstrap/commands/brands/cli.js +50 -0
- package/dist/bootstrap/commands/brands/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/brands/reporter.js +49 -0
- package/dist/bootstrap/commands/broker-report/cli.d.ts +132 -0
- package/dist/bootstrap/commands/broker-report/cli.js +105 -0
- package/dist/bootstrap/commands/broker-report/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/broker-report/reporter.js +123 -0
- package/dist/bootstrap/commands/cancel-order/cli.d.ts +120 -0
- package/dist/bootstrap/commands/cancel-order/cli.js +71 -0
- package/dist/bootstrap/commands/cancel-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/cancel-order/reporter.js +32 -0
- package/dist/bootstrap/commands/cancel-stop-order/cli.d.ts +120 -0
- package/dist/bootstrap/commands/cancel-stop-order/cli.js +71 -0
- package/dist/bootstrap/commands/cancel-stop-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/cancel-stop-order/reporter.js +32 -0
- package/dist/bootstrap/commands/candles/cli.d.ts +138 -0
- package/dist/bootstrap/commands/candles/cli.js +104 -0
- package/dist/bootstrap/commands/candles/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/candles/reporter.js +49 -0
- package/dist/bootstrap/commands/close-prices/cli.d.ts +99 -0
- package/dist/bootstrap/commands/close-prices/cli.js +66 -0
- package/dist/bootstrap/commands/close-prices/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/close-prices/reporter.js +43 -0
- package/dist/bootstrap/commands/compile-proto/cli.d.ts +12 -0
- package/dist/bootstrap/commands/compile-proto/cli.js +22 -0
- package/dist/bootstrap/commands/countries/cli.d.ts +63 -0
- package/dist/bootstrap/commands/countries/cli.js +50 -0
- package/dist/bootstrap/commands/countries/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/countries/reporter.js +42 -0
- package/dist/bootstrap/commands/currencies/cli.d.ts +73 -0
- package/dist/bootstrap/commands/currencies/cli.js +53 -0
- package/dist/bootstrap/commands/currencies/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/currencies/reporter.js +27 -0
- package/dist/bootstrap/commands/currency/cli.d.ts +83 -0
- package/dist/bootstrap/commands/currency/cli.js +53 -0
- package/dist/bootstrap/commands/currency/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/currency/reporter.js +104 -0
- package/dist/bootstrap/commands/dividends/cli.d.ts +129 -0
- package/dist/bootstrap/commands/dividends/cli.js +80 -0
- package/dist/bootstrap/commands/dividends/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/dividends/reporter.js +62 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/cli.d.ts +132 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/cli.js +105 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/dividends-foreign-issuer/reporter.js +108 -0
- package/dist/bootstrap/commands/edit-favorites/cli.d.ts +129 -0
- package/dist/bootstrap/commands/edit-favorites/cli.js +78 -0
- package/dist/bootstrap/commands/edit-favorites/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/edit-favorites/reporter.js +23 -0
- package/dist/bootstrap/commands/etf/cli.d.ts +83 -0
- package/dist/bootstrap/commands/etf/cli.js +53 -0
- package/dist/bootstrap/commands/etf/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/etf/reporter.js +109 -0
- package/dist/bootstrap/commands/etfs/cli.d.ts +73 -0
- package/dist/bootstrap/commands/etfs/cli.js +53 -0
- package/dist/bootstrap/commands/etfs/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/etfs/reporter.js +27 -0
- package/dist/bootstrap/commands/favorites/cli.d.ts +63 -0
- package/dist/bootstrap/commands/favorites/cli.js +50 -0
- package/dist/bootstrap/commands/favorites/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/favorites/reporter.js +60 -0
- package/dist/bootstrap/commands/find-instrument/cli.d.ts +126 -0
- package/dist/bootstrap/commands/find-instrument/cli.js +88 -0
- package/dist/bootstrap/commands/find-instrument/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/find-instrument/reporter.js +71 -0
- package/dist/bootstrap/commands/future/cli.d.ts +83 -0
- package/dist/bootstrap/commands/future/cli.js +53 -0
- package/dist/bootstrap/commands/future/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/future/reporter.js +116 -0
- package/dist/bootstrap/commands/futures/cli.d.ts +73 -0
- package/dist/bootstrap/commands/futures/cli.js +53 -0
- package/dist/bootstrap/commands/futures/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/futures/reporter.js +27 -0
- package/dist/bootstrap/commands/futures-margin/cli.d.ts +105 -0
- package/dist/bootstrap/commands/futures-margin/cli.js +64 -0
- package/dist/bootstrap/commands/futures-margin/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/futures-margin/reporter.js +40 -0
- package/dist/bootstrap/commands/help/cli.d.ts +13 -0
- package/dist/bootstrap/commands/help/cli.js +26 -0
- package/dist/bootstrap/commands/instrument/cli.d.ts +83 -0
- package/dist/bootstrap/commands/instrument/cli.js +53 -0
- package/dist/bootstrap/commands/instrument/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/instrument/reporter.js +91 -0
- package/dist/bootstrap/commands/last-prices/cli.d.ts +99 -0
- package/dist/bootstrap/commands/last-prices/cli.js +66 -0
- package/dist/bootstrap/commands/last-prices/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/last-prices/reporter.js +43 -0
- package/dist/bootstrap/commands/last-trades/cli.d.ts +123 -0
- package/dist/bootstrap/commands/last-trades/cli.js +82 -0
- package/dist/bootstrap/commands/last-trades/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/last-trades/reporter.js +48 -0
- package/dist/bootstrap/commands/margin-attributes/cli.d.ts +99 -0
- package/dist/bootstrap/commands/margin-attributes/cli.js +64 -0
- package/dist/bootstrap/commands/margin-attributes/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/margin-attributes/reporter.js +51 -0
- package/dist/bootstrap/commands/operations/cli.d.ts +156 -0
- package/dist/bootstrap/commands/operations/cli.js +99 -0
- package/dist/bootstrap/commands/operations/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/operations/reporter.js +78 -0
- package/dist/bootstrap/commands/operations-by-cursor/cli.d.ts +204 -0
- package/dist/bootstrap/commands/operations-by-cursor/cli.js +164 -0
- package/dist/bootstrap/commands/operations-by-cursor/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/operations-by-cursor/reporter.js +107 -0
- package/dist/bootstrap/commands/option/cli.d.ts +83 -0
- package/dist/bootstrap/commands/option/cli.js +53 -0
- package/dist/bootstrap/commands/option/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/option/reporter.js +125 -0
- package/dist/bootstrap/commands/options-by/cli.d.ts +108 -0
- package/dist/bootstrap/commands/options-by/cli.js +68 -0
- package/dist/bootstrap/commands/options-by/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/options-by/reporter.js +27 -0
- package/dist/bootstrap/commands/order-book/cli.d.ts +120 -0
- package/dist/bootstrap/commands/order-book/cli.js +73 -0
- package/dist/bootstrap/commands/order-book/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/order-book/reporter.js +60 -0
- package/dist/bootstrap/commands/order-state/cli.d.ts +111 -0
- package/dist/bootstrap/commands/order-state/cli.js +71 -0
- package/dist/bootstrap/commands/order-state/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/order-state/reporter.js +57 -0
- package/dist/bootstrap/commands/orders/cli.d.ts +99 -0
- package/dist/bootstrap/commands/orders/cli.js +64 -0
- package/dist/bootstrap/commands/orders/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/orders/reporter.js +88 -0
- package/dist/bootstrap/commands/portfolio/cli.d.ts +114 -0
- package/dist/bootstrap/commands/portfolio/cli.js +77 -0
- package/dist/bootstrap/commands/portfolio/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/portfolio/reporter.js +95 -0
- package/dist/bootstrap/commands/positions/cli.d.ts +99 -0
- package/dist/bootstrap/commands/positions/cli.js +64 -0
- package/dist/bootstrap/commands/positions/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/positions/reporter.js +116 -0
- package/dist/bootstrap/commands/post-order/cli.d.ts +192 -0
- package/dist/bootstrap/commands/post-order/cli.js +113 -0
- package/dist/bootstrap/commands/post-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/post-order/reporter.js +77 -0
- package/dist/bootstrap/commands/post-stop-order/cli.d.ts +216 -0
- package/dist/bootstrap/commands/post-stop-order/cli.js +145 -0
- package/dist/bootstrap/commands/post-stop-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/post-stop-order/reporter.js +31 -0
- package/dist/bootstrap/commands/replace-order/cli.d.ts +180 -0
- package/dist/bootstrap/commands/replace-order/cli.js +99 -0
- package/dist/bootstrap/commands/replace-order/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/replace-order/reporter.js +17 -0
- package/dist/bootstrap/commands/sandbox-accounts/cli.d.ts +64 -0
- package/dist/bootstrap/commands/sandbox-accounts/cli.js +54 -0
- package/dist/bootstrap/commands/sandbox-cancel-order/cli.d.ts +120 -0
- package/dist/bootstrap/commands/sandbox-cancel-order/cli.js +69 -0
- package/dist/bootstrap/commands/sandbox-close-account/cli.d.ts +108 -0
- package/dist/bootstrap/commands/sandbox-close-account/cli.js +66 -0
- package/dist/bootstrap/commands/sandbox-close-account/reporter.d.ts +12 -0
- package/dist/bootstrap/commands/sandbox-close-account/reporter.js +32 -0
- package/dist/bootstrap/commands/sandbox-open-account/cli.d.ts +70 -0
- package/dist/bootstrap/commands/sandbox-open-account/cli.js +57 -0
- package/dist/bootstrap/commands/sandbox-open-account/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/sandbox-open-account/reporter.js +31 -0
- package/dist/bootstrap/commands/sandbox-operations/cli.d.ts +156 -0
- package/dist/bootstrap/commands/sandbox-operations/cli.js +78 -0
- package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.d.ts +204 -0
- package/dist/bootstrap/commands/sandbox-operations-by-cursor/cli.js +98 -0
- package/dist/bootstrap/commands/sandbox-order-state/cli.d.ts +111 -0
- package/dist/bootstrap/commands/sandbox-order-state/cli.js +67 -0
- package/dist/bootstrap/commands/sandbox-orders/cli.d.ts +99 -0
- package/dist/bootstrap/commands/sandbox-orders/cli.js +63 -0
- package/dist/bootstrap/commands/sandbox-pay-in/cli.d.ts +135 -0
- package/dist/bootstrap/commands/sandbox-pay-in/cli.js +86 -0
- package/dist/bootstrap/commands/sandbox-pay-in/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/sandbox-pay-in/reporter.js +32 -0
- package/dist/bootstrap/commands/sandbox-portfolio/cli.d.ts +114 -0
- package/dist/bootstrap/commands/sandbox-portfolio/cli.js +68 -0
- package/dist/bootstrap/commands/sandbox-positions/cli.d.ts +99 -0
- package/dist/bootstrap/commands/sandbox-positions/cli.js +63 -0
- package/dist/bootstrap/commands/sandbox-post-order/cli.d.ts +192 -0
- package/dist/bootstrap/commands/sandbox-post-order/cli.js +90 -0
- package/dist/bootstrap/commands/sandbox-replace-order/cli.d.ts +180 -0
- package/dist/bootstrap/commands/sandbox-replace-order/cli.js +86 -0
- package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.d.ts +99 -0
- package/dist/bootstrap/commands/sandbox-withdraw-limits/cli.js +63 -0
- package/dist/bootstrap/commands/share/cli.d.ts +83 -0
- package/dist/bootstrap/commands/share/cli.js +53 -0
- package/dist/bootstrap/commands/share/reporter.d.ts +15 -0
- package/dist/bootstrap/commands/share/reporter.js +111 -0
- package/dist/bootstrap/commands/shares/cli.d.ts +73 -0
- package/dist/bootstrap/commands/shares/cli.js +53 -0
- package/dist/bootstrap/commands/shares/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/shares/reporter.js +27 -0
- package/dist/bootstrap/commands/stop-orders/cli.d.ts +99 -0
- package/dist/bootstrap/commands/stop-orders/cli.js +68 -0
- package/dist/bootstrap/commands/stop-orders/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/stop-orders/reporter.js +69 -0
- package/dist/bootstrap/commands/stream-run/cli.d.ts +138 -0
- package/dist/bootstrap/commands/stream-run/cli.js +229 -0
- package/dist/bootstrap/commands/stream-run/config.d.ts +56 -0
- package/dist/bootstrap/commands/stream-run/config.js +468 -0
- package/dist/bootstrap/commands/stream-run/reporter.d.ts +30 -0
- package/dist/bootstrap/commands/stream-run/reporter.js +76 -0
- package/dist/bootstrap/commands/trading-schedules/cli.d.ts +120 -0
- package/dist/bootstrap/commands/trading-schedules/cli.js +79 -0
- package/dist/bootstrap/commands/trading-schedules/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/trading-schedules/reporter.js +58 -0
- package/dist/bootstrap/commands/trading-status/cli.d.ts +99 -0
- package/dist/bootstrap/commands/trading-status/cli.js +65 -0
- package/dist/bootstrap/commands/trading-status/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/trading-status/reporter.js +51 -0
- package/dist/bootstrap/commands/trading-statuses/cli.d.ts +99 -0
- package/dist/bootstrap/commands/trading-statuses/cli.js +64 -0
- package/dist/bootstrap/commands/trading-statuses/reporter.d.ts +14 -0
- package/dist/bootstrap/commands/trading-statuses/reporter.js +44 -0
- package/dist/bootstrap/commands/user-info/cli.d.ts +63 -0
- package/dist/bootstrap/commands/user-info/cli.js +50 -0
- package/dist/bootstrap/commands/user-info/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/user-info/reporter.js +39 -0
- package/dist/bootstrap/commands/user-tariff/cli.d.ts +63 -0
- package/dist/bootstrap/commands/user-tariff/cli.js +50 -0
- package/dist/bootstrap/commands/user-tariff/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/user-tariff/reporter.js +50 -0
- package/dist/bootstrap/commands/version/cli.d.ts +13 -0
- package/dist/bootstrap/commands/version/cli.js +22 -0
- package/dist/bootstrap/commands/withdraw-limits/cli.d.ts +99 -0
- package/dist/bootstrap/commands/withdraw-limits/cli.js +64 -0
- package/dist/bootstrap/commands/withdraw-limits/reporter.d.ts +13 -0
- package/dist/bootstrap/commands/withdraw-limits/reporter.js +59 -0
- package/dist/bootstrap/generated-exports.d.ts +29 -0
- package/dist/bootstrap/generated-exports.js +590 -0
- package/dist/bootstrap/index.d.ts +6 -0
- package/dist/bootstrap/index.js +22 -0
- package/dist/bootstrap/proto/compile-proto.d.ts +18 -0
- package/dist/bootstrap/proto/compile-proto.js +122 -0
- package/dist/bootstrap/sdk-config.d.ts +21 -0
- package/dist/bootstrap/sdk-config.js +152 -0
- package/dist/bootstrap/t-invest-node-sdk.d.ts +42 -0
- package/dist/bootstrap/t-invest-node-sdk.js +115 -0
- package/dist/bootstrap/unary-limit-config.d.ts +38 -0
- package/dist/bootstrap/unary-limit-config.js +130 -0
- package/dist/config.d.ts +160 -0
- package/dist/config.js +173 -0
- package/dist/config.types.d.ts +89 -0
- package/dist/config.types.js +13 -0
- package/dist/generated/common.d.ts +214 -0
- package/dist/generated/common.js +1336 -0
- package/dist/generated/google/api/field_behavior.d.ts +61 -0
- package/dist/generated/google/api/field_behavior.js +126 -0
- package/dist/generated/google/protobuf/descriptor.d.ts +1330 -0
- package/dist/generated/google/protobuf/descriptor.js +5984 -0
- package/dist/generated/google/protobuf/timestamp.d.ts +122 -0
- package/dist/generated/google/protobuf/timestamp.js +102 -0
- package/dist/generated/instruments.d.ts +3230 -0
- package/dist/generated/instruments.js +24246 -0
- package/dist/generated/marketdata.d.ts +1268 -0
- package/dist/generated/marketdata.js +8922 -0
- package/dist/generated/operations.d.ts +1165 -0
- package/dist/generated/operations.js +8625 -0
- package/dist/generated/orders.d.ts +806 -0
- package/dist/generated/orders.js +5639 -0
- package/dist/generated/sandbox.d.ts +356 -0
- package/dist/generated/sandbox.js +603 -0
- package/dist/generated/signals.d.ts +196 -0
- package/dist/generated/signals.js +1261 -0
- package/dist/generated/stoporders.d.ts +328 -0
- package/dist/generated/stoporders.js +1990 -0
- package/dist/generated/users.d.ts +453 -0
- package/dist/generated/users.js +2334 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +30 -0
- package/dist/infrastructure/interceptor/index.d.ts +1 -0
- package/dist/infrastructure/interceptor/index.js +17 -0
- package/dist/infrastructure/interceptor/warning-interceptor.d.ts +23 -0
- package/dist/infrastructure/interceptor/warning-interceptor.js +38 -0
- package/dist/infrastructure/report-values.d.ts +19 -0
- package/dist/infrastructure/report-values.js +50 -0
- package/dist/infrastructure/transport/grpc/index.d.ts +5 -0
- package/dist/infrastructure/transport/grpc/index.js +13 -0
- package/dist/infrastructure/transport/grpc/sdk-channel.d.ts +12 -0
- package/dist/infrastructure/transport/grpc/sdk-channel.js +23 -0
- package/dist/infrastructure/transport/grpc/sdk-client.d.ts +16 -0
- package/dist/infrastructure/transport/grpc/sdk-client.js +33 -0
- package/dist/infrastructure/transport/grpc/sdk-metadata.d.ts +12 -0
- package/dist/infrastructure/transport/grpc/sdk-metadata.js +22 -0
- package/dist/infrastructure/transport/grpc/sdk-middleware.d.ts +22 -0
- package/dist/infrastructure/transport/grpc/sdk-middleware.js +312 -0
- package/dist/infrastructure/transport/grpc/tls-root-certificates.d.ts +10 -0
- package/dist/infrastructure/transport/grpc/tls-root-certificates.js +20 -0
- package/dist/infrastructure/transport/grpc/unary-limit-resolver.d.ts +22 -0
- package/dist/infrastructure/transport/grpc/unary-limit-resolver.js +60 -0
- package/dist/infrastructure/transport/grpc/unary-limits.d.ts +1 -0
- package/dist/infrastructure/transport/grpc/unary-limits.js +7 -0
- package/docs/architecture.md +378 -0
- package/docs/bundled-ca.md +157 -0
- package/docs/clean-architecture/adapters.md +173 -0
- package/docs/clean-architecture/api-commands.md +487 -0
- package/docs/clean-architecture/application.md +137 -0
- package/docs/clean-architecture/cli-output-boundaries.md +256 -0
- package/docs/clean-architecture/dto.md +153 -0
- package/docs/clean-architecture/index.md +89 -0
- package/docs/cli-stream-configuration.md +305 -0
- package/docs/cli-stream-reference.md +195 -0
- package/docs/guides/custom-unary-limiter.md +552 -0
- package/docs/guides/errors-and-lifecycle.md +196 -0
- package/docs/guides/getting-started.md +100 -0
- package/docs/guides/index.md +43 -0
- package/docs/guides/streams-and-cancellation.md +177 -0
- package/docs/guides/testing-with-service-definitions.md +110 -0
- package/docs/guides/unary-calls.md +216 -0
- package/docs/index.md +86 -0
- package/docs/limits-policy.md +201 -0
- package/docs/roadmap.md +204 -0
- package/docs/tls-policy.md +62 -0
- package/package.json +62 -0
- package/readme.md +472 -0
|
@@ -0,0 +1,1261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.2
|
|
5
|
+
// protoc v3.19.6
|
|
6
|
+
// source: signals.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SignalServiceDefinition = exports.Signal = exports.GetSignalsResponse = exports.GetSignalsRequest = exports.Strategy = exports.GetStrategiesResponse = exports.GetStrategiesRequest = exports.SignalState = exports.SignalDirection = exports.StrategyType = exports.protobufPackage = void 0;
|
|
9
|
+
exports.strategyTypeFromJSON = strategyTypeFromJSON;
|
|
10
|
+
exports.strategyTypeToJSON = strategyTypeToJSON;
|
|
11
|
+
exports.signalDirectionFromJSON = signalDirectionFromJSON;
|
|
12
|
+
exports.signalDirectionToJSON = signalDirectionToJSON;
|
|
13
|
+
exports.signalStateFromJSON = signalStateFromJSON;
|
|
14
|
+
exports.signalStateToJSON = signalStateToJSON;
|
|
15
|
+
/* eslint-disable */
|
|
16
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
17
|
+
const common_1 = require("./common");
|
|
18
|
+
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
19
|
+
exports.protobufPackage = "tinkoff.public.invest.api.contract.v1";
|
|
20
|
+
/** Тип стратегии. */
|
|
21
|
+
var StrategyType;
|
|
22
|
+
(function (StrategyType) {
|
|
23
|
+
/** STRATEGY_TYPE_UNSPECIFIED - Не определен. */
|
|
24
|
+
StrategyType[StrategyType["STRATEGY_TYPE_UNSPECIFIED"] = 0] = "STRATEGY_TYPE_UNSPECIFIED";
|
|
25
|
+
/** STRATEGY_TYPE_TECHNICAL - Техническая стратегия. */
|
|
26
|
+
StrategyType[StrategyType["STRATEGY_TYPE_TECHNICAL"] = 1] = "STRATEGY_TYPE_TECHNICAL";
|
|
27
|
+
/** STRATEGY_TYPE_FUNDAMENTAL - Фундаментальная стратегия. */
|
|
28
|
+
StrategyType[StrategyType["STRATEGY_TYPE_FUNDAMENTAL"] = 2] = "STRATEGY_TYPE_FUNDAMENTAL";
|
|
29
|
+
StrategyType[StrategyType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
30
|
+
})(StrategyType || (exports.StrategyType = StrategyType = {}));
|
|
31
|
+
function strategyTypeFromJSON(object) {
|
|
32
|
+
switch (object) {
|
|
33
|
+
case 0:
|
|
34
|
+
case "STRATEGY_TYPE_UNSPECIFIED":
|
|
35
|
+
return StrategyType.STRATEGY_TYPE_UNSPECIFIED;
|
|
36
|
+
case 1:
|
|
37
|
+
case "STRATEGY_TYPE_TECHNICAL":
|
|
38
|
+
return StrategyType.STRATEGY_TYPE_TECHNICAL;
|
|
39
|
+
case 2:
|
|
40
|
+
case "STRATEGY_TYPE_FUNDAMENTAL":
|
|
41
|
+
return StrategyType.STRATEGY_TYPE_FUNDAMENTAL;
|
|
42
|
+
case -1:
|
|
43
|
+
case "UNRECOGNIZED":
|
|
44
|
+
default:
|
|
45
|
+
return StrategyType.UNRECOGNIZED;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function strategyTypeToJSON(object) {
|
|
49
|
+
switch (object) {
|
|
50
|
+
case StrategyType.STRATEGY_TYPE_UNSPECIFIED:
|
|
51
|
+
return "STRATEGY_TYPE_UNSPECIFIED";
|
|
52
|
+
case StrategyType.STRATEGY_TYPE_TECHNICAL:
|
|
53
|
+
return "STRATEGY_TYPE_TECHNICAL";
|
|
54
|
+
case StrategyType.STRATEGY_TYPE_FUNDAMENTAL:
|
|
55
|
+
return "STRATEGY_TYPE_FUNDAMENTAL";
|
|
56
|
+
case StrategyType.UNRECOGNIZED:
|
|
57
|
+
default:
|
|
58
|
+
return "UNRECOGNIZED";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Направление сигнала. */
|
|
62
|
+
var SignalDirection;
|
|
63
|
+
(function (SignalDirection) {
|
|
64
|
+
/** SIGNAL_DIRECTION_UNSPECIFIED - Не определен. */
|
|
65
|
+
SignalDirection[SignalDirection["SIGNAL_DIRECTION_UNSPECIFIED"] = 0] = "SIGNAL_DIRECTION_UNSPECIFIED";
|
|
66
|
+
/** SIGNAL_DIRECTION_BUY - Покупка. */
|
|
67
|
+
SignalDirection[SignalDirection["SIGNAL_DIRECTION_BUY"] = 1] = "SIGNAL_DIRECTION_BUY";
|
|
68
|
+
/** SIGNAL_DIRECTION_SELL - Продажа. */
|
|
69
|
+
SignalDirection[SignalDirection["SIGNAL_DIRECTION_SELL"] = 2] = "SIGNAL_DIRECTION_SELL";
|
|
70
|
+
SignalDirection[SignalDirection["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
71
|
+
})(SignalDirection || (exports.SignalDirection = SignalDirection = {}));
|
|
72
|
+
function signalDirectionFromJSON(object) {
|
|
73
|
+
switch (object) {
|
|
74
|
+
case 0:
|
|
75
|
+
case "SIGNAL_DIRECTION_UNSPECIFIED":
|
|
76
|
+
return SignalDirection.SIGNAL_DIRECTION_UNSPECIFIED;
|
|
77
|
+
case 1:
|
|
78
|
+
case "SIGNAL_DIRECTION_BUY":
|
|
79
|
+
return SignalDirection.SIGNAL_DIRECTION_BUY;
|
|
80
|
+
case 2:
|
|
81
|
+
case "SIGNAL_DIRECTION_SELL":
|
|
82
|
+
return SignalDirection.SIGNAL_DIRECTION_SELL;
|
|
83
|
+
case -1:
|
|
84
|
+
case "UNRECOGNIZED":
|
|
85
|
+
default:
|
|
86
|
+
return SignalDirection.UNRECOGNIZED;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function signalDirectionToJSON(object) {
|
|
90
|
+
switch (object) {
|
|
91
|
+
case SignalDirection.SIGNAL_DIRECTION_UNSPECIFIED:
|
|
92
|
+
return "SIGNAL_DIRECTION_UNSPECIFIED";
|
|
93
|
+
case SignalDirection.SIGNAL_DIRECTION_BUY:
|
|
94
|
+
return "SIGNAL_DIRECTION_BUY";
|
|
95
|
+
case SignalDirection.SIGNAL_DIRECTION_SELL:
|
|
96
|
+
return "SIGNAL_DIRECTION_SELL";
|
|
97
|
+
case SignalDirection.UNRECOGNIZED:
|
|
98
|
+
default:
|
|
99
|
+
return "UNRECOGNIZED";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Статус сигнала. */
|
|
103
|
+
var SignalState;
|
|
104
|
+
(function (SignalState) {
|
|
105
|
+
/** SIGNAL_STATE_UNSPECIFIED - Не определен. */
|
|
106
|
+
SignalState[SignalState["SIGNAL_STATE_UNSPECIFIED"] = 0] = "SIGNAL_STATE_UNSPECIFIED";
|
|
107
|
+
/** SIGNAL_STATE_ACTIVE - Активный сигнал. */
|
|
108
|
+
SignalState[SignalState["SIGNAL_STATE_ACTIVE"] = 1] = "SIGNAL_STATE_ACTIVE";
|
|
109
|
+
/** SIGNAL_STATE_CLOSED - Закрытый сигнал. */
|
|
110
|
+
SignalState[SignalState["SIGNAL_STATE_CLOSED"] = 2] = "SIGNAL_STATE_CLOSED";
|
|
111
|
+
/** SIGNAL_STATE_ALL - Все состояния. */
|
|
112
|
+
SignalState[SignalState["SIGNAL_STATE_ALL"] = 3] = "SIGNAL_STATE_ALL";
|
|
113
|
+
SignalState[SignalState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
114
|
+
})(SignalState || (exports.SignalState = SignalState = {}));
|
|
115
|
+
function signalStateFromJSON(object) {
|
|
116
|
+
switch (object) {
|
|
117
|
+
case 0:
|
|
118
|
+
case "SIGNAL_STATE_UNSPECIFIED":
|
|
119
|
+
return SignalState.SIGNAL_STATE_UNSPECIFIED;
|
|
120
|
+
case 1:
|
|
121
|
+
case "SIGNAL_STATE_ACTIVE":
|
|
122
|
+
return SignalState.SIGNAL_STATE_ACTIVE;
|
|
123
|
+
case 2:
|
|
124
|
+
case "SIGNAL_STATE_CLOSED":
|
|
125
|
+
return SignalState.SIGNAL_STATE_CLOSED;
|
|
126
|
+
case 3:
|
|
127
|
+
case "SIGNAL_STATE_ALL":
|
|
128
|
+
return SignalState.SIGNAL_STATE_ALL;
|
|
129
|
+
case -1:
|
|
130
|
+
case "UNRECOGNIZED":
|
|
131
|
+
default:
|
|
132
|
+
return SignalState.UNRECOGNIZED;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function signalStateToJSON(object) {
|
|
136
|
+
switch (object) {
|
|
137
|
+
case SignalState.SIGNAL_STATE_UNSPECIFIED:
|
|
138
|
+
return "SIGNAL_STATE_UNSPECIFIED";
|
|
139
|
+
case SignalState.SIGNAL_STATE_ACTIVE:
|
|
140
|
+
return "SIGNAL_STATE_ACTIVE";
|
|
141
|
+
case SignalState.SIGNAL_STATE_CLOSED:
|
|
142
|
+
return "SIGNAL_STATE_CLOSED";
|
|
143
|
+
case SignalState.SIGNAL_STATE_ALL:
|
|
144
|
+
return "SIGNAL_STATE_ALL";
|
|
145
|
+
case SignalState.UNRECOGNIZED:
|
|
146
|
+
default:
|
|
147
|
+
return "UNRECOGNIZED";
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function createBaseGetStrategiesRequest() {
|
|
151
|
+
return { strategyId: undefined };
|
|
152
|
+
}
|
|
153
|
+
exports.GetStrategiesRequest = {
|
|
154
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
155
|
+
if (message.strategyId !== undefined) {
|
|
156
|
+
writer.uint32(10).string(message.strategyId);
|
|
157
|
+
}
|
|
158
|
+
return writer;
|
|
159
|
+
},
|
|
160
|
+
decode(input, length) {
|
|
161
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
162
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
163
|
+
if (previousRecursionDepth >= 100) {
|
|
164
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
165
|
+
}
|
|
166
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
167
|
+
try {
|
|
168
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
169
|
+
const message = createBaseGetStrategiesRequest();
|
|
170
|
+
while (reader.pos < end) {
|
|
171
|
+
const tag = reader.uint32();
|
|
172
|
+
switch (tag >>> 3) {
|
|
173
|
+
case 1: {
|
|
174
|
+
if (tag !== 10) {
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
message.strategyId = reader.string();
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
reader.skip(tag & 7);
|
|
185
|
+
}
|
|
186
|
+
return message;
|
|
187
|
+
}
|
|
188
|
+
finally {
|
|
189
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
fromJSON(object) {
|
|
193
|
+
return {
|
|
194
|
+
strategyId: isSet(object.strategyId)
|
|
195
|
+
? globalThis.String(object.strategyId)
|
|
196
|
+
: isSet(object.strategy_id)
|
|
197
|
+
? globalThis.String(object.strategy_id)
|
|
198
|
+
: undefined,
|
|
199
|
+
};
|
|
200
|
+
},
|
|
201
|
+
toJSON(message) {
|
|
202
|
+
const obj = {};
|
|
203
|
+
if (message.strategyId !== undefined) {
|
|
204
|
+
obj.strategyId = message.strategyId;
|
|
205
|
+
}
|
|
206
|
+
return obj;
|
|
207
|
+
},
|
|
208
|
+
create(base) {
|
|
209
|
+
return exports.GetStrategiesRequest.fromPartial(base ?? {});
|
|
210
|
+
},
|
|
211
|
+
fromPartial(object) {
|
|
212
|
+
const message = createBaseGetStrategiesRequest();
|
|
213
|
+
message.strategyId = object.strategyId ?? undefined;
|
|
214
|
+
return message;
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
function createBaseGetStrategiesResponse() {
|
|
218
|
+
return { strategies: [] };
|
|
219
|
+
}
|
|
220
|
+
exports.GetStrategiesResponse = {
|
|
221
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
222
|
+
for (const v of message.strategies) {
|
|
223
|
+
exports.Strategy.encode(v, writer.uint32(10).fork()).join();
|
|
224
|
+
}
|
|
225
|
+
return writer;
|
|
226
|
+
},
|
|
227
|
+
decode(input, length) {
|
|
228
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
229
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
230
|
+
if (previousRecursionDepth >= 100) {
|
|
231
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
232
|
+
}
|
|
233
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
234
|
+
try {
|
|
235
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
236
|
+
const message = createBaseGetStrategiesResponse();
|
|
237
|
+
while (reader.pos < end) {
|
|
238
|
+
const tag = reader.uint32();
|
|
239
|
+
switch (tag >>> 3) {
|
|
240
|
+
case 1: {
|
|
241
|
+
if (tag !== 10) {
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
message.strategies.push(exports.Strategy.decode(reader, reader.uint32()));
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
reader.skip(tag & 7);
|
|
252
|
+
}
|
|
253
|
+
return message;
|
|
254
|
+
}
|
|
255
|
+
finally {
|
|
256
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
fromJSON(object) {
|
|
260
|
+
return {
|
|
261
|
+
strategies: globalThis.Array.isArray(object?.strategies)
|
|
262
|
+
? object.strategies.map((e) => exports.Strategy.fromJSON(e))
|
|
263
|
+
: [],
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
toJSON(message) {
|
|
267
|
+
const obj = {};
|
|
268
|
+
if (message.strategies?.length) {
|
|
269
|
+
obj.strategies = message.strategies.map((e) => exports.Strategy.toJSON(e));
|
|
270
|
+
}
|
|
271
|
+
return obj;
|
|
272
|
+
},
|
|
273
|
+
create(base) {
|
|
274
|
+
return exports.GetStrategiesResponse.fromPartial(base ?? {});
|
|
275
|
+
},
|
|
276
|
+
fromPartial(object) {
|
|
277
|
+
const message = createBaseGetStrategiesResponse();
|
|
278
|
+
message.strategies = object.strategies?.map((e) => exports.Strategy.fromPartial(e)) || [];
|
|
279
|
+
return message;
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
function createBaseStrategy() {
|
|
283
|
+
return {
|
|
284
|
+
strategyId: "",
|
|
285
|
+
strategyName: "",
|
|
286
|
+
strategyDescription: undefined,
|
|
287
|
+
strategyUrl: undefined,
|
|
288
|
+
strategyType: 0,
|
|
289
|
+
activeSignals: 0,
|
|
290
|
+
totalSignals: 0,
|
|
291
|
+
timeInPosition: 0,
|
|
292
|
+
averageSignalYield: undefined,
|
|
293
|
+
averageSignalYieldYear: undefined,
|
|
294
|
+
yield: undefined,
|
|
295
|
+
yieldYear: undefined,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
exports.Strategy = {
|
|
299
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
300
|
+
if (message.strategyId !== "") {
|
|
301
|
+
writer.uint32(10).string(message.strategyId);
|
|
302
|
+
}
|
|
303
|
+
if (message.strategyName !== "") {
|
|
304
|
+
writer.uint32(18).string(message.strategyName);
|
|
305
|
+
}
|
|
306
|
+
if (message.strategyDescription !== undefined) {
|
|
307
|
+
writer.uint32(26).string(message.strategyDescription);
|
|
308
|
+
}
|
|
309
|
+
if (message.strategyUrl !== undefined) {
|
|
310
|
+
writer.uint32(34).string(message.strategyUrl);
|
|
311
|
+
}
|
|
312
|
+
if (message.strategyType !== 0) {
|
|
313
|
+
writer.uint32(40).int32(message.strategyType);
|
|
314
|
+
}
|
|
315
|
+
if (message.activeSignals !== 0) {
|
|
316
|
+
writer.uint32(48).int32(message.activeSignals);
|
|
317
|
+
}
|
|
318
|
+
if (message.totalSignals !== 0) {
|
|
319
|
+
writer.uint32(56).int32(message.totalSignals);
|
|
320
|
+
}
|
|
321
|
+
if (message.timeInPosition !== 0) {
|
|
322
|
+
writer.uint32(64).int64(message.timeInPosition);
|
|
323
|
+
}
|
|
324
|
+
if (message.averageSignalYield !== undefined) {
|
|
325
|
+
common_1.Quotation.encode(message.averageSignalYield, writer.uint32(74).fork()).join();
|
|
326
|
+
}
|
|
327
|
+
if (message.averageSignalYieldYear !== undefined) {
|
|
328
|
+
common_1.Quotation.encode(message.averageSignalYieldYear, writer.uint32(82).fork()).join();
|
|
329
|
+
}
|
|
330
|
+
if (message.yield !== undefined) {
|
|
331
|
+
common_1.Quotation.encode(message.yield, writer.uint32(90).fork()).join();
|
|
332
|
+
}
|
|
333
|
+
if (message.yieldYear !== undefined) {
|
|
334
|
+
common_1.Quotation.encode(message.yieldYear, writer.uint32(98).fork()).join();
|
|
335
|
+
}
|
|
336
|
+
return writer;
|
|
337
|
+
},
|
|
338
|
+
decode(input, length) {
|
|
339
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
340
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
341
|
+
if (previousRecursionDepth >= 100) {
|
|
342
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
343
|
+
}
|
|
344
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
345
|
+
try {
|
|
346
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
347
|
+
const message = createBaseStrategy();
|
|
348
|
+
while (reader.pos < end) {
|
|
349
|
+
const tag = reader.uint32();
|
|
350
|
+
switch (tag >>> 3) {
|
|
351
|
+
case 1: {
|
|
352
|
+
if (tag !== 10) {
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
message.strategyId = reader.string();
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
case 2: {
|
|
359
|
+
if (tag !== 18) {
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
message.strategyName = reader.string();
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
case 3: {
|
|
366
|
+
if (tag !== 26) {
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
message.strategyDescription = reader.string();
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
case 4: {
|
|
373
|
+
if (tag !== 34) {
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
message.strategyUrl = reader.string();
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
case 5: {
|
|
380
|
+
if (tag !== 40) {
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
message.strategyType = reader.int32();
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
case 6: {
|
|
387
|
+
if (tag !== 48) {
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
message.activeSignals = reader.int32();
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
case 7: {
|
|
394
|
+
if (tag !== 56) {
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
message.totalSignals = reader.int32();
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
case 8: {
|
|
401
|
+
if (tag !== 64) {
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
message.timeInPosition = longToNumber(reader.int64());
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
case 9: {
|
|
408
|
+
if (tag !== 74) {
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
message.averageSignalYield = common_1.Quotation.decode(reader, reader.uint32());
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
case 10: {
|
|
415
|
+
if (tag !== 82) {
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
message.averageSignalYieldYear = common_1.Quotation.decode(reader, reader.uint32());
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
case 11: {
|
|
422
|
+
if (tag !== 90) {
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
message.yield = common_1.Quotation.decode(reader, reader.uint32());
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
case 12: {
|
|
429
|
+
if (tag !== 98) {
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
message.yieldYear = common_1.Quotation.decode(reader, reader.uint32());
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
reader.skip(tag & 7);
|
|
440
|
+
}
|
|
441
|
+
return message;
|
|
442
|
+
}
|
|
443
|
+
finally {
|
|
444
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
fromJSON(object) {
|
|
448
|
+
return {
|
|
449
|
+
strategyId: isSet(object.strategyId)
|
|
450
|
+
? globalThis.String(object.strategyId)
|
|
451
|
+
: isSet(object.strategy_id)
|
|
452
|
+
? globalThis.String(object.strategy_id)
|
|
453
|
+
: "",
|
|
454
|
+
strategyName: isSet(object.strategyName)
|
|
455
|
+
? globalThis.String(object.strategyName)
|
|
456
|
+
: isSet(object.strategy_name)
|
|
457
|
+
? globalThis.String(object.strategy_name)
|
|
458
|
+
: "",
|
|
459
|
+
strategyDescription: isSet(object.strategyDescription)
|
|
460
|
+
? globalThis.String(object.strategyDescription)
|
|
461
|
+
: isSet(object.strategy_description)
|
|
462
|
+
? globalThis.String(object.strategy_description)
|
|
463
|
+
: undefined,
|
|
464
|
+
strategyUrl: isSet(object.strategyUrl)
|
|
465
|
+
? globalThis.String(object.strategyUrl)
|
|
466
|
+
: isSet(object.strategy_url)
|
|
467
|
+
? globalThis.String(object.strategy_url)
|
|
468
|
+
: undefined,
|
|
469
|
+
strategyType: isSet(object.strategyType)
|
|
470
|
+
? strategyTypeFromJSON(object.strategyType)
|
|
471
|
+
: isSet(object.strategy_type)
|
|
472
|
+
? strategyTypeFromJSON(object.strategy_type)
|
|
473
|
+
: 0,
|
|
474
|
+
activeSignals: isSet(object.activeSignals)
|
|
475
|
+
? globalThis.Number(object.activeSignals)
|
|
476
|
+
: isSet(object.active_signals)
|
|
477
|
+
? globalThis.Number(object.active_signals)
|
|
478
|
+
: 0,
|
|
479
|
+
totalSignals: isSet(object.totalSignals)
|
|
480
|
+
? globalThis.Number(object.totalSignals)
|
|
481
|
+
: isSet(object.total_signals)
|
|
482
|
+
? globalThis.Number(object.total_signals)
|
|
483
|
+
: 0,
|
|
484
|
+
timeInPosition: isSet(object.timeInPosition)
|
|
485
|
+
? globalThis.Number(object.timeInPosition)
|
|
486
|
+
: isSet(object.time_in_position)
|
|
487
|
+
? globalThis.Number(object.time_in_position)
|
|
488
|
+
: 0,
|
|
489
|
+
averageSignalYield: isSet(object.averageSignalYield)
|
|
490
|
+
? common_1.Quotation.fromJSON(object.averageSignalYield)
|
|
491
|
+
: isSet(object.average_signal_yield)
|
|
492
|
+
? common_1.Quotation.fromJSON(object.average_signal_yield)
|
|
493
|
+
: undefined,
|
|
494
|
+
averageSignalYieldYear: isSet(object.averageSignalYieldYear)
|
|
495
|
+
? common_1.Quotation.fromJSON(object.averageSignalYieldYear)
|
|
496
|
+
: isSet(object.average_signal_yield_year)
|
|
497
|
+
? common_1.Quotation.fromJSON(object.average_signal_yield_year)
|
|
498
|
+
: undefined,
|
|
499
|
+
yield: isSet(object.yield) ? common_1.Quotation.fromJSON(object.yield) : undefined,
|
|
500
|
+
yieldYear: isSet(object.yieldYear)
|
|
501
|
+
? common_1.Quotation.fromJSON(object.yieldYear)
|
|
502
|
+
: isSet(object.yield_year)
|
|
503
|
+
? common_1.Quotation.fromJSON(object.yield_year)
|
|
504
|
+
: undefined,
|
|
505
|
+
};
|
|
506
|
+
},
|
|
507
|
+
toJSON(message) {
|
|
508
|
+
const obj = {};
|
|
509
|
+
if (message.strategyId !== "") {
|
|
510
|
+
obj.strategyId = message.strategyId;
|
|
511
|
+
}
|
|
512
|
+
if (message.strategyName !== "") {
|
|
513
|
+
obj.strategyName = message.strategyName;
|
|
514
|
+
}
|
|
515
|
+
if (message.strategyDescription !== undefined) {
|
|
516
|
+
obj.strategyDescription = message.strategyDescription;
|
|
517
|
+
}
|
|
518
|
+
if (message.strategyUrl !== undefined) {
|
|
519
|
+
obj.strategyUrl = message.strategyUrl;
|
|
520
|
+
}
|
|
521
|
+
if (message.strategyType !== 0) {
|
|
522
|
+
obj.strategyType = strategyTypeToJSON(message.strategyType);
|
|
523
|
+
}
|
|
524
|
+
if (message.activeSignals !== 0) {
|
|
525
|
+
obj.activeSignals = Math.round(message.activeSignals);
|
|
526
|
+
}
|
|
527
|
+
if (message.totalSignals !== 0) {
|
|
528
|
+
obj.totalSignals = Math.round(message.totalSignals);
|
|
529
|
+
}
|
|
530
|
+
if (message.timeInPosition !== 0) {
|
|
531
|
+
obj.timeInPosition = Math.round(message.timeInPosition);
|
|
532
|
+
}
|
|
533
|
+
if (message.averageSignalYield !== undefined) {
|
|
534
|
+
obj.averageSignalYield = common_1.Quotation.toJSON(message.averageSignalYield);
|
|
535
|
+
}
|
|
536
|
+
if (message.averageSignalYieldYear !== undefined) {
|
|
537
|
+
obj.averageSignalYieldYear = common_1.Quotation.toJSON(message.averageSignalYieldYear);
|
|
538
|
+
}
|
|
539
|
+
if (message.yield !== undefined) {
|
|
540
|
+
obj.yield = common_1.Quotation.toJSON(message.yield);
|
|
541
|
+
}
|
|
542
|
+
if (message.yieldYear !== undefined) {
|
|
543
|
+
obj.yieldYear = common_1.Quotation.toJSON(message.yieldYear);
|
|
544
|
+
}
|
|
545
|
+
return obj;
|
|
546
|
+
},
|
|
547
|
+
create(base) {
|
|
548
|
+
return exports.Strategy.fromPartial(base ?? {});
|
|
549
|
+
},
|
|
550
|
+
fromPartial(object) {
|
|
551
|
+
const message = createBaseStrategy();
|
|
552
|
+
message.strategyId = object.strategyId ?? "";
|
|
553
|
+
message.strategyName = object.strategyName ?? "";
|
|
554
|
+
message.strategyDescription = object.strategyDescription ?? undefined;
|
|
555
|
+
message.strategyUrl = object.strategyUrl ?? undefined;
|
|
556
|
+
message.strategyType = object.strategyType ?? 0;
|
|
557
|
+
message.activeSignals = object.activeSignals ?? 0;
|
|
558
|
+
message.totalSignals = object.totalSignals ?? 0;
|
|
559
|
+
message.timeInPosition = object.timeInPosition ?? 0;
|
|
560
|
+
message.averageSignalYield = (object.averageSignalYield !== undefined && object.averageSignalYield !== null)
|
|
561
|
+
? common_1.Quotation.fromPartial(object.averageSignalYield)
|
|
562
|
+
: undefined;
|
|
563
|
+
message.averageSignalYieldYear =
|
|
564
|
+
(object.averageSignalYieldYear !== undefined && object.averageSignalYieldYear !== null)
|
|
565
|
+
? common_1.Quotation.fromPartial(object.averageSignalYieldYear)
|
|
566
|
+
: undefined;
|
|
567
|
+
message.yield = (object.yield !== undefined && object.yield !== null)
|
|
568
|
+
? common_1.Quotation.fromPartial(object.yield)
|
|
569
|
+
: undefined;
|
|
570
|
+
message.yieldYear = (object.yieldYear !== undefined && object.yieldYear !== null)
|
|
571
|
+
? common_1.Quotation.fromPartial(object.yieldYear)
|
|
572
|
+
: undefined;
|
|
573
|
+
return message;
|
|
574
|
+
},
|
|
575
|
+
};
|
|
576
|
+
function createBaseGetSignalsRequest() {
|
|
577
|
+
return {
|
|
578
|
+
signalId: undefined,
|
|
579
|
+
strategyId: undefined,
|
|
580
|
+
strategyType: undefined,
|
|
581
|
+
instrumentUid: undefined,
|
|
582
|
+
from: undefined,
|
|
583
|
+
to: undefined,
|
|
584
|
+
direction: undefined,
|
|
585
|
+
active: undefined,
|
|
586
|
+
paging: undefined,
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
exports.GetSignalsRequest = {
|
|
590
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
591
|
+
if (message.signalId !== undefined) {
|
|
592
|
+
writer.uint32(10).string(message.signalId);
|
|
593
|
+
}
|
|
594
|
+
if (message.strategyId !== undefined) {
|
|
595
|
+
writer.uint32(18).string(message.strategyId);
|
|
596
|
+
}
|
|
597
|
+
if (message.strategyType !== undefined) {
|
|
598
|
+
writer.uint32(24).int32(message.strategyType);
|
|
599
|
+
}
|
|
600
|
+
if (message.instrumentUid !== undefined) {
|
|
601
|
+
writer.uint32(34).string(message.instrumentUid);
|
|
602
|
+
}
|
|
603
|
+
if (message.from !== undefined) {
|
|
604
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.from), writer.uint32(42).fork()).join();
|
|
605
|
+
}
|
|
606
|
+
if (message.to !== undefined) {
|
|
607
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.to), writer.uint32(50).fork()).join();
|
|
608
|
+
}
|
|
609
|
+
if (message.direction !== undefined) {
|
|
610
|
+
writer.uint32(56).int32(message.direction);
|
|
611
|
+
}
|
|
612
|
+
if (message.active !== undefined) {
|
|
613
|
+
writer.uint32(64).int32(message.active);
|
|
614
|
+
}
|
|
615
|
+
if (message.paging !== undefined) {
|
|
616
|
+
common_1.Page.encode(message.paging, writer.uint32(74).fork()).join();
|
|
617
|
+
}
|
|
618
|
+
return writer;
|
|
619
|
+
},
|
|
620
|
+
decode(input, length) {
|
|
621
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
622
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
623
|
+
if (previousRecursionDepth >= 100) {
|
|
624
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
625
|
+
}
|
|
626
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
627
|
+
try {
|
|
628
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
629
|
+
const message = createBaseGetSignalsRequest();
|
|
630
|
+
while (reader.pos < end) {
|
|
631
|
+
const tag = reader.uint32();
|
|
632
|
+
switch (tag >>> 3) {
|
|
633
|
+
case 1: {
|
|
634
|
+
if (tag !== 10) {
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
637
|
+
message.signalId = reader.string();
|
|
638
|
+
continue;
|
|
639
|
+
}
|
|
640
|
+
case 2: {
|
|
641
|
+
if (tag !== 18) {
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
message.strategyId = reader.string();
|
|
645
|
+
continue;
|
|
646
|
+
}
|
|
647
|
+
case 3: {
|
|
648
|
+
if (tag !== 24) {
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
message.strategyType = reader.int32();
|
|
652
|
+
continue;
|
|
653
|
+
}
|
|
654
|
+
case 4: {
|
|
655
|
+
if (tag !== 34) {
|
|
656
|
+
break;
|
|
657
|
+
}
|
|
658
|
+
message.instrumentUid = reader.string();
|
|
659
|
+
continue;
|
|
660
|
+
}
|
|
661
|
+
case 5: {
|
|
662
|
+
if (tag !== 42) {
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
message.from = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
666
|
+
continue;
|
|
667
|
+
}
|
|
668
|
+
case 6: {
|
|
669
|
+
if (tag !== 50) {
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
message.to = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
case 7: {
|
|
676
|
+
if (tag !== 56) {
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
message.direction = reader.int32();
|
|
680
|
+
continue;
|
|
681
|
+
}
|
|
682
|
+
case 8: {
|
|
683
|
+
if (tag !== 64) {
|
|
684
|
+
break;
|
|
685
|
+
}
|
|
686
|
+
message.active = reader.int32();
|
|
687
|
+
continue;
|
|
688
|
+
}
|
|
689
|
+
case 9: {
|
|
690
|
+
if (tag !== 74) {
|
|
691
|
+
break;
|
|
692
|
+
}
|
|
693
|
+
message.paging = common_1.Page.decode(reader, reader.uint32());
|
|
694
|
+
continue;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
700
|
+
reader.skip(tag & 7);
|
|
701
|
+
}
|
|
702
|
+
return message;
|
|
703
|
+
}
|
|
704
|
+
finally {
|
|
705
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
fromJSON(object) {
|
|
709
|
+
return {
|
|
710
|
+
signalId: isSet(object.signalId)
|
|
711
|
+
? globalThis.String(object.signalId)
|
|
712
|
+
: isSet(object.signal_id)
|
|
713
|
+
? globalThis.String(object.signal_id)
|
|
714
|
+
: undefined,
|
|
715
|
+
strategyId: isSet(object.strategyId)
|
|
716
|
+
? globalThis.String(object.strategyId)
|
|
717
|
+
: isSet(object.strategy_id)
|
|
718
|
+
? globalThis.String(object.strategy_id)
|
|
719
|
+
: undefined,
|
|
720
|
+
strategyType: isSet(object.strategyType)
|
|
721
|
+
? strategyTypeFromJSON(object.strategyType)
|
|
722
|
+
: isSet(object.strategy_type)
|
|
723
|
+
? strategyTypeFromJSON(object.strategy_type)
|
|
724
|
+
: undefined,
|
|
725
|
+
instrumentUid: isSet(object.instrumentUid)
|
|
726
|
+
? globalThis.String(object.instrumentUid)
|
|
727
|
+
: isSet(object.instrument_uid)
|
|
728
|
+
? globalThis.String(object.instrument_uid)
|
|
729
|
+
: undefined,
|
|
730
|
+
from: isSet(object.from) ? fromJsonTimestamp(object.from) : undefined,
|
|
731
|
+
to: isSet(object.to) ? fromJsonTimestamp(object.to) : undefined,
|
|
732
|
+
direction: isSet(object.direction) ? signalDirectionFromJSON(object.direction) : undefined,
|
|
733
|
+
active: isSet(object.active) ? signalStateFromJSON(object.active) : undefined,
|
|
734
|
+
paging: isSet(object.paging) ? common_1.Page.fromJSON(object.paging) : undefined,
|
|
735
|
+
};
|
|
736
|
+
},
|
|
737
|
+
toJSON(message) {
|
|
738
|
+
const obj = {};
|
|
739
|
+
if (message.signalId !== undefined) {
|
|
740
|
+
obj.signalId = message.signalId;
|
|
741
|
+
}
|
|
742
|
+
if (message.strategyId !== undefined) {
|
|
743
|
+
obj.strategyId = message.strategyId;
|
|
744
|
+
}
|
|
745
|
+
if (message.strategyType !== undefined) {
|
|
746
|
+
obj.strategyType = strategyTypeToJSON(message.strategyType);
|
|
747
|
+
}
|
|
748
|
+
if (message.instrumentUid !== undefined) {
|
|
749
|
+
obj.instrumentUid = message.instrumentUid;
|
|
750
|
+
}
|
|
751
|
+
if (message.from !== undefined) {
|
|
752
|
+
obj.from = message.from.toISOString();
|
|
753
|
+
}
|
|
754
|
+
if (message.to !== undefined) {
|
|
755
|
+
obj.to = message.to.toISOString();
|
|
756
|
+
}
|
|
757
|
+
if (message.direction !== undefined) {
|
|
758
|
+
obj.direction = signalDirectionToJSON(message.direction);
|
|
759
|
+
}
|
|
760
|
+
if (message.active !== undefined) {
|
|
761
|
+
obj.active = signalStateToJSON(message.active);
|
|
762
|
+
}
|
|
763
|
+
if (message.paging !== undefined) {
|
|
764
|
+
obj.paging = common_1.Page.toJSON(message.paging);
|
|
765
|
+
}
|
|
766
|
+
return obj;
|
|
767
|
+
},
|
|
768
|
+
create(base) {
|
|
769
|
+
return exports.GetSignalsRequest.fromPartial(base ?? {});
|
|
770
|
+
},
|
|
771
|
+
fromPartial(object) {
|
|
772
|
+
const message = createBaseGetSignalsRequest();
|
|
773
|
+
message.signalId = object.signalId ?? undefined;
|
|
774
|
+
message.strategyId = object.strategyId ?? undefined;
|
|
775
|
+
message.strategyType = object.strategyType ?? undefined;
|
|
776
|
+
message.instrumentUid = object.instrumentUid ?? undefined;
|
|
777
|
+
message.from = object.from ?? undefined;
|
|
778
|
+
message.to = object.to ?? undefined;
|
|
779
|
+
message.direction = object.direction ?? undefined;
|
|
780
|
+
message.active = object.active ?? undefined;
|
|
781
|
+
message.paging = (object.paging !== undefined && object.paging !== null)
|
|
782
|
+
? common_1.Page.fromPartial(object.paging)
|
|
783
|
+
: undefined;
|
|
784
|
+
return message;
|
|
785
|
+
},
|
|
786
|
+
};
|
|
787
|
+
function createBaseGetSignalsResponse() {
|
|
788
|
+
return { signals: [], paging: undefined };
|
|
789
|
+
}
|
|
790
|
+
exports.GetSignalsResponse = {
|
|
791
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
792
|
+
for (const v of message.signals) {
|
|
793
|
+
exports.Signal.encode(v, writer.uint32(10).fork()).join();
|
|
794
|
+
}
|
|
795
|
+
if (message.paging !== undefined) {
|
|
796
|
+
common_1.PageResponse.encode(message.paging, writer.uint32(18).fork()).join();
|
|
797
|
+
}
|
|
798
|
+
return writer;
|
|
799
|
+
},
|
|
800
|
+
decode(input, length) {
|
|
801
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
802
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
803
|
+
if (previousRecursionDepth >= 100) {
|
|
804
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
805
|
+
}
|
|
806
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
807
|
+
try {
|
|
808
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
809
|
+
const message = createBaseGetSignalsResponse();
|
|
810
|
+
while (reader.pos < end) {
|
|
811
|
+
const tag = reader.uint32();
|
|
812
|
+
switch (tag >>> 3) {
|
|
813
|
+
case 1: {
|
|
814
|
+
if (tag !== 10) {
|
|
815
|
+
break;
|
|
816
|
+
}
|
|
817
|
+
message.signals.push(exports.Signal.decode(reader, reader.uint32()));
|
|
818
|
+
continue;
|
|
819
|
+
}
|
|
820
|
+
case 2: {
|
|
821
|
+
if (tag !== 18) {
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
message.paging = common_1.PageResponse.decode(reader, reader.uint32());
|
|
825
|
+
continue;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
829
|
+
break;
|
|
830
|
+
}
|
|
831
|
+
reader.skip(tag & 7);
|
|
832
|
+
}
|
|
833
|
+
return message;
|
|
834
|
+
}
|
|
835
|
+
finally {
|
|
836
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
fromJSON(object) {
|
|
840
|
+
return {
|
|
841
|
+
signals: globalThis.Array.isArray(object?.signals) ? object.signals.map((e) => exports.Signal.fromJSON(e)) : [],
|
|
842
|
+
paging: isSet(object.paging) ? common_1.PageResponse.fromJSON(object.paging) : undefined,
|
|
843
|
+
};
|
|
844
|
+
},
|
|
845
|
+
toJSON(message) {
|
|
846
|
+
const obj = {};
|
|
847
|
+
if (message.signals?.length) {
|
|
848
|
+
obj.signals = message.signals.map((e) => exports.Signal.toJSON(e));
|
|
849
|
+
}
|
|
850
|
+
if (message.paging !== undefined) {
|
|
851
|
+
obj.paging = common_1.PageResponse.toJSON(message.paging);
|
|
852
|
+
}
|
|
853
|
+
return obj;
|
|
854
|
+
},
|
|
855
|
+
create(base) {
|
|
856
|
+
return exports.GetSignalsResponse.fromPartial(base ?? {});
|
|
857
|
+
},
|
|
858
|
+
fromPartial(object) {
|
|
859
|
+
const message = createBaseGetSignalsResponse();
|
|
860
|
+
message.signals = object.signals?.map((e) => exports.Signal.fromPartial(e)) || [];
|
|
861
|
+
message.paging = (object.paging !== undefined && object.paging !== null)
|
|
862
|
+
? common_1.PageResponse.fromPartial(object.paging)
|
|
863
|
+
: undefined;
|
|
864
|
+
return message;
|
|
865
|
+
},
|
|
866
|
+
};
|
|
867
|
+
function createBaseSignal() {
|
|
868
|
+
return {
|
|
869
|
+
signalId: "",
|
|
870
|
+
strategyId: "",
|
|
871
|
+
strategyName: "",
|
|
872
|
+
instrumentUid: "",
|
|
873
|
+
createDt: undefined,
|
|
874
|
+
direction: 0,
|
|
875
|
+
initialPrice: undefined,
|
|
876
|
+
info: undefined,
|
|
877
|
+
name: "",
|
|
878
|
+
targetPrice: undefined,
|
|
879
|
+
endDt: undefined,
|
|
880
|
+
probability: undefined,
|
|
881
|
+
stoploss: undefined,
|
|
882
|
+
closePrice: undefined,
|
|
883
|
+
closeDt: undefined,
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
exports.Signal = {
|
|
887
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
888
|
+
if (message.signalId !== "") {
|
|
889
|
+
writer.uint32(10).string(message.signalId);
|
|
890
|
+
}
|
|
891
|
+
if (message.strategyId !== "") {
|
|
892
|
+
writer.uint32(18).string(message.strategyId);
|
|
893
|
+
}
|
|
894
|
+
if (message.strategyName !== "") {
|
|
895
|
+
writer.uint32(26).string(message.strategyName);
|
|
896
|
+
}
|
|
897
|
+
if (message.instrumentUid !== "") {
|
|
898
|
+
writer.uint32(34).string(message.instrumentUid);
|
|
899
|
+
}
|
|
900
|
+
if (message.createDt !== undefined) {
|
|
901
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createDt), writer.uint32(42).fork()).join();
|
|
902
|
+
}
|
|
903
|
+
if (message.direction !== 0) {
|
|
904
|
+
writer.uint32(48).int32(message.direction);
|
|
905
|
+
}
|
|
906
|
+
if (message.initialPrice !== undefined) {
|
|
907
|
+
common_1.Quotation.encode(message.initialPrice, writer.uint32(58).fork()).join();
|
|
908
|
+
}
|
|
909
|
+
if (message.info !== undefined) {
|
|
910
|
+
writer.uint32(66).string(message.info);
|
|
911
|
+
}
|
|
912
|
+
if (message.name !== "") {
|
|
913
|
+
writer.uint32(74).string(message.name);
|
|
914
|
+
}
|
|
915
|
+
if (message.targetPrice !== undefined) {
|
|
916
|
+
common_1.Quotation.encode(message.targetPrice, writer.uint32(82).fork()).join();
|
|
917
|
+
}
|
|
918
|
+
if (message.endDt !== undefined) {
|
|
919
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.endDt), writer.uint32(90).fork()).join();
|
|
920
|
+
}
|
|
921
|
+
if (message.probability !== undefined) {
|
|
922
|
+
writer.uint32(96).int32(message.probability);
|
|
923
|
+
}
|
|
924
|
+
if (message.stoploss !== undefined) {
|
|
925
|
+
common_1.Quotation.encode(message.stoploss, writer.uint32(106).fork()).join();
|
|
926
|
+
}
|
|
927
|
+
if (message.closePrice !== undefined) {
|
|
928
|
+
common_1.Quotation.encode(message.closePrice, writer.uint32(114).fork()).join();
|
|
929
|
+
}
|
|
930
|
+
if (message.closeDt !== undefined) {
|
|
931
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.closeDt), writer.uint32(122).fork()).join();
|
|
932
|
+
}
|
|
933
|
+
return writer;
|
|
934
|
+
},
|
|
935
|
+
decode(input, length) {
|
|
936
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
937
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
938
|
+
if (previousRecursionDepth >= 100) {
|
|
939
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
940
|
+
}
|
|
941
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
942
|
+
try {
|
|
943
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
944
|
+
const message = createBaseSignal();
|
|
945
|
+
while (reader.pos < end) {
|
|
946
|
+
const tag = reader.uint32();
|
|
947
|
+
switch (tag >>> 3) {
|
|
948
|
+
case 1: {
|
|
949
|
+
if (tag !== 10) {
|
|
950
|
+
break;
|
|
951
|
+
}
|
|
952
|
+
message.signalId = reader.string();
|
|
953
|
+
continue;
|
|
954
|
+
}
|
|
955
|
+
case 2: {
|
|
956
|
+
if (tag !== 18) {
|
|
957
|
+
break;
|
|
958
|
+
}
|
|
959
|
+
message.strategyId = reader.string();
|
|
960
|
+
continue;
|
|
961
|
+
}
|
|
962
|
+
case 3: {
|
|
963
|
+
if (tag !== 26) {
|
|
964
|
+
break;
|
|
965
|
+
}
|
|
966
|
+
message.strategyName = reader.string();
|
|
967
|
+
continue;
|
|
968
|
+
}
|
|
969
|
+
case 4: {
|
|
970
|
+
if (tag !== 34) {
|
|
971
|
+
break;
|
|
972
|
+
}
|
|
973
|
+
message.instrumentUid = reader.string();
|
|
974
|
+
continue;
|
|
975
|
+
}
|
|
976
|
+
case 5: {
|
|
977
|
+
if (tag !== 42) {
|
|
978
|
+
break;
|
|
979
|
+
}
|
|
980
|
+
message.createDt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
981
|
+
continue;
|
|
982
|
+
}
|
|
983
|
+
case 6: {
|
|
984
|
+
if (tag !== 48) {
|
|
985
|
+
break;
|
|
986
|
+
}
|
|
987
|
+
message.direction = reader.int32();
|
|
988
|
+
continue;
|
|
989
|
+
}
|
|
990
|
+
case 7: {
|
|
991
|
+
if (tag !== 58) {
|
|
992
|
+
break;
|
|
993
|
+
}
|
|
994
|
+
message.initialPrice = common_1.Quotation.decode(reader, reader.uint32());
|
|
995
|
+
continue;
|
|
996
|
+
}
|
|
997
|
+
case 8: {
|
|
998
|
+
if (tag !== 66) {
|
|
999
|
+
break;
|
|
1000
|
+
}
|
|
1001
|
+
message.info = reader.string();
|
|
1002
|
+
continue;
|
|
1003
|
+
}
|
|
1004
|
+
case 9: {
|
|
1005
|
+
if (tag !== 74) {
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
message.name = reader.string();
|
|
1009
|
+
continue;
|
|
1010
|
+
}
|
|
1011
|
+
case 10: {
|
|
1012
|
+
if (tag !== 82) {
|
|
1013
|
+
break;
|
|
1014
|
+
}
|
|
1015
|
+
message.targetPrice = common_1.Quotation.decode(reader, reader.uint32());
|
|
1016
|
+
continue;
|
|
1017
|
+
}
|
|
1018
|
+
case 11: {
|
|
1019
|
+
if (tag !== 90) {
|
|
1020
|
+
break;
|
|
1021
|
+
}
|
|
1022
|
+
message.endDt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1023
|
+
continue;
|
|
1024
|
+
}
|
|
1025
|
+
case 12: {
|
|
1026
|
+
if (tag !== 96) {
|
|
1027
|
+
break;
|
|
1028
|
+
}
|
|
1029
|
+
message.probability = reader.int32();
|
|
1030
|
+
continue;
|
|
1031
|
+
}
|
|
1032
|
+
case 13: {
|
|
1033
|
+
if (tag !== 106) {
|
|
1034
|
+
break;
|
|
1035
|
+
}
|
|
1036
|
+
message.stoploss = common_1.Quotation.decode(reader, reader.uint32());
|
|
1037
|
+
continue;
|
|
1038
|
+
}
|
|
1039
|
+
case 14: {
|
|
1040
|
+
if (tag !== 114) {
|
|
1041
|
+
break;
|
|
1042
|
+
}
|
|
1043
|
+
message.closePrice = common_1.Quotation.decode(reader, reader.uint32());
|
|
1044
|
+
continue;
|
|
1045
|
+
}
|
|
1046
|
+
case 15: {
|
|
1047
|
+
if (tag !== 122) {
|
|
1048
|
+
break;
|
|
1049
|
+
}
|
|
1050
|
+
message.closeDt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1051
|
+
continue;
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1055
|
+
break;
|
|
1056
|
+
}
|
|
1057
|
+
reader.skip(tag & 7);
|
|
1058
|
+
}
|
|
1059
|
+
return message;
|
|
1060
|
+
}
|
|
1061
|
+
finally {
|
|
1062
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
fromJSON(object) {
|
|
1066
|
+
return {
|
|
1067
|
+
signalId: isSet(object.signalId)
|
|
1068
|
+
? globalThis.String(object.signalId)
|
|
1069
|
+
: isSet(object.signal_id)
|
|
1070
|
+
? globalThis.String(object.signal_id)
|
|
1071
|
+
: "",
|
|
1072
|
+
strategyId: isSet(object.strategyId)
|
|
1073
|
+
? globalThis.String(object.strategyId)
|
|
1074
|
+
: isSet(object.strategy_id)
|
|
1075
|
+
? globalThis.String(object.strategy_id)
|
|
1076
|
+
: "",
|
|
1077
|
+
strategyName: isSet(object.strategyName)
|
|
1078
|
+
? globalThis.String(object.strategyName)
|
|
1079
|
+
: isSet(object.strategy_name)
|
|
1080
|
+
? globalThis.String(object.strategy_name)
|
|
1081
|
+
: "",
|
|
1082
|
+
instrumentUid: isSet(object.instrumentUid)
|
|
1083
|
+
? globalThis.String(object.instrumentUid)
|
|
1084
|
+
: isSet(object.instrument_uid)
|
|
1085
|
+
? globalThis.String(object.instrument_uid)
|
|
1086
|
+
: "",
|
|
1087
|
+
createDt: isSet(object.createDt)
|
|
1088
|
+
? fromJsonTimestamp(object.createDt)
|
|
1089
|
+
: isSet(object.create_dt)
|
|
1090
|
+
? fromJsonTimestamp(object.create_dt)
|
|
1091
|
+
: undefined,
|
|
1092
|
+
direction: isSet(object.direction) ? signalDirectionFromJSON(object.direction) : 0,
|
|
1093
|
+
initialPrice: isSet(object.initialPrice)
|
|
1094
|
+
? common_1.Quotation.fromJSON(object.initialPrice)
|
|
1095
|
+
: isSet(object.initial_price)
|
|
1096
|
+
? common_1.Quotation.fromJSON(object.initial_price)
|
|
1097
|
+
: undefined,
|
|
1098
|
+
info: isSet(object.info) ? globalThis.String(object.info) : undefined,
|
|
1099
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1100
|
+
targetPrice: isSet(object.targetPrice)
|
|
1101
|
+
? common_1.Quotation.fromJSON(object.targetPrice)
|
|
1102
|
+
: isSet(object.target_price)
|
|
1103
|
+
? common_1.Quotation.fromJSON(object.target_price)
|
|
1104
|
+
: undefined,
|
|
1105
|
+
endDt: isSet(object.endDt)
|
|
1106
|
+
? fromJsonTimestamp(object.endDt)
|
|
1107
|
+
: isSet(object.end_dt)
|
|
1108
|
+
? fromJsonTimestamp(object.end_dt)
|
|
1109
|
+
: undefined,
|
|
1110
|
+
probability: isSet(object.probability) ? globalThis.Number(object.probability) : undefined,
|
|
1111
|
+
stoploss: isSet(object.stoploss) ? common_1.Quotation.fromJSON(object.stoploss) : undefined,
|
|
1112
|
+
closePrice: isSet(object.closePrice)
|
|
1113
|
+
? common_1.Quotation.fromJSON(object.closePrice)
|
|
1114
|
+
: isSet(object.close_price)
|
|
1115
|
+
? common_1.Quotation.fromJSON(object.close_price)
|
|
1116
|
+
: undefined,
|
|
1117
|
+
closeDt: isSet(object.closeDt)
|
|
1118
|
+
? fromJsonTimestamp(object.closeDt)
|
|
1119
|
+
: isSet(object.close_dt)
|
|
1120
|
+
? fromJsonTimestamp(object.close_dt)
|
|
1121
|
+
: undefined,
|
|
1122
|
+
};
|
|
1123
|
+
},
|
|
1124
|
+
toJSON(message) {
|
|
1125
|
+
const obj = {};
|
|
1126
|
+
if (message.signalId !== "") {
|
|
1127
|
+
obj.signalId = message.signalId;
|
|
1128
|
+
}
|
|
1129
|
+
if (message.strategyId !== "") {
|
|
1130
|
+
obj.strategyId = message.strategyId;
|
|
1131
|
+
}
|
|
1132
|
+
if (message.strategyName !== "") {
|
|
1133
|
+
obj.strategyName = message.strategyName;
|
|
1134
|
+
}
|
|
1135
|
+
if (message.instrumentUid !== "") {
|
|
1136
|
+
obj.instrumentUid = message.instrumentUid;
|
|
1137
|
+
}
|
|
1138
|
+
if (message.createDt !== undefined) {
|
|
1139
|
+
obj.createDt = message.createDt.toISOString();
|
|
1140
|
+
}
|
|
1141
|
+
if (message.direction !== 0) {
|
|
1142
|
+
obj.direction = signalDirectionToJSON(message.direction);
|
|
1143
|
+
}
|
|
1144
|
+
if (message.initialPrice !== undefined) {
|
|
1145
|
+
obj.initialPrice = common_1.Quotation.toJSON(message.initialPrice);
|
|
1146
|
+
}
|
|
1147
|
+
if (message.info !== undefined) {
|
|
1148
|
+
obj.info = message.info;
|
|
1149
|
+
}
|
|
1150
|
+
if (message.name !== "") {
|
|
1151
|
+
obj.name = message.name;
|
|
1152
|
+
}
|
|
1153
|
+
if (message.targetPrice !== undefined) {
|
|
1154
|
+
obj.targetPrice = common_1.Quotation.toJSON(message.targetPrice);
|
|
1155
|
+
}
|
|
1156
|
+
if (message.endDt !== undefined) {
|
|
1157
|
+
obj.endDt = message.endDt.toISOString();
|
|
1158
|
+
}
|
|
1159
|
+
if (message.probability !== undefined) {
|
|
1160
|
+
obj.probability = Math.round(message.probability);
|
|
1161
|
+
}
|
|
1162
|
+
if (message.stoploss !== undefined) {
|
|
1163
|
+
obj.stoploss = common_1.Quotation.toJSON(message.stoploss);
|
|
1164
|
+
}
|
|
1165
|
+
if (message.closePrice !== undefined) {
|
|
1166
|
+
obj.closePrice = common_1.Quotation.toJSON(message.closePrice);
|
|
1167
|
+
}
|
|
1168
|
+
if (message.closeDt !== undefined) {
|
|
1169
|
+
obj.closeDt = message.closeDt.toISOString();
|
|
1170
|
+
}
|
|
1171
|
+
return obj;
|
|
1172
|
+
},
|
|
1173
|
+
create(base) {
|
|
1174
|
+
return exports.Signal.fromPartial(base ?? {});
|
|
1175
|
+
},
|
|
1176
|
+
fromPartial(object) {
|
|
1177
|
+
const message = createBaseSignal();
|
|
1178
|
+
message.signalId = object.signalId ?? "";
|
|
1179
|
+
message.strategyId = object.strategyId ?? "";
|
|
1180
|
+
message.strategyName = object.strategyName ?? "";
|
|
1181
|
+
message.instrumentUid = object.instrumentUid ?? "";
|
|
1182
|
+
message.createDt = object.createDt ?? undefined;
|
|
1183
|
+
message.direction = object.direction ?? 0;
|
|
1184
|
+
message.initialPrice = (object.initialPrice !== undefined && object.initialPrice !== null)
|
|
1185
|
+
? common_1.Quotation.fromPartial(object.initialPrice)
|
|
1186
|
+
: undefined;
|
|
1187
|
+
message.info = object.info ?? undefined;
|
|
1188
|
+
message.name = object.name ?? "";
|
|
1189
|
+
message.targetPrice = (object.targetPrice !== undefined && object.targetPrice !== null)
|
|
1190
|
+
? common_1.Quotation.fromPartial(object.targetPrice)
|
|
1191
|
+
: undefined;
|
|
1192
|
+
message.endDt = object.endDt ?? undefined;
|
|
1193
|
+
message.probability = object.probability ?? undefined;
|
|
1194
|
+
message.stoploss = (object.stoploss !== undefined && object.stoploss !== null)
|
|
1195
|
+
? common_1.Quotation.fromPartial(object.stoploss)
|
|
1196
|
+
: undefined;
|
|
1197
|
+
message.closePrice = (object.closePrice !== undefined && object.closePrice !== null)
|
|
1198
|
+
? common_1.Quotation.fromPartial(object.closePrice)
|
|
1199
|
+
: undefined;
|
|
1200
|
+
message.closeDt = object.closeDt ?? undefined;
|
|
1201
|
+
return message;
|
|
1202
|
+
},
|
|
1203
|
+
};
|
|
1204
|
+
exports.SignalServiceDefinition = {
|
|
1205
|
+
name: "SignalService",
|
|
1206
|
+
fullName: "tinkoff.public.invest.api.contract.v1.SignalService",
|
|
1207
|
+
methods: {
|
|
1208
|
+
/** GetStrategies — стратегии */
|
|
1209
|
+
getStrategies: {
|
|
1210
|
+
name: "GetStrategies",
|
|
1211
|
+
requestType: exports.GetStrategiesRequest,
|
|
1212
|
+
requestStream: false,
|
|
1213
|
+
responseType: exports.GetStrategiesResponse,
|
|
1214
|
+
responseStream: false,
|
|
1215
|
+
options: {},
|
|
1216
|
+
},
|
|
1217
|
+
/** GetSignals — сигналы */
|
|
1218
|
+
getSignals: {
|
|
1219
|
+
name: "GetSignals",
|
|
1220
|
+
requestType: exports.GetSignalsRequest,
|
|
1221
|
+
requestStream: false,
|
|
1222
|
+
responseType: exports.GetSignalsResponse,
|
|
1223
|
+
responseStream: false,
|
|
1224
|
+
options: {},
|
|
1225
|
+
},
|
|
1226
|
+
},
|
|
1227
|
+
};
|
|
1228
|
+
function toTimestamp(date) {
|
|
1229
|
+
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
1230
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
1231
|
+
return { seconds, nanos };
|
|
1232
|
+
}
|
|
1233
|
+
function fromTimestamp(t) {
|
|
1234
|
+
let millis = (t.seconds || 0) * 1_000;
|
|
1235
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
1236
|
+
return new globalThis.Date(millis);
|
|
1237
|
+
}
|
|
1238
|
+
function fromJsonTimestamp(o) {
|
|
1239
|
+
if (o instanceof globalThis.Date) {
|
|
1240
|
+
return o;
|
|
1241
|
+
}
|
|
1242
|
+
else if (typeof o === "string") {
|
|
1243
|
+
return new globalThis.Date(o);
|
|
1244
|
+
}
|
|
1245
|
+
else {
|
|
1246
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
function longToNumber(int64) {
|
|
1250
|
+
const num = globalThis.Number(int64.toString());
|
|
1251
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1252
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1253
|
+
}
|
|
1254
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1255
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1256
|
+
}
|
|
1257
|
+
return num;
|
|
1258
|
+
}
|
|
1259
|
+
function isSet(value) {
|
|
1260
|
+
return value !== null && value !== undefined;
|
|
1261
|
+
}
|