@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,1990 @@
|
|
|
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: stoporders.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.StopOrdersServiceDefinition = exports.StopOrder_TrailingData = exports.StopOrder = exports.CancelStopOrderResponse = exports.CancelStopOrderRequest = exports.GetStopOrdersResponse = exports.GetStopOrdersRequest = exports.PostStopOrderResponse = exports.PostStopOrderRequest_TrailingData = exports.PostStopOrderRequest = exports.TrailingStopStatus = exports.TrailingValueType = exports.TakeProfitType = exports.ExchangeOrderType = exports.StopOrderStatusOption = exports.StopOrderType = exports.StopOrderExpirationType = exports.StopOrderDirection = exports.protobufPackage = void 0;
|
|
9
|
+
exports.stopOrderDirectionFromJSON = stopOrderDirectionFromJSON;
|
|
10
|
+
exports.stopOrderDirectionToJSON = stopOrderDirectionToJSON;
|
|
11
|
+
exports.stopOrderExpirationTypeFromJSON = stopOrderExpirationTypeFromJSON;
|
|
12
|
+
exports.stopOrderExpirationTypeToJSON = stopOrderExpirationTypeToJSON;
|
|
13
|
+
exports.stopOrderTypeFromJSON = stopOrderTypeFromJSON;
|
|
14
|
+
exports.stopOrderTypeToJSON = stopOrderTypeToJSON;
|
|
15
|
+
exports.stopOrderStatusOptionFromJSON = stopOrderStatusOptionFromJSON;
|
|
16
|
+
exports.stopOrderStatusOptionToJSON = stopOrderStatusOptionToJSON;
|
|
17
|
+
exports.exchangeOrderTypeFromJSON = exchangeOrderTypeFromJSON;
|
|
18
|
+
exports.exchangeOrderTypeToJSON = exchangeOrderTypeToJSON;
|
|
19
|
+
exports.takeProfitTypeFromJSON = takeProfitTypeFromJSON;
|
|
20
|
+
exports.takeProfitTypeToJSON = takeProfitTypeToJSON;
|
|
21
|
+
exports.trailingValueTypeFromJSON = trailingValueTypeFromJSON;
|
|
22
|
+
exports.trailingValueTypeToJSON = trailingValueTypeToJSON;
|
|
23
|
+
exports.trailingStopStatusFromJSON = trailingStopStatusFromJSON;
|
|
24
|
+
exports.trailingStopStatusToJSON = trailingStopStatusToJSON;
|
|
25
|
+
/* eslint-disable */
|
|
26
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
27
|
+
const common_1 = require("./common");
|
|
28
|
+
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
29
|
+
exports.protobufPackage = "tinkoff.public.invest.api.contract.v1";
|
|
30
|
+
/** Направление сделки стоп-заявки. */
|
|
31
|
+
var StopOrderDirection;
|
|
32
|
+
(function (StopOrderDirection) {
|
|
33
|
+
/** STOP_ORDER_DIRECTION_UNSPECIFIED - Значение не указано. */
|
|
34
|
+
StopOrderDirection[StopOrderDirection["STOP_ORDER_DIRECTION_UNSPECIFIED"] = 0] = "STOP_ORDER_DIRECTION_UNSPECIFIED";
|
|
35
|
+
/** STOP_ORDER_DIRECTION_BUY - Покупка. */
|
|
36
|
+
StopOrderDirection[StopOrderDirection["STOP_ORDER_DIRECTION_BUY"] = 1] = "STOP_ORDER_DIRECTION_BUY";
|
|
37
|
+
/** STOP_ORDER_DIRECTION_SELL - Продажа. */
|
|
38
|
+
StopOrderDirection[StopOrderDirection["STOP_ORDER_DIRECTION_SELL"] = 2] = "STOP_ORDER_DIRECTION_SELL";
|
|
39
|
+
StopOrderDirection[StopOrderDirection["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
40
|
+
})(StopOrderDirection || (exports.StopOrderDirection = StopOrderDirection = {}));
|
|
41
|
+
function stopOrderDirectionFromJSON(object) {
|
|
42
|
+
switch (object) {
|
|
43
|
+
case 0:
|
|
44
|
+
case "STOP_ORDER_DIRECTION_UNSPECIFIED":
|
|
45
|
+
return StopOrderDirection.STOP_ORDER_DIRECTION_UNSPECIFIED;
|
|
46
|
+
case 1:
|
|
47
|
+
case "STOP_ORDER_DIRECTION_BUY":
|
|
48
|
+
return StopOrderDirection.STOP_ORDER_DIRECTION_BUY;
|
|
49
|
+
case 2:
|
|
50
|
+
case "STOP_ORDER_DIRECTION_SELL":
|
|
51
|
+
return StopOrderDirection.STOP_ORDER_DIRECTION_SELL;
|
|
52
|
+
case -1:
|
|
53
|
+
case "UNRECOGNIZED":
|
|
54
|
+
default:
|
|
55
|
+
return StopOrderDirection.UNRECOGNIZED;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function stopOrderDirectionToJSON(object) {
|
|
59
|
+
switch (object) {
|
|
60
|
+
case StopOrderDirection.STOP_ORDER_DIRECTION_UNSPECIFIED:
|
|
61
|
+
return "STOP_ORDER_DIRECTION_UNSPECIFIED";
|
|
62
|
+
case StopOrderDirection.STOP_ORDER_DIRECTION_BUY:
|
|
63
|
+
return "STOP_ORDER_DIRECTION_BUY";
|
|
64
|
+
case StopOrderDirection.STOP_ORDER_DIRECTION_SELL:
|
|
65
|
+
return "STOP_ORDER_DIRECTION_SELL";
|
|
66
|
+
case StopOrderDirection.UNRECOGNIZED:
|
|
67
|
+
default:
|
|
68
|
+
return "UNRECOGNIZED";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Тип экспирации стоп-заявке. */
|
|
72
|
+
var StopOrderExpirationType;
|
|
73
|
+
(function (StopOrderExpirationType) {
|
|
74
|
+
/** STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED - Значение не указано. */
|
|
75
|
+
StopOrderExpirationType[StopOrderExpirationType["STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED"] = 0] = "STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED";
|
|
76
|
+
/** STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL - Действительно до отмены. */
|
|
77
|
+
StopOrderExpirationType[StopOrderExpirationType["STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL"] = 1] = "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL";
|
|
78
|
+
/** STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE - Действительно до даты снятия. */
|
|
79
|
+
StopOrderExpirationType[StopOrderExpirationType["STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE"] = 2] = "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE";
|
|
80
|
+
StopOrderExpirationType[StopOrderExpirationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
81
|
+
})(StopOrderExpirationType || (exports.StopOrderExpirationType = StopOrderExpirationType = {}));
|
|
82
|
+
function stopOrderExpirationTypeFromJSON(object) {
|
|
83
|
+
switch (object) {
|
|
84
|
+
case 0:
|
|
85
|
+
case "STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED":
|
|
86
|
+
return StopOrderExpirationType.STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED;
|
|
87
|
+
case 1:
|
|
88
|
+
case "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL":
|
|
89
|
+
return StopOrderExpirationType.STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL;
|
|
90
|
+
case 2:
|
|
91
|
+
case "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE":
|
|
92
|
+
return StopOrderExpirationType.STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE;
|
|
93
|
+
case -1:
|
|
94
|
+
case "UNRECOGNIZED":
|
|
95
|
+
default:
|
|
96
|
+
return StopOrderExpirationType.UNRECOGNIZED;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function stopOrderExpirationTypeToJSON(object) {
|
|
100
|
+
switch (object) {
|
|
101
|
+
case StopOrderExpirationType.STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED:
|
|
102
|
+
return "STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED";
|
|
103
|
+
case StopOrderExpirationType.STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL:
|
|
104
|
+
return "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL";
|
|
105
|
+
case StopOrderExpirationType.STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE:
|
|
106
|
+
return "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE";
|
|
107
|
+
case StopOrderExpirationType.UNRECOGNIZED:
|
|
108
|
+
default:
|
|
109
|
+
return "UNRECOGNIZED";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/** Тип стоп-заявки. */
|
|
113
|
+
var StopOrderType;
|
|
114
|
+
(function (StopOrderType) {
|
|
115
|
+
/** STOP_ORDER_TYPE_UNSPECIFIED - Значение не указано. */
|
|
116
|
+
StopOrderType[StopOrderType["STOP_ORDER_TYPE_UNSPECIFIED"] = 0] = "STOP_ORDER_TYPE_UNSPECIFIED";
|
|
117
|
+
/** STOP_ORDER_TYPE_TAKE_PROFIT - `Take-profit`-заявка. */
|
|
118
|
+
StopOrderType[StopOrderType["STOP_ORDER_TYPE_TAKE_PROFIT"] = 1] = "STOP_ORDER_TYPE_TAKE_PROFIT";
|
|
119
|
+
/** STOP_ORDER_TYPE_STOP_LOSS - `Stop-loss`-заявка. */
|
|
120
|
+
StopOrderType[StopOrderType["STOP_ORDER_TYPE_STOP_LOSS"] = 2] = "STOP_ORDER_TYPE_STOP_LOSS";
|
|
121
|
+
/** STOP_ORDER_TYPE_STOP_LIMIT - `Stop-limit`-заявка. */
|
|
122
|
+
StopOrderType[StopOrderType["STOP_ORDER_TYPE_STOP_LIMIT"] = 3] = "STOP_ORDER_TYPE_STOP_LIMIT";
|
|
123
|
+
StopOrderType[StopOrderType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
124
|
+
})(StopOrderType || (exports.StopOrderType = StopOrderType = {}));
|
|
125
|
+
function stopOrderTypeFromJSON(object) {
|
|
126
|
+
switch (object) {
|
|
127
|
+
case 0:
|
|
128
|
+
case "STOP_ORDER_TYPE_UNSPECIFIED":
|
|
129
|
+
return StopOrderType.STOP_ORDER_TYPE_UNSPECIFIED;
|
|
130
|
+
case 1:
|
|
131
|
+
case "STOP_ORDER_TYPE_TAKE_PROFIT":
|
|
132
|
+
return StopOrderType.STOP_ORDER_TYPE_TAKE_PROFIT;
|
|
133
|
+
case 2:
|
|
134
|
+
case "STOP_ORDER_TYPE_STOP_LOSS":
|
|
135
|
+
return StopOrderType.STOP_ORDER_TYPE_STOP_LOSS;
|
|
136
|
+
case 3:
|
|
137
|
+
case "STOP_ORDER_TYPE_STOP_LIMIT":
|
|
138
|
+
return StopOrderType.STOP_ORDER_TYPE_STOP_LIMIT;
|
|
139
|
+
case -1:
|
|
140
|
+
case "UNRECOGNIZED":
|
|
141
|
+
default:
|
|
142
|
+
return StopOrderType.UNRECOGNIZED;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function stopOrderTypeToJSON(object) {
|
|
146
|
+
switch (object) {
|
|
147
|
+
case StopOrderType.STOP_ORDER_TYPE_UNSPECIFIED:
|
|
148
|
+
return "STOP_ORDER_TYPE_UNSPECIFIED";
|
|
149
|
+
case StopOrderType.STOP_ORDER_TYPE_TAKE_PROFIT:
|
|
150
|
+
return "STOP_ORDER_TYPE_TAKE_PROFIT";
|
|
151
|
+
case StopOrderType.STOP_ORDER_TYPE_STOP_LOSS:
|
|
152
|
+
return "STOP_ORDER_TYPE_STOP_LOSS";
|
|
153
|
+
case StopOrderType.STOP_ORDER_TYPE_STOP_LIMIT:
|
|
154
|
+
return "STOP_ORDER_TYPE_STOP_LIMIT";
|
|
155
|
+
case StopOrderType.UNRECOGNIZED:
|
|
156
|
+
default:
|
|
157
|
+
return "UNRECOGNIZED";
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** Статус стоп-заяки. */
|
|
161
|
+
var StopOrderStatusOption;
|
|
162
|
+
(function (StopOrderStatusOption) {
|
|
163
|
+
/** STOP_ORDER_STATUS_UNSPECIFIED - Значение не указано. */
|
|
164
|
+
StopOrderStatusOption[StopOrderStatusOption["STOP_ORDER_STATUS_UNSPECIFIED"] = 0] = "STOP_ORDER_STATUS_UNSPECIFIED";
|
|
165
|
+
/** STOP_ORDER_STATUS_ALL - Все заявки. */
|
|
166
|
+
StopOrderStatusOption[StopOrderStatusOption["STOP_ORDER_STATUS_ALL"] = 1] = "STOP_ORDER_STATUS_ALL";
|
|
167
|
+
/** STOP_ORDER_STATUS_ACTIVE - Активные заявки. */
|
|
168
|
+
StopOrderStatusOption[StopOrderStatusOption["STOP_ORDER_STATUS_ACTIVE"] = 2] = "STOP_ORDER_STATUS_ACTIVE";
|
|
169
|
+
/** STOP_ORDER_STATUS_EXECUTED - Исполненные заявки. */
|
|
170
|
+
StopOrderStatusOption[StopOrderStatusOption["STOP_ORDER_STATUS_EXECUTED"] = 3] = "STOP_ORDER_STATUS_EXECUTED";
|
|
171
|
+
/** STOP_ORDER_STATUS_CANCELED - Отмененные заявки. */
|
|
172
|
+
StopOrderStatusOption[StopOrderStatusOption["STOP_ORDER_STATUS_CANCELED"] = 4] = "STOP_ORDER_STATUS_CANCELED";
|
|
173
|
+
/** STOP_ORDER_STATUS_EXPIRED - Истекшие заявки. */
|
|
174
|
+
StopOrderStatusOption[StopOrderStatusOption["STOP_ORDER_STATUS_EXPIRED"] = 5] = "STOP_ORDER_STATUS_EXPIRED";
|
|
175
|
+
StopOrderStatusOption[StopOrderStatusOption["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
176
|
+
})(StopOrderStatusOption || (exports.StopOrderStatusOption = StopOrderStatusOption = {}));
|
|
177
|
+
function stopOrderStatusOptionFromJSON(object) {
|
|
178
|
+
switch (object) {
|
|
179
|
+
case 0:
|
|
180
|
+
case "STOP_ORDER_STATUS_UNSPECIFIED":
|
|
181
|
+
return StopOrderStatusOption.STOP_ORDER_STATUS_UNSPECIFIED;
|
|
182
|
+
case 1:
|
|
183
|
+
case "STOP_ORDER_STATUS_ALL":
|
|
184
|
+
return StopOrderStatusOption.STOP_ORDER_STATUS_ALL;
|
|
185
|
+
case 2:
|
|
186
|
+
case "STOP_ORDER_STATUS_ACTIVE":
|
|
187
|
+
return StopOrderStatusOption.STOP_ORDER_STATUS_ACTIVE;
|
|
188
|
+
case 3:
|
|
189
|
+
case "STOP_ORDER_STATUS_EXECUTED":
|
|
190
|
+
return StopOrderStatusOption.STOP_ORDER_STATUS_EXECUTED;
|
|
191
|
+
case 4:
|
|
192
|
+
case "STOP_ORDER_STATUS_CANCELED":
|
|
193
|
+
return StopOrderStatusOption.STOP_ORDER_STATUS_CANCELED;
|
|
194
|
+
case 5:
|
|
195
|
+
case "STOP_ORDER_STATUS_EXPIRED":
|
|
196
|
+
return StopOrderStatusOption.STOP_ORDER_STATUS_EXPIRED;
|
|
197
|
+
case -1:
|
|
198
|
+
case "UNRECOGNIZED":
|
|
199
|
+
default:
|
|
200
|
+
return StopOrderStatusOption.UNRECOGNIZED;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function stopOrderStatusOptionToJSON(object) {
|
|
204
|
+
switch (object) {
|
|
205
|
+
case StopOrderStatusOption.STOP_ORDER_STATUS_UNSPECIFIED:
|
|
206
|
+
return "STOP_ORDER_STATUS_UNSPECIFIED";
|
|
207
|
+
case StopOrderStatusOption.STOP_ORDER_STATUS_ALL:
|
|
208
|
+
return "STOP_ORDER_STATUS_ALL";
|
|
209
|
+
case StopOrderStatusOption.STOP_ORDER_STATUS_ACTIVE:
|
|
210
|
+
return "STOP_ORDER_STATUS_ACTIVE";
|
|
211
|
+
case StopOrderStatusOption.STOP_ORDER_STATUS_EXECUTED:
|
|
212
|
+
return "STOP_ORDER_STATUS_EXECUTED";
|
|
213
|
+
case StopOrderStatusOption.STOP_ORDER_STATUS_CANCELED:
|
|
214
|
+
return "STOP_ORDER_STATUS_CANCELED";
|
|
215
|
+
case StopOrderStatusOption.STOP_ORDER_STATUS_EXPIRED:
|
|
216
|
+
return "STOP_ORDER_STATUS_EXPIRED";
|
|
217
|
+
case StopOrderStatusOption.UNRECOGNIZED:
|
|
218
|
+
default:
|
|
219
|
+
return "UNRECOGNIZED";
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/** Тип выставляемой заявки. */
|
|
223
|
+
var ExchangeOrderType;
|
|
224
|
+
(function (ExchangeOrderType) {
|
|
225
|
+
/** EXCHANGE_ORDER_TYPE_UNSPECIFIED - Значение не указано. */
|
|
226
|
+
ExchangeOrderType[ExchangeOrderType["EXCHANGE_ORDER_TYPE_UNSPECIFIED"] = 0] = "EXCHANGE_ORDER_TYPE_UNSPECIFIED";
|
|
227
|
+
/** EXCHANGE_ORDER_TYPE_MARKET - Заявка по рыночной цене. */
|
|
228
|
+
ExchangeOrderType[ExchangeOrderType["EXCHANGE_ORDER_TYPE_MARKET"] = 1] = "EXCHANGE_ORDER_TYPE_MARKET";
|
|
229
|
+
/** EXCHANGE_ORDER_TYPE_LIMIT - Лимитная заявка. */
|
|
230
|
+
ExchangeOrderType[ExchangeOrderType["EXCHANGE_ORDER_TYPE_LIMIT"] = 2] = "EXCHANGE_ORDER_TYPE_LIMIT";
|
|
231
|
+
ExchangeOrderType[ExchangeOrderType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
232
|
+
})(ExchangeOrderType || (exports.ExchangeOrderType = ExchangeOrderType = {}));
|
|
233
|
+
function exchangeOrderTypeFromJSON(object) {
|
|
234
|
+
switch (object) {
|
|
235
|
+
case 0:
|
|
236
|
+
case "EXCHANGE_ORDER_TYPE_UNSPECIFIED":
|
|
237
|
+
return ExchangeOrderType.EXCHANGE_ORDER_TYPE_UNSPECIFIED;
|
|
238
|
+
case 1:
|
|
239
|
+
case "EXCHANGE_ORDER_TYPE_MARKET":
|
|
240
|
+
return ExchangeOrderType.EXCHANGE_ORDER_TYPE_MARKET;
|
|
241
|
+
case 2:
|
|
242
|
+
case "EXCHANGE_ORDER_TYPE_LIMIT":
|
|
243
|
+
return ExchangeOrderType.EXCHANGE_ORDER_TYPE_LIMIT;
|
|
244
|
+
case -1:
|
|
245
|
+
case "UNRECOGNIZED":
|
|
246
|
+
default:
|
|
247
|
+
return ExchangeOrderType.UNRECOGNIZED;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function exchangeOrderTypeToJSON(object) {
|
|
251
|
+
switch (object) {
|
|
252
|
+
case ExchangeOrderType.EXCHANGE_ORDER_TYPE_UNSPECIFIED:
|
|
253
|
+
return "EXCHANGE_ORDER_TYPE_UNSPECIFIED";
|
|
254
|
+
case ExchangeOrderType.EXCHANGE_ORDER_TYPE_MARKET:
|
|
255
|
+
return "EXCHANGE_ORDER_TYPE_MARKET";
|
|
256
|
+
case ExchangeOrderType.EXCHANGE_ORDER_TYPE_LIMIT:
|
|
257
|
+
return "EXCHANGE_ORDER_TYPE_LIMIT";
|
|
258
|
+
case ExchangeOrderType.UNRECOGNIZED:
|
|
259
|
+
default:
|
|
260
|
+
return "UNRECOGNIZED";
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/** Тип TakeProfit-заявки. */
|
|
264
|
+
var TakeProfitType;
|
|
265
|
+
(function (TakeProfitType) {
|
|
266
|
+
/** TAKE_PROFIT_TYPE_UNSPECIFIED - Значение не указано. */
|
|
267
|
+
TakeProfitType[TakeProfitType["TAKE_PROFIT_TYPE_UNSPECIFIED"] = 0] = "TAKE_PROFIT_TYPE_UNSPECIFIED";
|
|
268
|
+
/** TAKE_PROFIT_TYPE_REGULAR - Обычная заявка, значение по умолчанию. */
|
|
269
|
+
TakeProfitType[TakeProfitType["TAKE_PROFIT_TYPE_REGULAR"] = 1] = "TAKE_PROFIT_TYPE_REGULAR";
|
|
270
|
+
/** TAKE_PROFIT_TYPE_TRAILING - Трейлинг-стоп. */
|
|
271
|
+
TakeProfitType[TakeProfitType["TAKE_PROFIT_TYPE_TRAILING"] = 2] = "TAKE_PROFIT_TYPE_TRAILING";
|
|
272
|
+
TakeProfitType[TakeProfitType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
273
|
+
})(TakeProfitType || (exports.TakeProfitType = TakeProfitType = {}));
|
|
274
|
+
function takeProfitTypeFromJSON(object) {
|
|
275
|
+
switch (object) {
|
|
276
|
+
case 0:
|
|
277
|
+
case "TAKE_PROFIT_TYPE_UNSPECIFIED":
|
|
278
|
+
return TakeProfitType.TAKE_PROFIT_TYPE_UNSPECIFIED;
|
|
279
|
+
case 1:
|
|
280
|
+
case "TAKE_PROFIT_TYPE_REGULAR":
|
|
281
|
+
return TakeProfitType.TAKE_PROFIT_TYPE_REGULAR;
|
|
282
|
+
case 2:
|
|
283
|
+
case "TAKE_PROFIT_TYPE_TRAILING":
|
|
284
|
+
return TakeProfitType.TAKE_PROFIT_TYPE_TRAILING;
|
|
285
|
+
case -1:
|
|
286
|
+
case "UNRECOGNIZED":
|
|
287
|
+
default:
|
|
288
|
+
return TakeProfitType.UNRECOGNIZED;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function takeProfitTypeToJSON(object) {
|
|
292
|
+
switch (object) {
|
|
293
|
+
case TakeProfitType.TAKE_PROFIT_TYPE_UNSPECIFIED:
|
|
294
|
+
return "TAKE_PROFIT_TYPE_UNSPECIFIED";
|
|
295
|
+
case TakeProfitType.TAKE_PROFIT_TYPE_REGULAR:
|
|
296
|
+
return "TAKE_PROFIT_TYPE_REGULAR";
|
|
297
|
+
case TakeProfitType.TAKE_PROFIT_TYPE_TRAILING:
|
|
298
|
+
return "TAKE_PROFIT_TYPE_TRAILING";
|
|
299
|
+
case TakeProfitType.UNRECOGNIZED:
|
|
300
|
+
default:
|
|
301
|
+
return "UNRECOGNIZED";
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/** Тип параметров значений трейлинг-стопа. */
|
|
305
|
+
var TrailingValueType;
|
|
306
|
+
(function (TrailingValueType) {
|
|
307
|
+
/** TRAILING_VALUE_UNSPECIFIED - Значение не указано. */
|
|
308
|
+
TrailingValueType[TrailingValueType["TRAILING_VALUE_UNSPECIFIED"] = 0] = "TRAILING_VALUE_UNSPECIFIED";
|
|
309
|
+
/** TRAILING_VALUE_ABSOLUTE - Абсолютное значение в единицах цены. */
|
|
310
|
+
TrailingValueType[TrailingValueType["TRAILING_VALUE_ABSOLUTE"] = 1] = "TRAILING_VALUE_ABSOLUTE";
|
|
311
|
+
/** TRAILING_VALUE_RELATIVE - Относительное значение в процентах. */
|
|
312
|
+
TrailingValueType[TrailingValueType["TRAILING_VALUE_RELATIVE"] = 2] = "TRAILING_VALUE_RELATIVE";
|
|
313
|
+
TrailingValueType[TrailingValueType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
314
|
+
})(TrailingValueType || (exports.TrailingValueType = TrailingValueType = {}));
|
|
315
|
+
function trailingValueTypeFromJSON(object) {
|
|
316
|
+
switch (object) {
|
|
317
|
+
case 0:
|
|
318
|
+
case "TRAILING_VALUE_UNSPECIFIED":
|
|
319
|
+
return TrailingValueType.TRAILING_VALUE_UNSPECIFIED;
|
|
320
|
+
case 1:
|
|
321
|
+
case "TRAILING_VALUE_ABSOLUTE":
|
|
322
|
+
return TrailingValueType.TRAILING_VALUE_ABSOLUTE;
|
|
323
|
+
case 2:
|
|
324
|
+
case "TRAILING_VALUE_RELATIVE":
|
|
325
|
+
return TrailingValueType.TRAILING_VALUE_RELATIVE;
|
|
326
|
+
case -1:
|
|
327
|
+
case "UNRECOGNIZED":
|
|
328
|
+
default:
|
|
329
|
+
return TrailingValueType.UNRECOGNIZED;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
function trailingValueTypeToJSON(object) {
|
|
333
|
+
switch (object) {
|
|
334
|
+
case TrailingValueType.TRAILING_VALUE_UNSPECIFIED:
|
|
335
|
+
return "TRAILING_VALUE_UNSPECIFIED";
|
|
336
|
+
case TrailingValueType.TRAILING_VALUE_ABSOLUTE:
|
|
337
|
+
return "TRAILING_VALUE_ABSOLUTE";
|
|
338
|
+
case TrailingValueType.TRAILING_VALUE_RELATIVE:
|
|
339
|
+
return "TRAILING_VALUE_RELATIVE";
|
|
340
|
+
case TrailingValueType.UNRECOGNIZED:
|
|
341
|
+
default:
|
|
342
|
+
return "UNRECOGNIZED";
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/** Статус трейлинг-стопа. */
|
|
346
|
+
var TrailingStopStatus;
|
|
347
|
+
(function (TrailingStopStatus) {
|
|
348
|
+
/** TRAILING_STOP_UNSPECIFIED - Значение не указано. */
|
|
349
|
+
TrailingStopStatus[TrailingStopStatus["TRAILING_STOP_UNSPECIFIED"] = 0] = "TRAILING_STOP_UNSPECIFIED";
|
|
350
|
+
/** TRAILING_STOP_ACTIVE - Активный. */
|
|
351
|
+
TrailingStopStatus[TrailingStopStatus["TRAILING_STOP_ACTIVE"] = 1] = "TRAILING_STOP_ACTIVE";
|
|
352
|
+
/** TRAILING_STOP_ACTIVATED - Активированный. */
|
|
353
|
+
TrailingStopStatus[TrailingStopStatus["TRAILING_STOP_ACTIVATED"] = 2] = "TRAILING_STOP_ACTIVATED";
|
|
354
|
+
TrailingStopStatus[TrailingStopStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
355
|
+
})(TrailingStopStatus || (exports.TrailingStopStatus = TrailingStopStatus = {}));
|
|
356
|
+
function trailingStopStatusFromJSON(object) {
|
|
357
|
+
switch (object) {
|
|
358
|
+
case 0:
|
|
359
|
+
case "TRAILING_STOP_UNSPECIFIED":
|
|
360
|
+
return TrailingStopStatus.TRAILING_STOP_UNSPECIFIED;
|
|
361
|
+
case 1:
|
|
362
|
+
case "TRAILING_STOP_ACTIVE":
|
|
363
|
+
return TrailingStopStatus.TRAILING_STOP_ACTIVE;
|
|
364
|
+
case 2:
|
|
365
|
+
case "TRAILING_STOP_ACTIVATED":
|
|
366
|
+
return TrailingStopStatus.TRAILING_STOP_ACTIVATED;
|
|
367
|
+
case -1:
|
|
368
|
+
case "UNRECOGNIZED":
|
|
369
|
+
default:
|
|
370
|
+
return TrailingStopStatus.UNRECOGNIZED;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
function trailingStopStatusToJSON(object) {
|
|
374
|
+
switch (object) {
|
|
375
|
+
case TrailingStopStatus.TRAILING_STOP_UNSPECIFIED:
|
|
376
|
+
return "TRAILING_STOP_UNSPECIFIED";
|
|
377
|
+
case TrailingStopStatus.TRAILING_STOP_ACTIVE:
|
|
378
|
+
return "TRAILING_STOP_ACTIVE";
|
|
379
|
+
case TrailingStopStatus.TRAILING_STOP_ACTIVATED:
|
|
380
|
+
return "TRAILING_STOP_ACTIVATED";
|
|
381
|
+
case TrailingStopStatus.UNRECOGNIZED:
|
|
382
|
+
default:
|
|
383
|
+
return "UNRECOGNIZED";
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
function createBasePostStopOrderRequest() {
|
|
387
|
+
return {
|
|
388
|
+
figi: undefined,
|
|
389
|
+
quantity: 0,
|
|
390
|
+
price: undefined,
|
|
391
|
+
stopPrice: undefined,
|
|
392
|
+
direction: 0,
|
|
393
|
+
accountId: "",
|
|
394
|
+
expirationType: 0,
|
|
395
|
+
stopOrderType: 0,
|
|
396
|
+
expireDate: undefined,
|
|
397
|
+
instrumentId: "",
|
|
398
|
+
exchangeOrderType: 0,
|
|
399
|
+
takeProfitType: 0,
|
|
400
|
+
trailingData: undefined,
|
|
401
|
+
priceType: 0,
|
|
402
|
+
orderId: "",
|
|
403
|
+
confirmMarginTrade: false,
|
|
404
|
+
instantExecution: undefined,
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
exports.PostStopOrderRequest = {
|
|
408
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
409
|
+
if (message.figi !== undefined) {
|
|
410
|
+
writer.uint32(10).string(message.figi);
|
|
411
|
+
}
|
|
412
|
+
if (message.quantity !== 0) {
|
|
413
|
+
writer.uint32(16).int64(message.quantity);
|
|
414
|
+
}
|
|
415
|
+
if (message.price !== undefined) {
|
|
416
|
+
common_1.Quotation.encode(message.price, writer.uint32(26).fork()).join();
|
|
417
|
+
}
|
|
418
|
+
if (message.stopPrice !== undefined) {
|
|
419
|
+
common_1.Quotation.encode(message.stopPrice, writer.uint32(34).fork()).join();
|
|
420
|
+
}
|
|
421
|
+
if (message.direction !== 0) {
|
|
422
|
+
writer.uint32(40).int32(message.direction);
|
|
423
|
+
}
|
|
424
|
+
if (message.accountId !== "") {
|
|
425
|
+
writer.uint32(50).string(message.accountId);
|
|
426
|
+
}
|
|
427
|
+
if (message.expirationType !== 0) {
|
|
428
|
+
writer.uint32(56).int32(message.expirationType);
|
|
429
|
+
}
|
|
430
|
+
if (message.stopOrderType !== 0) {
|
|
431
|
+
writer.uint32(64).int32(message.stopOrderType);
|
|
432
|
+
}
|
|
433
|
+
if (message.expireDate !== undefined) {
|
|
434
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expireDate), writer.uint32(74).fork()).join();
|
|
435
|
+
}
|
|
436
|
+
if (message.instrumentId !== "") {
|
|
437
|
+
writer.uint32(82).string(message.instrumentId);
|
|
438
|
+
}
|
|
439
|
+
if (message.exchangeOrderType !== 0) {
|
|
440
|
+
writer.uint32(88).int32(message.exchangeOrderType);
|
|
441
|
+
}
|
|
442
|
+
if (message.takeProfitType !== 0) {
|
|
443
|
+
writer.uint32(96).int32(message.takeProfitType);
|
|
444
|
+
}
|
|
445
|
+
if (message.trailingData !== undefined) {
|
|
446
|
+
exports.PostStopOrderRequest_TrailingData.encode(message.trailingData, writer.uint32(106).fork()).join();
|
|
447
|
+
}
|
|
448
|
+
if (message.priceType !== 0) {
|
|
449
|
+
writer.uint32(112).int32(message.priceType);
|
|
450
|
+
}
|
|
451
|
+
if (message.orderId !== "") {
|
|
452
|
+
writer.uint32(122).string(message.orderId);
|
|
453
|
+
}
|
|
454
|
+
if (message.confirmMarginTrade !== false) {
|
|
455
|
+
writer.uint32(128).bool(message.confirmMarginTrade);
|
|
456
|
+
}
|
|
457
|
+
if (message.instantExecution !== undefined) {
|
|
458
|
+
writer.uint32(136).bool(message.instantExecution);
|
|
459
|
+
}
|
|
460
|
+
return writer;
|
|
461
|
+
},
|
|
462
|
+
decode(input, length) {
|
|
463
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
464
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
465
|
+
if (previousRecursionDepth >= 100) {
|
|
466
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
467
|
+
}
|
|
468
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
469
|
+
try {
|
|
470
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
471
|
+
const message = createBasePostStopOrderRequest();
|
|
472
|
+
while (reader.pos < end) {
|
|
473
|
+
const tag = reader.uint32();
|
|
474
|
+
switch (tag >>> 3) {
|
|
475
|
+
case 1: {
|
|
476
|
+
if (tag !== 10) {
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
message.figi = reader.string();
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
case 2: {
|
|
483
|
+
if (tag !== 16) {
|
|
484
|
+
break;
|
|
485
|
+
}
|
|
486
|
+
message.quantity = longToNumber(reader.int64());
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
case 3: {
|
|
490
|
+
if (tag !== 26) {
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
message.price = common_1.Quotation.decode(reader, reader.uint32());
|
|
494
|
+
continue;
|
|
495
|
+
}
|
|
496
|
+
case 4: {
|
|
497
|
+
if (tag !== 34) {
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
message.stopPrice = common_1.Quotation.decode(reader, reader.uint32());
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
case 5: {
|
|
504
|
+
if (tag !== 40) {
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
message.direction = reader.int32();
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
case 6: {
|
|
511
|
+
if (tag !== 50) {
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
message.accountId = reader.string();
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
case 7: {
|
|
518
|
+
if (tag !== 56) {
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
message.expirationType = reader.int32();
|
|
522
|
+
continue;
|
|
523
|
+
}
|
|
524
|
+
case 8: {
|
|
525
|
+
if (tag !== 64) {
|
|
526
|
+
break;
|
|
527
|
+
}
|
|
528
|
+
message.stopOrderType = reader.int32();
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
case 9: {
|
|
532
|
+
if (tag !== 74) {
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
message.expireDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
case 10: {
|
|
539
|
+
if (tag !== 82) {
|
|
540
|
+
break;
|
|
541
|
+
}
|
|
542
|
+
message.instrumentId = reader.string();
|
|
543
|
+
continue;
|
|
544
|
+
}
|
|
545
|
+
case 11: {
|
|
546
|
+
if (tag !== 88) {
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
message.exchangeOrderType = reader.int32();
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
case 12: {
|
|
553
|
+
if (tag !== 96) {
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
message.takeProfitType = reader.int32();
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
559
|
+
case 13: {
|
|
560
|
+
if (tag !== 106) {
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
message.trailingData = exports.PostStopOrderRequest_TrailingData.decode(reader, reader.uint32());
|
|
564
|
+
continue;
|
|
565
|
+
}
|
|
566
|
+
case 14: {
|
|
567
|
+
if (tag !== 112) {
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
message.priceType = reader.int32();
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
case 15: {
|
|
574
|
+
if (tag !== 122) {
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
message.orderId = reader.string();
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
case 16: {
|
|
581
|
+
if (tag !== 128) {
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
message.confirmMarginTrade = reader.bool();
|
|
585
|
+
continue;
|
|
586
|
+
}
|
|
587
|
+
case 17: {
|
|
588
|
+
if (tag !== 136) {
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
message.instantExecution = reader.bool();
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
reader.skip(tag & 7);
|
|
599
|
+
}
|
|
600
|
+
return message;
|
|
601
|
+
}
|
|
602
|
+
finally {
|
|
603
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
fromJSON(object) {
|
|
607
|
+
return {
|
|
608
|
+
figi: isSet(object.figi) ? globalThis.String(object.figi) : undefined,
|
|
609
|
+
quantity: isSet(object.quantity) ? globalThis.Number(object.quantity) : 0,
|
|
610
|
+
price: isSet(object.price) ? common_1.Quotation.fromJSON(object.price) : undefined,
|
|
611
|
+
stopPrice: isSet(object.stopPrice)
|
|
612
|
+
? common_1.Quotation.fromJSON(object.stopPrice)
|
|
613
|
+
: isSet(object.stop_price)
|
|
614
|
+
? common_1.Quotation.fromJSON(object.stop_price)
|
|
615
|
+
: undefined,
|
|
616
|
+
direction: isSet(object.direction) ? stopOrderDirectionFromJSON(object.direction) : 0,
|
|
617
|
+
accountId: isSet(object.accountId)
|
|
618
|
+
? globalThis.String(object.accountId)
|
|
619
|
+
: isSet(object.account_id)
|
|
620
|
+
? globalThis.String(object.account_id)
|
|
621
|
+
: "",
|
|
622
|
+
expirationType: isSet(object.expirationType)
|
|
623
|
+
? stopOrderExpirationTypeFromJSON(object.expirationType)
|
|
624
|
+
: isSet(object.expiration_type)
|
|
625
|
+
? stopOrderExpirationTypeFromJSON(object.expiration_type)
|
|
626
|
+
: 0,
|
|
627
|
+
stopOrderType: isSet(object.stopOrderType)
|
|
628
|
+
? stopOrderTypeFromJSON(object.stopOrderType)
|
|
629
|
+
: isSet(object.stop_order_type)
|
|
630
|
+
? stopOrderTypeFromJSON(object.stop_order_type)
|
|
631
|
+
: 0,
|
|
632
|
+
expireDate: isSet(object.expireDate)
|
|
633
|
+
? fromJsonTimestamp(object.expireDate)
|
|
634
|
+
: isSet(object.expire_date)
|
|
635
|
+
? fromJsonTimestamp(object.expire_date)
|
|
636
|
+
: undefined,
|
|
637
|
+
instrumentId: isSet(object.instrumentId)
|
|
638
|
+
? globalThis.String(object.instrumentId)
|
|
639
|
+
: isSet(object.instrument_id)
|
|
640
|
+
? globalThis.String(object.instrument_id)
|
|
641
|
+
: "",
|
|
642
|
+
exchangeOrderType: isSet(object.exchangeOrderType)
|
|
643
|
+
? exchangeOrderTypeFromJSON(object.exchangeOrderType)
|
|
644
|
+
: isSet(object.exchange_order_type)
|
|
645
|
+
? exchangeOrderTypeFromJSON(object.exchange_order_type)
|
|
646
|
+
: 0,
|
|
647
|
+
takeProfitType: isSet(object.takeProfitType)
|
|
648
|
+
? takeProfitTypeFromJSON(object.takeProfitType)
|
|
649
|
+
: isSet(object.take_profit_type)
|
|
650
|
+
? takeProfitTypeFromJSON(object.take_profit_type)
|
|
651
|
+
: 0,
|
|
652
|
+
trailingData: isSet(object.trailingData)
|
|
653
|
+
? exports.PostStopOrderRequest_TrailingData.fromJSON(object.trailingData)
|
|
654
|
+
: isSet(object.trailing_data)
|
|
655
|
+
? exports.PostStopOrderRequest_TrailingData.fromJSON(object.trailing_data)
|
|
656
|
+
: undefined,
|
|
657
|
+
priceType: isSet(object.priceType)
|
|
658
|
+
? (0, common_1.priceTypeFromJSON)(object.priceType)
|
|
659
|
+
: isSet(object.price_type)
|
|
660
|
+
? (0, common_1.priceTypeFromJSON)(object.price_type)
|
|
661
|
+
: 0,
|
|
662
|
+
orderId: isSet(object.orderId)
|
|
663
|
+
? globalThis.String(object.orderId)
|
|
664
|
+
: isSet(object.order_id)
|
|
665
|
+
? globalThis.String(object.order_id)
|
|
666
|
+
: "",
|
|
667
|
+
confirmMarginTrade: isSet(object.confirmMarginTrade)
|
|
668
|
+
? globalThis.Boolean(object.confirmMarginTrade)
|
|
669
|
+
: isSet(object.confirm_margin_trade)
|
|
670
|
+
? globalThis.Boolean(object.confirm_margin_trade)
|
|
671
|
+
: false,
|
|
672
|
+
instantExecution: isSet(object.instantExecution)
|
|
673
|
+
? globalThis.Boolean(object.instantExecution)
|
|
674
|
+
: isSet(object.instant_execution)
|
|
675
|
+
? globalThis.Boolean(object.instant_execution)
|
|
676
|
+
: undefined,
|
|
677
|
+
};
|
|
678
|
+
},
|
|
679
|
+
toJSON(message) {
|
|
680
|
+
const obj = {};
|
|
681
|
+
if (message.figi !== undefined) {
|
|
682
|
+
obj.figi = message.figi;
|
|
683
|
+
}
|
|
684
|
+
if (message.quantity !== 0) {
|
|
685
|
+
obj.quantity = Math.round(message.quantity);
|
|
686
|
+
}
|
|
687
|
+
if (message.price !== undefined) {
|
|
688
|
+
obj.price = common_1.Quotation.toJSON(message.price);
|
|
689
|
+
}
|
|
690
|
+
if (message.stopPrice !== undefined) {
|
|
691
|
+
obj.stopPrice = common_1.Quotation.toJSON(message.stopPrice);
|
|
692
|
+
}
|
|
693
|
+
if (message.direction !== 0) {
|
|
694
|
+
obj.direction = stopOrderDirectionToJSON(message.direction);
|
|
695
|
+
}
|
|
696
|
+
if (message.accountId !== "") {
|
|
697
|
+
obj.accountId = message.accountId;
|
|
698
|
+
}
|
|
699
|
+
if (message.expirationType !== 0) {
|
|
700
|
+
obj.expirationType = stopOrderExpirationTypeToJSON(message.expirationType);
|
|
701
|
+
}
|
|
702
|
+
if (message.stopOrderType !== 0) {
|
|
703
|
+
obj.stopOrderType = stopOrderTypeToJSON(message.stopOrderType);
|
|
704
|
+
}
|
|
705
|
+
if (message.expireDate !== undefined) {
|
|
706
|
+
obj.expireDate = message.expireDate.toISOString();
|
|
707
|
+
}
|
|
708
|
+
if (message.instrumentId !== "") {
|
|
709
|
+
obj.instrumentId = message.instrumentId;
|
|
710
|
+
}
|
|
711
|
+
if (message.exchangeOrderType !== 0) {
|
|
712
|
+
obj.exchangeOrderType = exchangeOrderTypeToJSON(message.exchangeOrderType);
|
|
713
|
+
}
|
|
714
|
+
if (message.takeProfitType !== 0) {
|
|
715
|
+
obj.takeProfitType = takeProfitTypeToJSON(message.takeProfitType);
|
|
716
|
+
}
|
|
717
|
+
if (message.trailingData !== undefined) {
|
|
718
|
+
obj.trailingData = exports.PostStopOrderRequest_TrailingData.toJSON(message.trailingData);
|
|
719
|
+
}
|
|
720
|
+
if (message.priceType !== 0) {
|
|
721
|
+
obj.priceType = (0, common_1.priceTypeToJSON)(message.priceType);
|
|
722
|
+
}
|
|
723
|
+
if (message.orderId !== "") {
|
|
724
|
+
obj.orderId = message.orderId;
|
|
725
|
+
}
|
|
726
|
+
if (message.confirmMarginTrade !== false) {
|
|
727
|
+
obj.confirmMarginTrade = message.confirmMarginTrade;
|
|
728
|
+
}
|
|
729
|
+
if (message.instantExecution !== undefined) {
|
|
730
|
+
obj.instantExecution = message.instantExecution;
|
|
731
|
+
}
|
|
732
|
+
return obj;
|
|
733
|
+
},
|
|
734
|
+
create(base) {
|
|
735
|
+
return exports.PostStopOrderRequest.fromPartial(base ?? {});
|
|
736
|
+
},
|
|
737
|
+
fromPartial(object) {
|
|
738
|
+
const message = createBasePostStopOrderRequest();
|
|
739
|
+
message.figi = object.figi ?? undefined;
|
|
740
|
+
message.quantity = object.quantity ?? 0;
|
|
741
|
+
message.price = (object.price !== undefined && object.price !== null)
|
|
742
|
+
? common_1.Quotation.fromPartial(object.price)
|
|
743
|
+
: undefined;
|
|
744
|
+
message.stopPrice = (object.stopPrice !== undefined && object.stopPrice !== null)
|
|
745
|
+
? common_1.Quotation.fromPartial(object.stopPrice)
|
|
746
|
+
: undefined;
|
|
747
|
+
message.direction = object.direction ?? 0;
|
|
748
|
+
message.accountId = object.accountId ?? "";
|
|
749
|
+
message.expirationType = object.expirationType ?? 0;
|
|
750
|
+
message.stopOrderType = object.stopOrderType ?? 0;
|
|
751
|
+
message.expireDate = object.expireDate ?? undefined;
|
|
752
|
+
message.instrumentId = object.instrumentId ?? "";
|
|
753
|
+
message.exchangeOrderType = object.exchangeOrderType ?? 0;
|
|
754
|
+
message.takeProfitType = object.takeProfitType ?? 0;
|
|
755
|
+
message.trailingData = (object.trailingData !== undefined && object.trailingData !== null)
|
|
756
|
+
? exports.PostStopOrderRequest_TrailingData.fromPartial(object.trailingData)
|
|
757
|
+
: undefined;
|
|
758
|
+
message.priceType = object.priceType ?? 0;
|
|
759
|
+
message.orderId = object.orderId ?? "";
|
|
760
|
+
message.confirmMarginTrade = object.confirmMarginTrade ?? false;
|
|
761
|
+
message.instantExecution = object.instantExecution ?? undefined;
|
|
762
|
+
return message;
|
|
763
|
+
},
|
|
764
|
+
};
|
|
765
|
+
function createBasePostStopOrderRequest_TrailingData() {
|
|
766
|
+
return { indent: undefined, indentType: 0, spread: undefined, spreadType: 0 };
|
|
767
|
+
}
|
|
768
|
+
exports.PostStopOrderRequest_TrailingData = {
|
|
769
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
770
|
+
if (message.indent !== undefined) {
|
|
771
|
+
common_1.Quotation.encode(message.indent, writer.uint32(10).fork()).join();
|
|
772
|
+
}
|
|
773
|
+
if (message.indentType !== 0) {
|
|
774
|
+
writer.uint32(16).int32(message.indentType);
|
|
775
|
+
}
|
|
776
|
+
if (message.spread !== undefined) {
|
|
777
|
+
common_1.Quotation.encode(message.spread, writer.uint32(26).fork()).join();
|
|
778
|
+
}
|
|
779
|
+
if (message.spreadType !== 0) {
|
|
780
|
+
writer.uint32(32).int32(message.spreadType);
|
|
781
|
+
}
|
|
782
|
+
return writer;
|
|
783
|
+
},
|
|
784
|
+
decode(input, length) {
|
|
785
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
786
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
787
|
+
if (previousRecursionDepth >= 100) {
|
|
788
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
789
|
+
}
|
|
790
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
791
|
+
try {
|
|
792
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
793
|
+
const message = createBasePostStopOrderRequest_TrailingData();
|
|
794
|
+
while (reader.pos < end) {
|
|
795
|
+
const tag = reader.uint32();
|
|
796
|
+
switch (tag >>> 3) {
|
|
797
|
+
case 1: {
|
|
798
|
+
if (tag !== 10) {
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
message.indent = common_1.Quotation.decode(reader, reader.uint32());
|
|
802
|
+
continue;
|
|
803
|
+
}
|
|
804
|
+
case 2: {
|
|
805
|
+
if (tag !== 16) {
|
|
806
|
+
break;
|
|
807
|
+
}
|
|
808
|
+
message.indentType = reader.int32();
|
|
809
|
+
continue;
|
|
810
|
+
}
|
|
811
|
+
case 3: {
|
|
812
|
+
if (tag !== 26) {
|
|
813
|
+
break;
|
|
814
|
+
}
|
|
815
|
+
message.spread = common_1.Quotation.decode(reader, reader.uint32());
|
|
816
|
+
continue;
|
|
817
|
+
}
|
|
818
|
+
case 4: {
|
|
819
|
+
if (tag !== 32) {
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
message.spreadType = reader.int32();
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
827
|
+
break;
|
|
828
|
+
}
|
|
829
|
+
reader.skip(tag & 7);
|
|
830
|
+
}
|
|
831
|
+
return message;
|
|
832
|
+
}
|
|
833
|
+
finally {
|
|
834
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
fromJSON(object) {
|
|
838
|
+
return {
|
|
839
|
+
indent: isSet(object.indent) ? common_1.Quotation.fromJSON(object.indent) : undefined,
|
|
840
|
+
indentType: isSet(object.indentType)
|
|
841
|
+
? trailingValueTypeFromJSON(object.indentType)
|
|
842
|
+
: isSet(object.indent_type)
|
|
843
|
+
? trailingValueTypeFromJSON(object.indent_type)
|
|
844
|
+
: 0,
|
|
845
|
+
spread: isSet(object.spread) ? common_1.Quotation.fromJSON(object.spread) : undefined,
|
|
846
|
+
spreadType: isSet(object.spreadType)
|
|
847
|
+
? trailingValueTypeFromJSON(object.spreadType)
|
|
848
|
+
: isSet(object.spread_type)
|
|
849
|
+
? trailingValueTypeFromJSON(object.spread_type)
|
|
850
|
+
: 0,
|
|
851
|
+
};
|
|
852
|
+
},
|
|
853
|
+
toJSON(message) {
|
|
854
|
+
const obj = {};
|
|
855
|
+
if (message.indent !== undefined) {
|
|
856
|
+
obj.indent = common_1.Quotation.toJSON(message.indent);
|
|
857
|
+
}
|
|
858
|
+
if (message.indentType !== 0) {
|
|
859
|
+
obj.indentType = trailingValueTypeToJSON(message.indentType);
|
|
860
|
+
}
|
|
861
|
+
if (message.spread !== undefined) {
|
|
862
|
+
obj.spread = common_1.Quotation.toJSON(message.spread);
|
|
863
|
+
}
|
|
864
|
+
if (message.spreadType !== 0) {
|
|
865
|
+
obj.spreadType = trailingValueTypeToJSON(message.spreadType);
|
|
866
|
+
}
|
|
867
|
+
return obj;
|
|
868
|
+
},
|
|
869
|
+
create(base) {
|
|
870
|
+
return exports.PostStopOrderRequest_TrailingData.fromPartial(base ?? {});
|
|
871
|
+
},
|
|
872
|
+
fromPartial(object) {
|
|
873
|
+
const message = createBasePostStopOrderRequest_TrailingData();
|
|
874
|
+
message.indent = (object.indent !== undefined && object.indent !== null)
|
|
875
|
+
? common_1.Quotation.fromPartial(object.indent)
|
|
876
|
+
: undefined;
|
|
877
|
+
message.indentType = object.indentType ?? 0;
|
|
878
|
+
message.spread = (object.spread !== undefined && object.spread !== null)
|
|
879
|
+
? common_1.Quotation.fromPartial(object.spread)
|
|
880
|
+
: undefined;
|
|
881
|
+
message.spreadType = object.spreadType ?? 0;
|
|
882
|
+
return message;
|
|
883
|
+
},
|
|
884
|
+
};
|
|
885
|
+
function createBasePostStopOrderResponse() {
|
|
886
|
+
return { stopOrderId: "", orderRequestId: "", responseMetadata: undefined };
|
|
887
|
+
}
|
|
888
|
+
exports.PostStopOrderResponse = {
|
|
889
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
890
|
+
if (message.stopOrderId !== "") {
|
|
891
|
+
writer.uint32(10).string(message.stopOrderId);
|
|
892
|
+
}
|
|
893
|
+
if (message.orderRequestId !== "") {
|
|
894
|
+
writer.uint32(18).string(message.orderRequestId);
|
|
895
|
+
}
|
|
896
|
+
if (message.responseMetadata !== undefined) {
|
|
897
|
+
common_1.ResponseMetadata.encode(message.responseMetadata, writer.uint32(2034).fork()).join();
|
|
898
|
+
}
|
|
899
|
+
return writer;
|
|
900
|
+
},
|
|
901
|
+
decode(input, length) {
|
|
902
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
903
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
904
|
+
if (previousRecursionDepth >= 100) {
|
|
905
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
906
|
+
}
|
|
907
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
908
|
+
try {
|
|
909
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
910
|
+
const message = createBasePostStopOrderResponse();
|
|
911
|
+
while (reader.pos < end) {
|
|
912
|
+
const tag = reader.uint32();
|
|
913
|
+
switch (tag >>> 3) {
|
|
914
|
+
case 1: {
|
|
915
|
+
if (tag !== 10) {
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
message.stopOrderId = reader.string();
|
|
919
|
+
continue;
|
|
920
|
+
}
|
|
921
|
+
case 2: {
|
|
922
|
+
if (tag !== 18) {
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
message.orderRequestId = reader.string();
|
|
926
|
+
continue;
|
|
927
|
+
}
|
|
928
|
+
case 254: {
|
|
929
|
+
if (tag !== 2034) {
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
message.responseMetadata = common_1.ResponseMetadata.decode(reader, reader.uint32());
|
|
933
|
+
continue;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
937
|
+
break;
|
|
938
|
+
}
|
|
939
|
+
reader.skip(tag & 7);
|
|
940
|
+
}
|
|
941
|
+
return message;
|
|
942
|
+
}
|
|
943
|
+
finally {
|
|
944
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
fromJSON(object) {
|
|
948
|
+
return {
|
|
949
|
+
stopOrderId: isSet(object.stopOrderId)
|
|
950
|
+
? globalThis.String(object.stopOrderId)
|
|
951
|
+
: isSet(object.stop_order_id)
|
|
952
|
+
? globalThis.String(object.stop_order_id)
|
|
953
|
+
: "",
|
|
954
|
+
orderRequestId: isSet(object.orderRequestId)
|
|
955
|
+
? globalThis.String(object.orderRequestId)
|
|
956
|
+
: isSet(object.order_request_id)
|
|
957
|
+
? globalThis.String(object.order_request_id)
|
|
958
|
+
: "",
|
|
959
|
+
responseMetadata: isSet(object.responseMetadata)
|
|
960
|
+
? common_1.ResponseMetadata.fromJSON(object.responseMetadata)
|
|
961
|
+
: isSet(object.response_metadata)
|
|
962
|
+
? common_1.ResponseMetadata.fromJSON(object.response_metadata)
|
|
963
|
+
: undefined,
|
|
964
|
+
};
|
|
965
|
+
},
|
|
966
|
+
toJSON(message) {
|
|
967
|
+
const obj = {};
|
|
968
|
+
if (message.stopOrderId !== "") {
|
|
969
|
+
obj.stopOrderId = message.stopOrderId;
|
|
970
|
+
}
|
|
971
|
+
if (message.orderRequestId !== "") {
|
|
972
|
+
obj.orderRequestId = message.orderRequestId;
|
|
973
|
+
}
|
|
974
|
+
if (message.responseMetadata !== undefined) {
|
|
975
|
+
obj.responseMetadata = common_1.ResponseMetadata.toJSON(message.responseMetadata);
|
|
976
|
+
}
|
|
977
|
+
return obj;
|
|
978
|
+
},
|
|
979
|
+
create(base) {
|
|
980
|
+
return exports.PostStopOrderResponse.fromPartial(base ?? {});
|
|
981
|
+
},
|
|
982
|
+
fromPartial(object) {
|
|
983
|
+
const message = createBasePostStopOrderResponse();
|
|
984
|
+
message.stopOrderId = object.stopOrderId ?? "";
|
|
985
|
+
message.orderRequestId = object.orderRequestId ?? "";
|
|
986
|
+
message.responseMetadata = (object.responseMetadata !== undefined && object.responseMetadata !== null)
|
|
987
|
+
? common_1.ResponseMetadata.fromPartial(object.responseMetadata)
|
|
988
|
+
: undefined;
|
|
989
|
+
return message;
|
|
990
|
+
},
|
|
991
|
+
};
|
|
992
|
+
function createBaseGetStopOrdersRequest() {
|
|
993
|
+
return { accountId: "", status: 0, from: undefined, to: undefined };
|
|
994
|
+
}
|
|
995
|
+
exports.GetStopOrdersRequest = {
|
|
996
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
997
|
+
if (message.accountId !== "") {
|
|
998
|
+
writer.uint32(10).string(message.accountId);
|
|
999
|
+
}
|
|
1000
|
+
if (message.status !== 0) {
|
|
1001
|
+
writer.uint32(16).int32(message.status);
|
|
1002
|
+
}
|
|
1003
|
+
if (message.from !== undefined) {
|
|
1004
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.from), writer.uint32(26).fork()).join();
|
|
1005
|
+
}
|
|
1006
|
+
if (message.to !== undefined) {
|
|
1007
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.to), writer.uint32(34).fork()).join();
|
|
1008
|
+
}
|
|
1009
|
+
return writer;
|
|
1010
|
+
},
|
|
1011
|
+
decode(input, length) {
|
|
1012
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1013
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1014
|
+
if (previousRecursionDepth >= 100) {
|
|
1015
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1016
|
+
}
|
|
1017
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1018
|
+
try {
|
|
1019
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1020
|
+
const message = createBaseGetStopOrdersRequest();
|
|
1021
|
+
while (reader.pos < end) {
|
|
1022
|
+
const tag = reader.uint32();
|
|
1023
|
+
switch (tag >>> 3) {
|
|
1024
|
+
case 1: {
|
|
1025
|
+
if (tag !== 10) {
|
|
1026
|
+
break;
|
|
1027
|
+
}
|
|
1028
|
+
message.accountId = reader.string();
|
|
1029
|
+
continue;
|
|
1030
|
+
}
|
|
1031
|
+
case 2: {
|
|
1032
|
+
if (tag !== 16) {
|
|
1033
|
+
break;
|
|
1034
|
+
}
|
|
1035
|
+
message.status = reader.int32();
|
|
1036
|
+
continue;
|
|
1037
|
+
}
|
|
1038
|
+
case 3: {
|
|
1039
|
+
if (tag !== 26) {
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
message.from = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1043
|
+
continue;
|
|
1044
|
+
}
|
|
1045
|
+
case 4: {
|
|
1046
|
+
if (tag !== 34) {
|
|
1047
|
+
break;
|
|
1048
|
+
}
|
|
1049
|
+
message.to = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1050
|
+
continue;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1054
|
+
break;
|
|
1055
|
+
}
|
|
1056
|
+
reader.skip(tag & 7);
|
|
1057
|
+
}
|
|
1058
|
+
return message;
|
|
1059
|
+
}
|
|
1060
|
+
finally {
|
|
1061
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
fromJSON(object) {
|
|
1065
|
+
return {
|
|
1066
|
+
accountId: isSet(object.accountId)
|
|
1067
|
+
? globalThis.String(object.accountId)
|
|
1068
|
+
: isSet(object.account_id)
|
|
1069
|
+
? globalThis.String(object.account_id)
|
|
1070
|
+
: "",
|
|
1071
|
+
status: isSet(object.status) ? stopOrderStatusOptionFromJSON(object.status) : 0,
|
|
1072
|
+
from: isSet(object.from) ? fromJsonTimestamp(object.from) : undefined,
|
|
1073
|
+
to: isSet(object.to) ? fromJsonTimestamp(object.to) : undefined,
|
|
1074
|
+
};
|
|
1075
|
+
},
|
|
1076
|
+
toJSON(message) {
|
|
1077
|
+
const obj = {};
|
|
1078
|
+
if (message.accountId !== "") {
|
|
1079
|
+
obj.accountId = message.accountId;
|
|
1080
|
+
}
|
|
1081
|
+
if (message.status !== 0) {
|
|
1082
|
+
obj.status = stopOrderStatusOptionToJSON(message.status);
|
|
1083
|
+
}
|
|
1084
|
+
if (message.from !== undefined) {
|
|
1085
|
+
obj.from = message.from.toISOString();
|
|
1086
|
+
}
|
|
1087
|
+
if (message.to !== undefined) {
|
|
1088
|
+
obj.to = message.to.toISOString();
|
|
1089
|
+
}
|
|
1090
|
+
return obj;
|
|
1091
|
+
},
|
|
1092
|
+
create(base) {
|
|
1093
|
+
return exports.GetStopOrdersRequest.fromPartial(base ?? {});
|
|
1094
|
+
},
|
|
1095
|
+
fromPartial(object) {
|
|
1096
|
+
const message = createBaseGetStopOrdersRequest();
|
|
1097
|
+
message.accountId = object.accountId ?? "";
|
|
1098
|
+
message.status = object.status ?? 0;
|
|
1099
|
+
message.from = object.from ?? undefined;
|
|
1100
|
+
message.to = object.to ?? undefined;
|
|
1101
|
+
return message;
|
|
1102
|
+
},
|
|
1103
|
+
};
|
|
1104
|
+
function createBaseGetStopOrdersResponse() {
|
|
1105
|
+
return { stopOrders: [] };
|
|
1106
|
+
}
|
|
1107
|
+
exports.GetStopOrdersResponse = {
|
|
1108
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1109
|
+
for (const v of message.stopOrders) {
|
|
1110
|
+
exports.StopOrder.encode(v, writer.uint32(10).fork()).join();
|
|
1111
|
+
}
|
|
1112
|
+
return writer;
|
|
1113
|
+
},
|
|
1114
|
+
decode(input, length) {
|
|
1115
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1116
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1117
|
+
if (previousRecursionDepth >= 100) {
|
|
1118
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1119
|
+
}
|
|
1120
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1121
|
+
try {
|
|
1122
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1123
|
+
const message = createBaseGetStopOrdersResponse();
|
|
1124
|
+
while (reader.pos < end) {
|
|
1125
|
+
const tag = reader.uint32();
|
|
1126
|
+
switch (tag >>> 3) {
|
|
1127
|
+
case 1: {
|
|
1128
|
+
if (tag !== 10) {
|
|
1129
|
+
break;
|
|
1130
|
+
}
|
|
1131
|
+
message.stopOrders.push(exports.StopOrder.decode(reader, reader.uint32()));
|
|
1132
|
+
continue;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1136
|
+
break;
|
|
1137
|
+
}
|
|
1138
|
+
reader.skip(tag & 7);
|
|
1139
|
+
}
|
|
1140
|
+
return message;
|
|
1141
|
+
}
|
|
1142
|
+
finally {
|
|
1143
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
fromJSON(object) {
|
|
1147
|
+
return {
|
|
1148
|
+
stopOrders: globalThis.Array.isArray(object?.stopOrders)
|
|
1149
|
+
? object.stopOrders.map((e) => exports.StopOrder.fromJSON(e))
|
|
1150
|
+
: globalThis.Array.isArray(object?.stop_orders)
|
|
1151
|
+
? object.stop_orders.map((e) => exports.StopOrder.fromJSON(e))
|
|
1152
|
+
: [],
|
|
1153
|
+
};
|
|
1154
|
+
},
|
|
1155
|
+
toJSON(message) {
|
|
1156
|
+
const obj = {};
|
|
1157
|
+
if (message.stopOrders?.length) {
|
|
1158
|
+
obj.stopOrders = message.stopOrders.map((e) => exports.StopOrder.toJSON(e));
|
|
1159
|
+
}
|
|
1160
|
+
return obj;
|
|
1161
|
+
},
|
|
1162
|
+
create(base) {
|
|
1163
|
+
return exports.GetStopOrdersResponse.fromPartial(base ?? {});
|
|
1164
|
+
},
|
|
1165
|
+
fromPartial(object) {
|
|
1166
|
+
const message = createBaseGetStopOrdersResponse();
|
|
1167
|
+
message.stopOrders = object.stopOrders?.map((e) => exports.StopOrder.fromPartial(e)) || [];
|
|
1168
|
+
return message;
|
|
1169
|
+
},
|
|
1170
|
+
};
|
|
1171
|
+
function createBaseCancelStopOrderRequest() {
|
|
1172
|
+
return { accountId: "", stopOrderId: "" };
|
|
1173
|
+
}
|
|
1174
|
+
exports.CancelStopOrderRequest = {
|
|
1175
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1176
|
+
if (message.accountId !== "") {
|
|
1177
|
+
writer.uint32(10).string(message.accountId);
|
|
1178
|
+
}
|
|
1179
|
+
if (message.stopOrderId !== "") {
|
|
1180
|
+
writer.uint32(18).string(message.stopOrderId);
|
|
1181
|
+
}
|
|
1182
|
+
return writer;
|
|
1183
|
+
},
|
|
1184
|
+
decode(input, length) {
|
|
1185
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1186
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1187
|
+
if (previousRecursionDepth >= 100) {
|
|
1188
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1189
|
+
}
|
|
1190
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1191
|
+
try {
|
|
1192
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1193
|
+
const message = createBaseCancelStopOrderRequest();
|
|
1194
|
+
while (reader.pos < end) {
|
|
1195
|
+
const tag = reader.uint32();
|
|
1196
|
+
switch (tag >>> 3) {
|
|
1197
|
+
case 1: {
|
|
1198
|
+
if (tag !== 10) {
|
|
1199
|
+
break;
|
|
1200
|
+
}
|
|
1201
|
+
message.accountId = reader.string();
|
|
1202
|
+
continue;
|
|
1203
|
+
}
|
|
1204
|
+
case 2: {
|
|
1205
|
+
if (tag !== 18) {
|
|
1206
|
+
break;
|
|
1207
|
+
}
|
|
1208
|
+
message.stopOrderId = reader.string();
|
|
1209
|
+
continue;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1213
|
+
break;
|
|
1214
|
+
}
|
|
1215
|
+
reader.skip(tag & 7);
|
|
1216
|
+
}
|
|
1217
|
+
return message;
|
|
1218
|
+
}
|
|
1219
|
+
finally {
|
|
1220
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
fromJSON(object) {
|
|
1224
|
+
return {
|
|
1225
|
+
accountId: isSet(object.accountId)
|
|
1226
|
+
? globalThis.String(object.accountId)
|
|
1227
|
+
: isSet(object.account_id)
|
|
1228
|
+
? globalThis.String(object.account_id)
|
|
1229
|
+
: "",
|
|
1230
|
+
stopOrderId: isSet(object.stopOrderId)
|
|
1231
|
+
? globalThis.String(object.stopOrderId)
|
|
1232
|
+
: isSet(object.stop_order_id)
|
|
1233
|
+
? globalThis.String(object.stop_order_id)
|
|
1234
|
+
: "",
|
|
1235
|
+
};
|
|
1236
|
+
},
|
|
1237
|
+
toJSON(message) {
|
|
1238
|
+
const obj = {};
|
|
1239
|
+
if (message.accountId !== "") {
|
|
1240
|
+
obj.accountId = message.accountId;
|
|
1241
|
+
}
|
|
1242
|
+
if (message.stopOrderId !== "") {
|
|
1243
|
+
obj.stopOrderId = message.stopOrderId;
|
|
1244
|
+
}
|
|
1245
|
+
return obj;
|
|
1246
|
+
},
|
|
1247
|
+
create(base) {
|
|
1248
|
+
return exports.CancelStopOrderRequest.fromPartial(base ?? {});
|
|
1249
|
+
},
|
|
1250
|
+
fromPartial(object) {
|
|
1251
|
+
const message = createBaseCancelStopOrderRequest();
|
|
1252
|
+
message.accountId = object.accountId ?? "";
|
|
1253
|
+
message.stopOrderId = object.stopOrderId ?? "";
|
|
1254
|
+
return message;
|
|
1255
|
+
},
|
|
1256
|
+
};
|
|
1257
|
+
function createBaseCancelStopOrderResponse() {
|
|
1258
|
+
return { time: undefined };
|
|
1259
|
+
}
|
|
1260
|
+
exports.CancelStopOrderResponse = {
|
|
1261
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1262
|
+
if (message.time !== undefined) {
|
|
1263
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.time), writer.uint32(10).fork()).join();
|
|
1264
|
+
}
|
|
1265
|
+
return writer;
|
|
1266
|
+
},
|
|
1267
|
+
decode(input, length) {
|
|
1268
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1269
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1270
|
+
if (previousRecursionDepth >= 100) {
|
|
1271
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1272
|
+
}
|
|
1273
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1274
|
+
try {
|
|
1275
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1276
|
+
const message = createBaseCancelStopOrderResponse();
|
|
1277
|
+
while (reader.pos < end) {
|
|
1278
|
+
const tag = reader.uint32();
|
|
1279
|
+
switch (tag >>> 3) {
|
|
1280
|
+
case 1: {
|
|
1281
|
+
if (tag !== 10) {
|
|
1282
|
+
break;
|
|
1283
|
+
}
|
|
1284
|
+
message.time = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1285
|
+
continue;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1289
|
+
break;
|
|
1290
|
+
}
|
|
1291
|
+
reader.skip(tag & 7);
|
|
1292
|
+
}
|
|
1293
|
+
return message;
|
|
1294
|
+
}
|
|
1295
|
+
finally {
|
|
1296
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
fromJSON(object) {
|
|
1300
|
+
return { time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined };
|
|
1301
|
+
},
|
|
1302
|
+
toJSON(message) {
|
|
1303
|
+
const obj = {};
|
|
1304
|
+
if (message.time !== undefined) {
|
|
1305
|
+
obj.time = message.time.toISOString();
|
|
1306
|
+
}
|
|
1307
|
+
return obj;
|
|
1308
|
+
},
|
|
1309
|
+
create(base) {
|
|
1310
|
+
return exports.CancelStopOrderResponse.fromPartial(base ?? {});
|
|
1311
|
+
},
|
|
1312
|
+
fromPartial(object) {
|
|
1313
|
+
const message = createBaseCancelStopOrderResponse();
|
|
1314
|
+
message.time = object.time ?? undefined;
|
|
1315
|
+
return message;
|
|
1316
|
+
},
|
|
1317
|
+
};
|
|
1318
|
+
function createBaseStopOrder() {
|
|
1319
|
+
return {
|
|
1320
|
+
stopOrderId: "",
|
|
1321
|
+
lotsRequested: 0,
|
|
1322
|
+
figi: "",
|
|
1323
|
+
direction: 0,
|
|
1324
|
+
currency: "",
|
|
1325
|
+
orderType: 0,
|
|
1326
|
+
createDate: undefined,
|
|
1327
|
+
activationDateTime: undefined,
|
|
1328
|
+
expirationTime: undefined,
|
|
1329
|
+
price: undefined,
|
|
1330
|
+
stopPrice: undefined,
|
|
1331
|
+
instrumentUid: "",
|
|
1332
|
+
takeProfitType: 0,
|
|
1333
|
+
trailingData: undefined,
|
|
1334
|
+
status: 0,
|
|
1335
|
+
exchangeOrderType: 0,
|
|
1336
|
+
exchangeOrderId: undefined,
|
|
1337
|
+
ticker: "",
|
|
1338
|
+
classCode: "",
|
|
1339
|
+
instantExecution: false,
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
exports.StopOrder = {
|
|
1343
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1344
|
+
if (message.stopOrderId !== "") {
|
|
1345
|
+
writer.uint32(10).string(message.stopOrderId);
|
|
1346
|
+
}
|
|
1347
|
+
if (message.lotsRequested !== 0) {
|
|
1348
|
+
writer.uint32(16).int64(message.lotsRequested);
|
|
1349
|
+
}
|
|
1350
|
+
if (message.figi !== "") {
|
|
1351
|
+
writer.uint32(26).string(message.figi);
|
|
1352
|
+
}
|
|
1353
|
+
if (message.direction !== 0) {
|
|
1354
|
+
writer.uint32(32).int32(message.direction);
|
|
1355
|
+
}
|
|
1356
|
+
if (message.currency !== "") {
|
|
1357
|
+
writer.uint32(42).string(message.currency);
|
|
1358
|
+
}
|
|
1359
|
+
if (message.orderType !== 0) {
|
|
1360
|
+
writer.uint32(48).int32(message.orderType);
|
|
1361
|
+
}
|
|
1362
|
+
if (message.createDate !== undefined) {
|
|
1363
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createDate), writer.uint32(58).fork()).join();
|
|
1364
|
+
}
|
|
1365
|
+
if (message.activationDateTime !== undefined) {
|
|
1366
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.activationDateTime), writer.uint32(66).fork()).join();
|
|
1367
|
+
}
|
|
1368
|
+
if (message.expirationTime !== undefined) {
|
|
1369
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.expirationTime), writer.uint32(74).fork()).join();
|
|
1370
|
+
}
|
|
1371
|
+
if (message.price !== undefined) {
|
|
1372
|
+
common_1.MoneyValue.encode(message.price, writer.uint32(82).fork()).join();
|
|
1373
|
+
}
|
|
1374
|
+
if (message.stopPrice !== undefined) {
|
|
1375
|
+
common_1.MoneyValue.encode(message.stopPrice, writer.uint32(90).fork()).join();
|
|
1376
|
+
}
|
|
1377
|
+
if (message.instrumentUid !== "") {
|
|
1378
|
+
writer.uint32(98).string(message.instrumentUid);
|
|
1379
|
+
}
|
|
1380
|
+
if (message.takeProfitType !== 0) {
|
|
1381
|
+
writer.uint32(104).int32(message.takeProfitType);
|
|
1382
|
+
}
|
|
1383
|
+
if (message.trailingData !== undefined) {
|
|
1384
|
+
exports.StopOrder_TrailingData.encode(message.trailingData, writer.uint32(114).fork()).join();
|
|
1385
|
+
}
|
|
1386
|
+
if (message.status !== 0) {
|
|
1387
|
+
writer.uint32(120).int32(message.status);
|
|
1388
|
+
}
|
|
1389
|
+
if (message.exchangeOrderType !== 0) {
|
|
1390
|
+
writer.uint32(128).int32(message.exchangeOrderType);
|
|
1391
|
+
}
|
|
1392
|
+
if (message.exchangeOrderId !== undefined) {
|
|
1393
|
+
writer.uint32(138).string(message.exchangeOrderId);
|
|
1394
|
+
}
|
|
1395
|
+
if (message.ticker !== "") {
|
|
1396
|
+
writer.uint32(146).string(message.ticker);
|
|
1397
|
+
}
|
|
1398
|
+
if (message.classCode !== "") {
|
|
1399
|
+
writer.uint32(154).string(message.classCode);
|
|
1400
|
+
}
|
|
1401
|
+
if (message.instantExecution !== false) {
|
|
1402
|
+
writer.uint32(160).bool(message.instantExecution);
|
|
1403
|
+
}
|
|
1404
|
+
return writer;
|
|
1405
|
+
},
|
|
1406
|
+
decode(input, length) {
|
|
1407
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1408
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1409
|
+
if (previousRecursionDepth >= 100) {
|
|
1410
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1411
|
+
}
|
|
1412
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1413
|
+
try {
|
|
1414
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1415
|
+
const message = createBaseStopOrder();
|
|
1416
|
+
while (reader.pos < end) {
|
|
1417
|
+
const tag = reader.uint32();
|
|
1418
|
+
switch (tag >>> 3) {
|
|
1419
|
+
case 1: {
|
|
1420
|
+
if (tag !== 10) {
|
|
1421
|
+
break;
|
|
1422
|
+
}
|
|
1423
|
+
message.stopOrderId = reader.string();
|
|
1424
|
+
continue;
|
|
1425
|
+
}
|
|
1426
|
+
case 2: {
|
|
1427
|
+
if (tag !== 16) {
|
|
1428
|
+
break;
|
|
1429
|
+
}
|
|
1430
|
+
message.lotsRequested = longToNumber(reader.int64());
|
|
1431
|
+
continue;
|
|
1432
|
+
}
|
|
1433
|
+
case 3: {
|
|
1434
|
+
if (tag !== 26) {
|
|
1435
|
+
break;
|
|
1436
|
+
}
|
|
1437
|
+
message.figi = reader.string();
|
|
1438
|
+
continue;
|
|
1439
|
+
}
|
|
1440
|
+
case 4: {
|
|
1441
|
+
if (tag !== 32) {
|
|
1442
|
+
break;
|
|
1443
|
+
}
|
|
1444
|
+
message.direction = reader.int32();
|
|
1445
|
+
continue;
|
|
1446
|
+
}
|
|
1447
|
+
case 5: {
|
|
1448
|
+
if (tag !== 42) {
|
|
1449
|
+
break;
|
|
1450
|
+
}
|
|
1451
|
+
message.currency = reader.string();
|
|
1452
|
+
continue;
|
|
1453
|
+
}
|
|
1454
|
+
case 6: {
|
|
1455
|
+
if (tag !== 48) {
|
|
1456
|
+
break;
|
|
1457
|
+
}
|
|
1458
|
+
message.orderType = reader.int32();
|
|
1459
|
+
continue;
|
|
1460
|
+
}
|
|
1461
|
+
case 7: {
|
|
1462
|
+
if (tag !== 58) {
|
|
1463
|
+
break;
|
|
1464
|
+
}
|
|
1465
|
+
message.createDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1466
|
+
continue;
|
|
1467
|
+
}
|
|
1468
|
+
case 8: {
|
|
1469
|
+
if (tag !== 66) {
|
|
1470
|
+
break;
|
|
1471
|
+
}
|
|
1472
|
+
message.activationDateTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1473
|
+
continue;
|
|
1474
|
+
}
|
|
1475
|
+
case 9: {
|
|
1476
|
+
if (tag !== 74) {
|
|
1477
|
+
break;
|
|
1478
|
+
}
|
|
1479
|
+
message.expirationTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1480
|
+
continue;
|
|
1481
|
+
}
|
|
1482
|
+
case 10: {
|
|
1483
|
+
if (tag !== 82) {
|
|
1484
|
+
break;
|
|
1485
|
+
}
|
|
1486
|
+
message.price = common_1.MoneyValue.decode(reader, reader.uint32());
|
|
1487
|
+
continue;
|
|
1488
|
+
}
|
|
1489
|
+
case 11: {
|
|
1490
|
+
if (tag !== 90) {
|
|
1491
|
+
break;
|
|
1492
|
+
}
|
|
1493
|
+
message.stopPrice = common_1.MoneyValue.decode(reader, reader.uint32());
|
|
1494
|
+
continue;
|
|
1495
|
+
}
|
|
1496
|
+
case 12: {
|
|
1497
|
+
if (tag !== 98) {
|
|
1498
|
+
break;
|
|
1499
|
+
}
|
|
1500
|
+
message.instrumentUid = reader.string();
|
|
1501
|
+
continue;
|
|
1502
|
+
}
|
|
1503
|
+
case 13: {
|
|
1504
|
+
if (tag !== 104) {
|
|
1505
|
+
break;
|
|
1506
|
+
}
|
|
1507
|
+
message.takeProfitType = reader.int32();
|
|
1508
|
+
continue;
|
|
1509
|
+
}
|
|
1510
|
+
case 14: {
|
|
1511
|
+
if (tag !== 114) {
|
|
1512
|
+
break;
|
|
1513
|
+
}
|
|
1514
|
+
message.trailingData = exports.StopOrder_TrailingData.decode(reader, reader.uint32());
|
|
1515
|
+
continue;
|
|
1516
|
+
}
|
|
1517
|
+
case 15: {
|
|
1518
|
+
if (tag !== 120) {
|
|
1519
|
+
break;
|
|
1520
|
+
}
|
|
1521
|
+
message.status = reader.int32();
|
|
1522
|
+
continue;
|
|
1523
|
+
}
|
|
1524
|
+
case 16: {
|
|
1525
|
+
if (tag !== 128) {
|
|
1526
|
+
break;
|
|
1527
|
+
}
|
|
1528
|
+
message.exchangeOrderType = reader.int32();
|
|
1529
|
+
continue;
|
|
1530
|
+
}
|
|
1531
|
+
case 17: {
|
|
1532
|
+
if (tag !== 138) {
|
|
1533
|
+
break;
|
|
1534
|
+
}
|
|
1535
|
+
message.exchangeOrderId = reader.string();
|
|
1536
|
+
continue;
|
|
1537
|
+
}
|
|
1538
|
+
case 18: {
|
|
1539
|
+
if (tag !== 146) {
|
|
1540
|
+
break;
|
|
1541
|
+
}
|
|
1542
|
+
message.ticker = reader.string();
|
|
1543
|
+
continue;
|
|
1544
|
+
}
|
|
1545
|
+
case 19: {
|
|
1546
|
+
if (tag !== 154) {
|
|
1547
|
+
break;
|
|
1548
|
+
}
|
|
1549
|
+
message.classCode = reader.string();
|
|
1550
|
+
continue;
|
|
1551
|
+
}
|
|
1552
|
+
case 20: {
|
|
1553
|
+
if (tag !== 160) {
|
|
1554
|
+
break;
|
|
1555
|
+
}
|
|
1556
|
+
message.instantExecution = reader.bool();
|
|
1557
|
+
continue;
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1561
|
+
break;
|
|
1562
|
+
}
|
|
1563
|
+
reader.skip(tag & 7);
|
|
1564
|
+
}
|
|
1565
|
+
return message;
|
|
1566
|
+
}
|
|
1567
|
+
finally {
|
|
1568
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1571
|
+
fromJSON(object) {
|
|
1572
|
+
return {
|
|
1573
|
+
stopOrderId: isSet(object.stopOrderId)
|
|
1574
|
+
? globalThis.String(object.stopOrderId)
|
|
1575
|
+
: isSet(object.stop_order_id)
|
|
1576
|
+
? globalThis.String(object.stop_order_id)
|
|
1577
|
+
: "",
|
|
1578
|
+
lotsRequested: isSet(object.lotsRequested)
|
|
1579
|
+
? globalThis.Number(object.lotsRequested)
|
|
1580
|
+
: isSet(object.lots_requested)
|
|
1581
|
+
? globalThis.Number(object.lots_requested)
|
|
1582
|
+
: 0,
|
|
1583
|
+
figi: isSet(object.figi) ? globalThis.String(object.figi) : "",
|
|
1584
|
+
direction: isSet(object.direction) ? stopOrderDirectionFromJSON(object.direction) : 0,
|
|
1585
|
+
currency: isSet(object.currency) ? globalThis.String(object.currency) : "",
|
|
1586
|
+
orderType: isSet(object.orderType)
|
|
1587
|
+
? stopOrderTypeFromJSON(object.orderType)
|
|
1588
|
+
: isSet(object.order_type)
|
|
1589
|
+
? stopOrderTypeFromJSON(object.order_type)
|
|
1590
|
+
: 0,
|
|
1591
|
+
createDate: isSet(object.createDate)
|
|
1592
|
+
? fromJsonTimestamp(object.createDate)
|
|
1593
|
+
: isSet(object.create_date)
|
|
1594
|
+
? fromJsonTimestamp(object.create_date)
|
|
1595
|
+
: undefined,
|
|
1596
|
+
activationDateTime: isSet(object.activationDateTime)
|
|
1597
|
+
? fromJsonTimestamp(object.activationDateTime)
|
|
1598
|
+
: isSet(object.activation_date_time)
|
|
1599
|
+
? fromJsonTimestamp(object.activation_date_time)
|
|
1600
|
+
: undefined,
|
|
1601
|
+
expirationTime: isSet(object.expirationTime)
|
|
1602
|
+
? fromJsonTimestamp(object.expirationTime)
|
|
1603
|
+
: isSet(object.expiration_time)
|
|
1604
|
+
? fromJsonTimestamp(object.expiration_time)
|
|
1605
|
+
: undefined,
|
|
1606
|
+
price: isSet(object.price) ? common_1.MoneyValue.fromJSON(object.price) : undefined,
|
|
1607
|
+
stopPrice: isSet(object.stopPrice)
|
|
1608
|
+
? common_1.MoneyValue.fromJSON(object.stopPrice)
|
|
1609
|
+
: isSet(object.stop_price)
|
|
1610
|
+
? common_1.MoneyValue.fromJSON(object.stop_price)
|
|
1611
|
+
: undefined,
|
|
1612
|
+
instrumentUid: isSet(object.instrumentUid)
|
|
1613
|
+
? globalThis.String(object.instrumentUid)
|
|
1614
|
+
: isSet(object.instrument_uid)
|
|
1615
|
+
? globalThis.String(object.instrument_uid)
|
|
1616
|
+
: "",
|
|
1617
|
+
takeProfitType: isSet(object.takeProfitType)
|
|
1618
|
+
? takeProfitTypeFromJSON(object.takeProfitType)
|
|
1619
|
+
: isSet(object.take_profit_type)
|
|
1620
|
+
? takeProfitTypeFromJSON(object.take_profit_type)
|
|
1621
|
+
: 0,
|
|
1622
|
+
trailingData: isSet(object.trailingData)
|
|
1623
|
+
? exports.StopOrder_TrailingData.fromJSON(object.trailingData)
|
|
1624
|
+
: isSet(object.trailing_data)
|
|
1625
|
+
? exports.StopOrder_TrailingData.fromJSON(object.trailing_data)
|
|
1626
|
+
: undefined,
|
|
1627
|
+
status: isSet(object.status) ? stopOrderStatusOptionFromJSON(object.status) : 0,
|
|
1628
|
+
exchangeOrderType: isSet(object.exchangeOrderType)
|
|
1629
|
+
? exchangeOrderTypeFromJSON(object.exchangeOrderType)
|
|
1630
|
+
: isSet(object.exchange_order_type)
|
|
1631
|
+
? exchangeOrderTypeFromJSON(object.exchange_order_type)
|
|
1632
|
+
: 0,
|
|
1633
|
+
exchangeOrderId: isSet(object.exchangeOrderId)
|
|
1634
|
+
? globalThis.String(object.exchangeOrderId)
|
|
1635
|
+
: isSet(object.exchange_order_id)
|
|
1636
|
+
? globalThis.String(object.exchange_order_id)
|
|
1637
|
+
: undefined,
|
|
1638
|
+
ticker: isSet(object.ticker) ? globalThis.String(object.ticker) : "",
|
|
1639
|
+
classCode: isSet(object.classCode)
|
|
1640
|
+
? globalThis.String(object.classCode)
|
|
1641
|
+
: isSet(object.class_code)
|
|
1642
|
+
? globalThis.String(object.class_code)
|
|
1643
|
+
: "",
|
|
1644
|
+
instantExecution: isSet(object.instantExecution)
|
|
1645
|
+
? globalThis.Boolean(object.instantExecution)
|
|
1646
|
+
: isSet(object.instant_execution)
|
|
1647
|
+
? globalThis.Boolean(object.instant_execution)
|
|
1648
|
+
: false,
|
|
1649
|
+
};
|
|
1650
|
+
},
|
|
1651
|
+
toJSON(message) {
|
|
1652
|
+
const obj = {};
|
|
1653
|
+
if (message.stopOrderId !== "") {
|
|
1654
|
+
obj.stopOrderId = message.stopOrderId;
|
|
1655
|
+
}
|
|
1656
|
+
if (message.lotsRequested !== 0) {
|
|
1657
|
+
obj.lotsRequested = Math.round(message.lotsRequested);
|
|
1658
|
+
}
|
|
1659
|
+
if (message.figi !== "") {
|
|
1660
|
+
obj.figi = message.figi;
|
|
1661
|
+
}
|
|
1662
|
+
if (message.direction !== 0) {
|
|
1663
|
+
obj.direction = stopOrderDirectionToJSON(message.direction);
|
|
1664
|
+
}
|
|
1665
|
+
if (message.currency !== "") {
|
|
1666
|
+
obj.currency = message.currency;
|
|
1667
|
+
}
|
|
1668
|
+
if (message.orderType !== 0) {
|
|
1669
|
+
obj.orderType = stopOrderTypeToJSON(message.orderType);
|
|
1670
|
+
}
|
|
1671
|
+
if (message.createDate !== undefined) {
|
|
1672
|
+
obj.createDate = message.createDate.toISOString();
|
|
1673
|
+
}
|
|
1674
|
+
if (message.activationDateTime !== undefined) {
|
|
1675
|
+
obj.activationDateTime = message.activationDateTime.toISOString();
|
|
1676
|
+
}
|
|
1677
|
+
if (message.expirationTime !== undefined) {
|
|
1678
|
+
obj.expirationTime = message.expirationTime.toISOString();
|
|
1679
|
+
}
|
|
1680
|
+
if (message.price !== undefined) {
|
|
1681
|
+
obj.price = common_1.MoneyValue.toJSON(message.price);
|
|
1682
|
+
}
|
|
1683
|
+
if (message.stopPrice !== undefined) {
|
|
1684
|
+
obj.stopPrice = common_1.MoneyValue.toJSON(message.stopPrice);
|
|
1685
|
+
}
|
|
1686
|
+
if (message.instrumentUid !== "") {
|
|
1687
|
+
obj.instrumentUid = message.instrumentUid;
|
|
1688
|
+
}
|
|
1689
|
+
if (message.takeProfitType !== 0) {
|
|
1690
|
+
obj.takeProfitType = takeProfitTypeToJSON(message.takeProfitType);
|
|
1691
|
+
}
|
|
1692
|
+
if (message.trailingData !== undefined) {
|
|
1693
|
+
obj.trailingData = exports.StopOrder_TrailingData.toJSON(message.trailingData);
|
|
1694
|
+
}
|
|
1695
|
+
if (message.status !== 0) {
|
|
1696
|
+
obj.status = stopOrderStatusOptionToJSON(message.status);
|
|
1697
|
+
}
|
|
1698
|
+
if (message.exchangeOrderType !== 0) {
|
|
1699
|
+
obj.exchangeOrderType = exchangeOrderTypeToJSON(message.exchangeOrderType);
|
|
1700
|
+
}
|
|
1701
|
+
if (message.exchangeOrderId !== undefined) {
|
|
1702
|
+
obj.exchangeOrderId = message.exchangeOrderId;
|
|
1703
|
+
}
|
|
1704
|
+
if (message.ticker !== "") {
|
|
1705
|
+
obj.ticker = message.ticker;
|
|
1706
|
+
}
|
|
1707
|
+
if (message.classCode !== "") {
|
|
1708
|
+
obj.classCode = message.classCode;
|
|
1709
|
+
}
|
|
1710
|
+
if (message.instantExecution !== false) {
|
|
1711
|
+
obj.instantExecution = message.instantExecution;
|
|
1712
|
+
}
|
|
1713
|
+
return obj;
|
|
1714
|
+
},
|
|
1715
|
+
create(base) {
|
|
1716
|
+
return exports.StopOrder.fromPartial(base ?? {});
|
|
1717
|
+
},
|
|
1718
|
+
fromPartial(object) {
|
|
1719
|
+
const message = createBaseStopOrder();
|
|
1720
|
+
message.stopOrderId = object.stopOrderId ?? "";
|
|
1721
|
+
message.lotsRequested = object.lotsRequested ?? 0;
|
|
1722
|
+
message.figi = object.figi ?? "";
|
|
1723
|
+
message.direction = object.direction ?? 0;
|
|
1724
|
+
message.currency = object.currency ?? "";
|
|
1725
|
+
message.orderType = object.orderType ?? 0;
|
|
1726
|
+
message.createDate = object.createDate ?? undefined;
|
|
1727
|
+
message.activationDateTime = object.activationDateTime ?? undefined;
|
|
1728
|
+
message.expirationTime = object.expirationTime ?? undefined;
|
|
1729
|
+
message.price = (object.price !== undefined && object.price !== null)
|
|
1730
|
+
? common_1.MoneyValue.fromPartial(object.price)
|
|
1731
|
+
: undefined;
|
|
1732
|
+
message.stopPrice = (object.stopPrice !== undefined && object.stopPrice !== null)
|
|
1733
|
+
? common_1.MoneyValue.fromPartial(object.stopPrice)
|
|
1734
|
+
: undefined;
|
|
1735
|
+
message.instrumentUid = object.instrumentUid ?? "";
|
|
1736
|
+
message.takeProfitType = object.takeProfitType ?? 0;
|
|
1737
|
+
message.trailingData = (object.trailingData !== undefined && object.trailingData !== null)
|
|
1738
|
+
? exports.StopOrder_TrailingData.fromPartial(object.trailingData)
|
|
1739
|
+
: undefined;
|
|
1740
|
+
message.status = object.status ?? 0;
|
|
1741
|
+
message.exchangeOrderType = object.exchangeOrderType ?? 0;
|
|
1742
|
+
message.exchangeOrderId = object.exchangeOrderId ?? undefined;
|
|
1743
|
+
message.ticker = object.ticker ?? "";
|
|
1744
|
+
message.classCode = object.classCode ?? "";
|
|
1745
|
+
message.instantExecution = object.instantExecution ?? false;
|
|
1746
|
+
return message;
|
|
1747
|
+
},
|
|
1748
|
+
};
|
|
1749
|
+
function createBaseStopOrder_TrailingData() {
|
|
1750
|
+
return {
|
|
1751
|
+
indent: undefined,
|
|
1752
|
+
indentType: 0,
|
|
1753
|
+
spread: undefined,
|
|
1754
|
+
spreadType: 0,
|
|
1755
|
+
status: 0,
|
|
1756
|
+
price: undefined,
|
|
1757
|
+
extr: undefined,
|
|
1758
|
+
};
|
|
1759
|
+
}
|
|
1760
|
+
exports.StopOrder_TrailingData = {
|
|
1761
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1762
|
+
if (message.indent !== undefined) {
|
|
1763
|
+
common_1.Quotation.encode(message.indent, writer.uint32(10).fork()).join();
|
|
1764
|
+
}
|
|
1765
|
+
if (message.indentType !== 0) {
|
|
1766
|
+
writer.uint32(16).int32(message.indentType);
|
|
1767
|
+
}
|
|
1768
|
+
if (message.spread !== undefined) {
|
|
1769
|
+
common_1.Quotation.encode(message.spread, writer.uint32(26).fork()).join();
|
|
1770
|
+
}
|
|
1771
|
+
if (message.spreadType !== 0) {
|
|
1772
|
+
writer.uint32(32).int32(message.spreadType);
|
|
1773
|
+
}
|
|
1774
|
+
if (message.status !== 0) {
|
|
1775
|
+
writer.uint32(40).int32(message.status);
|
|
1776
|
+
}
|
|
1777
|
+
if (message.price !== undefined) {
|
|
1778
|
+
common_1.Quotation.encode(message.price, writer.uint32(58).fork()).join();
|
|
1779
|
+
}
|
|
1780
|
+
if (message.extr !== undefined) {
|
|
1781
|
+
common_1.Quotation.encode(message.extr, writer.uint32(66).fork()).join();
|
|
1782
|
+
}
|
|
1783
|
+
return writer;
|
|
1784
|
+
},
|
|
1785
|
+
decode(input, length) {
|
|
1786
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1787
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1788
|
+
if (previousRecursionDepth >= 100) {
|
|
1789
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1790
|
+
}
|
|
1791
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1792
|
+
try {
|
|
1793
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1794
|
+
const message = createBaseStopOrder_TrailingData();
|
|
1795
|
+
while (reader.pos < end) {
|
|
1796
|
+
const tag = reader.uint32();
|
|
1797
|
+
switch (tag >>> 3) {
|
|
1798
|
+
case 1: {
|
|
1799
|
+
if (tag !== 10) {
|
|
1800
|
+
break;
|
|
1801
|
+
}
|
|
1802
|
+
message.indent = common_1.Quotation.decode(reader, reader.uint32());
|
|
1803
|
+
continue;
|
|
1804
|
+
}
|
|
1805
|
+
case 2: {
|
|
1806
|
+
if (tag !== 16) {
|
|
1807
|
+
break;
|
|
1808
|
+
}
|
|
1809
|
+
message.indentType = reader.int32();
|
|
1810
|
+
continue;
|
|
1811
|
+
}
|
|
1812
|
+
case 3: {
|
|
1813
|
+
if (tag !== 26) {
|
|
1814
|
+
break;
|
|
1815
|
+
}
|
|
1816
|
+
message.spread = common_1.Quotation.decode(reader, reader.uint32());
|
|
1817
|
+
continue;
|
|
1818
|
+
}
|
|
1819
|
+
case 4: {
|
|
1820
|
+
if (tag !== 32) {
|
|
1821
|
+
break;
|
|
1822
|
+
}
|
|
1823
|
+
message.spreadType = reader.int32();
|
|
1824
|
+
continue;
|
|
1825
|
+
}
|
|
1826
|
+
case 5: {
|
|
1827
|
+
if (tag !== 40) {
|
|
1828
|
+
break;
|
|
1829
|
+
}
|
|
1830
|
+
message.status = reader.int32();
|
|
1831
|
+
continue;
|
|
1832
|
+
}
|
|
1833
|
+
case 7: {
|
|
1834
|
+
if (tag !== 58) {
|
|
1835
|
+
break;
|
|
1836
|
+
}
|
|
1837
|
+
message.price = common_1.Quotation.decode(reader, reader.uint32());
|
|
1838
|
+
continue;
|
|
1839
|
+
}
|
|
1840
|
+
case 8: {
|
|
1841
|
+
if (tag !== 66) {
|
|
1842
|
+
break;
|
|
1843
|
+
}
|
|
1844
|
+
message.extr = common_1.Quotation.decode(reader, reader.uint32());
|
|
1845
|
+
continue;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1849
|
+
break;
|
|
1850
|
+
}
|
|
1851
|
+
reader.skip(tag & 7);
|
|
1852
|
+
}
|
|
1853
|
+
return message;
|
|
1854
|
+
}
|
|
1855
|
+
finally {
|
|
1856
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1857
|
+
}
|
|
1858
|
+
},
|
|
1859
|
+
fromJSON(object) {
|
|
1860
|
+
return {
|
|
1861
|
+
indent: isSet(object.indent) ? common_1.Quotation.fromJSON(object.indent) : undefined,
|
|
1862
|
+
indentType: isSet(object.indentType)
|
|
1863
|
+
? trailingValueTypeFromJSON(object.indentType)
|
|
1864
|
+
: isSet(object.indent_type)
|
|
1865
|
+
? trailingValueTypeFromJSON(object.indent_type)
|
|
1866
|
+
: 0,
|
|
1867
|
+
spread: isSet(object.spread) ? common_1.Quotation.fromJSON(object.spread) : undefined,
|
|
1868
|
+
spreadType: isSet(object.spreadType)
|
|
1869
|
+
? trailingValueTypeFromJSON(object.spreadType)
|
|
1870
|
+
: isSet(object.spread_type)
|
|
1871
|
+
? trailingValueTypeFromJSON(object.spread_type)
|
|
1872
|
+
: 0,
|
|
1873
|
+
status: isSet(object.status) ? trailingStopStatusFromJSON(object.status) : 0,
|
|
1874
|
+
price: isSet(object.price) ? common_1.Quotation.fromJSON(object.price) : undefined,
|
|
1875
|
+
extr: isSet(object.extr) ? common_1.Quotation.fromJSON(object.extr) : undefined,
|
|
1876
|
+
};
|
|
1877
|
+
},
|
|
1878
|
+
toJSON(message) {
|
|
1879
|
+
const obj = {};
|
|
1880
|
+
if (message.indent !== undefined) {
|
|
1881
|
+
obj.indent = common_1.Quotation.toJSON(message.indent);
|
|
1882
|
+
}
|
|
1883
|
+
if (message.indentType !== 0) {
|
|
1884
|
+
obj.indentType = trailingValueTypeToJSON(message.indentType);
|
|
1885
|
+
}
|
|
1886
|
+
if (message.spread !== undefined) {
|
|
1887
|
+
obj.spread = common_1.Quotation.toJSON(message.spread);
|
|
1888
|
+
}
|
|
1889
|
+
if (message.spreadType !== 0) {
|
|
1890
|
+
obj.spreadType = trailingValueTypeToJSON(message.spreadType);
|
|
1891
|
+
}
|
|
1892
|
+
if (message.status !== 0) {
|
|
1893
|
+
obj.status = trailingStopStatusToJSON(message.status);
|
|
1894
|
+
}
|
|
1895
|
+
if (message.price !== undefined) {
|
|
1896
|
+
obj.price = common_1.Quotation.toJSON(message.price);
|
|
1897
|
+
}
|
|
1898
|
+
if (message.extr !== undefined) {
|
|
1899
|
+
obj.extr = common_1.Quotation.toJSON(message.extr);
|
|
1900
|
+
}
|
|
1901
|
+
return obj;
|
|
1902
|
+
},
|
|
1903
|
+
create(base) {
|
|
1904
|
+
return exports.StopOrder_TrailingData.fromPartial(base ?? {});
|
|
1905
|
+
},
|
|
1906
|
+
fromPartial(object) {
|
|
1907
|
+
const message = createBaseStopOrder_TrailingData();
|
|
1908
|
+
message.indent = (object.indent !== undefined && object.indent !== null)
|
|
1909
|
+
? common_1.Quotation.fromPartial(object.indent)
|
|
1910
|
+
: undefined;
|
|
1911
|
+
message.indentType = object.indentType ?? 0;
|
|
1912
|
+
message.spread = (object.spread !== undefined && object.spread !== null)
|
|
1913
|
+
? common_1.Quotation.fromPartial(object.spread)
|
|
1914
|
+
: undefined;
|
|
1915
|
+
message.spreadType = object.spreadType ?? 0;
|
|
1916
|
+
message.status = object.status ?? 0;
|
|
1917
|
+
message.price = (object.price !== undefined && object.price !== null)
|
|
1918
|
+
? common_1.Quotation.fromPartial(object.price)
|
|
1919
|
+
: undefined;
|
|
1920
|
+
message.extr = (object.extr !== undefined && object.extr !== null) ? common_1.Quotation.fromPartial(object.extr) : undefined;
|
|
1921
|
+
return message;
|
|
1922
|
+
},
|
|
1923
|
+
};
|
|
1924
|
+
exports.StopOrdersServiceDefinition = {
|
|
1925
|
+
name: "StopOrdersService",
|
|
1926
|
+
fullName: "tinkoff.public.invest.api.contract.v1.StopOrdersService",
|
|
1927
|
+
methods: {
|
|
1928
|
+
/** PostStopOrder — выставить стоп-заявку */
|
|
1929
|
+
postStopOrder: {
|
|
1930
|
+
name: "PostStopOrder",
|
|
1931
|
+
requestType: exports.PostStopOrderRequest,
|
|
1932
|
+
requestStream: false,
|
|
1933
|
+
responseType: exports.PostStopOrderResponse,
|
|
1934
|
+
responseStream: false,
|
|
1935
|
+
options: {},
|
|
1936
|
+
},
|
|
1937
|
+
/** GetStopOrders — получить список стоп-заявок по счету */
|
|
1938
|
+
getStopOrders: {
|
|
1939
|
+
name: "GetStopOrders",
|
|
1940
|
+
requestType: exports.GetStopOrdersRequest,
|
|
1941
|
+
requestStream: false,
|
|
1942
|
+
responseType: exports.GetStopOrdersResponse,
|
|
1943
|
+
responseStream: false,
|
|
1944
|
+
options: {},
|
|
1945
|
+
},
|
|
1946
|
+
/** CancelStopOrder — отменить стоп-заявку */
|
|
1947
|
+
cancelStopOrder: {
|
|
1948
|
+
name: "CancelStopOrder",
|
|
1949
|
+
requestType: exports.CancelStopOrderRequest,
|
|
1950
|
+
requestStream: false,
|
|
1951
|
+
responseType: exports.CancelStopOrderResponse,
|
|
1952
|
+
responseStream: false,
|
|
1953
|
+
options: {},
|
|
1954
|
+
},
|
|
1955
|
+
},
|
|
1956
|
+
};
|
|
1957
|
+
function toTimestamp(date) {
|
|
1958
|
+
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
1959
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
1960
|
+
return { seconds, nanos };
|
|
1961
|
+
}
|
|
1962
|
+
function fromTimestamp(t) {
|
|
1963
|
+
let millis = (t.seconds || 0) * 1_000;
|
|
1964
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
1965
|
+
return new globalThis.Date(millis);
|
|
1966
|
+
}
|
|
1967
|
+
function fromJsonTimestamp(o) {
|
|
1968
|
+
if (o instanceof globalThis.Date) {
|
|
1969
|
+
return o;
|
|
1970
|
+
}
|
|
1971
|
+
else if (typeof o === "string") {
|
|
1972
|
+
return new globalThis.Date(o);
|
|
1973
|
+
}
|
|
1974
|
+
else {
|
|
1975
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
function longToNumber(int64) {
|
|
1979
|
+
const num = globalThis.Number(int64.toString());
|
|
1980
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1981
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1982
|
+
}
|
|
1983
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1984
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1985
|
+
}
|
|
1986
|
+
return num;
|
|
1987
|
+
}
|
|
1988
|
+
function isSet(value) {
|
|
1989
|
+
return value !== null && value !== undefined;
|
|
1990
|
+
}
|