@polyester/sdk 0.36.0-devnet-20261119184734 → 0.36.0-devnet-20261120015159

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.
Files changed (199) hide show
  1. package/CHANGELOG.md +18 -2
  2. package/dist/client.d.ts +2 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +2 -0
  5. package/dist/client.js.map +1 -1
  6. package/dist/gen/ai/v1/assistant_pb.d.ts +55 -3
  7. package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
  8. package/dist/gen/ai/v1/assistant_pb.js +8 -1
  9. package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
  10. package/dist/gen/auth/v1/account_scope_pb.d.ts +40 -0
  11. package/dist/gen/auth/v1/account_scope_pb.d.ts.map +1 -0
  12. package/dist/gen/auth/v1/account_scope_pb.js +46 -0
  13. package/dist/gen/auth/v1/account_scope_pb.js.map +1 -0
  14. package/dist/gen/auth/v1/address_book_pb.d.ts +3 -31
  15. package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
  16. package/dist/gen/auth/v1/address_book_pb.js +8 -38
  17. package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
  18. package/dist/gen/auth/v1/auth_pb.d.ts +15 -14
  19. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  20. package/dist/gen/auth/v1/auth_pb.js +16 -15
  21. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  22. package/dist/gen/auth/v1/connected_apps_pb.d.ts +59 -58
  23. package/dist/gen/auth/v1/connected_apps_pb.d.ts.map +1 -1
  24. package/dist/gen/auth/v1/connected_apps_pb.js +38 -37
  25. package/dist/gen/auth/v1/connected_apps_pb.js.map +1 -1
  26. package/dist/gen/auth/v1/policies_pb.d.ts +27 -1
  27. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  28. package/dist/gen/auth/v1/policies_pb.js +27 -1
  29. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  30. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +228 -2
  31. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
  32. package/dist/gen/chain/withdraw/v1/withdraw_pb.js +32 -8
  33. package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
  34. package/dist/gen/changelog/v1/changelog_pb.d.ts +16 -4
  35. package/dist/gen/changelog/v1/changelog_pb.d.ts.map +1 -1
  36. package/dist/gen/changelog/v1/changelog_pb.js.map +1 -1
  37. package/dist/gen/index.d.ts +7 -5
  38. package/dist/gen/index.js +7 -5
  39. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +288 -2
  40. package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
  41. package/dist/gen/marketdata/v1/marketdata_pb.js +115 -2
  42. package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
  43. package/dist/gen/orders/v1/orders_pb.d.ts +78 -25
  44. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  45. package/dist/gen/orders/v1/orders_pb.js +36 -7
  46. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  47. package/dist/gen/orders/v1/orders_read_pb.d.ts +35 -1
  48. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  49. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  50. package/dist/gen/strategies/v1/strategies_pb.d.ts +2928 -0
  51. package/dist/gen/strategies/v1/strategies_pb.d.ts.map +1 -0
  52. package/dist/gen/strategies/v1/strategies_pb.js +818 -0
  53. package/dist/gen/strategies/v1/strategies_pb.js.map +1 -0
  54. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +38 -17
  55. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
  56. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +4 -1
  57. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
  58. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts +312 -132
  59. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts.map +1 -1
  60. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js +31 -26
  61. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js.map +1 -1
  62. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +28 -13
  63. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
  64. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +2 -2
  65. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
  66. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +109 -2
  67. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts.map +1 -1
  68. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js +23 -3
  69. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js.map +1 -1
  70. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +3 -2
  71. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
  72. package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
  73. package/dist/gen/triggers/v1/triggers_pb.d.ts +61 -11
  74. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  75. package/dist/gen/triggers/v1/triggers_pb.js +4 -2
  76. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  77. package/dist/index.d.ts +9 -6
  78. package/dist/services/account-activity/account-activity.schemas.d.ts +6 -6
  79. package/dist/services/address-book/address-book.codecs.js +1 -0
  80. package/dist/services/address-book/address-book.codecs.js.map +1 -1
  81. package/dist/services/address-book/address-book.js +1 -1
  82. package/dist/services/api-keys/api-keys.js +1 -1
  83. package/dist/services/assistant/assistant-events.schemas.d.ts +141 -43
  84. package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
  85. package/dist/services/assistant/assistant-events.schemas.js +15 -5
  86. package/dist/services/assistant/assistant-events.schemas.js.map +1 -1
  87. package/dist/services/assistant/assistant.codecs.d.ts +5 -2
  88. package/dist/services/assistant/assistant.codecs.d.ts.map +1 -1
  89. package/dist/services/assistant/assistant.codecs.js +10 -2
  90. package/dist/services/assistant/assistant.codecs.js.map +1 -1
  91. package/dist/services/assistant/assistant.schemas.d.ts +2 -2
  92. package/dist/services/auth/auth.js +1 -1
  93. package/dist/services/auth/auth.js.map +1 -1
  94. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +16 -16
  95. package/dist/services/balances/balances.js +1 -1
  96. package/dist/services/balances/balances.schemas.d.ts +3 -3
  97. package/dist/services/candles/candles.schemas.d.ts +10 -10
  98. package/dist/services/changelog/changelog.schemas.d.ts +38 -38
  99. package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
  100. package/dist/services/claims/claims.schemas.d.ts +2 -2
  101. package/dist/services/connected-apps/connected-apps.d.ts +4 -4
  102. package/dist/services/connected-apps/connected-apps.d.ts.map +1 -1
  103. package/dist/services/connected-apps/connected-apps.js +13 -13
  104. package/dist/services/connected-apps/connected-apps.js.map +1 -1
  105. package/dist/services/connected-apps/connected-apps.schemas.d.ts +7 -7
  106. package/dist/services/connected-apps/connected-apps.schemas.d.ts.map +1 -1
  107. package/dist/services/connected-apps/connected-apps.schemas.js +10 -10
  108. package/dist/services/connected-apps/connected-apps.schemas.js.map +1 -1
  109. package/dist/services/connected-apps/connected-apps.types.d.ts +2 -2
  110. package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +8 -8
  111. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  112. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +6 -6
  113. package/dist/services/lifecycle/lifecycle.schemas.d.ts +94 -94
  114. package/dist/services/market-data/market-data.codecs.d.ts +9 -1
  115. package/dist/services/market-data/market-data.codecs.d.ts.map +1 -1
  116. package/dist/services/market-data/market-data.codecs.js +14 -1
  117. package/dist/services/market-data/market-data.codecs.js.map +1 -1
  118. package/dist/services/market-data/market-data.d.ts +9 -1
  119. package/dist/services/market-data/market-data.d.ts.map +1 -1
  120. package/dist/services/market-data/market-data.js +14 -1
  121. package/dist/services/market-data/market-data.js.map +1 -1
  122. package/dist/services/market-data/market-data.schemas.d.ts +40 -2
  123. package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
  124. package/dist/services/market-data/market-data.schemas.js +43 -8
  125. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  126. package/dist/services/market-data/market-data.types.d.ts +3 -3
  127. package/dist/services/notifications/notifications.schemas.d.ts +4 -4
  128. package/dist/services/orderbook/orderbook.d.ts.map +1 -1
  129. package/dist/services/orderbook/orderbook.js +5 -19
  130. package/dist/services/orderbook/orderbook.js.map +1 -1
  131. package/dist/services/orders/order-errors.schemas.d.ts +6 -6
  132. package/dist/services/orders/orders-batch.schemas.d.ts +72 -72
  133. package/dist/services/orders/orders-input.schemas.d.ts +10 -10
  134. package/dist/services/orders/orders-output.schemas.d.ts +16 -16
  135. package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
  136. package/dist/services/orders/orders-output.schemas.js +1 -1
  137. package/dist/services/orders/orders-output.schemas.js.map +1 -1
  138. package/dist/services/orders/orders.d.ts +5 -0
  139. package/dist/services/orders/orders.d.ts.map +1 -1
  140. package/dist/services/orders/orders.js +5 -0
  141. package/dist/services/orders/orders.js.map +1 -1
  142. package/dist/services/policies/api-key-policies/api-key-policies.js +1 -1
  143. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  144. package/dist/services/policies/shared.codecs.js +13 -4
  145. package/dist/services/policies/shared.codecs.js.map +1 -1
  146. package/dist/services/policies/shared.d.ts +1 -1
  147. package/dist/services/policies/subaccount-policies/subaccount-policies.js +1 -1
  148. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
  149. package/dist/services/rewards/rewards.schemas.d.ts +4 -4
  150. package/dist/services/statement-exports/statement-exports.schemas.d.ts +6 -6
  151. package/dist/services/strategies/service.d.ts +8 -0
  152. package/dist/services/strategies/service.d.ts.map +1 -0
  153. package/dist/services/strategies/service.js +9 -0
  154. package/dist/services/strategies/service.js.map +1 -0
  155. package/dist/services/strategies/strategies.codecs.d.ts +15 -0
  156. package/dist/services/strategies/strategies.codecs.d.ts.map +1 -0
  157. package/dist/services/strategies/strategies.codecs.js +50 -0
  158. package/dist/services/strategies/strategies.codecs.js.map +1 -0
  159. package/dist/services/strategies/strategies.d.ts +75 -0
  160. package/dist/services/strategies/strategies.d.ts.map +1 -0
  161. package/dist/services/strategies/strategies.js +135 -0
  162. package/dist/services/strategies/strategies.js.map +1 -0
  163. package/dist/services/strategies/strategies.schemas.d.ts +568 -0
  164. package/dist/services/strategies/strategies.schemas.d.ts.map +1 -0
  165. package/dist/services/strategies/strategies.schemas.js +408 -0
  166. package/dist/services/strategies/strategies.schemas.js.map +1 -0
  167. package/dist/services/strategies/strategies.types.d.ts +3 -0
  168. package/dist/services/subaccounts/subaccounts.js +2 -2
  169. package/dist/services/subaccounts/subaccounts.schemas.d.ts +8 -8
  170. package/dist/services/system/system.schemas.d.ts +13 -13
  171. package/dist/services/trades/trades.schemas.d.ts +1 -1
  172. package/dist/services/trading-withdraws/trading-withdraws.d.ts +29 -2
  173. package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
  174. package/dist/services/trading-withdraws/trading-withdraws.js +74 -11
  175. package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
  176. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +85 -1
  177. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
  178. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +56 -1
  179. package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
  180. package/dist/services/trading-withdraws/trading-withdraws.types.d.ts +3 -3
  181. package/dist/services/trading-withdraws/wallet-message.js +29 -1
  182. package/dist/services/trading-withdraws/wallet-message.js.map +1 -1
  183. package/dist/services/transfers/transfers.js +1 -1
  184. package/dist/services/transfers/transfers.schemas.d.ts +1 -1
  185. package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
  186. package/dist/services/triggers/triggers-output.schemas.d.ts +44 -44
  187. package/dist/shared/connect-error-mapping.d.ts.map +1 -1
  188. package/dist/shared/connect-error-mapping.js +5 -0
  189. package/dist/shared/connect-error-mapping.js.map +1 -1
  190. package/dist/shared/error-detail.d.ts +25 -2
  191. package/dist/shared/error-detail.d.ts.map +1 -1
  192. package/dist/shared/error-detail.js +1 -0
  193. package/dist/shared/error-detail.js.map +1 -1
  194. package/dist/shared/error-details/strategies.js +36 -0
  195. package/dist/shared/error-details/strategies.js.map +1 -0
  196. package/dist/wired-services.d.ts.map +1 -1
  197. package/dist/wired-services.js +6 -4
  198. package/dist/wired-services.js.map +1 -1
  199. package/package.json +1 -1
@@ -0,0 +1,2928 @@
1
+ import { JsonObject, Message } from "@bufbuild/protobuf";
2
+ import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
3
+ import { Timestamp } from "@bufbuild/protobuf/wkt";
4
+ declare namespace strategies_pb_d_exports {
5
+ export { Backtest, BacktestMetrics, BacktestMetricsSchema, BacktestReport, BacktestReportSchema, BacktestSchema, BacktestSummary, BacktestSummarySchema, BacktestTrade, BacktestTradeSchema, Backtest_Status, Backtest_StatusSchema, Baseline, BaselineSchema, Bot, BotBalance, BotBalanceSchema, BotCapDetail, BotCapDetailSchema, BotDecision, BotDecisionSchema, BotError, BotErrorSchema, BotLogEntry, BotLogEntrySchema, BotLogEntry_Kind, BotLogEntry_KindSchema, BotOrder, BotOrderSchema, BotSchema, Bot_Status, Bot_StatusSchema, DataGap, DataGapSchema, DeployProposalSummary, DeployProposalSummarySchema, DeployStatus, DeployStatusSchema, DeployStatus_State, DeployStatus_StateSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, ExplainStrategyRequest, ExplainStrategyRequestSchema, ExplainStrategyResponse, ExplainStrategyResponseSchema, GetBacktestRequest, GetBacktestRequestSchema, GetBacktestResponse, GetBacktestResponseSchema, GetBotRequest, GetBotRequestSchema, GetBotResponse, GetBotResponseSchema, GetDeployStatusRequest, GetDeployStatusRequestSchema, GetDeployStatusResponse, GetDeployStatusResponseSchema, GetStrategyReferenceRequest, GetStrategyReferenceRequestSchema, GetStrategyReferenceResponse, GetStrategyReferenceResponseSchema, Indicator, IndicatorLibrary, IndicatorLibrarySchema, IndicatorParameter, IndicatorParameterSchema, IndicatorSchema, ListBotLogsRequest, ListBotLogsRequestSchema, ListBotLogsResponse, ListBotLogsResponseSchema, ListBotsRequest, ListBotsRequestSchema, ListBotsResponse, ListBotsResponseSchema, ListStrategyTemplatesRequest, ListStrategyTemplatesRequestSchema, ListStrategyTemplatesResponse, ListStrategyTemplatesResponseSchema, Money, MoneyCard, MoneyCardSchema, MoneySchema, OrderSide, OrderSideSchema, ProposeDeployRequest, ProposeDeployRequestSchema, ProposeDeployResponse, ProposeDeployResponseSchema, RunScenariosRequest, RunScenariosRequestSchema, RunScenariosResponse, RunScenariosResponseSchema, ScenarioResult, ScenarioResultSchema, ScenarioSummary, ScenarioSummarySchema, ScenarioSummary_Outcome, ScenarioSummary_OutcomeSchema, SettingField, SettingFieldSchema, SettingValue, SettingValueSchema, SkillDocument, SkillDocumentSchema, StartBacktestRequest, StartBacktestRequestSchema, StartBacktestResponse, StartBacktestResponseSchema, StrategiesService, StrategyLimits, StrategyLimitsSchema, StrategyTemplate, StrategyTemplateSchema, TimeWindow, TimeWindowSchema, ValidateStrategyRequest, ValidateStrategyRequestSchema, ValidateStrategyResponse, ValidateStrategyResponseSchema, ValidationIssue, ValidationIssueSchema, file_strategies_v1_strategies };
6
+ }
7
+ /**
8
+ * Describes the file strategies/v1/strategies.proto.
9
+ */
10
+ declare const file_strategies_v1_strategies: GenFile;
11
+ /**
12
+ * BotCapDetail explains BOT_CAP_REACHED.
13
+ *
14
+ * @generated from message strategies.v1.BotCapDetail
15
+ */
16
+ type BotCapDetail = Message<"strategies.v1.BotCapDetail"> & {
17
+ /**
18
+ * The caller's current VIP tier.
19
+ *
20
+ * @generated from field: uint32 vip_tier = 1;
21
+ */
22
+ vipTier: number;
23
+ /**
24
+ * The most bots the tier allows at once.
25
+ *
26
+ * @generated from field: uint32 bot_cap = 2;
27
+ */
28
+ botCap: number;
29
+ /**
30
+ * Bots the caller runs now, deploying ones included.
31
+ *
32
+ * @generated from field: uint32 bots = 3;
33
+ */
34
+ bots: number;
35
+ /**
36
+ * The next VIP tier with a higher cap. Zero when no tier lifts it.
37
+ *
38
+ * @generated from field: uint32 next_vip_tier = 4;
39
+ */
40
+ nextVipTier: number;
41
+ /**
42
+ * The cap of next_vip_tier. Zero when no tier lifts it.
43
+ *
44
+ * @generated from field: uint32 next_bot_cap = 5;
45
+ */
46
+ nextBotCap: number;
47
+ };
48
+ /**
49
+ * Describes the message strategies.v1.BotCapDetail.
50
+ * Use `create(BotCapDetailSchema)` to create a new message.
51
+ */
52
+ declare const BotCapDetailSchema: GenMessage<BotCapDetail>;
53
+ /**
54
+ * ErrorDetail is attached to Strategies API errors as an error detail of type
55
+ * strategies.v1.ErrorDetail.
56
+ *
57
+ * @generated from message strategies.v1.ErrorDetail
58
+ */
59
+ type ErrorDetail = Message<"strategies.v1.ErrorDetail"> & {
60
+ /**
61
+ * Stable error code.
62
+ *
63
+ * @generated from field: strategies.v1.ErrorCode code = 1;
64
+ */
65
+ code: ErrorCode;
66
+ /**
67
+ * Request field the error is about, as a field path such as
68
+ * settings[0].value or funding[1].asset. Set only with SETTINGS_INVALID,
69
+ * FUNDING_INVALID and MANIFEST_TOO_LARGE.
70
+ *
71
+ * @generated from field: string field_path = 2;
72
+ */
73
+ fieldPath: string;
74
+ /**
75
+ * When the same request may succeed. Set only with
76
+ * SCENARIO_RUN_LIMIT_REACHED and BACKTEST_LIMIT_REACHED.
77
+ *
78
+ * @generated from field: google.protobuf.Timestamp retry_after = 3;
79
+ */
80
+ retryAfter?: Timestamp | undefined;
81
+ /**
82
+ * Set only with BOT_CAP_REACHED.
83
+ *
84
+ * @generated from field: strategies.v1.BotCapDetail bot_cap = 4;
85
+ */
86
+ botCap?: BotCapDetail | undefined;
87
+ /**
88
+ * Markets not open to bots, as the manifest names them. Set only with
89
+ * MARKET_NOT_ALLOWED.
90
+ *
91
+ * @generated from field: repeated string markets = 5;
92
+ */
93
+ markets: string[];
94
+ /**
95
+ * Amounts the funding account lacks, one per asset. Set only with
96
+ * INSUFFICIENT_FUNDS.
97
+ *
98
+ * @generated from field: repeated strategies.v1.Money shortfall = 6;
99
+ */
100
+ shortfall: Money[];
101
+ };
102
+ /**
103
+ * Describes the message strategies.v1.ErrorDetail.
104
+ * Use `create(ErrorDetailSchema)` to create a new message.
105
+ */
106
+ declare const ErrorDetailSchema: GenMessage<ErrorDetail>;
107
+ /**
108
+ * Money is an exact amount of one asset.
109
+ *
110
+ * @generated from message strategies.v1.Money
111
+ */
112
+ type Money = Message<"strategies.v1.Money"> & {
113
+ /**
114
+ * Asset symbol, for example USDT.
115
+ *
116
+ * @generated from field: string asset = 1;
117
+ */
118
+ asset: string;
119
+ /**
120
+ * Exact, non-negative decimal amount in whole asset units, for example "50"
121
+ * or "0.0125". Never a binary floating-point value.
122
+ *
123
+ * @generated from field: string amount = 2;
124
+ */
125
+ amount: string;
126
+ };
127
+ /**
128
+ * Describes the message strategies.v1.Money.
129
+ * Use `create(MoneySchema)` to create a new message.
130
+ */
131
+ declare const MoneySchema: GenMessage<Money>;
132
+ /**
133
+ * TimeWindow is a span of time: start_time inclusive, end_time exclusive.
134
+ *
135
+ * @generated from message strategies.v1.TimeWindow
136
+ */
137
+ type TimeWindow = Message<"strategies.v1.TimeWindow"> & {
138
+ /**
139
+ * Start of the window, inclusive.
140
+ *
141
+ * @generated from field: google.protobuf.Timestamp start_time = 1;
142
+ */
143
+ startTime?: Timestamp | undefined;
144
+ /**
145
+ * End of the window, exclusive.
146
+ *
147
+ * @generated from field: google.protobuf.Timestamp end_time = 2;
148
+ */
149
+ endTime?: Timestamp | undefined;
150
+ };
151
+ /**
152
+ * Describes the message strategies.v1.TimeWindow.
153
+ * Use `create(TimeWindowSchema)` to create a new message.
154
+ */
155
+ declare const TimeWindowSchema: GenMessage<TimeWindow>;
156
+ /**
157
+ * IndicatorLibrary names the indicator library a runtime version computes
158
+ * indicators with.
159
+ *
160
+ * @generated from message strategies.v1.IndicatorLibrary
161
+ */
162
+ type IndicatorLibrary = Message<"strategies.v1.IndicatorLibrary"> & {
163
+ /**
164
+ * Library name.
165
+ *
166
+ * @generated from field: string name = 1;
167
+ */
168
+ name: string;
169
+ /**
170
+ * Exact library version, pinned for every bot deployed on the runtime
171
+ * version.
172
+ *
173
+ * @generated from field: string version = 2;
174
+ */
175
+ version: string;
176
+ };
177
+ /**
178
+ * Describes the message strategies.v1.IndicatorLibrary.
179
+ * Use `create(IndicatorLibrarySchema)` to create a new message.
180
+ */
181
+ declare const IndicatorLibrarySchema: GenMessage<IndicatorLibrary>;
182
+ /**
183
+ * IndicatorParameter is one parameter of an allowed indicator.
184
+ *
185
+ * @generated from message strategies.v1.IndicatorParameter
186
+ */
187
+ type IndicatorParameter = Message<"strategies.v1.IndicatorParameter"> & {
188
+ /**
189
+ * Parameter name, as bot code passes it, for example period.
190
+ *
191
+ * @generated from field: string name = 1;
192
+ */
193
+ name: string;
194
+ /**
195
+ * What the parameter sets.
196
+ *
197
+ * @generated from field: string description = 2;
198
+ */
199
+ description: string;
200
+ /**
201
+ * Smallest allowed value, as an exact decimal.
202
+ *
203
+ * @generated from field: string minimum = 3;
204
+ */
205
+ minimum: string;
206
+ /**
207
+ * Largest allowed value, as an exact decimal.
208
+ *
209
+ * @generated from field: string maximum = 4;
210
+ */
211
+ maximum: string;
212
+ /**
213
+ * Value used when bot code omits the parameter, as an exact decimal.
214
+ *
215
+ * @generated from field: string default_value = 5;
216
+ */
217
+ defaultValue: string;
218
+ /**
219
+ * True when only whole numbers are allowed.
220
+ *
221
+ * @generated from field: bool integer = 6;
222
+ */
223
+ integer: boolean;
224
+ };
225
+ /**
226
+ * Describes the message strategies.v1.IndicatorParameter.
227
+ * Use `create(IndicatorParameterSchema)` to create a new message.
228
+ */
229
+ declare const IndicatorParameterSchema: GenMessage<IndicatorParameter>;
230
+ /**
231
+ * Indicator is one indicator bot code may read.
232
+ *
233
+ * @generated from message strategies.v1.Indicator
234
+ */
235
+ type Indicator = Message<"strategies.v1.Indicator"> & {
236
+ /**
237
+ * Indicator name, as bot code calls it, for example rsi.
238
+ *
239
+ * @generated from field: string name = 1;
240
+ */
241
+ name: string;
242
+ /**
243
+ * What the indicator measures.
244
+ *
245
+ * @generated from field: string description = 2;
246
+ */
247
+ description: string;
248
+ /**
249
+ * Parameters, in the order bot code passes them.
250
+ *
251
+ * @generated from field: repeated strategies.v1.IndicatorParameter parameters = 3;
252
+ */
253
+ parameters: IndicatorParameter[];
254
+ /**
255
+ * Output names, for example value for RSI or upper, middle and lower for
256
+ * Bollinger bands.
257
+ *
258
+ * @generated from field: repeated string outputs = 4;
259
+ */
260
+ outputs: string[];
261
+ /**
262
+ * Closed candles needed before the indicator has a value, as an expression
263
+ * of its parameters, for example "period + 1". Until then bot code reads no
264
+ * value.
265
+ *
266
+ * @generated from field: string warmup_bars = 5;
267
+ */
268
+ warmupBars: string;
269
+ };
270
+ /**
271
+ * Describes the message strategies.v1.Indicator.
272
+ * Use `create(IndicatorSchema)` to create a new message.
273
+ */
274
+ declare const IndicatorSchema: GenMessage<Indicator>;
275
+ /**
276
+ * StrategyLimits are the limits every bot of a runtime version runs under.
277
+ *
278
+ * @generated from message strategies.v1.StrategyLimits
279
+ */
280
+ type StrategyLimits = Message<"strategies.v1.StrategyLimits"> & {
281
+ /**
282
+ * CPU time one handler call may use, in milliseconds.
283
+ *
284
+ * @generated from field: uint32 cpu_ms_per_call = 1;
285
+ */
286
+ cpuMsPerCall: number;
287
+ /**
288
+ * Memory one handler call may use, in bytes.
289
+ *
290
+ * @generated from field: uint64 memory_bytes_per_call = 2;
291
+ */
292
+ memoryBytesPerCall: bigint;
293
+ /**
294
+ * Largest saved bot state, in bytes.
295
+ *
296
+ * @generated from field: uint64 state_bytes = 3;
297
+ */
298
+ stateBytes: bigint;
299
+ /**
300
+ * Largest bot code, in bytes.
301
+ *
302
+ * @generated from field: uint64 code_bytes = 4;
303
+ */
304
+ codeBytes: bigint;
305
+ /**
306
+ * Largest manifest, in bytes of compact JSON.
307
+ *
308
+ * @generated from field: uint64 manifest_bytes = 5;
309
+ */
310
+ manifestBytes: bigint;
311
+ /**
312
+ * Most distinct indicator settings the caller's bots and backtests may read
313
+ * at once. A setting is one indicator with one market, timeframe and set of
314
+ * parameters.
315
+ *
316
+ * @generated from field: uint32 unique_indicator_settings = 6;
317
+ */
318
+ uniqueIndicatorSettings: number;
319
+ /**
320
+ * Most backtests the caller may start per UTC day.
321
+ *
322
+ * @generated from field: uint32 backtests_per_day = 7;
323
+ */
324
+ backtestsPerDay: number;
325
+ /**
326
+ * Most RunScenarios calls the caller may make per minute.
327
+ *
328
+ * @generated from field: uint32 scenario_runs_per_minute = 8;
329
+ */
330
+ scenarioRunsPerMinute: number;
331
+ };
332
+ /**
333
+ * Describes the message strategies.v1.StrategyLimits.
334
+ * Use `create(StrategyLimitsSchema)` to create a new message.
335
+ */
336
+ declare const StrategyLimitsSchema: GenMessage<StrategyLimits>;
337
+ /**
338
+ * GetStrategyReferenceRequest asks for what bot code is written against.
339
+ *
340
+ * @generated from message strategies.v1.GetStrategyReferenceRequest
341
+ */
342
+ type GetStrategyReferenceRequest = Message<"strategies.v1.GetStrategyReferenceRequest"> & {
343
+ /**
344
+ * Runtime version to describe. Empty means the current one. Until the
345
+ * runtime catalog is available, any other value is
346
+ * RUNTIME_VERSION_UNSUPPORTED.
347
+ *
348
+ * @generated from field: string runtime_version = 1;
349
+ */
350
+ runtimeVersion: string;
351
+ };
352
+ /**
353
+ * Describes the message strategies.v1.GetStrategyReferenceRequest.
354
+ * Use `create(GetStrategyReferenceRequestSchema)` to create a new message.
355
+ */
356
+ declare const GetStrategyReferenceRequestSchema: GenMessage<GetStrategyReferenceRequest>;
357
+ /**
358
+ * GetStrategyReferenceResponse is the bot format of one runtime version, and
359
+ * the skill pack for writing bots.
360
+ *
361
+ * The runtime catalog (runtime_version, indicator_library, manifest_schema,
362
+ * indicators and limits) is not available yet: those fields are empty until
363
+ * it is. The reference and the skill pack are always set.
364
+ *
365
+ * @generated from message strategies.v1.GetStrategyReferenceResponse
366
+ */
367
+ type GetStrategyReferenceResponse = Message<"strategies.v1.GetStrategyReferenceResponse"> & {
368
+ /**
369
+ * The runtime version described. Empty until the runtime catalog is
370
+ * available.
371
+ *
372
+ * @generated from field: string runtime_version = 1;
373
+ */
374
+ runtimeVersion: string;
375
+ /**
376
+ * The indicator library and its pinned version. Unset until the runtime
377
+ * catalog is available.
378
+ *
379
+ * @generated from field: strategies.v1.IndicatorLibrary indicator_library = 2;
380
+ */
381
+ indicatorLibrary?: IndicatorLibrary | undefined;
382
+ /**
383
+ * The bot API reference as Markdown: events and handlers, the manifest,
384
+ * reads, actions, money rules, limits and language rules, with examples.
385
+ *
386
+ * @generated from field: string reference = 3;
387
+ */
388
+ reference: string;
389
+ /**
390
+ * JSON Schema of the manifest. Unset until the runtime catalog is
391
+ * available.
392
+ *
393
+ * @generated from field: google.protobuf.Struct manifest_schema = 4;
394
+ */
395
+ manifestSchema?: JsonObject | undefined;
396
+ /**
397
+ * Every indicator bot code may read, by name. Empty until the runtime
398
+ * catalog is available; the reference lists the indicators meanwhile.
399
+ *
400
+ * @generated from field: repeated strategies.v1.Indicator indicators = 5;
401
+ */
402
+ indicators: Indicator[];
403
+ /**
404
+ * Limits every bot of this runtime version runs under. Unset until the
405
+ * runtime catalog is available.
406
+ *
407
+ * @generated from field: strategies.v1.StrategyLimits limits = 6;
408
+ */
409
+ limits?: StrategyLimits | undefined;
410
+ /**
411
+ * The skill pack: guidance for writing bots against the reference (the
412
+ * workflow, the language subset, patterns and pitfalls), one Markdown
413
+ * document per part, workflow first.
414
+ *
415
+ * @generated from field: repeated strategies.v1.SkillDocument skill_pack = 7;
416
+ */
417
+ skillPack: SkillDocument[];
418
+ /**
419
+ * Version of the skill pack: "sha256:" followed by the lowercase hex
420
+ * SHA-256 of, for each document in skill_pack order, the UTF-8 bytes of its
421
+ * name and then of its Markdown, each preceded by its length in bytes as an
422
+ * unsigned 64-bit big-endian integer. It changes exactly when a document's
423
+ * name, content or position does.
424
+ *
425
+ * @generated from field: string skill_pack_version = 8;
426
+ */
427
+ skillPackVersion: string;
428
+ };
429
+ /**
430
+ * Describes the message strategies.v1.GetStrategyReferenceResponse.
431
+ * Use `create(GetStrategyReferenceResponseSchema)` to create a new message.
432
+ */
433
+ declare const GetStrategyReferenceResponseSchema: GenMessage<GetStrategyReferenceResponse>;
434
+ /**
435
+ * SkillDocument is one document of the skill pack.
436
+ *
437
+ * @generated from message strategies.v1.SkillDocument
438
+ */
439
+ type SkillDocument = Message<"strategies.v1.SkillDocument"> & {
440
+ /**
441
+ * File name of the document, for example writing-bots.md. Links between
442
+ * documents use these names.
443
+ *
444
+ * @generated from field: string name = 1;
445
+ */
446
+ name: string;
447
+ /**
448
+ * The document, as Markdown.
449
+ *
450
+ * @generated from field: string markdown = 2;
451
+ */
452
+ markdown: string;
453
+ };
454
+ /**
455
+ * Describes the message strategies.v1.SkillDocument.
456
+ * Use `create(SkillDocumentSchema)` to create a new message.
457
+ */
458
+ declare const SkillDocumentSchema: GenMessage<SkillDocument>;
459
+ /**
460
+ * StrategyTemplate is a starting point for a bot.
461
+ *
462
+ * @generated from message strategies.v1.StrategyTemplate
463
+ */
464
+ type StrategyTemplate = Message<"strategies.v1.StrategyTemplate"> & {
465
+ /**
466
+ * Stable template ID, for example weekly-dca.
467
+ *
468
+ * @generated from field: string template_id = 1;
469
+ */
470
+ templateId: string;
471
+ /**
472
+ * Display name.
473
+ *
474
+ * @generated from field: string name = 2;
475
+ */
476
+ name: string;
477
+ /**
478
+ * What the template's bot does.
479
+ *
480
+ * @generated from field: string description = 3;
481
+ */
482
+ description: string;
483
+ /**
484
+ * The template's manifest, as ValidateStrategy takes it.
485
+ *
486
+ * @generated from field: google.protobuf.Struct manifest = 4;
487
+ */
488
+ manifest?: JsonObject | undefined;
489
+ /**
490
+ * The template's bot code.
491
+ *
492
+ * @generated from field: string code = 5;
493
+ */
494
+ code: string;
495
+ /**
496
+ * Runtime version the template is written for.
497
+ *
498
+ * @generated from field: string runtime_version = 6;
499
+ */
500
+ runtimeVersion: string;
501
+ };
502
+ /**
503
+ * Describes the message strategies.v1.StrategyTemplate.
504
+ * Use `create(StrategyTemplateSchema)` to create a new message.
505
+ */
506
+ declare const StrategyTemplateSchema: GenMessage<StrategyTemplate>;
507
+ /**
508
+ * ListStrategyTemplatesRequest lists the bot templates.
509
+ *
510
+ * @generated from message strategies.v1.ListStrategyTemplatesRequest
511
+ */
512
+ type ListStrategyTemplatesRequest = Message<"strategies.v1.ListStrategyTemplatesRequest"> & {};
513
+ /**
514
+ * Describes the message strategies.v1.ListStrategyTemplatesRequest.
515
+ * Use `create(ListStrategyTemplatesRequestSchema)` to create a new message.
516
+ */
517
+ declare const ListStrategyTemplatesRequestSchema: GenMessage<ListStrategyTemplatesRequest>;
518
+ /**
519
+ * ListStrategyTemplatesResponse returns every bot template.
520
+ *
521
+ * @generated from message strategies.v1.ListStrategyTemplatesResponse
522
+ */
523
+ type ListStrategyTemplatesResponse = Message<"strategies.v1.ListStrategyTemplatesResponse"> & {
524
+ /**
525
+ * Every template, in display order. The list is short and complete; it is
526
+ * not paginated.
527
+ *
528
+ * @generated from field: repeated strategies.v1.StrategyTemplate templates = 1;
529
+ */
530
+ templates: StrategyTemplate[];
531
+ };
532
+ /**
533
+ * Describes the message strategies.v1.ListStrategyTemplatesResponse.
534
+ * Use `create(ListStrategyTemplatesResponseSchema)` to create a new message.
535
+ */
536
+ declare const ListStrategyTemplatesResponseSchema: GenMessage<ListStrategyTemplatesResponse>;
537
+ /**
538
+ * ValidationIssue is one problem ValidateStrategy found.
539
+ *
540
+ * @generated from message strategies.v1.ValidationIssue
541
+ */
542
+ type ValidationIssue = Message<"strategies.v1.ValidationIssue"> & {
543
+ /**
544
+ * Path of the manifest value at fault, for example limits.max_order.amount.
545
+ * Empty when the issue is in the code.
546
+ *
547
+ * @generated from field: string manifest_path = 1;
548
+ */
549
+ manifestPath: string;
550
+ /**
551
+ * Line of the code at fault, from 1. Zero when the issue is in the
552
+ * manifest.
553
+ *
554
+ * @generated from field: uint32 line = 2;
555
+ */
556
+ line: number;
557
+ /**
558
+ * Column of the code at fault, from 1. Zero when unknown or when the issue
559
+ * is in the manifest.
560
+ *
561
+ * @generated from field: uint32 column = 3;
562
+ */
563
+ column: number;
564
+ /**
565
+ * Stable rule identifier, for example UNSUPPORTED_SYNTAX, UNKNOWN_CALL,
566
+ * MISSING_REASON, LIMIT_ABOVE_MAXIMUM or SCENARIO_UNPARSEABLE. A runtime
567
+ * version may add rules.
568
+ *
569
+ * @generated from field: string rule = 4;
570
+ */
571
+ rule: string;
572
+ /**
573
+ * What is wrong.
574
+ *
575
+ * @generated from field: string message = 5;
576
+ */
577
+ message: string;
578
+ /**
579
+ * What to change to fix it.
580
+ *
581
+ * @generated from field: string hint = 6;
582
+ */
583
+ hint: string;
584
+ };
585
+ /**
586
+ * Describes the message strategies.v1.ValidationIssue.
587
+ * Use `create(ValidationIssueSchema)` to create a new message.
588
+ */
589
+ declare const ValidationIssueSchema: GenMessage<ValidationIssue>;
590
+ /**
591
+ * MoneyCard is what a bot may do with money, in the quote asset of its
592
+ * markets.
593
+ *
594
+ * @generated from message strategies.v1.MoneyCard
595
+ */
596
+ type MoneyCard = Message<"strategies.v1.MoneyCard"> & {
597
+ /**
598
+ * Most the bot may spend in total.
599
+ *
600
+ * @generated from field: strategies.v1.Money budget = 1;
601
+ */
602
+ budget?: Money | undefined;
603
+ /**
604
+ * Largest single order.
605
+ *
606
+ * @generated from field: strategies.v1.Money max_order = 2;
607
+ */
608
+ maxOrder?: Money | undefined;
609
+ /**
610
+ * Most good-till-cancelled orders the bot may have open at once.
611
+ *
612
+ * @generated from field: uint32 max_open_gtc_orders = 3;
613
+ */
614
+ maxOpenGtcOrders: number;
615
+ /**
616
+ * Loss within one UTC day at which the bot pauses.
617
+ *
618
+ * @generated from field: strategies.v1.Money daily_loss_threshold = 4;
619
+ */
620
+ dailyLossThreshold?: Money | undefined;
621
+ /**
622
+ * Markets the bot trades, for example BTC/USDT.
623
+ *
624
+ * @generated from field: repeated string markets = 5;
625
+ */
626
+ markets: string[];
627
+ /**
628
+ * Events the bot handles, as the manifest declares them, for example
629
+ * "schedule mon 09:00 UTC" or "candles BTC/USDT 1h".
630
+ *
631
+ * @generated from field: repeated string events = 6;
632
+ */
633
+ events: string[];
634
+ };
635
+ /**
636
+ * Describes the message strategies.v1.MoneyCard.
637
+ * Use `create(MoneyCardSchema)` to create a new message.
638
+ */
639
+ declare const MoneyCardSchema: GenMessage<MoneyCard>;
640
+ /**
641
+ * SettingField is one setting a user may change without editing code.
642
+ *
643
+ * @generated from message strategies.v1.SettingField
644
+ */
645
+ type SettingField = Message<"strategies.v1.SettingField"> & {
646
+ /**
647
+ * Setting name, as bot code reads it.
648
+ *
649
+ * @generated from field: string name = 1;
650
+ */
651
+ name: string;
652
+ /**
653
+ * What the setting controls.
654
+ *
655
+ * @generated from field: string description = 2;
656
+ */
657
+ description: string;
658
+ /**
659
+ * Kind of value, as the manifest declares it, for example quote for an
660
+ * amount of the quote asset.
661
+ *
662
+ * @generated from field: string kind = 3;
663
+ */
664
+ kind: string;
665
+ /**
666
+ * Asset of an amount setting. Empty for other kinds.
667
+ *
668
+ * @generated from field: string asset = 4;
669
+ */
670
+ asset: string;
671
+ /**
672
+ * Value used when none is given.
673
+ *
674
+ * @generated from field: string default_value = 5;
675
+ */
676
+ defaultValue: string;
677
+ /**
678
+ * Smallest allowed value. Empty when unbounded.
679
+ *
680
+ * @generated from field: string minimum = 6;
681
+ */
682
+ minimum: string;
683
+ /**
684
+ * Largest allowed value. Empty when unbounded.
685
+ *
686
+ * @generated from field: string maximum = 7;
687
+ */
688
+ maximum: string;
689
+ };
690
+ /**
691
+ * Describes the message strategies.v1.SettingField.
692
+ * Use `create(SettingFieldSchema)` to create a new message.
693
+ */
694
+ declare const SettingFieldSchema: GenMessage<SettingField>;
695
+ /**
696
+ * ValidateStrategyRequest checks a bot and stores it as a version.
697
+ *
698
+ * @generated from message strategies.v1.ValidateStrategyRequest
699
+ */
700
+ type ValidateStrategyRequest = Message<"strategies.v1.ValidateStrategyRequest"> & {
701
+ /**
702
+ * Name of the strategy.
703
+ *
704
+ * @generated from field: string name = 1;
705
+ */
706
+ name: string;
707
+ /**
708
+ * The manifest: settings, events, limits and behaviour examples, as a JSON
709
+ * object whose shape GetStrategyReference's manifest_schema gives. Write
710
+ * amounts as decimal strings.
711
+ *
712
+ * @generated from field: google.protobuf.Struct manifest = 2;
713
+ */
714
+ manifest?: JsonObject | undefined;
715
+ /**
716
+ * The bot code: at most 65536 bytes (64 KiB) of UTF-8.
717
+ *
718
+ * @generated from field: string code = 3;
719
+ */
720
+ code: string;
721
+ /**
722
+ * Runtime version to validate against. Empty means the current one.
723
+ *
724
+ * @generated from field: string runtime_version = 4;
725
+ */
726
+ runtimeVersion: string;
727
+ };
728
+ /**
729
+ * Describes the message strategies.v1.ValidateStrategyRequest.
730
+ * Use `create(ValidateStrategyRequestSchema)` to create a new message.
731
+ */
732
+ declare const ValidateStrategyRequestSchema: GenMessage<ValidateStrategyRequest>;
733
+ /**
734
+ * ValidateStrategyResponse is the outcome of validating a bot.
735
+ *
736
+ * @generated from message strategies.v1.ValidateStrategyResponse
737
+ */
738
+ type ValidateStrategyResponse = Message<"strategies.v1.ValidateStrategyResponse"> & {
739
+ /**
740
+ * ID of the stored version, derived from the runtime version, manifest and
741
+ * code: the same content always gets the same ID.
742
+ *
743
+ * @generated from field: string version_id = 1;
744
+ */
745
+ versionId: string;
746
+ /**
747
+ * The runtime version validated against.
748
+ *
749
+ * @generated from field: string runtime_version = 2;
750
+ */
751
+ runtimeVersion: string;
752
+ /**
753
+ * True when the bot has no errors.
754
+ *
755
+ * @generated from field: bool valid = 3;
756
+ */
757
+ valid: boolean;
758
+ /**
759
+ * Errors, in code and manifest order: at most 50. Further errors may show
760
+ * once these are fixed.
761
+ *
762
+ * @generated from field: repeated strategies.v1.ValidationIssue errors = 4;
763
+ */
764
+ errors: ValidationIssue[];
765
+ /**
766
+ * Warnings, in the same order and shape: at most 50.
767
+ *
768
+ * @generated from field: repeated strategies.v1.ValidationIssue warnings = 5;
769
+ */
770
+ warnings: ValidationIssue[];
771
+ /**
772
+ * What the bot may do with money. Set only when valid.
773
+ *
774
+ * @generated from field: strategies.v1.MoneyCard money_card = 6;
775
+ */
776
+ moneyCard?: MoneyCard | undefined;
777
+ /**
778
+ * The settings a user may change. Set only when valid.
779
+ *
780
+ * @generated from field: repeated strategies.v1.SettingField settings_form = 7;
781
+ */
782
+ settingsForm: SettingField[];
783
+ };
784
+ /**
785
+ * Describes the message strategies.v1.ValidateStrategyResponse.
786
+ * Use `create(ValidateStrategyResponseSchema)` to create a new message.
787
+ */
788
+ declare const ValidateStrategyResponseSchema: GenMessage<ValidateStrategyResponse>;
789
+ /**
790
+ * RunScenariosRequest runs a version's behaviour examples.
791
+ *
792
+ * @generated from message strategies.v1.RunScenariosRequest
793
+ */
794
+ type RunScenariosRequest = Message<"strategies.v1.RunScenariosRequest"> & {
795
+ /**
796
+ * Version to run.
797
+ *
798
+ * @generated from field: string version_id = 1;
799
+ */
800
+ versionId: string;
801
+ };
802
+ /**
803
+ * Describes the message strategies.v1.RunScenariosRequest.
804
+ * Use `create(RunScenariosRequestSchema)` to create a new message.
805
+ */
806
+ declare const RunScenariosRequestSchema: GenMessage<RunScenariosRequest>;
807
+ /**
808
+ * ScenarioResult is the outcome of one behaviour example.
809
+ *
810
+ * @generated from message strategies.v1.ScenarioResult
811
+ */
812
+ type ScenarioResult = Message<"strategies.v1.ScenarioResult"> & {
813
+ /**
814
+ * The example's name, from the manifest.
815
+ *
816
+ * @generated from field: string name = 1;
817
+ */
818
+ name: string;
819
+ /**
820
+ * True when the code made exactly the expected orders.
821
+ *
822
+ * @generated from field: bool passed = 2;
823
+ */
824
+ passed: boolean;
825
+ /**
826
+ * The orders the example expects, as the manifest writes them.
827
+ *
828
+ * @generated from field: repeated google.protobuf.Struct expected = 3;
829
+ */
830
+ expected: JsonObject[];
831
+ /**
832
+ * The orders the code made, in the same shape.
833
+ *
834
+ * @generated from field: repeated google.protobuf.Struct actual = 4;
835
+ */
836
+ actual: JsonObject[];
837
+ /**
838
+ * The code's log lines, oldest first: at most 50.
839
+ *
840
+ * @generated from field: repeated string logs = 5;
841
+ */
842
+ logs: string[];
843
+ /**
844
+ * The handler's error, when it failed. Empty otherwise.
845
+ *
846
+ * @generated from field: string error = 6;
847
+ */
848
+ error: string;
849
+ };
850
+ /**
851
+ * Describes the message strategies.v1.ScenarioResult.
852
+ * Use `create(ScenarioResultSchema)` to create a new message.
853
+ */
854
+ declare const ScenarioResultSchema: GenMessage<ScenarioResult>;
855
+ /**
856
+ * RunScenariosResponse is the outcome of every behaviour example of a
857
+ * version.
858
+ *
859
+ * @generated from message strategies.v1.RunScenariosResponse
860
+ */
861
+ type RunScenariosResponse = Message<"strategies.v1.RunScenariosResponse"> & {
862
+ /**
863
+ * The version run.
864
+ *
865
+ * @generated from field: string version_id = 1;
866
+ */
867
+ versionId: string;
868
+ /**
869
+ * Examples that passed.
870
+ *
871
+ * @generated from field: uint32 passed = 2;
872
+ */
873
+ passed: number;
874
+ /**
875
+ * Examples that failed.
876
+ *
877
+ * @generated from field: uint32 failed = 3;
878
+ */
879
+ failed: number;
880
+ /**
881
+ * One result per example, in manifest order.
882
+ *
883
+ * @generated from field: repeated strategies.v1.ScenarioResult results = 4;
884
+ */
885
+ results: ScenarioResult[];
886
+ };
887
+ /**
888
+ * Describes the message strategies.v1.RunScenariosResponse.
889
+ * Use `create(RunScenariosResponseSchema)` to create a new message.
890
+ */
891
+ declare const RunScenariosResponseSchema: GenMessage<RunScenariosResponse>;
892
+ /**
893
+ * BacktestMetrics are the results of a bot over one period.
894
+ *
895
+ * @generated from message strategies.v1.BacktestMetrics
896
+ */
897
+ type BacktestMetrics = Message<"strategies.v1.BacktestMetrics"> & {
898
+ /**
899
+ * Return over the period, in percent, for example "4.2" or "-1.5".
900
+ *
901
+ * @generated from field: string return_percent = 1;
902
+ */
903
+ returnPercent: string;
904
+ /**
905
+ * Largest fall from a peak, in percent.
906
+ *
907
+ * @generated from field: string max_drawdown_percent = 2;
908
+ */
909
+ maxDrawdownPercent: string;
910
+ /**
911
+ * Trades made.
912
+ *
913
+ * @generated from field: uint32 trades = 3;
914
+ */
915
+ trades: number;
916
+ /**
917
+ * Share of closed trades that made a profit, in percent.
918
+ *
919
+ * @generated from field: string win_rate_percent = 4;
920
+ */
921
+ winRatePercent: string;
922
+ /**
923
+ * Fees paid, in the quote asset.
924
+ *
925
+ * @generated from field: strategies.v1.Money fees = 5;
926
+ */
927
+ fees?: Money | undefined;
928
+ /**
929
+ * Share of the period the bot held a position, in percent.
930
+ *
931
+ * @generated from field: string exposure_percent = 6;
932
+ */
933
+ exposurePercent: string;
934
+ };
935
+ /**
936
+ * Describes the message strategies.v1.BacktestMetrics.
937
+ * Use `create(BacktestMetricsSchema)` to create a new message.
938
+ */
939
+ declare const BacktestMetricsSchema: GenMessage<BacktestMetrics>;
940
+ /**
941
+ * Baseline is a simple strategy a backtest is compared with.
942
+ *
943
+ * @generated from message strategies.v1.Baseline
944
+ */
945
+ type Baseline = Message<"strategies.v1.Baseline"> & {
946
+ /**
947
+ * Baseline name: buy_and_hold or cash.
948
+ *
949
+ * @generated from field: string name = 1;
950
+ */
951
+ name: string;
952
+ /**
953
+ * Its results over the same period.
954
+ *
955
+ * @generated from field: strategies.v1.BacktestMetrics metrics = 2;
956
+ */
957
+ metrics?: BacktestMetrics | undefined;
958
+ };
959
+ /**
960
+ * Describes the message strategies.v1.Baseline.
961
+ * Use `create(BaselineSchema)` to create a new message.
962
+ */
963
+ declare const BaselineSchema: GenMessage<Baseline>;
964
+ /**
965
+ * BacktestTrade is one trade a backtest made.
966
+ *
967
+ * @generated from message strategies.v1.BacktestTrade
968
+ */
969
+ type BacktestTrade = Message<"strategies.v1.BacktestTrade"> & {
970
+ /**
971
+ * When the trade happened, in simulated time.
972
+ *
973
+ * @generated from field: google.protobuf.Timestamp time = 1;
974
+ */
975
+ time?: Timestamp | undefined;
976
+ /**
977
+ * Market, for example BTC/USDT.
978
+ *
979
+ * @generated from field: string market = 2;
980
+ */
981
+ market: string;
982
+ /**
983
+ * Side.
984
+ *
985
+ * @generated from field: strategies.v1.OrderSide side = 3;
986
+ */
987
+ side: OrderSide;
988
+ /**
989
+ * Price, as an exact decimal in the quote asset.
990
+ *
991
+ * @generated from field: string price = 4;
992
+ */
993
+ price: string;
994
+ /**
995
+ * Quantity, as an exact decimal in the base asset.
996
+ *
997
+ * @generated from field: string quantity = 5;
998
+ */
999
+ quantity: string;
1000
+ /**
1001
+ * Fee paid.
1002
+ *
1003
+ * @generated from field: strategies.v1.Money fee = 6;
1004
+ */
1005
+ fee?: Money | undefined;
1006
+ /**
1007
+ * The reason the bot gave for the order.
1008
+ *
1009
+ * @generated from field: string reason = 7;
1010
+ */
1011
+ reason: string;
1012
+ };
1013
+ /**
1014
+ * Describes the message strategies.v1.BacktestTrade.
1015
+ * Use `create(BacktestTradeSchema)` to create a new message.
1016
+ */
1017
+ declare const BacktestTradeSchema: GenMessage<BacktestTrade>;
1018
+ /**
1019
+ * DataGap is a span with missing market data.
1020
+ *
1021
+ * @generated from message strategies.v1.DataGap
1022
+ */
1023
+ type DataGap = Message<"strategies.v1.DataGap"> & {
1024
+ /**
1025
+ * Market, for example BTC/USDT.
1026
+ *
1027
+ * @generated from field: string market = 1;
1028
+ */
1029
+ market: string;
1030
+ /**
1031
+ * Candle timeframe, for example 1h.
1032
+ *
1033
+ * @generated from field: string timeframe = 2;
1034
+ */
1035
+ timeframe: string;
1036
+ /**
1037
+ * The span without data.
1038
+ *
1039
+ * @generated from field: strategies.v1.TimeWindow window = 3;
1040
+ */
1041
+ window?: TimeWindow | undefined;
1042
+ };
1043
+ /**
1044
+ * Describes the message strategies.v1.DataGap.
1045
+ * Use `create(DataGapSchema)` to create a new message.
1046
+ */
1047
+ declare const DataGapSchema: GenMessage<DataGap>;
1048
+ /**
1049
+ * BacktestReport is the result of a finished backtest.
1050
+ *
1051
+ * @generated from message strategies.v1.BacktestReport
1052
+ */
1053
+ type BacktestReport = Message<"strategies.v1.BacktestReport"> & {
1054
+ /**
1055
+ * How closely the simulation follows live trading, as a short label.
1056
+ *
1057
+ * @generated from field: string fidelity = 1;
1058
+ */
1059
+ fidelity: string;
1060
+ /**
1061
+ * How much the result can be trusted, as a short grade.
1062
+ *
1063
+ * @generated from field: string evidence_grade = 2;
1064
+ */
1065
+ evidenceGrade: string;
1066
+ /**
1067
+ * The period the bot was tuned on.
1068
+ *
1069
+ * @generated from field: strategies.v1.TimeWindow period = 3;
1070
+ */
1071
+ period?: TimeWindow | undefined;
1072
+ /**
1073
+ * The most recent months, held back from tuning.
1074
+ *
1075
+ * @generated from field: strategies.v1.TimeWindow held_back_period = 4;
1076
+ */
1077
+ heldBackPeriod?: TimeWindow | undefined;
1078
+ /**
1079
+ * Results over period.
1080
+ *
1081
+ * @generated from field: strategies.v1.BacktestMetrics metrics = 5;
1082
+ */
1083
+ metrics?: BacktestMetrics | undefined;
1084
+ /**
1085
+ * Results over held_back_period.
1086
+ *
1087
+ * @generated from field: strategies.v1.BacktestMetrics held_back_metrics = 6;
1088
+ */
1089
+ heldBackMetrics?: BacktestMetrics | undefined;
1090
+ /**
1091
+ * The baselines over period: buy-and-hold and cash.
1092
+ *
1093
+ * @generated from field: repeated strategies.v1.Baseline baselines = 7;
1094
+ */
1095
+ baselines: Baseline[];
1096
+ /**
1097
+ * Backtests run so far for this bot's family of versions. Many attempts
1098
+ * make a good result more likely to be luck.
1099
+ *
1100
+ * @generated from field: uint32 attempts = 8;
1101
+ */
1102
+ attempts: number;
1103
+ /**
1104
+ * The first trades, oldest first: at most 20. report_url lists all of them.
1105
+ *
1106
+ * @generated from field: repeated strategies.v1.BacktestTrade trades = 9;
1107
+ */
1108
+ trades: BacktestTrade[];
1109
+ /**
1110
+ * Spans without market data, oldest first.
1111
+ *
1112
+ * @generated from field: repeated strategies.v1.DataGap data_gaps = 10;
1113
+ */
1114
+ dataGaps: DataGap[];
1115
+ /**
1116
+ * What to keep in mind when reading the result.
1117
+ *
1118
+ * @generated from field: repeated string warnings = 11;
1119
+ */
1120
+ warnings: string[];
1121
+ /**
1122
+ * The full report on the website.
1123
+ *
1124
+ * @generated from field: string report_url = 12;
1125
+ */
1126
+ reportUrl: string;
1127
+ };
1128
+ /**
1129
+ * Describes the message strategies.v1.BacktestReport.
1130
+ * Use `create(BacktestReportSchema)` to create a new message.
1131
+ */
1132
+ declare const BacktestReportSchema: GenMessage<BacktestReport>;
1133
+ /**
1134
+ * Backtest is one backtest of a version.
1135
+ *
1136
+ * @generated from message strategies.v1.Backtest
1137
+ */
1138
+ type Backtest = Message<"strategies.v1.Backtest"> & {
1139
+ /**
1140
+ * Public backtest ID.
1141
+ *
1142
+ * @generated from field: fixed64 backtest_id = 1;
1143
+ */
1144
+ backtestId: bigint;
1145
+ /**
1146
+ * The version backtested.
1147
+ *
1148
+ * @generated from field: string version_id = 2;
1149
+ */
1150
+ versionId: string;
1151
+ /**
1152
+ * Current status.
1153
+ *
1154
+ * @generated from field: strategies.v1.Backtest.Status status = 3;
1155
+ */
1156
+ status: Backtest_Status;
1157
+ /**
1158
+ * The simulated window.
1159
+ *
1160
+ * @generated from field: strategies.v1.TimeWindow window = 4;
1161
+ */
1162
+ window?: TimeWindow | undefined;
1163
+ /**
1164
+ * When the backtest was started.
1165
+ *
1166
+ * @generated from field: google.protobuf.Timestamp created_at = 5;
1167
+ */
1168
+ createdAt?: Timestamp | undefined;
1169
+ /**
1170
+ * When it finished or failed. Omitted before.
1171
+ *
1172
+ * @generated from field: google.protobuf.Timestamp finished_at = 6;
1173
+ */
1174
+ finishedAt?: Timestamp | undefined;
1175
+ /**
1176
+ * The result. Set only when status is DONE.
1177
+ *
1178
+ * @generated from field: strategies.v1.BacktestReport report = 7;
1179
+ */
1180
+ report?: BacktestReport | undefined;
1181
+ /**
1182
+ * Why it failed. Empty unless status is FAILED.
1183
+ *
1184
+ * @generated from field: string failure = 8;
1185
+ */
1186
+ failure: string;
1187
+ };
1188
+ /**
1189
+ * Describes the message strategies.v1.Backtest.
1190
+ * Use `create(BacktestSchema)` to create a new message.
1191
+ */
1192
+ declare const BacktestSchema: GenMessage<Backtest>;
1193
+ /**
1194
+ * Status is where a backtest is.
1195
+ *
1196
+ * @generated from enum strategies.v1.Backtest.Status
1197
+ */
1198
+ declare enum Backtest_Status {
1199
+ /**
1200
+ * Not set. Never returned.
1201
+ *
1202
+ * @generated from enum value: STATUS_UNSPECIFIED = 0;
1203
+ */
1204
+ STATUS_UNSPECIFIED = 0,
1205
+ /**
1206
+ * Waiting for capacity.
1207
+ *
1208
+ * @generated from enum value: QUEUED = 1;
1209
+ */
1210
+ QUEUED = 1,
1211
+ /**
1212
+ * Simulating.
1213
+ *
1214
+ * @generated from enum value: RUNNING = 2;
1215
+ */
1216
+ RUNNING = 2,
1217
+ /**
1218
+ * Finished: report is set.
1219
+ *
1220
+ * @generated from enum value: DONE = 3;
1221
+ */
1222
+ DONE = 3,
1223
+ /**
1224
+ * Failed: failure says why.
1225
+ *
1226
+ * @generated from enum value: FAILED = 4;
1227
+ */
1228
+ FAILED = 4
1229
+ }
1230
+ /**
1231
+ * Describes the enum strategies.v1.Backtest.Status.
1232
+ */
1233
+ declare const Backtest_StatusSchema: GenEnum<Backtest_Status>;
1234
+ /**
1235
+ * StartBacktestRequest starts a backtest of a version.
1236
+ *
1237
+ * A retry is bound by idempotency_key: the same key and request return the
1238
+ * backtest the first request started, even when an unset window bound would
1239
+ * now resolve differently, and never count again against the backtest quota
1240
+ * or the attempts.
1241
+ *
1242
+ * Across keys, a backtest's identity is its version, effective window,
1243
+ * effective settings and effective initial balances. A request whose
1244
+ * identity matches an earlier backtest of the caller returns that backtest
1245
+ * rather than running again, so a request that spells out a default refers to
1246
+ * the same run, while a request that changes any of them starts a new one:
1247
+ * - effective window: start_time and end_time, an unset bound replaced by
1248
+ * the bound of the longest window with data when the request arrives;
1249
+ * - effective settings: every setting of the version's settings form, by
1250
+ * name, with its default value where the request leaves it out;
1251
+ * - effective initial balances: initial_balances, or when it is empty, the
1252
+ * effective budget setting in the quote asset; one per asset, sorted by
1253
+ * asset;
1254
+ * - every decimal in its canonical form, without leading zeros or trailing
1255
+ * fractional zeros, so "50", "50.0" and "050" are the same amount.
1256
+ *
1257
+ * @generated from message strategies.v1.StartBacktestRequest
1258
+ */
1259
+ type StartBacktestRequest = Message<"strategies.v1.StartBacktestRequest"> & {
1260
+ /**
1261
+ * Version to backtest.
1262
+ *
1263
+ * @generated from field: string version_id = 1;
1264
+ */
1265
+ versionId: string;
1266
+ /**
1267
+ * Start of the window, inclusive. Unset means the start of the longest
1268
+ * window with data for the bot's markets and timeframes.
1269
+ *
1270
+ * @generated from field: google.protobuf.Timestamp start_time = 2;
1271
+ */
1272
+ startTime?: Timestamp | undefined;
1273
+ /**
1274
+ * End of the window, exclusive. Unset means the end of that longest
1275
+ * window.
1276
+ *
1277
+ * @generated from field: google.protobuf.Timestamp end_time = 3;
1278
+ */
1279
+ endTime?: Timestamp | undefined;
1280
+ /**
1281
+ * Values for the version's settings form, at most 64, each setting once.
1282
+ * Settings left out take their default value.
1283
+ *
1284
+ * @generated from field: repeated strategies.v1.SettingValue settings = 4;
1285
+ */
1286
+ settings: SettingValue[];
1287
+ /**
1288
+ * Starting balances of the simulated account, one per asset. Empty means
1289
+ * the budget setting in the quote asset. Part of the backtest's identity:
1290
+ * the same run with other balances is another backtest.
1291
+ *
1292
+ * @generated from field: repeated strategies.v1.Money initial_balances = 5;
1293
+ */
1294
+ initialBalances: Money[];
1295
+ /**
1296
+ * Client-chosen key, unique per caller, that makes the call idempotent: the
1297
+ * same key and request return the backtest the first call started; another
1298
+ * request with the same key is IDEMPOTENCY_CONFLICT.
1299
+ *
1300
+ * @generated from field: string idempotency_key = 6;
1301
+ */
1302
+ idempotencyKey: string;
1303
+ };
1304
+ /**
1305
+ * Describes the message strategies.v1.StartBacktestRequest.
1306
+ * Use `create(StartBacktestRequestSchema)` to create a new message.
1307
+ */
1308
+ declare const StartBacktestRequestSchema: GenMessage<StartBacktestRequest>;
1309
+ /**
1310
+ * StartBacktestResponse is the started backtest.
1311
+ *
1312
+ * @generated from message strategies.v1.StartBacktestResponse
1313
+ */
1314
+ type StartBacktestResponse = Message<"strategies.v1.StartBacktestResponse"> & {
1315
+ /**
1316
+ * Public backtest ID. A retry with the same idempotency_key and request
1317
+ * returns the same ID; across keys, so does a request with the same
1318
+ * version, effective window, effective settings and effective initial
1319
+ * balances (see StartBacktestRequest).
1320
+ *
1321
+ * @generated from field: fixed64 backtest_id = 1;
1322
+ */
1323
+ backtestId: bigint;
1324
+ /**
1325
+ * Status: QUEUED for a new backtest, or the current status of the same
1326
+ * backtest started before.
1327
+ *
1328
+ * @generated from field: strategies.v1.Backtest.Status status = 2;
1329
+ */
1330
+ status: Backtest_Status;
1331
+ /**
1332
+ * Estimated seconds until it finishes.
1333
+ *
1334
+ * @generated from field: uint32 estimated_seconds = 3;
1335
+ */
1336
+ estimatedSeconds: number;
1337
+ };
1338
+ /**
1339
+ * Describes the message strategies.v1.StartBacktestResponse.
1340
+ * Use `create(StartBacktestResponseSchema)` to create a new message.
1341
+ */
1342
+ declare const StartBacktestResponseSchema: GenMessage<StartBacktestResponse>;
1343
+ /**
1344
+ * GetBacktestRequest reads one backtest of the caller.
1345
+ *
1346
+ * @generated from message strategies.v1.GetBacktestRequest
1347
+ */
1348
+ type GetBacktestRequest = Message<"strategies.v1.GetBacktestRequest"> & {
1349
+ /**
1350
+ * Public backtest ID.
1351
+ *
1352
+ * @generated from field: fixed64 backtest_id = 1;
1353
+ */
1354
+ backtestId: bigint;
1355
+ };
1356
+ /**
1357
+ * Describes the message strategies.v1.GetBacktestRequest.
1358
+ * Use `create(GetBacktestRequestSchema)` to create a new message.
1359
+ */
1360
+ declare const GetBacktestRequestSchema: GenMessage<GetBacktestRequest>;
1361
+ /**
1362
+ * GetBacktestResponse returns the backtest.
1363
+ *
1364
+ * @generated from message strategies.v1.GetBacktestResponse
1365
+ */
1366
+ type GetBacktestResponse = Message<"strategies.v1.GetBacktestResponse"> & {
1367
+ /**
1368
+ * The backtest.
1369
+ *
1370
+ * @generated from field: strategies.v1.Backtest backtest = 1;
1371
+ */
1372
+ backtest?: Backtest | undefined;
1373
+ };
1374
+ /**
1375
+ * Describes the message strategies.v1.GetBacktestResponse.
1376
+ * Use `create(GetBacktestResponseSchema)` to create a new message.
1377
+ */
1378
+ declare const GetBacktestResponseSchema: GenMessage<GetBacktestResponse>;
1379
+ /**
1380
+ * ScenarioSummary is one behaviour example of a version and its last result.
1381
+ *
1382
+ * @generated from message strategies.v1.ScenarioSummary
1383
+ */
1384
+ type ScenarioSummary = Message<"strategies.v1.ScenarioSummary"> & {
1385
+ /**
1386
+ * The example's name, from the manifest.
1387
+ *
1388
+ * @generated from field: string name = 1;
1389
+ */
1390
+ name: string;
1391
+ /**
1392
+ * Its last result.
1393
+ *
1394
+ * @generated from field: strategies.v1.ScenarioSummary.Outcome outcome = 2;
1395
+ */
1396
+ outcome: ScenarioSummary_Outcome;
1397
+ };
1398
+ /**
1399
+ * Describes the message strategies.v1.ScenarioSummary.
1400
+ * Use `create(ScenarioSummarySchema)` to create a new message.
1401
+ */
1402
+ declare const ScenarioSummarySchema: GenMessage<ScenarioSummary>;
1403
+ /**
1404
+ * Outcome is a behaviour example's last result.
1405
+ *
1406
+ * @generated from enum strategies.v1.ScenarioSummary.Outcome
1407
+ */
1408
+ declare enum ScenarioSummary_Outcome {
1409
+ /**
1410
+ * Not set. Never returned.
1411
+ *
1412
+ * @generated from enum value: OUTCOME_UNSPECIFIED = 0;
1413
+ */
1414
+ OUTCOME_UNSPECIFIED = 0,
1415
+ /**
1416
+ * The examples were never run.
1417
+ *
1418
+ * @generated from enum value: NOT_RUN = 1;
1419
+ */
1420
+ NOT_RUN = 1,
1421
+ /**
1422
+ * The code made exactly the expected orders.
1423
+ *
1424
+ * @generated from enum value: PASSED = 2;
1425
+ */
1426
+ PASSED = 2,
1427
+ /**
1428
+ * The code made other orders, or failed.
1429
+ *
1430
+ * @generated from enum value: FAILED = 3;
1431
+ */
1432
+ FAILED = 3
1433
+ }
1434
+ /**
1435
+ * Describes the enum strategies.v1.ScenarioSummary.Outcome.
1436
+ */
1437
+ declare const ScenarioSummary_OutcomeSchema: GenEnum<ScenarioSummary_Outcome>;
1438
+ /**
1439
+ * BacktestSummary is the headline of a version's latest backtest.
1440
+ *
1441
+ * @generated from message strategies.v1.BacktestSummary
1442
+ */
1443
+ type BacktestSummary = Message<"strategies.v1.BacktestSummary"> & {
1444
+ /**
1445
+ * Public backtest ID.
1446
+ *
1447
+ * @generated from field: fixed64 backtest_id = 1;
1448
+ */
1449
+ backtestId: bigint;
1450
+ /**
1451
+ * Its status.
1452
+ *
1453
+ * @generated from field: strategies.v1.Backtest.Status status = 2;
1454
+ */
1455
+ status: Backtest_Status;
1456
+ /**
1457
+ * Results over the tuning period. Set only when status is DONE.
1458
+ *
1459
+ * @generated from field: strategies.v1.BacktestMetrics metrics = 3;
1460
+ */
1461
+ metrics?: BacktestMetrics | undefined;
1462
+ /**
1463
+ * Results over the held-back period. Set only when status is DONE.
1464
+ *
1465
+ * @generated from field: strategies.v1.BacktestMetrics held_back_metrics = 4;
1466
+ */
1467
+ heldBackMetrics?: BacktestMetrics | undefined;
1468
+ /**
1469
+ * Backtests run so far for this bot's family of versions.
1470
+ *
1471
+ * @generated from field: uint32 attempts = 5;
1472
+ */
1473
+ attempts: number;
1474
+ /**
1475
+ * The full report on the website. Set only when status is DONE.
1476
+ *
1477
+ * @generated from field: string report_url = 6;
1478
+ */
1479
+ reportUrl: string;
1480
+ };
1481
+ /**
1482
+ * Describes the message strategies.v1.BacktestSummary.
1483
+ * Use `create(BacktestSummarySchema)` to create a new message.
1484
+ */
1485
+ declare const BacktestSummarySchema: GenMessage<BacktestSummary>;
1486
+ /**
1487
+ * ExplainStrategyRequest asks for the review summary of a version.
1488
+ *
1489
+ * @generated from message strategies.v1.ExplainStrategyRequest
1490
+ */
1491
+ type ExplainStrategyRequest = Message<"strategies.v1.ExplainStrategyRequest"> & {
1492
+ /**
1493
+ * Version to explain.
1494
+ *
1495
+ * @generated from field: string version_id = 1;
1496
+ */
1497
+ versionId: string;
1498
+ };
1499
+ /**
1500
+ * Describes the message strategies.v1.ExplainStrategyRequest.
1501
+ * Use `create(ExplainStrategyRequestSchema)` to create a new message.
1502
+ */
1503
+ declare const ExplainStrategyRequestSchema: GenMessage<ExplainStrategyRequest>;
1504
+ /**
1505
+ * ExplainStrategyResponse is what a user reviews before deploying a version.
1506
+ * It is built from the manifest and the recorded results alone, so it states
1507
+ * exactly what the user approves.
1508
+ *
1509
+ * @generated from message strategies.v1.ExplainStrategyResponse
1510
+ */
1511
+ type ExplainStrategyResponse = Message<"strategies.v1.ExplainStrategyResponse"> & {
1512
+ /**
1513
+ * The version explained.
1514
+ *
1515
+ * @generated from field: string version_id = 1;
1516
+ */
1517
+ versionId: string;
1518
+ /**
1519
+ * What the bot may do with money, its markets and its events.
1520
+ *
1521
+ * @generated from field: strategies.v1.MoneyCard money_card = 2;
1522
+ */
1523
+ moneyCard?: MoneyCard | undefined;
1524
+ /**
1525
+ * The settings a user may change.
1526
+ *
1527
+ * @generated from field: repeated strategies.v1.SettingField settings = 3;
1528
+ */
1529
+ settings: SettingField[];
1530
+ /**
1531
+ * Each behaviour example and its last result, in manifest order.
1532
+ *
1533
+ * @generated from field: repeated strategies.v1.ScenarioSummary scenarios = 4;
1534
+ */
1535
+ scenarios: ScenarioSummary[];
1536
+ /**
1537
+ * The latest backtest. Omitted when there is none; backtest_absent_reason
1538
+ * then says why.
1539
+ *
1540
+ * @generated from field: strategies.v1.BacktestSummary backtest = 5;
1541
+ */
1542
+ backtest?: BacktestSummary | undefined;
1543
+ /**
1544
+ * Why there is no backtest, for example that the bot cannot be backtested
1545
+ * on candles. Empty when backtest is set.
1546
+ *
1547
+ * @generated from field: string backtest_absent_reason = 6;
1548
+ */
1549
+ backtestAbsentReason: string;
1550
+ /**
1551
+ * What to weigh before deploying, for example "never backtested" or "trades
1552
+ * a thin market".
1553
+ *
1554
+ * @generated from field: repeated string warnings = 7;
1555
+ */
1556
+ warnings: string[];
1557
+ /**
1558
+ * What the bot does not do, for example "stopping the bot does not sell its
1559
+ * holdings".
1560
+ *
1561
+ * @generated from field: repeated string limitations = 8;
1562
+ */
1563
+ limitations: string[];
1564
+ };
1565
+ /**
1566
+ * Describes the message strategies.v1.ExplainStrategyResponse.
1567
+ * Use `create(ExplainStrategyResponseSchema)` to create a new message.
1568
+ */
1569
+ declare const ExplainStrategyResponseSchema: GenMessage<ExplainStrategyResponse>;
1570
+ /**
1571
+ * SettingValue is one setting and its value.
1572
+ *
1573
+ * @generated from message strategies.v1.SettingValue
1574
+ */
1575
+ type SettingValue = Message<"strategies.v1.SettingValue"> & {
1576
+ /**
1577
+ * Setting name, from the settings form.
1578
+ *
1579
+ * @generated from field: string name = 1;
1580
+ */
1581
+ name: string;
1582
+ /**
1583
+ * Its value, as a string: an amount or number as an exact decimal.
1584
+ *
1585
+ * @generated from field: string value = 2;
1586
+ */
1587
+ value: string;
1588
+ };
1589
+ /**
1590
+ * Describes the message strategies.v1.SettingValue.
1591
+ * Use `create(SettingValueSchema)` to create a new message.
1592
+ */
1593
+ declare const SettingValueSchema: GenMessage<SettingValue>;
1594
+ /**
1595
+ * DeployProposalSummary is what a deploy proposal binds, for showing beside
1596
+ * its link.
1597
+ *
1598
+ * @generated from message strategies.v1.DeployProposalSummary
1599
+ */
1600
+ type DeployProposalSummary = Message<"strategies.v1.DeployProposalSummary"> & {
1601
+ /**
1602
+ * The version proposed.
1603
+ *
1604
+ * @generated from field: string version_id = 1;
1605
+ */
1606
+ versionId: string;
1607
+ /**
1608
+ * The bot's name.
1609
+ *
1610
+ * @generated from field: string bot_name = 2;
1611
+ */
1612
+ botName: string;
1613
+ /**
1614
+ * What the bot may do with money.
1615
+ *
1616
+ * @generated from field: strategies.v1.MoneyCard money_card = 3;
1617
+ */
1618
+ moneyCard?: MoneyCard | undefined;
1619
+ /**
1620
+ * Every setting, with its value, in settings-form order.
1621
+ *
1622
+ * @generated from field: repeated strategies.v1.SettingValue settings = 4;
1623
+ */
1624
+ settings: SettingValue[];
1625
+ /**
1626
+ * The subaccount the funding comes from. Zero means the main account.
1627
+ *
1628
+ * @generated from field: fixed64 funding_subaccount_id = 8;
1629
+ */
1630
+ fundingSubaccountId: bigint;
1631
+ /**
1632
+ * What moves into the bot's new subaccount from the funding account.
1633
+ *
1634
+ * @generated from field: repeated strategies.v1.Money funding = 5;
1635
+ */
1636
+ funding: Money[];
1637
+ /**
1638
+ * Behaviour examples that passed.
1639
+ *
1640
+ * @generated from field: uint32 scenarios_passed = 6;
1641
+ */
1642
+ scenariosPassed: number;
1643
+ /**
1644
+ * The version's latest backtest. Omitted when the bot cannot be
1645
+ * backtested.
1646
+ *
1647
+ * @generated from field: strategies.v1.BacktestSummary backtest = 7;
1648
+ */
1649
+ backtest?: BacktestSummary | undefined;
1650
+ };
1651
+ /**
1652
+ * Describes the message strategies.v1.DeployProposalSummary.
1653
+ * Use `create(DeployProposalSummarySchema)` to create a new message.
1654
+ */
1655
+ declare const DeployProposalSummarySchema: GenMessage<DeployProposalSummary>;
1656
+ /**
1657
+ * ProposeDeployRequest records a deploy proposal. It never deploys.
1658
+ *
1659
+ * @generated from message strategies.v1.ProposeDeployRequest
1660
+ */
1661
+ type ProposeDeployRequest = Message<"strategies.v1.ProposeDeployRequest"> & {
1662
+ /**
1663
+ * Version to deploy.
1664
+ *
1665
+ * @generated from field: string version_id = 1;
1666
+ */
1667
+ versionId: string;
1668
+ /**
1669
+ * Name of the new bot.
1670
+ *
1671
+ * @generated from field: string bot_name = 2;
1672
+ */
1673
+ botName: string;
1674
+ /**
1675
+ * Values for the version's settings form, at most 64, each setting once.
1676
+ * Settings left out take their default value.
1677
+ *
1678
+ * @generated from field: repeated strategies.v1.SettingValue settings = 3;
1679
+ */
1680
+ settings: SettingValue[];
1681
+ /**
1682
+ * Assets and amounts to move from the funding account into the bot's new
1683
+ * subaccount when the user deploys it: one to 16 assets, each once.
1684
+ *
1685
+ * @generated from field: repeated strategies.v1.Money funding = 4;
1686
+ */
1687
+ funding: Money[];
1688
+ /**
1689
+ * Client-chosen key, unique per caller, that makes the call idempotent: the
1690
+ * same key and request return the proposal the first call recorded; another
1691
+ * request with the same key is IDEMPOTENCY_CONFLICT.
1692
+ *
1693
+ * @generated from field: string idempotency_key = 5;
1694
+ */
1695
+ idempotencyKey: string;
1696
+ /**
1697
+ * The subaccount that funds the bot. Zero means the main account. It must
1698
+ * belong to the caller's main account; another subaccount is refused as
1699
+ * not found.
1700
+ *
1701
+ * @generated from field: fixed64 funding_subaccount_id = 6;
1702
+ */
1703
+ fundingSubaccountId: bigint;
1704
+ };
1705
+ /**
1706
+ * Describes the message strategies.v1.ProposeDeployRequest.
1707
+ * Use `create(ProposeDeployRequestSchema)` to create a new message.
1708
+ */
1709
+ declare const ProposeDeployRequestSchema: GenMessage<ProposeDeployRequest>;
1710
+ /**
1711
+ * ProposeDeployResponse is the recorded proposal and where the user deploys
1712
+ * it.
1713
+ *
1714
+ * @generated from message strategies.v1.ProposeDeployResponse
1715
+ */
1716
+ type ProposeDeployResponse = Message<"strategies.v1.ProposeDeployResponse"> & {
1717
+ /**
1718
+ * Public proposal ID.
1719
+ *
1720
+ * @generated from field: fixed64 proposal_id = 1;
1721
+ */
1722
+ proposalId: bigint;
1723
+ /**
1724
+ * The website page where the user reviews the proposal and deploys it.
1725
+ *
1726
+ * @generated from field: string deploy_url = 2;
1727
+ */
1728
+ deployUrl: string;
1729
+ /**
1730
+ * What the proposal binds.
1731
+ *
1732
+ * @generated from field: strategies.v1.DeployProposalSummary summary = 3;
1733
+ */
1734
+ summary?: DeployProposalSummary | undefined;
1735
+ /**
1736
+ * When the proposal expires if the user has not deployed it.
1737
+ *
1738
+ * @generated from field: google.protobuf.Timestamp expires_at = 4;
1739
+ */
1740
+ expiresAt?: Timestamp | undefined;
1741
+ };
1742
+ /**
1743
+ * Describes the message strategies.v1.ProposeDeployResponse.
1744
+ * Use `create(ProposeDeployResponseSchema)` to create a new message.
1745
+ */
1746
+ declare const ProposeDeployResponseSchema: GenMessage<ProposeDeployResponse>;
1747
+ /**
1748
+ * DeployStatus is where a deploy proposal is.
1749
+ *
1750
+ * @generated from message strategies.v1.DeployStatus
1751
+ */
1752
+ type DeployStatus = Message<"strategies.v1.DeployStatus"> & {
1753
+ /**
1754
+ * Public proposal ID.
1755
+ *
1756
+ * @generated from field: fixed64 proposal_id = 1;
1757
+ */
1758
+ proposalId: bigint;
1759
+ /**
1760
+ * Current step.
1761
+ *
1762
+ * @generated from field: strategies.v1.DeployStatus.State state = 2;
1763
+ */
1764
+ state: DeployStatus_State;
1765
+ /**
1766
+ * The current step as the user sees it, for example "Funding the
1767
+ * account…".
1768
+ *
1769
+ * @generated from field: string step = 3;
1770
+ */
1771
+ step: string;
1772
+ /**
1773
+ * Public ID of the bot. Zero until the bot exists.
1774
+ *
1775
+ * @generated from field: fixed64 bot_id = 4;
1776
+ */
1777
+ botId: bigint;
1778
+ /**
1779
+ * Public ID of the bot's subaccount. Zero until it exists.
1780
+ *
1781
+ * @generated from field: fixed64 subaccount_id = 5;
1782
+ */
1783
+ subaccountId: bigint;
1784
+ /**
1785
+ * Why the deploy stopped and what the user can do. Empty unless state is
1786
+ * FAILED.
1787
+ *
1788
+ * @generated from field: string failure = 6;
1789
+ */
1790
+ failure: string;
1791
+ /**
1792
+ * When the proposal expires if not deployed.
1793
+ *
1794
+ * @generated from field: google.protobuf.Timestamp expires_at = 7;
1795
+ */
1796
+ expiresAt?: Timestamp | undefined;
1797
+ /**
1798
+ * When the state last changed.
1799
+ *
1800
+ * @generated from field: google.protobuf.Timestamp updated_at = 8;
1801
+ */
1802
+ updatedAt?: Timestamp | undefined;
1803
+ };
1804
+ /**
1805
+ * Describes the message strategies.v1.DeployStatus.
1806
+ * Use `create(DeployStatusSchema)` to create a new message.
1807
+ */
1808
+ declare const DeployStatusSchema: GenMessage<DeployStatus>;
1809
+ /**
1810
+ * State is a deploy proposal's step.
1811
+ *
1812
+ * @generated from enum strategies.v1.DeployStatus.State
1813
+ */
1814
+ declare enum DeployStatus_State {
1815
+ /**
1816
+ * Not set. Never returned.
1817
+ *
1818
+ * @generated from enum value: STATE_UNSPECIFIED = 0;
1819
+ */
1820
+ STATE_UNSPECIFIED = 0,
1821
+ /**
1822
+ * Recorded; waiting for the user to deploy it.
1823
+ *
1824
+ * @generated from enum value: PROPOSED = 1;
1825
+ */
1826
+ PROPOSED = 1,
1827
+ /**
1828
+ * Checking the version, its behaviour examples and limits again.
1829
+ *
1830
+ * @generated from enum value: VALIDATING = 2;
1831
+ */
1832
+ VALIDATING = 2,
1833
+ /**
1834
+ * Preparing the bot's subaccount.
1835
+ *
1836
+ * @generated from enum value: CREATING_SUBACCOUNT = 3;
1837
+ */
1838
+ CREATING_SUBACCOUNT = 3,
1839
+ /**
1840
+ * Moving the funding into the bot's subaccount.
1841
+ *
1842
+ * @generated from enum value: FUNDING = 4;
1843
+ */
1844
+ FUNDING = 4,
1845
+ /**
1846
+ * Starting the bot.
1847
+ *
1848
+ * @generated from enum value: DEPLOYING = 5;
1849
+ */
1850
+ DEPLOYING = 5,
1851
+ /**
1852
+ * The bot runs: bot_id is set.
1853
+ *
1854
+ * @generated from enum value: LIVE = 6;
1855
+ */
1856
+ LIVE = 6,
1857
+ /**
1858
+ * The deploy stopped: failure says why.
1859
+ *
1860
+ * @generated from enum value: FAILED = 7;
1861
+ */
1862
+ FAILED = 7,
1863
+ /**
1864
+ * The user did not deploy the proposal in time.
1865
+ *
1866
+ * @generated from enum value: EXPIRED = 8;
1867
+ */
1868
+ EXPIRED = 8
1869
+ }
1870
+ /**
1871
+ * Describes the enum strategies.v1.DeployStatus.State.
1872
+ */
1873
+ declare const DeployStatus_StateSchema: GenEnum<DeployStatus_State>;
1874
+ /**
1875
+ * GetDeployStatusRequest reads one deploy proposal of the caller.
1876
+ *
1877
+ * @generated from message strategies.v1.GetDeployStatusRequest
1878
+ */
1879
+ type GetDeployStatusRequest = Message<"strategies.v1.GetDeployStatusRequest"> & {
1880
+ /**
1881
+ * Public proposal ID.
1882
+ *
1883
+ * @generated from field: fixed64 proposal_id = 1;
1884
+ */
1885
+ proposalId: bigint;
1886
+ };
1887
+ /**
1888
+ * Describes the message strategies.v1.GetDeployStatusRequest.
1889
+ * Use `create(GetDeployStatusRequestSchema)` to create a new message.
1890
+ */
1891
+ declare const GetDeployStatusRequestSchema: GenMessage<GetDeployStatusRequest>;
1892
+ /**
1893
+ * GetDeployStatusResponse returns the proposal's status.
1894
+ *
1895
+ * @generated from message strategies.v1.GetDeployStatusResponse
1896
+ */
1897
+ type GetDeployStatusResponse = Message<"strategies.v1.GetDeployStatusResponse"> & {
1898
+ /**
1899
+ * The status.
1900
+ *
1901
+ * @generated from field: strategies.v1.DeployStatus status = 1;
1902
+ */
1903
+ status?: DeployStatus | undefined;
1904
+ };
1905
+ /**
1906
+ * Describes the message strategies.v1.GetDeployStatusResponse.
1907
+ * Use `create(GetDeployStatusResponseSchema)` to create a new message.
1908
+ */
1909
+ declare const GetDeployStatusResponseSchema: GenMessage<GetDeployStatusResponse>;
1910
+ /**
1911
+ * Bot is one bot of the caller.
1912
+ *
1913
+ * @generated from message strategies.v1.Bot
1914
+ */
1915
+ type Bot = Message<"strategies.v1.Bot"> & {
1916
+ /**
1917
+ * Public bot ID.
1918
+ *
1919
+ * @generated from field: fixed64 bot_id = 1;
1920
+ */
1921
+ botId: bigint;
1922
+ /**
1923
+ * The bot's name.
1924
+ *
1925
+ * @generated from field: string name = 2;
1926
+ */
1927
+ name: string;
1928
+ /**
1929
+ * Public ID of the bot's own subaccount, which the caller's main account
1930
+ * owns.
1931
+ *
1932
+ * @generated from field: fixed64 subaccount_id = 3;
1933
+ */
1934
+ subaccountId: bigint;
1935
+ /**
1936
+ * Current state.
1937
+ *
1938
+ * @generated from field: strategies.v1.Bot.Status status = 4;
1939
+ */
1940
+ status: Bot_Status;
1941
+ /**
1942
+ * Why the bot is in its state. Empty when RUNNING.
1943
+ *
1944
+ * @generated from field: string status_reason = 5;
1945
+ */
1946
+ statusReason: string;
1947
+ /**
1948
+ * The version it runs.
1949
+ *
1950
+ * @generated from field: string version_id = 6;
1951
+ */
1952
+ versionId: string;
1953
+ /**
1954
+ * Profit and loss since deployment, as an exact decimal in quote_asset:
1955
+ * negative for a loss, for example "-12.5".
1956
+ *
1957
+ * @generated from field: string profit_and_loss = 7;
1958
+ */
1959
+ profitAndLoss: string;
1960
+ /**
1961
+ * When the bot last decided. Omitted before its first decision.
1962
+ *
1963
+ * @generated from field: google.protobuf.Timestamp last_decision_at = 8;
1964
+ */
1965
+ lastDecisionAt?: Timestamp | undefined;
1966
+ /**
1967
+ * When the bot was deployed.
1968
+ *
1969
+ * @generated from field: google.protobuf.Timestamp created_at = 9;
1970
+ */
1971
+ createdAt?: Timestamp | undefined;
1972
+ /**
1973
+ * Quote asset of the bot's markets, for example USDT.
1974
+ *
1975
+ * @generated from field: string quote_asset = 10;
1976
+ */
1977
+ quoteAsset: string;
1978
+ };
1979
+ /**
1980
+ * Describes the message strategies.v1.Bot.
1981
+ * Use `create(BotSchema)` to create a new message.
1982
+ */
1983
+ declare const BotSchema: GenMessage<Bot>;
1984
+ /**
1985
+ * Status is a bot's state.
1986
+ *
1987
+ * @generated from enum strategies.v1.Bot.Status
1988
+ */
1989
+ declare enum Bot_Status {
1990
+ /**
1991
+ * Not set. Never returned.
1992
+ *
1993
+ * @generated from enum value: STATUS_UNSPECIFIED = 0;
1994
+ */
1995
+ STATUS_UNSPECIFIED = 0,
1996
+ /**
1997
+ * Being deployed.
1998
+ *
1999
+ * @generated from enum value: DEPLOYING = 1;
2000
+ */
2001
+ DEPLOYING = 1,
2002
+ /**
2003
+ * Handling its events.
2004
+ *
2005
+ * @generated from enum value: RUNNING = 2;
2006
+ */
2007
+ RUNNING = 2,
2008
+ /**
2009
+ * Being stopped.
2010
+ *
2011
+ * @generated from enum value: STOPPING = 3;
2012
+ */
2013
+ STOPPING = 3,
2014
+ /**
2015
+ * Stopped by the user.
2016
+ *
2017
+ * @generated from enum value: STOPPED = 4;
2018
+ */
2019
+ STOPPED = 4,
2020
+ /**
2021
+ * Paused, by itself or after an environment reset: status_reason says
2022
+ * why. Its orders stay.
2023
+ *
2024
+ * @generated from enum value: PAUSED = 5;
2025
+ */
2026
+ PAUSED = 5,
2027
+ /**
2028
+ * Paused because its calls kept failing to run: status_reason says why.
2029
+ * Its orders stay.
2030
+ *
2031
+ * @generated from enum value: QUARANTINED = 6;
2032
+ */
2033
+ QUARANTINED = 6
2034
+ }
2035
+ /**
2036
+ * Describes the enum strategies.v1.Bot.Status.
2037
+ */
2038
+ declare const Bot_StatusSchema: GenEnum<Bot_Status>;
2039
+ /**
2040
+ * ListBotsRequest lists the caller's bots.
2041
+ *
2042
+ * @generated from message strategies.v1.ListBotsRequest
2043
+ */
2044
+ type ListBotsRequest = Message<"strategies.v1.ListBotsRequest"> & {
2045
+ /**
2046
+ * Maximum number of bots to return: default 50, max 200.
2047
+ *
2048
+ * @generated from field: uint32 limit = 1;
2049
+ */
2050
+ limit: number;
2051
+ /**
2052
+ * Opaque, keyset-backed and exclusive cursor from a previous response's
2053
+ * next_page_token. It is bound to the caller.
2054
+ *
2055
+ * @generated from field: string page_token = 2;
2056
+ */
2057
+ pageToken: string;
2058
+ };
2059
+ /**
2060
+ * Describes the message strategies.v1.ListBotsRequest.
2061
+ * Use `create(ListBotsRequestSchema)` to create a new message.
2062
+ */
2063
+ declare const ListBotsRequestSchema: GenMessage<ListBotsRequest>;
2064
+ /**
2065
+ * ListBotsResponse returns one page of the caller's bots.
2066
+ *
2067
+ * @generated from message strategies.v1.ListBotsResponse
2068
+ */
2069
+ type ListBotsResponse = Message<"strategies.v1.ListBotsResponse"> & {
2070
+ /**
2071
+ * Bots, newest first.
2072
+ *
2073
+ * @generated from field: repeated strategies.v1.Bot bots = 1;
2074
+ */
2075
+ bots: Bot[];
2076
+ /**
2077
+ * Cursor for the next page. Empty when no more results exist.
2078
+ *
2079
+ * @generated from field: string next_page_token = 2;
2080
+ */
2081
+ nextPageToken: string;
2082
+ };
2083
+ /**
2084
+ * Describes the message strategies.v1.ListBotsResponse.
2085
+ * Use `create(ListBotsResponseSchema)` to create a new message.
2086
+ */
2087
+ declare const ListBotsResponseSchema: GenMessage<ListBotsResponse>;
2088
+ /**
2089
+ * BotBalance is one asset balance of a bot's subaccount.
2090
+ *
2091
+ * @generated from message strategies.v1.BotBalance
2092
+ */
2093
+ type BotBalance = Message<"strategies.v1.BotBalance"> & {
2094
+ /**
2095
+ * Asset symbol, for example USDT.
2096
+ *
2097
+ * @generated from field: string asset = 1;
2098
+ */
2099
+ asset: string;
2100
+ /**
2101
+ * Balance free to use, as an exact decimal.
2102
+ *
2103
+ * @generated from field: string free = 2;
2104
+ */
2105
+ free: string;
2106
+ /**
2107
+ * Balance held by open orders, as an exact decimal.
2108
+ *
2109
+ * @generated from field: string locked = 3;
2110
+ */
2111
+ locked: string;
2112
+ };
2113
+ /**
2114
+ * Describes the message strategies.v1.BotBalance.
2115
+ * Use `create(BotBalanceSchema)` to create a new message.
2116
+ */
2117
+ declare const BotBalanceSchema: GenMessage<BotBalance>;
2118
+ /**
2119
+ * BotOrder is one open order of a bot.
2120
+ *
2121
+ * @generated from message strategies.v1.BotOrder
2122
+ */
2123
+ type BotOrder = Message<"strategies.v1.BotOrder"> & {
2124
+ /**
2125
+ * Public order ID.
2126
+ *
2127
+ * @generated from field: fixed64 order_id = 1;
2128
+ */
2129
+ orderId: bigint;
2130
+ /**
2131
+ * Market, for example BTC/USDT.
2132
+ *
2133
+ * @generated from field: string market = 2;
2134
+ */
2135
+ market: string;
2136
+ /**
2137
+ * Side.
2138
+ *
2139
+ * @generated from field: strategies.v1.OrderSide side = 3;
2140
+ */
2141
+ side: OrderSide;
2142
+ /**
2143
+ * Order type, for example limit or stop_loss.
2144
+ *
2145
+ * @generated from field: string type = 4;
2146
+ */
2147
+ type: string;
2148
+ /**
2149
+ * Limit or trigger price, as an exact decimal in the quote asset. Empty for
2150
+ * a market order.
2151
+ *
2152
+ * @generated from field: string price = 5;
2153
+ */
2154
+ price: string;
2155
+ /**
2156
+ * Quantity, as an exact decimal in the base asset.
2157
+ *
2158
+ * @generated from field: string quantity = 6;
2159
+ */
2160
+ quantity: string;
2161
+ /**
2162
+ * Quantity filled so far.
2163
+ *
2164
+ * @generated from field: string filled_quantity = 7;
2165
+ */
2166
+ filledQuantity: string;
2167
+ /**
2168
+ * When the order was placed.
2169
+ *
2170
+ * @generated from field: google.protobuf.Timestamp created_at = 8;
2171
+ */
2172
+ createdAt?: Timestamp | undefined;
2173
+ };
2174
+ /**
2175
+ * Describes the message strategies.v1.BotOrder.
2176
+ * Use `create(BotOrderSchema)` to create a new message.
2177
+ */
2178
+ declare const BotOrderSchema: GenMessage<BotOrder>;
2179
+ /**
2180
+ * BotDecision is one handler call of a bot.
2181
+ *
2182
+ * @generated from message strategies.v1.BotDecision
2183
+ */
2184
+ type BotDecision = Message<"strategies.v1.BotDecision"> & {
2185
+ /**
2186
+ * When the decision was made.
2187
+ *
2188
+ * @generated from field: google.protobuf.Timestamp decided_at = 1;
2189
+ */
2190
+ decidedAt?: Timestamp | undefined;
2191
+ /**
2192
+ * The event that woke the bot, for example "schedule mon 09:00 UTC".
2193
+ *
2194
+ * @generated from field: string event = 2;
2195
+ */
2196
+ event: string;
2197
+ /**
2198
+ * The orders the bot asked for, each with its reason, in the shape the
2199
+ * manifest's behaviour examples use. Empty when it decided to do nothing.
2200
+ *
2201
+ * @generated from field: repeated google.protobuf.Struct orders = 3;
2202
+ */
2203
+ orders: JsonObject[];
2204
+ /**
2205
+ * The bot's log lines from the call, oldest first.
2206
+ *
2207
+ * @generated from field: repeated string logs = 4;
2208
+ */
2209
+ logs: string[];
2210
+ /**
2211
+ * What the bot saw: prices, indicator values, balances and open orders at
2212
+ * the event.
2213
+ *
2214
+ * @generated from field: google.protobuf.Struct snapshot = 5;
2215
+ */
2216
+ snapshot?: JsonObject | undefined;
2217
+ };
2218
+ /**
2219
+ * Describes the message strategies.v1.BotDecision.
2220
+ * Use `create(BotDecisionSchema)` to create a new message.
2221
+ */
2222
+ declare const BotDecisionSchema: GenMessage<BotDecision>;
2223
+ /**
2224
+ * BotError is one failed handler call of a bot.
2225
+ *
2226
+ * @generated from message strategies.v1.BotError
2227
+ */
2228
+ type BotError = Message<"strategies.v1.BotError"> & {
2229
+ /**
2230
+ * When the call failed.
2231
+ *
2232
+ * @generated from field: google.protobuf.Timestamp time = 1;
2233
+ */
2234
+ time?: Timestamp | undefined;
2235
+ /**
2236
+ * The event that woke the bot.
2237
+ *
2238
+ * @generated from field: string event = 2;
2239
+ */
2240
+ event: string;
2241
+ /**
2242
+ * The error.
2243
+ *
2244
+ * @generated from field: string message = 3;
2245
+ */
2246
+ message: string;
2247
+ };
2248
+ /**
2249
+ * Describes the message strategies.v1.BotError.
2250
+ * Use `create(BotErrorSchema)` to create a new message.
2251
+ */
2252
+ declare const BotErrorSchema: GenMessage<BotError>;
2253
+ /**
2254
+ * GetBotRequest reads one bot of the caller.
2255
+ *
2256
+ * @generated from message strategies.v1.GetBotRequest
2257
+ */
2258
+ type GetBotRequest = Message<"strategies.v1.GetBotRequest"> & {
2259
+ /**
2260
+ * Public bot ID.
2261
+ *
2262
+ * @generated from field: fixed64 bot_id = 1;
2263
+ */
2264
+ botId: bigint;
2265
+ };
2266
+ /**
2267
+ * Describes the message strategies.v1.GetBotRequest.
2268
+ * Use `create(GetBotRequestSchema)` to create a new message.
2269
+ */
2270
+ declare const GetBotRequestSchema: GenMessage<GetBotRequest>;
2271
+ /**
2272
+ * GetBotResponse is a bot with its money rules, account and recent
2273
+ * decisions.
2274
+ *
2275
+ * @generated from message strategies.v1.GetBotResponse
2276
+ */
2277
+ type GetBotResponse = Message<"strategies.v1.GetBotResponse"> & {
2278
+ /**
2279
+ * The bot.
2280
+ *
2281
+ * @generated from field: strategies.v1.Bot bot = 1;
2282
+ */
2283
+ bot?: Bot | undefined;
2284
+ /**
2285
+ * What the bot may do with money.
2286
+ *
2287
+ * @generated from field: strategies.v1.MoneyCard money_card = 2;
2288
+ */
2289
+ moneyCard?: MoneyCard | undefined;
2290
+ /**
2291
+ * Its settings, with their values, in settings-form order.
2292
+ *
2293
+ * @generated from field: repeated strategies.v1.SettingValue settings = 3;
2294
+ */
2295
+ settings: SettingValue[];
2296
+ /**
2297
+ * Balances of its subaccount, by asset.
2298
+ *
2299
+ * @generated from field: repeated strategies.v1.BotBalance balances = 4;
2300
+ */
2301
+ balances: BotBalance[];
2302
+ /**
2303
+ * Open orders of its subaccount, newest first.
2304
+ *
2305
+ * @generated from field: repeated strategies.v1.BotOrder open_orders = 5;
2306
+ */
2307
+ openOrders: BotOrder[];
2308
+ /**
2309
+ * Its last decisions, newest first: at most 20.
2310
+ *
2311
+ * @generated from field: repeated strategies.v1.BotDecision decisions = 6;
2312
+ */
2313
+ decisions: BotDecision[];
2314
+ /**
2315
+ * Its last errors, newest first: at most 20.
2316
+ *
2317
+ * @generated from field: repeated strategies.v1.BotError errors = 7;
2318
+ */
2319
+ errors: BotError[];
2320
+ };
2321
+ /**
2322
+ * Describes the message strategies.v1.GetBotResponse.
2323
+ * Use `create(GetBotResponseSchema)` to create a new message.
2324
+ */
2325
+ declare const GetBotResponseSchema: GenMessage<GetBotResponse>;
2326
+ /**
2327
+ * BotLogEntry is one line of a bot's log.
2328
+ *
2329
+ * @generated from message strategies.v1.BotLogEntry
2330
+ */
2331
+ type BotLogEntry = Message<"strategies.v1.BotLogEntry"> & {
2332
+ /**
2333
+ * Position in the bot's log, increasing.
2334
+ *
2335
+ * @generated from field: uint64 sequence = 1;
2336
+ */
2337
+ sequence: bigint;
2338
+ /**
2339
+ * When it was written.
2340
+ *
2341
+ * @generated from field: google.protobuf.Timestamp time = 2;
2342
+ */
2343
+ time?: Timestamp | undefined;
2344
+ /**
2345
+ * What it records.
2346
+ *
2347
+ * @generated from field: strategies.v1.BotLogEntry.Kind kind = 3;
2348
+ */
2349
+ kind: BotLogEntry_Kind;
2350
+ /**
2351
+ * The line.
2352
+ *
2353
+ * @generated from field: string message = 4;
2354
+ */
2355
+ message: string;
2356
+ };
2357
+ /**
2358
+ * Describes the message strategies.v1.BotLogEntry.
2359
+ * Use `create(BotLogEntrySchema)` to create a new message.
2360
+ */
2361
+ declare const BotLogEntrySchema: GenMessage<BotLogEntry>;
2362
+ /**
2363
+ * Kind is what a log entry records.
2364
+ *
2365
+ * @generated from enum strategies.v1.BotLogEntry.Kind
2366
+ */
2367
+ declare enum BotLogEntry_Kind {
2368
+ /**
2369
+ * Not set. Never returned.
2370
+ *
2371
+ * @generated from enum value: KIND_UNSPECIFIED = 0;
2372
+ */
2373
+ KIND_UNSPECIFIED = 0,
2374
+ /**
2375
+ * A line the bot wrote.
2376
+ *
2377
+ * @generated from enum value: LOG = 1;
2378
+ */
2379
+ LOG = 1,
2380
+ /**
2381
+ * A decision: the orders it asked for, or that it did nothing.
2382
+ *
2383
+ * @generated from enum value: DECISION = 2;
2384
+ */
2385
+ DECISION = 2,
2386
+ /**
2387
+ * A failed handler call.
2388
+ *
2389
+ * @generated from enum value: ERROR = 3;
2390
+ */
2391
+ ERROR = 3
2392
+ }
2393
+ /**
2394
+ * Describes the enum strategies.v1.BotLogEntry.Kind.
2395
+ */
2396
+ declare const BotLogEntry_KindSchema: GenEnum<BotLogEntry_Kind>;
2397
+ /**
2398
+ * ListBotLogsRequest reads a bot's log.
2399
+ *
2400
+ * @generated from message strategies.v1.ListBotLogsRequest
2401
+ */
2402
+ type ListBotLogsRequest = Message<"strategies.v1.ListBotLogsRequest"> & {
2403
+ /**
2404
+ * Public bot ID.
2405
+ *
2406
+ * @generated from field: fixed64 bot_id = 1;
2407
+ */
2408
+ botId: bigint;
2409
+ /**
2410
+ * Earliest entry time, inclusive. Unset means the start of the retained
2411
+ * log.
2412
+ *
2413
+ * @generated from field: google.protobuf.Timestamp start_time = 2;
2414
+ */
2415
+ startTime?: Timestamp | undefined;
2416
+ /**
2417
+ * Maximum number of entries to return: default 100, max 200.
2418
+ *
2419
+ * @generated from field: uint32 limit = 3;
2420
+ */
2421
+ limit: number;
2422
+ /**
2423
+ * Opaque, keyset-backed and exclusive cursor from a previous response's
2424
+ * next_page_token. It is bound to the caller, bot_id and start_time; reuse
2425
+ * it only with the same values.
2426
+ *
2427
+ * @generated from field: string page_token = 4;
2428
+ */
2429
+ pageToken: string;
2430
+ };
2431
+ /**
2432
+ * Describes the message strategies.v1.ListBotLogsRequest.
2433
+ * Use `create(ListBotLogsRequestSchema)` to create a new message.
2434
+ */
2435
+ declare const ListBotLogsRequestSchema: GenMessage<ListBotLogsRequest>;
2436
+ /**
2437
+ * ListBotLogsResponse returns one page of a bot's log.
2438
+ *
2439
+ * @generated from message strategies.v1.ListBotLogsResponse
2440
+ */
2441
+ type ListBotLogsResponse = Message<"strategies.v1.ListBotLogsResponse"> & {
2442
+ /**
2443
+ * Entries, oldest first.
2444
+ *
2445
+ * @generated from field: repeated strategies.v1.BotLogEntry entries = 1;
2446
+ */
2447
+ entries: BotLogEntry[];
2448
+ /**
2449
+ * Cursor for the next page. Empty when no more results exist. Entries
2450
+ * written later are read with a new listing whose start_time is the last
2451
+ * entry's time, skipping sequences already read.
2452
+ *
2453
+ * @generated from field: string next_page_token = 2;
2454
+ */
2455
+ nextPageToken: string;
2456
+ };
2457
+ /**
2458
+ * Describes the message strategies.v1.ListBotLogsResponse.
2459
+ * Use `create(ListBotLogsResponseSchema)` to create a new message.
2460
+ */
2461
+ declare const ListBotLogsResponseSchema: GenMessage<ListBotLogsResponse>;
2462
+ /**
2463
+ * ErrorCode identifies a Strategies API error.
2464
+ *
2465
+ * @generated from enum strategies.v1.ErrorCode
2466
+ */
2467
+ declare enum ErrorCode {
2468
+ /**
2469
+ * No code.
2470
+ *
2471
+ * @generated from enum value: ERROR_UNSPECIFIED = 0;
2472
+ */
2473
+ ERROR_UNSPECIFIED = 0,
2474
+ /**
2475
+ * No strategy version of the caller has this ID, or it expired. Another
2476
+ * account's version is reported the same way.
2477
+ *
2478
+ * @generated from enum value: VERSION_NOT_FOUND = 1;
2479
+ */
2480
+ VERSION_NOT_FOUND = 1,
2481
+ /**
2482
+ * No backtest of the caller has this ID.
2483
+ *
2484
+ * @generated from enum value: BACKTEST_NOT_FOUND = 2;
2485
+ */
2486
+ BACKTEST_NOT_FOUND = 2,
2487
+ /**
2488
+ * No deploy proposal of the caller has this ID.
2489
+ *
2490
+ * @generated from enum value: PROPOSAL_NOT_FOUND = 3;
2491
+ */
2492
+ PROPOSAL_NOT_FOUND = 3,
2493
+ /**
2494
+ * No bot of the caller has this ID.
2495
+ *
2496
+ * @generated from enum value: BOT_NOT_FOUND = 4;
2497
+ */
2498
+ BOT_NOT_FOUND = 4,
2499
+ /**
2500
+ * The requested runtime version is not offered. GetStrategyReference
2501
+ * without a runtime version names the current one.
2502
+ *
2503
+ * @generated from enum value: RUNTIME_VERSION_UNSUPPORTED = 5;
2504
+ */
2505
+ RUNTIME_VERSION_UNSUPPORTED = 5,
2506
+ /**
2507
+ * The manifest is larger than the limit GetStrategyReference states
2508
+ * (StrategyLimits.manifest_bytes), measured as compact JSON.
2509
+ *
2510
+ * @generated from enum value: MANIFEST_TOO_LARGE = 6;
2511
+ */
2512
+ MANIFEST_TOO_LARGE = 6,
2513
+ /**
2514
+ * A setting is unknown to the version's settings form, or its value is not
2515
+ * a valid value of its kind or lies outside its bounds. field_path names it.
2516
+ *
2517
+ * @generated from enum value: SETTINGS_INVALID = 7;
2518
+ */
2519
+ SETTINGS_INVALID = 7,
2520
+ /**
2521
+ * A funding or initial balance names an asset twice, or an asset the bot's
2522
+ * markets do not trade. field_path names it.
2523
+ *
2524
+ * @generated from enum value: FUNDING_INVALID = 8;
2525
+ */
2526
+ FUNDING_INVALID = 8,
2527
+ /**
2528
+ * The version did not validate: ValidateStrategy returned valid false for
2529
+ * it. Fix the errors and validate again.
2530
+ *
2531
+ * @generated from enum value: VERSION_INVALID = 9;
2532
+ */
2533
+ VERSION_INVALID = 9,
2534
+ /**
2535
+ * A behaviour example of the version fails, or the examples were never
2536
+ * run. RunScenarios shows each result.
2537
+ *
2538
+ * @generated from enum value: SCENARIOS_FAILING = 10;
2539
+ */
2540
+ SCENARIOS_FAILING = 10,
2541
+ /**
2542
+ * The version has no finished backtest. Bots that cannot be backtested
2543
+ * are exempt.
2544
+ *
2545
+ * @generated from enum value: BACKTEST_MISSING = 11;
2546
+ */
2547
+ BACKTEST_MISSING = 11,
2548
+ /**
2549
+ * A market of the bot is not open to bots. markets lists them.
2550
+ *
2551
+ * @generated from enum value: MARKET_NOT_ALLOWED = 12;
2552
+ */
2553
+ MARKET_NOT_ALLOWED = 12,
2554
+ /**
2555
+ * The funding account does not hold the funding. shortfall gives the
2556
+ * missing amounts.
2557
+ *
2558
+ * @generated from enum value: INSUFFICIENT_FUNDS = 13;
2559
+ */
2560
+ INSUFFICIENT_FUNDS = 13,
2561
+ /**
2562
+ * The caller already runs as many bots as their VIP tier allows. bot_cap
2563
+ * gives the tier, the cap and the next tier's cap.
2564
+ *
2565
+ * @generated from enum value: BOT_CAP_REACHED = 14;
2566
+ */
2567
+ BOT_CAP_REACHED = 14,
2568
+ /**
2569
+ * The backtest window holds no market data for the bot's markets and
2570
+ * timeframes.
2571
+ *
2572
+ * @generated from enum value: WINDOW_HAS_NO_DATA = 15;
2573
+ */
2574
+ WINDOW_HAS_NO_DATA = 15,
2575
+ /**
2576
+ * The bot cannot be backtested on candles: it reacts to events candles do
2577
+ * not carry, such as top-of-book or trade updates. ExplainStrategy says so.
2578
+ *
2579
+ * @generated from enum value: NOT_BACKTESTABLE = 16;
2580
+ */
2581
+ NOT_BACKTESTABLE = 16,
2582
+ /**
2583
+ * The caller ran the most behaviour-example runs allowed per minute.
2584
+ * retry_after says when to try again.
2585
+ *
2586
+ * @generated from enum value: SCENARIO_RUN_LIMIT_REACHED = 17;
2587
+ */
2588
+ SCENARIO_RUN_LIMIT_REACHED = 17,
2589
+ /**
2590
+ * The caller started the most backtests allowed per day. retry_after says
2591
+ * when to try again.
2592
+ *
2593
+ * @generated from enum value: BACKTEST_LIMIT_REACHED = 18;
2594
+ */
2595
+ BACKTEST_LIMIT_REACHED = 18,
2596
+ /**
2597
+ * The caller's bots and backtests would read more distinct indicator
2598
+ * settings than allowed. Reuse an indicator setting another bot reads, or
2599
+ * stop a bot.
2600
+ *
2601
+ * @generated from enum value: INDICATOR_SETTINGS_LIMIT_REACHED = 19;
2602
+ */
2603
+ INDICATOR_SETTINGS_LIMIT_REACHED = 19,
2604
+ /**
2605
+ * The idempotency key was already used with a different request. The
2606
+ * original backtest or proposal stands.
2607
+ *
2608
+ * @generated from enum value: IDEMPOTENCY_CONFLICT = 20;
2609
+ */
2610
+ IDEMPOTENCY_CONFLICT = 20,
2611
+ /**
2612
+ * A required service is temporarily unavailable; retry the same request.
2613
+ * Every call of this API is safe to retry.
2614
+ *
2615
+ * @generated from enum value: SERVICE_UNAVAILABLE = 21;
2616
+ */
2617
+ SERVICE_UNAVAILABLE = 21,
2618
+ /**
2619
+ * The funding subaccount is not a subaccount of the caller's main account.
2620
+ *
2621
+ * @generated from enum value: FUNDING_SUBACCOUNT_NOT_FOUND = 22;
2622
+ */
2623
+ FUNDING_SUBACCOUNT_NOT_FOUND = 22
2624
+ }
2625
+ /**
2626
+ * Describes the enum strategies.v1.ErrorCode.
2627
+ */
2628
+ declare const ErrorCodeSchema: GenEnum<ErrorCode>;
2629
+ /**
2630
+ * OrderSide is the side of an order.
2631
+ *
2632
+ * @generated from enum strategies.v1.OrderSide
2633
+ */
2634
+ declare enum OrderSide {
2635
+ /**
2636
+ * Not set. Never returned.
2637
+ *
2638
+ * @generated from enum value: SIDE_UNSPECIFIED = 0;
2639
+ */
2640
+ SIDE_UNSPECIFIED = 0,
2641
+ /**
2642
+ * Buy the market's base asset.
2643
+ *
2644
+ * @generated from enum value: BUY = 1;
2645
+ */
2646
+ BUY = 1,
2647
+ /**
2648
+ * Sell the market's base asset.
2649
+ *
2650
+ * @generated from enum value: SELL = 2;
2651
+ */
2652
+ SELL = 2
2653
+ }
2654
+ /**
2655
+ * Describes the enum strategies.v1.OrderSide.
2656
+ */
2657
+ declare const OrderSideSchema: GenEnum<OrderSide>;
2658
+ /**
2659
+ * StrategiesService writes, tests and proposes the caller's trading bots and
2660
+ * reads them. Bots belong to the caller's main account, and each runs on its
2661
+ * own subaccount, created when the user deploys it. No call moves money,
2662
+ * creates a subaccount, deploys a bot or stops one: deploying takes the
2663
+ * user's MFA and wallet signature on the deploy page ProposeDeploy links.
2664
+ *
2665
+ * Requests name no account, except the funding subaccount of ProposeDeploy:
2666
+ * every call acts for the caller's main account. An
2667
+ * API key must be scoped to the main account, and its policy must grant the
2668
+ * call's permission: READ_STRATEGIES for reads, DRAFT_STRATEGIES to store and
2669
+ * test versions, PROPOSE_STRATEGY_DEPLOY to propose deploys. An API key
2670
+ * scoped to a subaccount is refused (PERMISSION_DENIED,
2671
+ * AUTH_API_KEY_ACCESS_DENIED) even when its policy grants the permission.
2672
+ * Every call is safe to retry.
2673
+ *
2674
+ * @generated from service strategies.v1.StrategiesService
2675
+ */
2676
+ declare const StrategiesService: GenService<{
2677
+ /**
2678
+ * GetStrategyReference returns what bot code is written against for one
2679
+ * runtime version: the bot API reference and the skill pack, then the
2680
+ * manifest's JSON Schema, the allowed indicators and the limits once the
2681
+ * runtime catalog is available.
2682
+ *
2683
+ * Errors:
2684
+ * - INVALID_ARGUMENT: malformed request, or RUNTIME_VERSION_UNSUPPORTED.
2685
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2686
+ *
2687
+ * @generated from rpc strategies.v1.StrategiesService.GetStrategyReference
2688
+ */
2689
+ getStrategyReference: {
2690
+ methodKind: "unary";
2691
+ input: typeof GetStrategyReferenceRequestSchema;
2692
+ output: typeof GetStrategyReferenceResponseSchema;
2693
+ };
2694
+ /**
2695
+ * ListStrategyTemplates lists the bot templates: starting points with a
2696
+ * manifest and code.
2697
+ *
2698
+ * Errors:
2699
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2700
+ *
2701
+ * @generated from rpc strategies.v1.StrategiesService.ListStrategyTemplates
2702
+ */
2703
+ listStrategyTemplates: {
2704
+ methodKind: "unary";
2705
+ input: typeof ListStrategyTemplatesRequestSchema;
2706
+ output: typeof ListStrategyTemplatesResponseSchema;
2707
+ };
2708
+ /**
2709
+ * ValidateStrategy checks a bot and stores it as an immutable version of
2710
+ * the caller. The same runtime version, manifest and code always return the
2711
+ * same version. A bot with mistakes is no error: it returns valid false
2712
+ * with its errors, so it can be fixed and validated again.
2713
+ *
2714
+ * Errors:
2715
+ * - INVALID_ARGUMENT: malformed request, RUNTIME_VERSION_UNSUPPORTED or
2716
+ * MANIFEST_TOO_LARGE.
2717
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2718
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2719
+ * does not grant DRAFT_STRATEGIES or the key is scoped to a subaccount.
2720
+ * - UNAUTHENTICATED: missing or invalid credentials.
2721
+ *
2722
+ * @generated from rpc strategies.v1.StrategiesService.ValidateStrategy
2723
+ */
2724
+ validateStrategy: {
2725
+ methodKind: "unary";
2726
+ input: typeof ValidateStrategyRequestSchema;
2727
+ output: typeof ValidateStrategyResponseSchema;
2728
+ };
2729
+ /**
2730
+ * RunScenarios runs a version's behaviour examples against its code and
2731
+ * records the results. The result is deterministic: a version always gets
2732
+ * the same one.
2733
+ *
2734
+ * Errors:
2735
+ * - INVALID_ARGUMENT: malformed request.
2736
+ * - NOT_FOUND: VERSION_NOT_FOUND.
2737
+ * - FAILED_PRECONDITION: VERSION_INVALID.
2738
+ * - RESOURCE_EXHAUSTED: SCENARIO_RUN_LIMIT_REACHED; retry after
2739
+ * retry_after.
2740
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2741
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2742
+ * does not grant DRAFT_STRATEGIES or the key is scoped to a subaccount.
2743
+ * - UNAUTHENTICATED: missing or invalid credentials.
2744
+ *
2745
+ * @generated from rpc strategies.v1.StrategiesService.RunScenarios
2746
+ */
2747
+ runScenarios: {
2748
+ methodKind: "unary";
2749
+ input: typeof RunScenariosRequestSchema;
2750
+ output: typeof RunScenariosResponseSchema;
2751
+ };
2752
+ /**
2753
+ * StartBacktest starts a backtest of a version. A retry with the same
2754
+ * idempotency_key and request returns the backtest the first call started.
2755
+ * Across keys, a request with the same version, effective window, effective
2756
+ * settings and effective initial balances returns the same backtest rather
2757
+ * than running again; defaults count as their resolved values (see
2758
+ * StartBacktestRequest). Every new backtest counts in the attempts of the
2759
+ * bot's family of versions.
2760
+ *
2761
+ * Errors:
2762
+ * - INVALID_ARGUMENT: malformed request, SETTINGS_INVALID or
2763
+ * FUNDING_INVALID.
2764
+ * - NOT_FOUND: VERSION_NOT_FOUND.
2765
+ * - FAILED_PRECONDITION: VERSION_INVALID, WINDOW_HAS_NO_DATA or
2766
+ * NOT_BACKTESTABLE.
2767
+ * - RESOURCE_EXHAUSTED: BACKTEST_LIMIT_REACHED, retry after retry_after; or
2768
+ * INDICATOR_SETTINGS_LIMIT_REACHED.
2769
+ * - ALREADY_EXISTS: IDEMPOTENCY_CONFLICT; the original backtest stands.
2770
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry the same request.
2771
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2772
+ * does not grant DRAFT_STRATEGIES or the key is scoped to a subaccount.
2773
+ * - UNAUTHENTICATED: missing or invalid credentials.
2774
+ *
2775
+ * @generated from rpc strategies.v1.StrategiesService.StartBacktest
2776
+ */
2777
+ startBacktest: {
2778
+ methodKind: "unary";
2779
+ input: typeof StartBacktestRequestSchema;
2780
+ output: typeof StartBacktestResponseSchema;
2781
+ };
2782
+ /**
2783
+ * GetBacktest reads one backtest of the caller, with its report once it is
2784
+ * done.
2785
+ *
2786
+ * Errors:
2787
+ * - INVALID_ARGUMENT: malformed request.
2788
+ * - NOT_FOUND: BACKTEST_NOT_FOUND.
2789
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2790
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2791
+ * does not grant READ_STRATEGIES or the key is scoped to a subaccount.
2792
+ * - UNAUTHENTICATED: missing or invalid credentials.
2793
+ *
2794
+ * @generated from rpc strategies.v1.StrategiesService.GetBacktest
2795
+ */
2796
+ getBacktest: {
2797
+ methodKind: "unary";
2798
+ input: typeof GetBacktestRequestSchema;
2799
+ output: typeof GetBacktestResponseSchema;
2800
+ };
2801
+ /**
2802
+ * ExplainStrategy returns the review summary of a version: what a user
2803
+ * approves when deploying it.
2804
+ *
2805
+ * Errors:
2806
+ * - INVALID_ARGUMENT: malformed request.
2807
+ * - NOT_FOUND: VERSION_NOT_FOUND.
2808
+ * - FAILED_PRECONDITION: VERSION_INVALID.
2809
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2810
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2811
+ * does not grant READ_STRATEGIES or the key is scoped to a subaccount.
2812
+ * - UNAUTHENTICATED: missing or invalid credentials.
2813
+ *
2814
+ * @generated from rpc strategies.v1.StrategiesService.ExplainStrategy
2815
+ */
2816
+ explainStrategy: {
2817
+ methodKind: "unary";
2818
+ input: typeof ExplainStrategyRequestSchema;
2819
+ output: typeof ExplainStrategyResponseSchema;
2820
+ };
2821
+ /**
2822
+ * ProposeDeploy records an immutable deploy proposal and returns the link
2823
+ * to the deploy page, where the user deploys it with MFA and a wallet
2824
+ * signature. It never deploys, creates a subaccount or moves funds. The
2825
+ * version must be valid, pass every behaviour example and have a finished
2826
+ * backtest unless it cannot be backtested; its markets must be open to
2827
+ * bots; the funding account must hold the funding; and the caller must be
2828
+ * under their bot cap.
2829
+ *
2830
+ * Errors:
2831
+ * - INVALID_ARGUMENT: malformed request, SETTINGS_INVALID or
2832
+ * FUNDING_INVALID.
2833
+ * - NOT_FOUND: VERSION_NOT_FOUND, or FUNDING_SUBACCOUNT_NOT_FOUND.
2834
+ * - FAILED_PRECONDITION: VERSION_INVALID, SCENARIOS_FAILING,
2835
+ * BACKTEST_MISSING, MARKET_NOT_ALLOWED, INSUFFICIENT_FUNDS or
2836
+ * BOT_CAP_REACHED.
2837
+ * - RESOURCE_EXHAUSTED: INDICATOR_SETTINGS_LIMIT_REACHED.
2838
+ * - ALREADY_EXISTS: IDEMPOTENCY_CONFLICT; the original proposal stands.
2839
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry the same request.
2840
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2841
+ * does not grant PROPOSE_STRATEGY_DEPLOY or the key is scoped to a
2842
+ * subaccount.
2843
+ * - UNAUTHENTICATED: missing or invalid credentials.
2844
+ *
2845
+ * @generated from rpc strategies.v1.StrategiesService.ProposeDeploy
2846
+ */
2847
+ proposeDeploy: {
2848
+ methodKind: "unary";
2849
+ input: typeof ProposeDeployRequestSchema;
2850
+ output: typeof ProposeDeployResponseSchema;
2851
+ };
2852
+ /**
2853
+ * GetDeployStatus reads where one deploy proposal of the caller is.
2854
+ *
2855
+ * Errors:
2856
+ * - INVALID_ARGUMENT: malformed request.
2857
+ * - NOT_FOUND: PROPOSAL_NOT_FOUND.
2858
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2859
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2860
+ * does not grant READ_STRATEGIES or the key is scoped to a subaccount.
2861
+ * - UNAUTHENTICATED: missing or invalid credentials.
2862
+ *
2863
+ * @generated from rpc strategies.v1.StrategiesService.GetDeployStatus
2864
+ */
2865
+ getDeployStatus: {
2866
+ methodKind: "unary";
2867
+ input: typeof GetDeployStatusRequestSchema;
2868
+ output: typeof GetDeployStatusResponseSchema;
2869
+ };
2870
+ /**
2871
+ * ListBots lists the caller's bots, newest first.
2872
+ *
2873
+ * Errors:
2874
+ * - INVALID_ARGUMENT: malformed request or page token.
2875
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2876
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2877
+ * does not grant READ_STRATEGIES or the key is scoped to a subaccount.
2878
+ * - UNAUTHENTICATED: missing or invalid credentials.
2879
+ *
2880
+ * @generated from rpc strategies.v1.StrategiesService.ListBots
2881
+ */
2882
+ listBots: {
2883
+ methodKind: "unary";
2884
+ input: typeof ListBotsRequestSchema;
2885
+ output: typeof ListBotsResponseSchema;
2886
+ };
2887
+ /**
2888
+ * GetBot reads one bot of the caller: its money rules and settings, its
2889
+ * subaccount's balances and open orders, and its recent decisions and
2890
+ * errors.
2891
+ *
2892
+ * Errors:
2893
+ * - INVALID_ARGUMENT: malformed request.
2894
+ * - NOT_FOUND: BOT_NOT_FOUND.
2895
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2896
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2897
+ * does not grant READ_STRATEGIES or the key is scoped to a subaccount.
2898
+ * - UNAUTHENTICATED: missing or invalid credentials.
2899
+ *
2900
+ * @generated from rpc strategies.v1.StrategiesService.GetBot
2901
+ */
2902
+ getBot: {
2903
+ methodKind: "unary";
2904
+ input: typeof GetBotRequestSchema;
2905
+ output: typeof GetBotResponseSchema;
2906
+ };
2907
+ /**
2908
+ * ListBotLogs reads a bot's log lines, decisions and errors, oldest first.
2909
+ *
2910
+ * Errors:
2911
+ * - INVALID_ARGUMENT: malformed request or page token.
2912
+ * - NOT_FOUND: BOT_NOT_FOUND.
2913
+ * - UNAVAILABLE: SERVICE_UNAVAILABLE; retry.
2914
+ * - PERMISSION_DENIED: AUTH_API_KEY_ACCESS_DENIED when the API key's policy
2915
+ * does not grant READ_STRATEGIES or the key is scoped to a subaccount.
2916
+ * - UNAUTHENTICATED: missing or invalid credentials.
2917
+ *
2918
+ * @generated from rpc strategies.v1.StrategiesService.ListBotLogs
2919
+ */
2920
+ listBotLogs: {
2921
+ methodKind: "unary";
2922
+ input: typeof ListBotLogsRequestSchema;
2923
+ output: typeof ListBotLogsResponseSchema;
2924
+ };
2925
+ }>;
2926
+ //#endregion
2927
+ export { Backtest, BacktestMetrics, BacktestMetricsSchema, BacktestReport, BacktestReportSchema, BacktestSchema, BacktestSummary, BacktestSummarySchema, BacktestTrade, BacktestTradeSchema, Backtest_Status, Backtest_StatusSchema, Baseline, BaselineSchema, Bot, BotBalance, BotBalanceSchema, BotCapDetail, BotCapDetailSchema, BotDecision, BotDecisionSchema, BotError, BotErrorSchema, BotLogEntry, BotLogEntrySchema, BotLogEntry_Kind, BotLogEntry_KindSchema, BotOrder, BotOrderSchema, BotSchema, Bot_Status, Bot_StatusSchema, DataGap, DataGapSchema, DeployProposalSummary, DeployProposalSummarySchema, DeployStatus, DeployStatusSchema, DeployStatus_State, DeployStatus_StateSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, ExplainStrategyRequest, ExplainStrategyRequestSchema, ExplainStrategyResponse, ExplainStrategyResponseSchema, GetBacktestRequest, GetBacktestRequestSchema, GetBacktestResponse, GetBacktestResponseSchema, GetBotRequest, GetBotRequestSchema, GetBotResponse, GetBotResponseSchema, GetDeployStatusRequest, GetDeployStatusRequestSchema, GetDeployStatusResponse, GetDeployStatusResponseSchema, GetStrategyReferenceRequest, GetStrategyReferenceRequestSchema, GetStrategyReferenceResponse, GetStrategyReferenceResponseSchema, Indicator, IndicatorLibrary, IndicatorLibrarySchema, IndicatorParameter, IndicatorParameterSchema, IndicatorSchema, ListBotLogsRequest, ListBotLogsRequestSchema, ListBotLogsResponse, ListBotLogsResponseSchema, ListBotsRequest, ListBotsRequestSchema, ListBotsResponse, ListBotsResponseSchema, ListStrategyTemplatesRequest, ListStrategyTemplatesRequestSchema, ListStrategyTemplatesResponse, ListStrategyTemplatesResponseSchema, Money, MoneyCard, MoneyCardSchema, MoneySchema, OrderSide, OrderSideSchema, ProposeDeployRequest, ProposeDeployRequestSchema, ProposeDeployResponse, ProposeDeployResponseSchema, RunScenariosRequest, RunScenariosRequestSchema, RunScenariosResponse, RunScenariosResponseSchema, ScenarioResult, ScenarioResultSchema, ScenarioSummary, ScenarioSummarySchema, ScenarioSummary_Outcome, ScenarioSummary_OutcomeSchema, SettingField, SettingFieldSchema, SettingValue, SettingValueSchema, SkillDocument, SkillDocumentSchema, StartBacktestRequest, StartBacktestRequestSchema, StartBacktestResponse, StartBacktestResponseSchema, StrategiesService, StrategyLimits, StrategyLimitsSchema, StrategyTemplate, StrategyTemplateSchema, TimeWindow, TimeWindowSchema, ValidateStrategyRequest, ValidateStrategyRequestSchema, ValidateStrategyResponse, ValidateStrategyResponseSchema, ValidationIssue, ValidationIssueSchema, file_strategies_v1_strategies, strategies_pb_d_exports };
2928
+ //# sourceMappingURL=strategies_pb.d.ts.map