diff --git a/.gitignore b/.gitignore
index 9c9e6a9f..888c0be6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,4 +33,3 @@ packages/ibkr/ref/source/cppclient/
packages/ibkr/ref/samples/Java/
packages/ibkr/ref/samples/Cpp/
packages/ibkr/ref/CMakeLists.txt
-packages/ibkr/src/protobuf/
diff --git a/README.md b/README.md
index 20da37cd..9737831e 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,9 @@ Your one-person Wall Street. Alice is an AI trading agent that gives you your ow
+> [!CAUTION]
+> **Open Alice is experimental software in active development.** Many features and interfaces are incomplete and subject to breaking changes. Do not use this software for live trading with real funds unless you fully understand and accept the risks involved. The authors provide no guarantees of correctness, reliability, or profitability, and accept no liability for financial losses.
+
## Features
- **Multi-provider AI** — switch between Claude Code CLI, Vercel AI SDK, and Agent SDK at runtime, no restart needed
diff --git a/packages/ibkr/src/protobuf/AccountDataEnd.ts b/packages/ibkr/src/protobuf/AccountDataEnd.ts
new file mode 100644
index 00000000..b2246df6
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountDataEnd.ts
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountDataEnd.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountDataEnd {
+ accountName?: string | undefined;
+}
+
+function createBaseAccountDataEnd(): AccountDataEnd {
+ return { accountName: undefined };
+}
+
+export const AccountDataEnd: MessageFns = {
+ encode(message: AccountDataEnd, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.accountName !== undefined) {
+ writer.uint32(10).string(message.accountName);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountDataEnd {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountDataEnd();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.accountName = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountDataEnd {
+ return { accountName: isSet(object.accountName) ? globalThis.String(object.accountName) : undefined };
+ },
+
+ toJSON(message: AccountDataEnd): unknown {
+ const obj: any = {};
+ if (message.accountName !== undefined) {
+ obj.accountName = message.accountName;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountDataEnd {
+ return AccountDataEnd.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountDataEnd {
+ const message = createBaseAccountDataEnd();
+ message.accountName = object.accountName ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountDataRequest.ts b/packages/ibkr/src/protobuf/AccountDataRequest.ts
new file mode 100644
index 00000000..b5f30b13
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountDataRequest.ts
@@ -0,0 +1,112 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountDataRequest.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountDataRequest {
+ subscribe?: boolean | undefined;
+ acctCode?: string | undefined;
+}
+
+function createBaseAccountDataRequest(): AccountDataRequest {
+ return { subscribe: undefined, acctCode: undefined };
+}
+
+export const AccountDataRequest: MessageFns = {
+ encode(message: AccountDataRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.subscribe !== undefined) {
+ writer.uint32(8).bool(message.subscribe);
+ }
+ if (message.acctCode !== undefined) {
+ writer.uint32(18).string(message.acctCode);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountDataRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountDataRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.subscribe = reader.bool();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.acctCode = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountDataRequest {
+ return {
+ subscribe: isSet(object.subscribe) ? globalThis.Boolean(object.subscribe) : undefined,
+ acctCode: isSet(object.acctCode) ? globalThis.String(object.acctCode) : undefined,
+ };
+ },
+
+ toJSON(message: AccountDataRequest): unknown {
+ const obj: any = {};
+ if (message.subscribe !== undefined) {
+ obj.subscribe = message.subscribe;
+ }
+ if (message.acctCode !== undefined) {
+ obj.acctCode = message.acctCode;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountDataRequest {
+ return AccountDataRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountDataRequest {
+ const message = createBaseAccountDataRequest();
+ message.subscribe = object.subscribe ?? undefined;
+ message.acctCode = object.acctCode ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountSummary.ts b/packages/ibkr/src/protobuf/AccountSummary.ts
new file mode 100644
index 00000000..d6938037
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountSummary.ts
@@ -0,0 +1,163 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountSummary.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountSummary {
+ reqId?: number | undefined;
+ account?: string | undefined;
+ tag?: string | undefined;
+ value?: string | undefined;
+ currency?: string | undefined;
+}
+
+function createBaseAccountSummary(): AccountSummary {
+ return { reqId: undefined, account: undefined, tag: undefined, value: undefined, currency: undefined };
+}
+
+export const AccountSummary: MessageFns = {
+ encode(message: AccountSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ if (message.account !== undefined) {
+ writer.uint32(18).string(message.account);
+ }
+ if (message.tag !== undefined) {
+ writer.uint32(26).string(message.tag);
+ }
+ if (message.value !== undefined) {
+ writer.uint32(34).string(message.value);
+ }
+ if (message.currency !== undefined) {
+ writer.uint32(42).string(message.currency);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountSummary {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountSummary();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.account = reader.string();
+ continue;
+ }
+ case 3: {
+ if (tag !== 26) {
+ break;
+ }
+
+ message.tag = reader.string();
+ continue;
+ }
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.value = reader.string();
+ continue;
+ }
+ case 5: {
+ if (tag !== 42) {
+ break;
+ }
+
+ message.currency = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountSummary {
+ return {
+ reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined,
+ account: isSet(object.account) ? globalThis.String(object.account) : undefined,
+ tag: isSet(object.tag) ? globalThis.String(object.tag) : undefined,
+ value: isSet(object.value) ? globalThis.String(object.value) : undefined,
+ currency: isSet(object.currency) ? globalThis.String(object.currency) : undefined,
+ };
+ },
+
+ toJSON(message: AccountSummary): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ if (message.account !== undefined) {
+ obj.account = message.account;
+ }
+ if (message.tag !== undefined) {
+ obj.tag = message.tag;
+ }
+ if (message.value !== undefined) {
+ obj.value = message.value;
+ }
+ if (message.currency !== undefined) {
+ obj.currency = message.currency;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountSummary {
+ return AccountSummary.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountSummary {
+ const message = createBaseAccountSummary();
+ message.reqId = object.reqId ?? undefined;
+ message.account = object.account ?? undefined;
+ message.tag = object.tag ?? undefined;
+ message.value = object.value ?? undefined;
+ message.currency = object.currency ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountSummaryEnd.ts b/packages/ibkr/src/protobuf/AccountSummaryEnd.ts
new file mode 100644
index 00000000..71be69d1
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountSummaryEnd.ts
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountSummaryEnd.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountSummaryEnd {
+ reqId?: number | undefined;
+}
+
+function createBaseAccountSummaryEnd(): AccountSummaryEnd {
+ return { reqId: undefined };
+}
+
+export const AccountSummaryEnd: MessageFns = {
+ encode(message: AccountSummaryEnd, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountSummaryEnd {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountSummaryEnd();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountSummaryEnd {
+ return { reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined };
+ },
+
+ toJSON(message: AccountSummaryEnd): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountSummaryEnd {
+ return AccountSummaryEnd.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountSummaryEnd {
+ const message = createBaseAccountSummaryEnd();
+ message.reqId = object.reqId ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountSummaryRequest.ts b/packages/ibkr/src/protobuf/AccountSummaryRequest.ts
new file mode 100644
index 00000000..21669fda
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountSummaryRequest.ts
@@ -0,0 +1,129 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountSummaryRequest.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountSummaryRequest {
+ reqId?: number | undefined;
+ group?: string | undefined;
+ tags?: string | undefined;
+}
+
+function createBaseAccountSummaryRequest(): AccountSummaryRequest {
+ return { reqId: undefined, group: undefined, tags: undefined };
+}
+
+export const AccountSummaryRequest: MessageFns = {
+ encode(message: AccountSummaryRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ if (message.group !== undefined) {
+ writer.uint32(18).string(message.group);
+ }
+ if (message.tags !== undefined) {
+ writer.uint32(26).string(message.tags);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountSummaryRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountSummaryRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.group = reader.string();
+ continue;
+ }
+ case 3: {
+ if (tag !== 26) {
+ break;
+ }
+
+ message.tags = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountSummaryRequest {
+ return {
+ reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined,
+ group: isSet(object.group) ? globalThis.String(object.group) : undefined,
+ tags: isSet(object.tags) ? globalThis.String(object.tags) : undefined,
+ };
+ },
+
+ toJSON(message: AccountSummaryRequest): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ if (message.group !== undefined) {
+ obj.group = message.group;
+ }
+ if (message.tags !== undefined) {
+ obj.tags = message.tags;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountSummaryRequest {
+ return AccountSummaryRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountSummaryRequest {
+ const message = createBaseAccountSummaryRequest();
+ message.reqId = object.reqId ?? undefined;
+ message.group = object.group ?? undefined;
+ message.tags = object.tags ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountUpdateMulti.ts b/packages/ibkr/src/protobuf/AccountUpdateMulti.ts
new file mode 100644
index 00000000..99c418e8
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountUpdateMulti.ts
@@ -0,0 +1,187 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountUpdateMulti.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountUpdateMulti {
+ reqId?: number | undefined;
+ account?: string | undefined;
+ modelCode?: string | undefined;
+ key?: string | undefined;
+ value?: string | undefined;
+ currency?: string | undefined;
+}
+
+function createBaseAccountUpdateMulti(): AccountUpdateMulti {
+ return {
+ reqId: undefined,
+ account: undefined,
+ modelCode: undefined,
+ key: undefined,
+ value: undefined,
+ currency: undefined,
+ };
+}
+
+export const AccountUpdateMulti: MessageFns = {
+ encode(message: AccountUpdateMulti, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ if (message.account !== undefined) {
+ writer.uint32(18).string(message.account);
+ }
+ if (message.modelCode !== undefined) {
+ writer.uint32(26).string(message.modelCode);
+ }
+ if (message.key !== undefined) {
+ writer.uint32(34).string(message.key);
+ }
+ if (message.value !== undefined) {
+ writer.uint32(42).string(message.value);
+ }
+ if (message.currency !== undefined) {
+ writer.uint32(50).string(message.currency);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountUpdateMulti {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountUpdateMulti();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.account = reader.string();
+ continue;
+ }
+ case 3: {
+ if (tag !== 26) {
+ break;
+ }
+
+ message.modelCode = reader.string();
+ continue;
+ }
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.key = reader.string();
+ continue;
+ }
+ case 5: {
+ if (tag !== 42) {
+ break;
+ }
+
+ message.value = reader.string();
+ continue;
+ }
+ case 6: {
+ if (tag !== 50) {
+ break;
+ }
+
+ message.currency = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountUpdateMulti {
+ return {
+ reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined,
+ account: isSet(object.account) ? globalThis.String(object.account) : undefined,
+ modelCode: isSet(object.modelCode) ? globalThis.String(object.modelCode) : undefined,
+ key: isSet(object.key) ? globalThis.String(object.key) : undefined,
+ value: isSet(object.value) ? globalThis.String(object.value) : undefined,
+ currency: isSet(object.currency) ? globalThis.String(object.currency) : undefined,
+ };
+ },
+
+ toJSON(message: AccountUpdateMulti): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ if (message.account !== undefined) {
+ obj.account = message.account;
+ }
+ if (message.modelCode !== undefined) {
+ obj.modelCode = message.modelCode;
+ }
+ if (message.key !== undefined) {
+ obj.key = message.key;
+ }
+ if (message.value !== undefined) {
+ obj.value = message.value;
+ }
+ if (message.currency !== undefined) {
+ obj.currency = message.currency;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountUpdateMulti {
+ return AccountUpdateMulti.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountUpdateMulti {
+ const message = createBaseAccountUpdateMulti();
+ message.reqId = object.reqId ?? undefined;
+ message.account = object.account ?? undefined;
+ message.modelCode = object.modelCode ?? undefined;
+ message.key = object.key ?? undefined;
+ message.value = object.value ?? undefined;
+ message.currency = object.currency ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountUpdateMultiEnd.ts b/packages/ibkr/src/protobuf/AccountUpdateMultiEnd.ts
new file mode 100644
index 00000000..13b388e7
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountUpdateMultiEnd.ts
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountUpdateMultiEnd.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountUpdateMultiEnd {
+ reqId?: number | undefined;
+}
+
+function createBaseAccountUpdateMultiEnd(): AccountUpdateMultiEnd {
+ return { reqId: undefined };
+}
+
+export const AccountUpdateMultiEnd: MessageFns = {
+ encode(message: AccountUpdateMultiEnd, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountUpdateMultiEnd {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountUpdateMultiEnd();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountUpdateMultiEnd {
+ return { reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined };
+ },
+
+ toJSON(message: AccountUpdateMultiEnd): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountUpdateMultiEnd {
+ return AccountUpdateMultiEnd.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountUpdateMultiEnd {
+ const message = createBaseAccountUpdateMultiEnd();
+ message.reqId = object.reqId ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountUpdateTime.ts b/packages/ibkr/src/protobuf/AccountUpdateTime.ts
new file mode 100644
index 00000000..309b7f07
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountUpdateTime.ts
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountUpdateTime.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountUpdateTime {
+ timeStamp?: string | undefined;
+}
+
+function createBaseAccountUpdateTime(): AccountUpdateTime {
+ return { timeStamp: undefined };
+}
+
+export const AccountUpdateTime: MessageFns = {
+ encode(message: AccountUpdateTime, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.timeStamp !== undefined) {
+ writer.uint32(10).string(message.timeStamp);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountUpdateTime {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountUpdateTime();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.timeStamp = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountUpdateTime {
+ return { timeStamp: isSet(object.timeStamp) ? globalThis.String(object.timeStamp) : undefined };
+ },
+
+ toJSON(message: AccountUpdateTime): unknown {
+ const obj: any = {};
+ if (message.timeStamp !== undefined) {
+ obj.timeStamp = message.timeStamp;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountUpdateTime {
+ return AccountUpdateTime.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountUpdateTime {
+ const message = createBaseAccountUpdateTime();
+ message.timeStamp = object.timeStamp ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountUpdatesMultiRequest.ts b/packages/ibkr/src/protobuf/AccountUpdatesMultiRequest.ts
new file mode 100644
index 00000000..ef6f3c88
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountUpdatesMultiRequest.ts
@@ -0,0 +1,146 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountUpdatesMultiRequest.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountUpdatesMultiRequest {
+ reqId?: number | undefined;
+ account?: string | undefined;
+ modelCode?: string | undefined;
+ ledgerAndNLV?: boolean | undefined;
+}
+
+function createBaseAccountUpdatesMultiRequest(): AccountUpdatesMultiRequest {
+ return { reqId: undefined, account: undefined, modelCode: undefined, ledgerAndNLV: undefined };
+}
+
+export const AccountUpdatesMultiRequest: MessageFns = {
+ encode(message: AccountUpdatesMultiRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ if (message.account !== undefined) {
+ writer.uint32(18).string(message.account);
+ }
+ if (message.modelCode !== undefined) {
+ writer.uint32(26).string(message.modelCode);
+ }
+ if (message.ledgerAndNLV !== undefined) {
+ writer.uint32(32).bool(message.ledgerAndNLV);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountUpdatesMultiRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountUpdatesMultiRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.account = reader.string();
+ continue;
+ }
+ case 3: {
+ if (tag !== 26) {
+ break;
+ }
+
+ message.modelCode = reader.string();
+ continue;
+ }
+ case 4: {
+ if (tag !== 32) {
+ break;
+ }
+
+ message.ledgerAndNLV = reader.bool();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountUpdatesMultiRequest {
+ return {
+ reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined,
+ account: isSet(object.account) ? globalThis.String(object.account) : undefined,
+ modelCode: isSet(object.modelCode) ? globalThis.String(object.modelCode) : undefined,
+ ledgerAndNLV: isSet(object.ledgerAndNLV) ? globalThis.Boolean(object.ledgerAndNLV) : undefined,
+ };
+ },
+
+ toJSON(message: AccountUpdatesMultiRequest): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ if (message.account !== undefined) {
+ obj.account = message.account;
+ }
+ if (message.modelCode !== undefined) {
+ obj.modelCode = message.modelCode;
+ }
+ if (message.ledgerAndNLV !== undefined) {
+ obj.ledgerAndNLV = message.ledgerAndNLV;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountUpdatesMultiRequest {
+ return AccountUpdatesMultiRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountUpdatesMultiRequest {
+ const message = createBaseAccountUpdatesMultiRequest();
+ message.reqId = object.reqId ?? undefined;
+ message.account = object.account ?? undefined;
+ message.modelCode = object.modelCode ?? undefined;
+ message.ledgerAndNLV = object.ledgerAndNLV ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AccountValue.ts b/packages/ibkr/src/protobuf/AccountValue.ts
new file mode 100644
index 00000000..c5e65abb
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AccountValue.ts
@@ -0,0 +1,146 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AccountValue.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AccountValue {
+ key?: string | undefined;
+ value?: string | undefined;
+ currency?: string | undefined;
+ accountName?: string | undefined;
+}
+
+function createBaseAccountValue(): AccountValue {
+ return { key: undefined, value: undefined, currency: undefined, accountName: undefined };
+}
+
+export const AccountValue: MessageFns = {
+ encode(message: AccountValue, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.key !== undefined) {
+ writer.uint32(10).string(message.key);
+ }
+ if (message.value !== undefined) {
+ writer.uint32(18).string(message.value);
+ }
+ if (message.currency !== undefined) {
+ writer.uint32(26).string(message.currency);
+ }
+ if (message.accountName !== undefined) {
+ writer.uint32(34).string(message.accountName);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AccountValue {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAccountValue();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.key = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.value = reader.string();
+ continue;
+ }
+ case 3: {
+ if (tag !== 26) {
+ break;
+ }
+
+ message.currency = reader.string();
+ continue;
+ }
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.accountName = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AccountValue {
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : undefined,
+ value: isSet(object.value) ? globalThis.String(object.value) : undefined,
+ currency: isSet(object.currency) ? globalThis.String(object.currency) : undefined,
+ accountName: isSet(object.accountName) ? globalThis.String(object.accountName) : undefined,
+ };
+ },
+
+ toJSON(message: AccountValue): unknown {
+ const obj: any = {};
+ if (message.key !== undefined) {
+ obj.key = message.key;
+ }
+ if (message.value !== undefined) {
+ obj.value = message.value;
+ }
+ if (message.currency !== undefined) {
+ obj.currency = message.currency;
+ }
+ if (message.accountName !== undefined) {
+ obj.accountName = message.accountName;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AccountValue {
+ return AccountValue.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AccountValue {
+ const message = createBaseAccountValue();
+ message.key = object.key ?? undefined;
+ message.value = object.value ?? undefined;
+ message.currency = object.currency ?? undefined;
+ message.accountName = object.accountName ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AllOpenOrdersRequest.ts b/packages/ibkr/src/protobuf/AllOpenOrdersRequest.ts
new file mode 100644
index 00000000..abf7833b
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AllOpenOrdersRequest.ts
@@ -0,0 +1,74 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AllOpenOrdersRequest.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+/** empty */
+export interface AllOpenOrdersRequest {
+}
+
+function createBaseAllOpenOrdersRequest(): AllOpenOrdersRequest {
+ return {};
+}
+
+export const AllOpenOrdersRequest: MessageFns = {
+ encode(_: AllOpenOrdersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AllOpenOrdersRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAllOpenOrdersRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(_: any): AllOpenOrdersRequest {
+ return {};
+ },
+
+ toJSON(_: AllOpenOrdersRequest): unknown {
+ const obj: any = {};
+ return obj;
+ },
+
+ create(base?: DeepPartial): AllOpenOrdersRequest {
+ return AllOpenOrdersRequest.fromPartial(base ?? {});
+ },
+ fromPartial(_: DeepPartial): AllOpenOrdersRequest {
+ const message = createBaseAllOpenOrdersRequest();
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/ApiConfig.ts b/packages/ibkr/src/protobuf/ApiConfig.ts
new file mode 100644
index 00000000..b4b28262
--- /dev/null
+++ b/packages/ibkr/src/protobuf/ApiConfig.ts
@@ -0,0 +1,118 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: ApiConfig.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+import { ApiPrecautionsConfig } from "./ApiPrecautionsConfig";
+import { ApiSettingsConfig } from "./ApiSettingsConfig";
+
+export const protobufPackage = "protobuf";
+
+export interface ApiConfig {
+ precautions?: ApiPrecautionsConfig | undefined;
+ settings?: ApiSettingsConfig | undefined;
+}
+
+function createBaseApiConfig(): ApiConfig {
+ return { precautions: undefined, settings: undefined };
+}
+
+export const ApiConfig: MessageFns = {
+ encode(message: ApiConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.precautions !== undefined) {
+ ApiPrecautionsConfig.encode(message.precautions, writer.uint32(10).fork()).join();
+ }
+ if (message.settings !== undefined) {
+ ApiSettingsConfig.encode(message.settings, writer.uint32(18).fork()).join();
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): ApiConfig {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseApiConfig();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.precautions = ApiPrecautionsConfig.decode(reader, reader.uint32());
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.settings = ApiSettingsConfig.decode(reader, reader.uint32());
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ApiConfig {
+ return {
+ precautions: isSet(object.precautions) ? ApiPrecautionsConfig.fromJSON(object.precautions) : undefined,
+ settings: isSet(object.settings) ? ApiSettingsConfig.fromJSON(object.settings) : undefined,
+ };
+ },
+
+ toJSON(message: ApiConfig): unknown {
+ const obj: any = {};
+ if (message.precautions !== undefined) {
+ obj.precautions = ApiPrecautionsConfig.toJSON(message.precautions);
+ }
+ if (message.settings !== undefined) {
+ obj.settings = ApiSettingsConfig.toJSON(message.settings);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): ApiConfig {
+ return ApiConfig.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): ApiConfig {
+ const message = createBaseApiConfig();
+ message.precautions = (object.precautions !== undefined && object.precautions !== null)
+ ? ApiPrecautionsConfig.fromPartial(object.precautions)
+ : undefined;
+ message.settings = (object.settings !== undefined && object.settings !== null)
+ ? ApiSettingsConfig.fromPartial(object.settings)
+ : undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/ApiPrecautionsConfig.ts b/packages/ibkr/src/protobuf/ApiPrecautionsConfig.ts
new file mode 100644
index 00000000..84bf96be
--- /dev/null
+++ b/packages/ibkr/src/protobuf/ApiPrecautionsConfig.ts
@@ -0,0 +1,277 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: ApiPrecautionsConfig.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface ApiPrecautionsConfig {
+ bypassOrderPrecautions?: boolean | undefined;
+ bypassBondWarning?: boolean | undefined;
+ bypassNegativeYieldConfirmation?: boolean | undefined;
+ bypassCalledBondWarning?: boolean | undefined;
+ bypassSameActionPairTradeWarning?: boolean | undefined;
+ bypassFlaggedAccountsWarning?: boolean | undefined;
+ bypassPriceBasedVolatilityWarning?: boolean | undefined;
+ bypassRedirectOrderWarning?: boolean | undefined;
+ bypassNoOverfillProtection?: boolean | undefined;
+ bypassRouteMarketableToBBO?: boolean | undefined;
+}
+
+function createBaseApiPrecautionsConfig(): ApiPrecautionsConfig {
+ return {
+ bypassOrderPrecautions: undefined,
+ bypassBondWarning: undefined,
+ bypassNegativeYieldConfirmation: undefined,
+ bypassCalledBondWarning: undefined,
+ bypassSameActionPairTradeWarning: undefined,
+ bypassFlaggedAccountsWarning: undefined,
+ bypassPriceBasedVolatilityWarning: undefined,
+ bypassRedirectOrderWarning: undefined,
+ bypassNoOverfillProtection: undefined,
+ bypassRouteMarketableToBBO: undefined,
+ };
+}
+
+export const ApiPrecautionsConfig: MessageFns = {
+ encode(message: ApiPrecautionsConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.bypassOrderPrecautions !== undefined) {
+ writer.uint32(8).bool(message.bypassOrderPrecautions);
+ }
+ if (message.bypassBondWarning !== undefined) {
+ writer.uint32(16).bool(message.bypassBondWarning);
+ }
+ if (message.bypassNegativeYieldConfirmation !== undefined) {
+ writer.uint32(24).bool(message.bypassNegativeYieldConfirmation);
+ }
+ if (message.bypassCalledBondWarning !== undefined) {
+ writer.uint32(32).bool(message.bypassCalledBondWarning);
+ }
+ if (message.bypassSameActionPairTradeWarning !== undefined) {
+ writer.uint32(40).bool(message.bypassSameActionPairTradeWarning);
+ }
+ if (message.bypassFlaggedAccountsWarning !== undefined) {
+ writer.uint32(48).bool(message.bypassFlaggedAccountsWarning);
+ }
+ if (message.bypassPriceBasedVolatilityWarning !== undefined) {
+ writer.uint32(56).bool(message.bypassPriceBasedVolatilityWarning);
+ }
+ if (message.bypassRedirectOrderWarning !== undefined) {
+ writer.uint32(64).bool(message.bypassRedirectOrderWarning);
+ }
+ if (message.bypassNoOverfillProtection !== undefined) {
+ writer.uint32(72).bool(message.bypassNoOverfillProtection);
+ }
+ if (message.bypassRouteMarketableToBBO !== undefined) {
+ writer.uint32(80).bool(message.bypassRouteMarketableToBBO);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): ApiPrecautionsConfig {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseApiPrecautionsConfig();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.bypassOrderPrecautions = reader.bool();
+ continue;
+ }
+ case 2: {
+ if (tag !== 16) {
+ break;
+ }
+
+ message.bypassBondWarning = reader.bool();
+ continue;
+ }
+ case 3: {
+ if (tag !== 24) {
+ break;
+ }
+
+ message.bypassNegativeYieldConfirmation = reader.bool();
+ continue;
+ }
+ case 4: {
+ if (tag !== 32) {
+ break;
+ }
+
+ message.bypassCalledBondWarning = reader.bool();
+ continue;
+ }
+ case 5: {
+ if (tag !== 40) {
+ break;
+ }
+
+ message.bypassSameActionPairTradeWarning = reader.bool();
+ continue;
+ }
+ case 6: {
+ if (tag !== 48) {
+ break;
+ }
+
+ message.bypassFlaggedAccountsWarning = reader.bool();
+ continue;
+ }
+ case 7: {
+ if (tag !== 56) {
+ break;
+ }
+
+ message.bypassPriceBasedVolatilityWarning = reader.bool();
+ continue;
+ }
+ case 8: {
+ if (tag !== 64) {
+ break;
+ }
+
+ message.bypassRedirectOrderWarning = reader.bool();
+ continue;
+ }
+ case 9: {
+ if (tag !== 72) {
+ break;
+ }
+
+ message.bypassNoOverfillProtection = reader.bool();
+ continue;
+ }
+ case 10: {
+ if (tag !== 80) {
+ break;
+ }
+
+ message.bypassRouteMarketableToBBO = reader.bool();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ApiPrecautionsConfig {
+ return {
+ bypassOrderPrecautions: isSet(object.bypassOrderPrecautions)
+ ? globalThis.Boolean(object.bypassOrderPrecautions)
+ : undefined,
+ bypassBondWarning: isSet(object.bypassBondWarning) ? globalThis.Boolean(object.bypassBondWarning) : undefined,
+ bypassNegativeYieldConfirmation: isSet(object.bypassNegativeYieldConfirmation)
+ ? globalThis.Boolean(object.bypassNegativeYieldConfirmation)
+ : undefined,
+ bypassCalledBondWarning: isSet(object.bypassCalledBondWarning)
+ ? globalThis.Boolean(object.bypassCalledBondWarning)
+ : undefined,
+ bypassSameActionPairTradeWarning: isSet(object.bypassSameActionPairTradeWarning)
+ ? globalThis.Boolean(object.bypassSameActionPairTradeWarning)
+ : undefined,
+ bypassFlaggedAccountsWarning: isSet(object.bypassFlaggedAccountsWarning)
+ ? globalThis.Boolean(object.bypassFlaggedAccountsWarning)
+ : undefined,
+ bypassPriceBasedVolatilityWarning: isSet(object.bypassPriceBasedVolatilityWarning)
+ ? globalThis.Boolean(object.bypassPriceBasedVolatilityWarning)
+ : undefined,
+ bypassRedirectOrderWarning: isSet(object.bypassRedirectOrderWarning)
+ ? globalThis.Boolean(object.bypassRedirectOrderWarning)
+ : undefined,
+ bypassNoOverfillProtection: isSet(object.bypassNoOverfillProtection)
+ ? globalThis.Boolean(object.bypassNoOverfillProtection)
+ : undefined,
+ bypassRouteMarketableToBBO: isSet(object.bypassRouteMarketableToBBO)
+ ? globalThis.Boolean(object.bypassRouteMarketableToBBO)
+ : undefined,
+ };
+ },
+
+ toJSON(message: ApiPrecautionsConfig): unknown {
+ const obj: any = {};
+ if (message.bypassOrderPrecautions !== undefined) {
+ obj.bypassOrderPrecautions = message.bypassOrderPrecautions;
+ }
+ if (message.bypassBondWarning !== undefined) {
+ obj.bypassBondWarning = message.bypassBondWarning;
+ }
+ if (message.bypassNegativeYieldConfirmation !== undefined) {
+ obj.bypassNegativeYieldConfirmation = message.bypassNegativeYieldConfirmation;
+ }
+ if (message.bypassCalledBondWarning !== undefined) {
+ obj.bypassCalledBondWarning = message.bypassCalledBondWarning;
+ }
+ if (message.bypassSameActionPairTradeWarning !== undefined) {
+ obj.bypassSameActionPairTradeWarning = message.bypassSameActionPairTradeWarning;
+ }
+ if (message.bypassFlaggedAccountsWarning !== undefined) {
+ obj.bypassFlaggedAccountsWarning = message.bypassFlaggedAccountsWarning;
+ }
+ if (message.bypassPriceBasedVolatilityWarning !== undefined) {
+ obj.bypassPriceBasedVolatilityWarning = message.bypassPriceBasedVolatilityWarning;
+ }
+ if (message.bypassRedirectOrderWarning !== undefined) {
+ obj.bypassRedirectOrderWarning = message.bypassRedirectOrderWarning;
+ }
+ if (message.bypassNoOverfillProtection !== undefined) {
+ obj.bypassNoOverfillProtection = message.bypassNoOverfillProtection;
+ }
+ if (message.bypassRouteMarketableToBBO !== undefined) {
+ obj.bypassRouteMarketableToBBO = message.bypassRouteMarketableToBBO;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): ApiPrecautionsConfig {
+ return ApiPrecautionsConfig.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): ApiPrecautionsConfig {
+ const message = createBaseApiPrecautionsConfig();
+ message.bypassOrderPrecautions = object.bypassOrderPrecautions ?? undefined;
+ message.bypassBondWarning = object.bypassBondWarning ?? undefined;
+ message.bypassNegativeYieldConfirmation = object.bypassNegativeYieldConfirmation ?? undefined;
+ message.bypassCalledBondWarning = object.bypassCalledBondWarning ?? undefined;
+ message.bypassSameActionPairTradeWarning = object.bypassSameActionPairTradeWarning ?? undefined;
+ message.bypassFlaggedAccountsWarning = object.bypassFlaggedAccountsWarning ?? undefined;
+ message.bypassPriceBasedVolatilityWarning = object.bypassPriceBasedVolatilityWarning ?? undefined;
+ message.bypassRedirectOrderWarning = object.bypassRedirectOrderWarning ?? undefined;
+ message.bypassNoOverfillProtection = object.bypassNoOverfillProtection ?? undefined;
+ message.bypassRouteMarketableToBBO = object.bypassRouteMarketableToBBO ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/ApiSettingsConfig.ts b/packages/ibkr/src/protobuf/ApiSettingsConfig.ts
new file mode 100644
index 00000000..530c9de0
--- /dev/null
+++ b/packages/ibkr/src/protobuf/ApiSettingsConfig.ts
@@ -0,0 +1,787 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: ApiSettingsConfig.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface ApiSettingsConfig {
+ readOnlyApi?: boolean | undefined;
+ totalQuantityForMutualFunds?: boolean | undefined;
+ downloadOpenOrdersOnConnection?: boolean | undefined;
+ includeVirtualFxPositions?: boolean | undefined;
+ prepareDailyPnL?: boolean | undefined;
+ sendStatusUpdatesForVolatilityOrders?: boolean | undefined;
+ encodeApiMessages?: string | undefined;
+ socketPort?: number | undefined;
+ useNegativeAutoRange?: boolean | undefined;
+ createApiMessageLogFile?: boolean | undefined;
+ includeMarketDataInLogFile?: boolean | undefined;
+ exposeTradingScheduleToApi?: boolean | undefined;
+ splitInsuredDepositFromCashBalance?: boolean | undefined;
+ sendZeroPositionsForTodayOnly?: boolean | undefined;
+ letApiAccountRequestsSwitchSubscription?: boolean | undefined;
+ useAccountGroupsWithAllocationMethods?: boolean | undefined;
+ loggingLevel?: string | undefined;
+ masterClientId?: number | undefined;
+ bulkDataTimeout?: number | undefined;
+ componentExchSeparator?: string | undefined;
+ showForexDataIn110Pips?: boolean | undefined;
+ allowForexTradingIn110Pips?: boolean | undefined;
+ roundAccountValuesToNearestWholeNumber?: boolean | undefined;
+ sendMarketDataInLotsForUsStocks?: boolean | undefined;
+ showAdvancedOrderRejectInUi?: boolean | undefined;
+ rejectMessagesAboveMaxRate?: boolean | undefined;
+ maintainConnectionOnIncorrectFields?: boolean | undefined;
+ compatibilityModeNasdaqStocks?: boolean | undefined;
+ sendInstrumentTimezone?: string | undefined;
+ sendForexDataInCompatibilityMode?: boolean | undefined;
+ maintainAndResubmitOrdersOnReconnect?: boolean | undefined;
+ historicalDataMaxSize?: number | undefined;
+ autoReportNettingEventContractTrades?: boolean | undefined;
+ optionExerciseRequestType?: string | undefined;
+ allowLocalhostOnly?: boolean | undefined;
+ trustedIPs: string[];
+}
+
+function createBaseApiSettingsConfig(): ApiSettingsConfig {
+ return {
+ readOnlyApi: undefined,
+ totalQuantityForMutualFunds: undefined,
+ downloadOpenOrdersOnConnection: undefined,
+ includeVirtualFxPositions: undefined,
+ prepareDailyPnL: undefined,
+ sendStatusUpdatesForVolatilityOrders: undefined,
+ encodeApiMessages: undefined,
+ socketPort: undefined,
+ useNegativeAutoRange: undefined,
+ createApiMessageLogFile: undefined,
+ includeMarketDataInLogFile: undefined,
+ exposeTradingScheduleToApi: undefined,
+ splitInsuredDepositFromCashBalance: undefined,
+ sendZeroPositionsForTodayOnly: undefined,
+ letApiAccountRequestsSwitchSubscription: undefined,
+ useAccountGroupsWithAllocationMethods: undefined,
+ loggingLevel: undefined,
+ masterClientId: undefined,
+ bulkDataTimeout: undefined,
+ componentExchSeparator: undefined,
+ showForexDataIn110Pips: undefined,
+ allowForexTradingIn110Pips: undefined,
+ roundAccountValuesToNearestWholeNumber: undefined,
+ sendMarketDataInLotsForUsStocks: undefined,
+ showAdvancedOrderRejectInUi: undefined,
+ rejectMessagesAboveMaxRate: undefined,
+ maintainConnectionOnIncorrectFields: undefined,
+ compatibilityModeNasdaqStocks: undefined,
+ sendInstrumentTimezone: undefined,
+ sendForexDataInCompatibilityMode: undefined,
+ maintainAndResubmitOrdersOnReconnect: undefined,
+ historicalDataMaxSize: undefined,
+ autoReportNettingEventContractTrades: undefined,
+ optionExerciseRequestType: undefined,
+ allowLocalhostOnly: undefined,
+ trustedIPs: [],
+ };
+}
+
+export const ApiSettingsConfig: MessageFns = {
+ encode(message: ApiSettingsConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.readOnlyApi !== undefined) {
+ writer.uint32(8).bool(message.readOnlyApi);
+ }
+ if (message.totalQuantityForMutualFunds !== undefined) {
+ writer.uint32(16).bool(message.totalQuantityForMutualFunds);
+ }
+ if (message.downloadOpenOrdersOnConnection !== undefined) {
+ writer.uint32(24).bool(message.downloadOpenOrdersOnConnection);
+ }
+ if (message.includeVirtualFxPositions !== undefined) {
+ writer.uint32(32).bool(message.includeVirtualFxPositions);
+ }
+ if (message.prepareDailyPnL !== undefined) {
+ writer.uint32(40).bool(message.prepareDailyPnL);
+ }
+ if (message.sendStatusUpdatesForVolatilityOrders !== undefined) {
+ writer.uint32(48).bool(message.sendStatusUpdatesForVolatilityOrders);
+ }
+ if (message.encodeApiMessages !== undefined) {
+ writer.uint32(58).string(message.encodeApiMessages);
+ }
+ if (message.socketPort !== undefined) {
+ writer.uint32(64).int32(message.socketPort);
+ }
+ if (message.useNegativeAutoRange !== undefined) {
+ writer.uint32(72).bool(message.useNegativeAutoRange);
+ }
+ if (message.createApiMessageLogFile !== undefined) {
+ writer.uint32(80).bool(message.createApiMessageLogFile);
+ }
+ if (message.includeMarketDataInLogFile !== undefined) {
+ writer.uint32(88).bool(message.includeMarketDataInLogFile);
+ }
+ if (message.exposeTradingScheduleToApi !== undefined) {
+ writer.uint32(96).bool(message.exposeTradingScheduleToApi);
+ }
+ if (message.splitInsuredDepositFromCashBalance !== undefined) {
+ writer.uint32(104).bool(message.splitInsuredDepositFromCashBalance);
+ }
+ if (message.sendZeroPositionsForTodayOnly !== undefined) {
+ writer.uint32(112).bool(message.sendZeroPositionsForTodayOnly);
+ }
+ if (message.letApiAccountRequestsSwitchSubscription !== undefined) {
+ writer.uint32(120).bool(message.letApiAccountRequestsSwitchSubscription);
+ }
+ if (message.useAccountGroupsWithAllocationMethods !== undefined) {
+ writer.uint32(128).bool(message.useAccountGroupsWithAllocationMethods);
+ }
+ if (message.loggingLevel !== undefined) {
+ writer.uint32(138).string(message.loggingLevel);
+ }
+ if (message.masterClientId !== undefined) {
+ writer.uint32(144).int32(message.masterClientId);
+ }
+ if (message.bulkDataTimeout !== undefined) {
+ writer.uint32(152).int32(message.bulkDataTimeout);
+ }
+ if (message.componentExchSeparator !== undefined) {
+ writer.uint32(162).string(message.componentExchSeparator);
+ }
+ if (message.showForexDataIn110Pips !== undefined) {
+ writer.uint32(168).bool(message.showForexDataIn110Pips);
+ }
+ if (message.allowForexTradingIn110Pips !== undefined) {
+ writer.uint32(176).bool(message.allowForexTradingIn110Pips);
+ }
+ if (message.roundAccountValuesToNearestWholeNumber !== undefined) {
+ writer.uint32(184).bool(message.roundAccountValuesToNearestWholeNumber);
+ }
+ if (message.sendMarketDataInLotsForUsStocks !== undefined) {
+ writer.uint32(192).bool(message.sendMarketDataInLotsForUsStocks);
+ }
+ if (message.showAdvancedOrderRejectInUi !== undefined) {
+ writer.uint32(200).bool(message.showAdvancedOrderRejectInUi);
+ }
+ if (message.rejectMessagesAboveMaxRate !== undefined) {
+ writer.uint32(208).bool(message.rejectMessagesAboveMaxRate);
+ }
+ if (message.maintainConnectionOnIncorrectFields !== undefined) {
+ writer.uint32(216).bool(message.maintainConnectionOnIncorrectFields);
+ }
+ if (message.compatibilityModeNasdaqStocks !== undefined) {
+ writer.uint32(224).bool(message.compatibilityModeNasdaqStocks);
+ }
+ if (message.sendInstrumentTimezone !== undefined) {
+ writer.uint32(234).string(message.sendInstrumentTimezone);
+ }
+ if (message.sendForexDataInCompatibilityMode !== undefined) {
+ writer.uint32(240).bool(message.sendForexDataInCompatibilityMode);
+ }
+ if (message.maintainAndResubmitOrdersOnReconnect !== undefined) {
+ writer.uint32(248).bool(message.maintainAndResubmitOrdersOnReconnect);
+ }
+ if (message.historicalDataMaxSize !== undefined) {
+ writer.uint32(256).int32(message.historicalDataMaxSize);
+ }
+ if (message.autoReportNettingEventContractTrades !== undefined) {
+ writer.uint32(264).bool(message.autoReportNettingEventContractTrades);
+ }
+ if (message.optionExerciseRequestType !== undefined) {
+ writer.uint32(274).string(message.optionExerciseRequestType);
+ }
+ if (message.allowLocalhostOnly !== undefined) {
+ writer.uint32(280).bool(message.allowLocalhostOnly);
+ }
+ for (const v of message.trustedIPs) {
+ writer.uint32(290).string(v!);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): ApiSettingsConfig {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseApiSettingsConfig();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.readOnlyApi = reader.bool();
+ continue;
+ }
+ case 2: {
+ if (tag !== 16) {
+ break;
+ }
+
+ message.totalQuantityForMutualFunds = reader.bool();
+ continue;
+ }
+ case 3: {
+ if (tag !== 24) {
+ break;
+ }
+
+ message.downloadOpenOrdersOnConnection = reader.bool();
+ continue;
+ }
+ case 4: {
+ if (tag !== 32) {
+ break;
+ }
+
+ message.includeVirtualFxPositions = reader.bool();
+ continue;
+ }
+ case 5: {
+ if (tag !== 40) {
+ break;
+ }
+
+ message.prepareDailyPnL = reader.bool();
+ continue;
+ }
+ case 6: {
+ if (tag !== 48) {
+ break;
+ }
+
+ message.sendStatusUpdatesForVolatilityOrders = reader.bool();
+ continue;
+ }
+ case 7: {
+ if (tag !== 58) {
+ break;
+ }
+
+ message.encodeApiMessages = reader.string();
+ continue;
+ }
+ case 8: {
+ if (tag !== 64) {
+ break;
+ }
+
+ message.socketPort = reader.int32();
+ continue;
+ }
+ case 9: {
+ if (tag !== 72) {
+ break;
+ }
+
+ message.useNegativeAutoRange = reader.bool();
+ continue;
+ }
+ case 10: {
+ if (tag !== 80) {
+ break;
+ }
+
+ message.createApiMessageLogFile = reader.bool();
+ continue;
+ }
+ case 11: {
+ if (tag !== 88) {
+ break;
+ }
+
+ message.includeMarketDataInLogFile = reader.bool();
+ continue;
+ }
+ case 12: {
+ if (tag !== 96) {
+ break;
+ }
+
+ message.exposeTradingScheduleToApi = reader.bool();
+ continue;
+ }
+ case 13: {
+ if (tag !== 104) {
+ break;
+ }
+
+ message.splitInsuredDepositFromCashBalance = reader.bool();
+ continue;
+ }
+ case 14: {
+ if (tag !== 112) {
+ break;
+ }
+
+ message.sendZeroPositionsForTodayOnly = reader.bool();
+ continue;
+ }
+ case 15: {
+ if (tag !== 120) {
+ break;
+ }
+
+ message.letApiAccountRequestsSwitchSubscription = reader.bool();
+ continue;
+ }
+ case 16: {
+ if (tag !== 128) {
+ break;
+ }
+
+ message.useAccountGroupsWithAllocationMethods = reader.bool();
+ continue;
+ }
+ case 17: {
+ if (tag !== 138) {
+ break;
+ }
+
+ message.loggingLevel = reader.string();
+ continue;
+ }
+ case 18: {
+ if (tag !== 144) {
+ break;
+ }
+
+ message.masterClientId = reader.int32();
+ continue;
+ }
+ case 19: {
+ if (tag !== 152) {
+ break;
+ }
+
+ message.bulkDataTimeout = reader.int32();
+ continue;
+ }
+ case 20: {
+ if (tag !== 162) {
+ break;
+ }
+
+ message.componentExchSeparator = reader.string();
+ continue;
+ }
+ case 21: {
+ if (tag !== 168) {
+ break;
+ }
+
+ message.showForexDataIn110Pips = reader.bool();
+ continue;
+ }
+ case 22: {
+ if (tag !== 176) {
+ break;
+ }
+
+ message.allowForexTradingIn110Pips = reader.bool();
+ continue;
+ }
+ case 23: {
+ if (tag !== 184) {
+ break;
+ }
+
+ message.roundAccountValuesToNearestWholeNumber = reader.bool();
+ continue;
+ }
+ case 24: {
+ if (tag !== 192) {
+ break;
+ }
+
+ message.sendMarketDataInLotsForUsStocks = reader.bool();
+ continue;
+ }
+ case 25: {
+ if (tag !== 200) {
+ break;
+ }
+
+ message.showAdvancedOrderRejectInUi = reader.bool();
+ continue;
+ }
+ case 26: {
+ if (tag !== 208) {
+ break;
+ }
+
+ message.rejectMessagesAboveMaxRate = reader.bool();
+ continue;
+ }
+ case 27: {
+ if (tag !== 216) {
+ break;
+ }
+
+ message.maintainConnectionOnIncorrectFields = reader.bool();
+ continue;
+ }
+ case 28: {
+ if (tag !== 224) {
+ break;
+ }
+
+ message.compatibilityModeNasdaqStocks = reader.bool();
+ continue;
+ }
+ case 29: {
+ if (tag !== 234) {
+ break;
+ }
+
+ message.sendInstrumentTimezone = reader.string();
+ continue;
+ }
+ case 30: {
+ if (tag !== 240) {
+ break;
+ }
+
+ message.sendForexDataInCompatibilityMode = reader.bool();
+ continue;
+ }
+ case 31: {
+ if (tag !== 248) {
+ break;
+ }
+
+ message.maintainAndResubmitOrdersOnReconnect = reader.bool();
+ continue;
+ }
+ case 32: {
+ if (tag !== 256) {
+ break;
+ }
+
+ message.historicalDataMaxSize = reader.int32();
+ continue;
+ }
+ case 33: {
+ if (tag !== 264) {
+ break;
+ }
+
+ message.autoReportNettingEventContractTrades = reader.bool();
+ continue;
+ }
+ case 34: {
+ if (tag !== 274) {
+ break;
+ }
+
+ message.optionExerciseRequestType = reader.string();
+ continue;
+ }
+ case 35: {
+ if (tag !== 280) {
+ break;
+ }
+
+ message.allowLocalhostOnly = reader.bool();
+ continue;
+ }
+ case 36: {
+ if (tag !== 290) {
+ break;
+ }
+
+ message.trustedIPs.push(reader.string());
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ApiSettingsConfig {
+ return {
+ readOnlyApi: isSet(object.readOnlyApi) ? globalThis.Boolean(object.readOnlyApi) : undefined,
+ totalQuantityForMutualFunds: isSet(object.totalQuantityForMutualFunds)
+ ? globalThis.Boolean(object.totalQuantityForMutualFunds)
+ : undefined,
+ downloadOpenOrdersOnConnection: isSet(object.downloadOpenOrdersOnConnection)
+ ? globalThis.Boolean(object.downloadOpenOrdersOnConnection)
+ : undefined,
+ includeVirtualFxPositions: isSet(object.includeVirtualFxPositions)
+ ? globalThis.Boolean(object.includeVirtualFxPositions)
+ : undefined,
+ prepareDailyPnL: isSet(object.prepareDailyPnL) ? globalThis.Boolean(object.prepareDailyPnL) : undefined,
+ sendStatusUpdatesForVolatilityOrders: isSet(object.sendStatusUpdatesForVolatilityOrders)
+ ? globalThis.Boolean(object.sendStatusUpdatesForVolatilityOrders)
+ : undefined,
+ encodeApiMessages: isSet(object.encodeApiMessages) ? globalThis.String(object.encodeApiMessages) : undefined,
+ socketPort: isSet(object.socketPort) ? globalThis.Number(object.socketPort) : undefined,
+ useNegativeAutoRange: isSet(object.useNegativeAutoRange)
+ ? globalThis.Boolean(object.useNegativeAutoRange)
+ : undefined,
+ createApiMessageLogFile: isSet(object.createApiMessageLogFile)
+ ? globalThis.Boolean(object.createApiMessageLogFile)
+ : undefined,
+ includeMarketDataInLogFile: isSet(object.includeMarketDataInLogFile)
+ ? globalThis.Boolean(object.includeMarketDataInLogFile)
+ : undefined,
+ exposeTradingScheduleToApi: isSet(object.exposeTradingScheduleToApi)
+ ? globalThis.Boolean(object.exposeTradingScheduleToApi)
+ : undefined,
+ splitInsuredDepositFromCashBalance: isSet(object.splitInsuredDepositFromCashBalance)
+ ? globalThis.Boolean(object.splitInsuredDepositFromCashBalance)
+ : undefined,
+ sendZeroPositionsForTodayOnly: isSet(object.sendZeroPositionsForTodayOnly)
+ ? globalThis.Boolean(object.sendZeroPositionsForTodayOnly)
+ : undefined,
+ letApiAccountRequestsSwitchSubscription: isSet(object.letApiAccountRequestsSwitchSubscription)
+ ? globalThis.Boolean(object.letApiAccountRequestsSwitchSubscription)
+ : undefined,
+ useAccountGroupsWithAllocationMethods: isSet(object.useAccountGroupsWithAllocationMethods)
+ ? globalThis.Boolean(object.useAccountGroupsWithAllocationMethods)
+ : undefined,
+ loggingLevel: isSet(object.loggingLevel) ? globalThis.String(object.loggingLevel) : undefined,
+ masterClientId: isSet(object.masterClientId) ? globalThis.Number(object.masterClientId) : undefined,
+ bulkDataTimeout: isSet(object.bulkDataTimeout) ? globalThis.Number(object.bulkDataTimeout) : undefined,
+ componentExchSeparator: isSet(object.componentExchSeparator)
+ ? globalThis.String(object.componentExchSeparator)
+ : undefined,
+ showForexDataIn110Pips: isSet(object.showForexDataIn110Pips)
+ ? globalThis.Boolean(object.showForexDataIn110Pips)
+ : isSet(object.showForexDataIn1_10Pips)
+ ? globalThis.Boolean(object.showForexDataIn1_10Pips)
+ : undefined,
+ allowForexTradingIn110Pips: isSet(object.allowForexTradingIn110Pips)
+ ? globalThis.Boolean(object.allowForexTradingIn110Pips)
+ : isSet(object.allowForexTradingIn1_10Pips)
+ ? globalThis.Boolean(object.allowForexTradingIn1_10Pips)
+ : undefined,
+ roundAccountValuesToNearestWholeNumber: isSet(object.roundAccountValuesToNearestWholeNumber)
+ ? globalThis.Boolean(object.roundAccountValuesToNearestWholeNumber)
+ : undefined,
+ sendMarketDataInLotsForUsStocks: isSet(object.sendMarketDataInLotsForUsStocks)
+ ? globalThis.Boolean(object.sendMarketDataInLotsForUsStocks)
+ : undefined,
+ showAdvancedOrderRejectInUi: isSet(object.showAdvancedOrderRejectInUi)
+ ? globalThis.Boolean(object.showAdvancedOrderRejectInUi)
+ : undefined,
+ rejectMessagesAboveMaxRate: isSet(object.rejectMessagesAboveMaxRate)
+ ? globalThis.Boolean(object.rejectMessagesAboveMaxRate)
+ : undefined,
+ maintainConnectionOnIncorrectFields: isSet(object.maintainConnectionOnIncorrectFields)
+ ? globalThis.Boolean(object.maintainConnectionOnIncorrectFields)
+ : undefined,
+ compatibilityModeNasdaqStocks: isSet(object.compatibilityModeNasdaqStocks)
+ ? globalThis.Boolean(object.compatibilityModeNasdaqStocks)
+ : undefined,
+ sendInstrumentTimezone: isSet(object.sendInstrumentTimezone)
+ ? globalThis.String(object.sendInstrumentTimezone)
+ : undefined,
+ sendForexDataInCompatibilityMode: isSet(object.sendForexDataInCompatibilityMode)
+ ? globalThis.Boolean(object.sendForexDataInCompatibilityMode)
+ : undefined,
+ maintainAndResubmitOrdersOnReconnect: isSet(object.maintainAndResubmitOrdersOnReconnect)
+ ? globalThis.Boolean(object.maintainAndResubmitOrdersOnReconnect)
+ : undefined,
+ historicalDataMaxSize: isSet(object.historicalDataMaxSize)
+ ? globalThis.Number(object.historicalDataMaxSize)
+ : undefined,
+ autoReportNettingEventContractTrades: isSet(object.autoReportNettingEventContractTrades)
+ ? globalThis.Boolean(object.autoReportNettingEventContractTrades)
+ : undefined,
+ optionExerciseRequestType: isSet(object.optionExerciseRequestType)
+ ? globalThis.String(object.optionExerciseRequestType)
+ : undefined,
+ allowLocalhostOnly: isSet(object.allowLocalhostOnly) ? globalThis.Boolean(object.allowLocalhostOnly) : undefined,
+ trustedIPs: globalThis.Array.isArray(object?.trustedIPs)
+ ? object.trustedIPs.map((e: any) => globalThis.String(e))
+ : [],
+ };
+ },
+
+ toJSON(message: ApiSettingsConfig): unknown {
+ const obj: any = {};
+ if (message.readOnlyApi !== undefined) {
+ obj.readOnlyApi = message.readOnlyApi;
+ }
+ if (message.totalQuantityForMutualFunds !== undefined) {
+ obj.totalQuantityForMutualFunds = message.totalQuantityForMutualFunds;
+ }
+ if (message.downloadOpenOrdersOnConnection !== undefined) {
+ obj.downloadOpenOrdersOnConnection = message.downloadOpenOrdersOnConnection;
+ }
+ if (message.includeVirtualFxPositions !== undefined) {
+ obj.includeVirtualFxPositions = message.includeVirtualFxPositions;
+ }
+ if (message.prepareDailyPnL !== undefined) {
+ obj.prepareDailyPnL = message.prepareDailyPnL;
+ }
+ if (message.sendStatusUpdatesForVolatilityOrders !== undefined) {
+ obj.sendStatusUpdatesForVolatilityOrders = message.sendStatusUpdatesForVolatilityOrders;
+ }
+ if (message.encodeApiMessages !== undefined) {
+ obj.encodeApiMessages = message.encodeApiMessages;
+ }
+ if (message.socketPort !== undefined) {
+ obj.socketPort = Math.round(message.socketPort);
+ }
+ if (message.useNegativeAutoRange !== undefined) {
+ obj.useNegativeAutoRange = message.useNegativeAutoRange;
+ }
+ if (message.createApiMessageLogFile !== undefined) {
+ obj.createApiMessageLogFile = message.createApiMessageLogFile;
+ }
+ if (message.includeMarketDataInLogFile !== undefined) {
+ obj.includeMarketDataInLogFile = message.includeMarketDataInLogFile;
+ }
+ if (message.exposeTradingScheduleToApi !== undefined) {
+ obj.exposeTradingScheduleToApi = message.exposeTradingScheduleToApi;
+ }
+ if (message.splitInsuredDepositFromCashBalance !== undefined) {
+ obj.splitInsuredDepositFromCashBalance = message.splitInsuredDepositFromCashBalance;
+ }
+ if (message.sendZeroPositionsForTodayOnly !== undefined) {
+ obj.sendZeroPositionsForTodayOnly = message.sendZeroPositionsForTodayOnly;
+ }
+ if (message.letApiAccountRequestsSwitchSubscription !== undefined) {
+ obj.letApiAccountRequestsSwitchSubscription = message.letApiAccountRequestsSwitchSubscription;
+ }
+ if (message.useAccountGroupsWithAllocationMethods !== undefined) {
+ obj.useAccountGroupsWithAllocationMethods = message.useAccountGroupsWithAllocationMethods;
+ }
+ if (message.loggingLevel !== undefined) {
+ obj.loggingLevel = message.loggingLevel;
+ }
+ if (message.masterClientId !== undefined) {
+ obj.masterClientId = Math.round(message.masterClientId);
+ }
+ if (message.bulkDataTimeout !== undefined) {
+ obj.bulkDataTimeout = Math.round(message.bulkDataTimeout);
+ }
+ if (message.componentExchSeparator !== undefined) {
+ obj.componentExchSeparator = message.componentExchSeparator;
+ }
+ if (message.showForexDataIn110Pips !== undefined) {
+ obj.showForexDataIn110Pips = message.showForexDataIn110Pips;
+ }
+ if (message.allowForexTradingIn110Pips !== undefined) {
+ obj.allowForexTradingIn110Pips = message.allowForexTradingIn110Pips;
+ }
+ if (message.roundAccountValuesToNearestWholeNumber !== undefined) {
+ obj.roundAccountValuesToNearestWholeNumber = message.roundAccountValuesToNearestWholeNumber;
+ }
+ if (message.sendMarketDataInLotsForUsStocks !== undefined) {
+ obj.sendMarketDataInLotsForUsStocks = message.sendMarketDataInLotsForUsStocks;
+ }
+ if (message.showAdvancedOrderRejectInUi !== undefined) {
+ obj.showAdvancedOrderRejectInUi = message.showAdvancedOrderRejectInUi;
+ }
+ if (message.rejectMessagesAboveMaxRate !== undefined) {
+ obj.rejectMessagesAboveMaxRate = message.rejectMessagesAboveMaxRate;
+ }
+ if (message.maintainConnectionOnIncorrectFields !== undefined) {
+ obj.maintainConnectionOnIncorrectFields = message.maintainConnectionOnIncorrectFields;
+ }
+ if (message.compatibilityModeNasdaqStocks !== undefined) {
+ obj.compatibilityModeNasdaqStocks = message.compatibilityModeNasdaqStocks;
+ }
+ if (message.sendInstrumentTimezone !== undefined) {
+ obj.sendInstrumentTimezone = message.sendInstrumentTimezone;
+ }
+ if (message.sendForexDataInCompatibilityMode !== undefined) {
+ obj.sendForexDataInCompatibilityMode = message.sendForexDataInCompatibilityMode;
+ }
+ if (message.maintainAndResubmitOrdersOnReconnect !== undefined) {
+ obj.maintainAndResubmitOrdersOnReconnect = message.maintainAndResubmitOrdersOnReconnect;
+ }
+ if (message.historicalDataMaxSize !== undefined) {
+ obj.historicalDataMaxSize = Math.round(message.historicalDataMaxSize);
+ }
+ if (message.autoReportNettingEventContractTrades !== undefined) {
+ obj.autoReportNettingEventContractTrades = message.autoReportNettingEventContractTrades;
+ }
+ if (message.optionExerciseRequestType !== undefined) {
+ obj.optionExerciseRequestType = message.optionExerciseRequestType;
+ }
+ if (message.allowLocalhostOnly !== undefined) {
+ obj.allowLocalhostOnly = message.allowLocalhostOnly;
+ }
+ if (message.trustedIPs?.length) {
+ obj.trustedIPs = message.trustedIPs;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): ApiSettingsConfig {
+ return ApiSettingsConfig.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): ApiSettingsConfig {
+ const message = createBaseApiSettingsConfig();
+ message.readOnlyApi = object.readOnlyApi ?? undefined;
+ message.totalQuantityForMutualFunds = object.totalQuantityForMutualFunds ?? undefined;
+ message.downloadOpenOrdersOnConnection = object.downloadOpenOrdersOnConnection ?? undefined;
+ message.includeVirtualFxPositions = object.includeVirtualFxPositions ?? undefined;
+ message.prepareDailyPnL = object.prepareDailyPnL ?? undefined;
+ message.sendStatusUpdatesForVolatilityOrders = object.sendStatusUpdatesForVolatilityOrders ?? undefined;
+ message.encodeApiMessages = object.encodeApiMessages ?? undefined;
+ message.socketPort = object.socketPort ?? undefined;
+ message.useNegativeAutoRange = object.useNegativeAutoRange ?? undefined;
+ message.createApiMessageLogFile = object.createApiMessageLogFile ?? undefined;
+ message.includeMarketDataInLogFile = object.includeMarketDataInLogFile ?? undefined;
+ message.exposeTradingScheduleToApi = object.exposeTradingScheduleToApi ?? undefined;
+ message.splitInsuredDepositFromCashBalance = object.splitInsuredDepositFromCashBalance ?? undefined;
+ message.sendZeroPositionsForTodayOnly = object.sendZeroPositionsForTodayOnly ?? undefined;
+ message.letApiAccountRequestsSwitchSubscription = object.letApiAccountRequestsSwitchSubscription ?? undefined;
+ message.useAccountGroupsWithAllocationMethods = object.useAccountGroupsWithAllocationMethods ?? undefined;
+ message.loggingLevel = object.loggingLevel ?? undefined;
+ message.masterClientId = object.masterClientId ?? undefined;
+ message.bulkDataTimeout = object.bulkDataTimeout ?? undefined;
+ message.componentExchSeparator = object.componentExchSeparator ?? undefined;
+ message.showForexDataIn110Pips = object.showForexDataIn110Pips ?? undefined;
+ message.allowForexTradingIn110Pips = object.allowForexTradingIn110Pips ?? undefined;
+ message.roundAccountValuesToNearestWholeNumber = object.roundAccountValuesToNearestWholeNumber ?? undefined;
+ message.sendMarketDataInLotsForUsStocks = object.sendMarketDataInLotsForUsStocks ?? undefined;
+ message.showAdvancedOrderRejectInUi = object.showAdvancedOrderRejectInUi ?? undefined;
+ message.rejectMessagesAboveMaxRate = object.rejectMessagesAboveMaxRate ?? undefined;
+ message.maintainConnectionOnIncorrectFields = object.maintainConnectionOnIncorrectFields ?? undefined;
+ message.compatibilityModeNasdaqStocks = object.compatibilityModeNasdaqStocks ?? undefined;
+ message.sendInstrumentTimezone = object.sendInstrumentTimezone ?? undefined;
+ message.sendForexDataInCompatibilityMode = object.sendForexDataInCompatibilityMode ?? undefined;
+ message.maintainAndResubmitOrdersOnReconnect = object.maintainAndResubmitOrdersOnReconnect ?? undefined;
+ message.historicalDataMaxSize = object.historicalDataMaxSize ?? undefined;
+ message.autoReportNettingEventContractTrades = object.autoReportNettingEventContractTrades ?? undefined;
+ message.optionExerciseRequestType = object.optionExerciseRequestType ?? undefined;
+ message.allowLocalhostOnly = object.allowLocalhostOnly ?? undefined;
+ message.trustedIPs = object.trustedIPs?.map((e) => e) || [];
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AttachedOrders.ts b/packages/ibkr/src/protobuf/AttachedOrders.ts
new file mode 100644
index 00000000..4353a381
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AttachedOrders.ts
@@ -0,0 +1,146 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AttachedOrders.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AttachedOrders {
+ slOrderId?: number | undefined;
+ slOrderType?: string | undefined;
+ ptOrderId?: number | undefined;
+ ptOrderType?: string | undefined;
+}
+
+function createBaseAttachedOrders(): AttachedOrders {
+ return { slOrderId: undefined, slOrderType: undefined, ptOrderId: undefined, ptOrderType: undefined };
+}
+
+export const AttachedOrders: MessageFns = {
+ encode(message: AttachedOrders, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.slOrderId !== undefined) {
+ writer.uint32(8).int32(message.slOrderId);
+ }
+ if (message.slOrderType !== undefined) {
+ writer.uint32(18).string(message.slOrderType);
+ }
+ if (message.ptOrderId !== undefined) {
+ writer.uint32(24).int32(message.ptOrderId);
+ }
+ if (message.ptOrderType !== undefined) {
+ writer.uint32(34).string(message.ptOrderType);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AttachedOrders {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAttachedOrders();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.slOrderId = reader.int32();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.slOrderType = reader.string();
+ continue;
+ }
+ case 3: {
+ if (tag !== 24) {
+ break;
+ }
+
+ message.ptOrderId = reader.int32();
+ continue;
+ }
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.ptOrderType = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AttachedOrders {
+ return {
+ slOrderId: isSet(object.slOrderId) ? globalThis.Number(object.slOrderId) : undefined,
+ slOrderType: isSet(object.slOrderType) ? globalThis.String(object.slOrderType) : undefined,
+ ptOrderId: isSet(object.ptOrderId) ? globalThis.Number(object.ptOrderId) : undefined,
+ ptOrderType: isSet(object.ptOrderType) ? globalThis.String(object.ptOrderType) : undefined,
+ };
+ },
+
+ toJSON(message: AttachedOrders): unknown {
+ const obj: any = {};
+ if (message.slOrderId !== undefined) {
+ obj.slOrderId = Math.round(message.slOrderId);
+ }
+ if (message.slOrderType !== undefined) {
+ obj.slOrderType = message.slOrderType;
+ }
+ if (message.ptOrderId !== undefined) {
+ obj.ptOrderId = Math.round(message.ptOrderId);
+ }
+ if (message.ptOrderType !== undefined) {
+ obj.ptOrderType = message.ptOrderType;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AttachedOrders {
+ return AttachedOrders.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AttachedOrders {
+ const message = createBaseAttachedOrders();
+ message.slOrderId = object.slOrderId ?? undefined;
+ message.slOrderType = object.slOrderType ?? undefined;
+ message.ptOrderId = object.ptOrderId ?? undefined;
+ message.ptOrderType = object.ptOrderType ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/AutoOpenOrdersRequest.ts b/packages/ibkr/src/protobuf/AutoOpenOrdersRequest.ts
new file mode 100644
index 00000000..af8edb57
--- /dev/null
+++ b/packages/ibkr/src/protobuf/AutoOpenOrdersRequest.ts
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: AutoOpenOrdersRequest.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface AutoOpenOrdersRequest {
+ autoBind?: boolean | undefined;
+}
+
+function createBaseAutoOpenOrdersRequest(): AutoOpenOrdersRequest {
+ return { autoBind: undefined };
+}
+
+export const AutoOpenOrdersRequest: MessageFns = {
+ encode(message: AutoOpenOrdersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.autoBind !== undefined) {
+ writer.uint32(8).bool(message.autoBind);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): AutoOpenOrdersRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAutoOpenOrdersRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.autoBind = reader.bool();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): AutoOpenOrdersRequest {
+ return { autoBind: isSet(object.autoBind) ? globalThis.Boolean(object.autoBind) : undefined };
+ },
+
+ toJSON(message: AutoOpenOrdersRequest): unknown {
+ const obj: any = {};
+ if (message.autoBind !== undefined) {
+ obj.autoBind = message.autoBind;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): AutoOpenOrdersRequest {
+ return AutoOpenOrdersRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): AutoOpenOrdersRequest {
+ const message = createBaseAutoOpenOrdersRequest();
+ message.autoBind = object.autoBind ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/CalculateImpliedVolatilityRequest.ts b/packages/ibkr/src/protobuf/CalculateImpliedVolatilityRequest.ts
new file mode 100644
index 00000000..9553a09d
--- /dev/null
+++ b/packages/ibkr/src/protobuf/CalculateImpliedVolatilityRequest.ts
@@ -0,0 +1,301 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: CalculateImpliedVolatilityRequest.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+import { Contract } from "./Contract";
+
+export const protobufPackage = "protobuf";
+
+export interface CalculateImpliedVolatilityRequest {
+ reqId?: number | undefined;
+ contract?: Contract | undefined;
+ optionPrice?: number | undefined;
+ underPrice?: number | undefined;
+ impliedVolatilityOptions: { [key: string]: string };
+}
+
+export interface CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry {
+ key: string;
+ value: string;
+}
+
+function createBaseCalculateImpliedVolatilityRequest(): CalculateImpliedVolatilityRequest {
+ return {
+ reqId: undefined,
+ contract: undefined,
+ optionPrice: undefined,
+ underPrice: undefined,
+ impliedVolatilityOptions: {},
+ };
+}
+
+export const CalculateImpliedVolatilityRequest: MessageFns = {
+ encode(message: CalculateImpliedVolatilityRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ if (message.contract !== undefined) {
+ Contract.encode(message.contract, writer.uint32(18).fork()).join();
+ }
+ if (message.optionPrice !== undefined) {
+ writer.uint32(25).double(message.optionPrice);
+ }
+ if (message.underPrice !== undefined) {
+ writer.uint32(33).double(message.underPrice);
+ }
+ globalThis.Object.entries(message.impliedVolatilityOptions).forEach(([key, value]: [string, string]) => {
+ CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry.encode(
+ { key: key as any, value },
+ writer.uint32(42).fork(),
+ ).join();
+ });
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): CalculateImpliedVolatilityRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCalculateImpliedVolatilityRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.contract = Contract.decode(reader, reader.uint32());
+ continue;
+ }
+ case 3: {
+ if (tag !== 25) {
+ break;
+ }
+
+ message.optionPrice = reader.double();
+ continue;
+ }
+ case 4: {
+ if (tag !== 33) {
+ break;
+ }
+
+ message.underPrice = reader.double();
+ continue;
+ }
+ case 5: {
+ if (tag !== 42) {
+ break;
+ }
+
+ const entry5 = CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry.decode(
+ reader,
+ reader.uint32(),
+ );
+ if (entry5.value !== undefined) {
+ message.impliedVolatilityOptions[entry5.key] = entry5.value;
+ }
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CalculateImpliedVolatilityRequest {
+ return {
+ reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined,
+ contract: isSet(object.contract) ? Contract.fromJSON(object.contract) : undefined,
+ optionPrice: isSet(object.optionPrice) ? globalThis.Number(object.optionPrice) : undefined,
+ underPrice: isSet(object.underPrice) ? globalThis.Number(object.underPrice) : undefined,
+ impliedVolatilityOptions: isObject(object.impliedVolatilityOptions)
+ ? (globalThis.Object.entries(object.impliedVolatilityOptions) as [string, any][]).reduce(
+ (acc: { [key: string]: string }, [key, value]: [string, any]) => {
+ acc[key] = globalThis.String(value);
+ return acc;
+ },
+ {},
+ )
+ : {},
+ };
+ },
+
+ toJSON(message: CalculateImpliedVolatilityRequest): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ if (message.contract !== undefined) {
+ obj.contract = Contract.toJSON(message.contract);
+ }
+ if (message.optionPrice !== undefined) {
+ obj.optionPrice = message.optionPrice;
+ }
+ if (message.underPrice !== undefined) {
+ obj.underPrice = message.underPrice;
+ }
+ if (message.impliedVolatilityOptions) {
+ const entries = globalThis.Object.entries(message.impliedVolatilityOptions) as [string, string][];
+ if (entries.length > 0) {
+ obj.impliedVolatilityOptions = {};
+ entries.forEach(([k, v]) => {
+ obj.impliedVolatilityOptions[k] = v;
+ });
+ }
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): CalculateImpliedVolatilityRequest {
+ return CalculateImpliedVolatilityRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): CalculateImpliedVolatilityRequest {
+ const message = createBaseCalculateImpliedVolatilityRequest();
+ message.reqId = object.reqId ?? undefined;
+ message.contract = (object.contract !== undefined && object.contract !== null)
+ ? Contract.fromPartial(object.contract)
+ : undefined;
+ message.optionPrice = object.optionPrice ?? undefined;
+ message.underPrice = object.underPrice ?? undefined;
+ message.impliedVolatilityOptions =
+ (globalThis.Object.entries(object.impliedVolatilityOptions ?? {}) as [string, string][]).reduce(
+ (acc: { [key: string]: string }, [key, value]: [string, string]) => {
+ if (value !== undefined) {
+ acc[key] = globalThis.String(value);
+ }
+ return acc;
+ },
+ {},
+ );
+ return message;
+ },
+};
+
+function createBaseCalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry(): CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry {
+ return { key: "", value: "" };
+}
+
+export const CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry: MessageFns<
+ CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry
+> = {
+ encode(
+ message: CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry,
+ writer: BinaryWriter = new BinaryWriter(),
+ ): BinaryWriter {
+ if (message.key !== "") {
+ writer.uint32(10).string(message.key);
+ }
+ if (message.value !== "") {
+ writer.uint32(18).string(message.value);
+ }
+ return writer;
+ },
+
+ decode(
+ input: BinaryReader | Uint8Array,
+ length?: number,
+ ): CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.key = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.value = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry {
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
+ },
+
+ toJSON(message: CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry): unknown {
+ const obj: any = {};
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
+ return obj;
+ },
+
+ create(
+ base?: DeepPartial,
+ ): CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry {
+ return CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry.fromPartial(base ?? {});
+ },
+ fromPartial(
+ object: DeepPartial,
+ ): CalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry {
+ const message = createBaseCalculateImpliedVolatilityRequest_ImpliedVolatilityOptionsEntry();
+ message.key = object.key ?? "";
+ message.value = object.value ?? "";
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isObject(value: any): boolean {
+ return typeof value === "object" && value !== null;
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/CalculateOptionPriceRequest.ts b/packages/ibkr/src/protobuf/CalculateOptionPriceRequest.ts
new file mode 100644
index 00000000..c4b76465
--- /dev/null
+++ b/packages/ibkr/src/protobuf/CalculateOptionPriceRequest.ts
@@ -0,0 +1,290 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: CalculateOptionPriceRequest.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+import { Contract } from "./Contract";
+
+export const protobufPackage = "protobuf";
+
+export interface CalculateOptionPriceRequest {
+ reqId?: number | undefined;
+ contract?: Contract | undefined;
+ volatility?: number | undefined;
+ underPrice?: number | undefined;
+ optionPriceOptions: { [key: string]: string };
+}
+
+export interface CalculateOptionPriceRequest_OptionPriceOptionsEntry {
+ key: string;
+ value: string;
+}
+
+function createBaseCalculateOptionPriceRequest(): CalculateOptionPriceRequest {
+ return {
+ reqId: undefined,
+ contract: undefined,
+ volatility: undefined,
+ underPrice: undefined,
+ optionPriceOptions: {},
+ };
+}
+
+export const CalculateOptionPriceRequest: MessageFns = {
+ encode(message: CalculateOptionPriceRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ if (message.contract !== undefined) {
+ Contract.encode(message.contract, writer.uint32(18).fork()).join();
+ }
+ if (message.volatility !== undefined) {
+ writer.uint32(25).double(message.volatility);
+ }
+ if (message.underPrice !== undefined) {
+ writer.uint32(33).double(message.underPrice);
+ }
+ globalThis.Object.entries(message.optionPriceOptions).forEach(([key, value]: [string, string]) => {
+ CalculateOptionPriceRequest_OptionPriceOptionsEntry.encode({ key: key as any, value }, writer.uint32(42).fork())
+ .join();
+ });
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): CalculateOptionPriceRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCalculateOptionPriceRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.contract = Contract.decode(reader, reader.uint32());
+ continue;
+ }
+ case 3: {
+ if (tag !== 25) {
+ break;
+ }
+
+ message.volatility = reader.double();
+ continue;
+ }
+ case 4: {
+ if (tag !== 33) {
+ break;
+ }
+
+ message.underPrice = reader.double();
+ continue;
+ }
+ case 5: {
+ if (tag !== 42) {
+ break;
+ }
+
+ const entry5 = CalculateOptionPriceRequest_OptionPriceOptionsEntry.decode(reader, reader.uint32());
+ if (entry5.value !== undefined) {
+ message.optionPriceOptions[entry5.key] = entry5.value;
+ }
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CalculateOptionPriceRequest {
+ return {
+ reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined,
+ contract: isSet(object.contract) ? Contract.fromJSON(object.contract) : undefined,
+ volatility: isSet(object.volatility) ? globalThis.Number(object.volatility) : undefined,
+ underPrice: isSet(object.underPrice) ? globalThis.Number(object.underPrice) : undefined,
+ optionPriceOptions: isObject(object.optionPriceOptions)
+ ? (globalThis.Object.entries(object.optionPriceOptions) as [string, any][]).reduce(
+ (acc: { [key: string]: string }, [key, value]: [string, any]) => {
+ acc[key] = globalThis.String(value);
+ return acc;
+ },
+ {},
+ )
+ : {},
+ };
+ },
+
+ toJSON(message: CalculateOptionPriceRequest): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ if (message.contract !== undefined) {
+ obj.contract = Contract.toJSON(message.contract);
+ }
+ if (message.volatility !== undefined) {
+ obj.volatility = message.volatility;
+ }
+ if (message.underPrice !== undefined) {
+ obj.underPrice = message.underPrice;
+ }
+ if (message.optionPriceOptions) {
+ const entries = globalThis.Object.entries(message.optionPriceOptions) as [string, string][];
+ if (entries.length > 0) {
+ obj.optionPriceOptions = {};
+ entries.forEach(([k, v]) => {
+ obj.optionPriceOptions[k] = v;
+ });
+ }
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): CalculateOptionPriceRequest {
+ return CalculateOptionPriceRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): CalculateOptionPriceRequest {
+ const message = createBaseCalculateOptionPriceRequest();
+ message.reqId = object.reqId ?? undefined;
+ message.contract = (object.contract !== undefined && object.contract !== null)
+ ? Contract.fromPartial(object.contract)
+ : undefined;
+ message.volatility = object.volatility ?? undefined;
+ message.underPrice = object.underPrice ?? undefined;
+ message.optionPriceOptions = (globalThis.Object.entries(object.optionPriceOptions ?? {}) as [string, string][])
+ .reduce((acc: { [key: string]: string }, [key, value]: [string, string]) => {
+ if (value !== undefined) {
+ acc[key] = globalThis.String(value);
+ }
+ return acc;
+ }, {});
+ return message;
+ },
+};
+
+function createBaseCalculateOptionPriceRequest_OptionPriceOptionsEntry(): CalculateOptionPriceRequest_OptionPriceOptionsEntry {
+ return { key: "", value: "" };
+}
+
+export const CalculateOptionPriceRequest_OptionPriceOptionsEntry: MessageFns<
+ CalculateOptionPriceRequest_OptionPriceOptionsEntry
+> = {
+ encode(
+ message: CalculateOptionPriceRequest_OptionPriceOptionsEntry,
+ writer: BinaryWriter = new BinaryWriter(),
+ ): BinaryWriter {
+ if (message.key !== "") {
+ writer.uint32(10).string(message.key);
+ }
+ if (message.value !== "") {
+ writer.uint32(18).string(message.value);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): CalculateOptionPriceRequest_OptionPriceOptionsEntry {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCalculateOptionPriceRequest_OptionPriceOptionsEntry();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.key = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.value = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CalculateOptionPriceRequest_OptionPriceOptionsEntry {
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
+ },
+
+ toJSON(message: CalculateOptionPriceRequest_OptionPriceOptionsEntry): unknown {
+ const obj: any = {};
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
+ return obj;
+ },
+
+ create(
+ base?: DeepPartial,
+ ): CalculateOptionPriceRequest_OptionPriceOptionsEntry {
+ return CalculateOptionPriceRequest_OptionPriceOptionsEntry.fromPartial(base ?? {});
+ },
+ fromPartial(
+ object: DeepPartial,
+ ): CalculateOptionPriceRequest_OptionPriceOptionsEntry {
+ const message = createBaseCalculateOptionPriceRequest_OptionPriceOptionsEntry();
+ message.key = object.key ?? "";
+ message.value = object.value ?? "";
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isObject(value: any): boolean {
+ return typeof value === "object" && value !== null;
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/CancelAccountSummary.ts b/packages/ibkr/src/protobuf/CancelAccountSummary.ts
new file mode 100644
index 00000000..74fc640a
--- /dev/null
+++ b/packages/ibkr/src/protobuf/CancelAccountSummary.ts
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: CancelAccountSummary.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface CancelAccountSummary {
+ reqId?: number | undefined;
+}
+
+function createBaseCancelAccountSummary(): CancelAccountSummary {
+ return { reqId: undefined };
+}
+
+export const CancelAccountSummary: MessageFns = {
+ encode(message: CancelAccountSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): CancelAccountSummary {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCancelAccountSummary();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CancelAccountSummary {
+ return { reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined };
+ },
+
+ toJSON(message: CancelAccountSummary): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): CancelAccountSummary {
+ return CancelAccountSummary.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial): CancelAccountSummary {
+ const message = createBaseCancelAccountSummary();
+ message.reqId = object.reqId ?? undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial = T extends Builtin ? T
+ : T extends globalThis.Array ? globalThis.Array>
+ : T extends ReadonlyArray ? ReadonlyArray>
+ : T extends {} ? { [K in keyof T]?: DeepPartial }
+ : Partial;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
+
+export interface MessageFns {
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
+ fromJSON(object: any): T;
+ toJSON(message: T): unknown;
+ create(base?: DeepPartial): T;
+ fromPartial(object: DeepPartial): T;
+}
diff --git a/packages/ibkr/src/protobuf/CancelAccountUpdatesMulti.ts b/packages/ibkr/src/protobuf/CancelAccountUpdatesMulti.ts
new file mode 100644
index 00000000..589a77e4
--- /dev/null
+++ b/packages/ibkr/src/protobuf/CancelAccountUpdatesMulti.ts
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
+// versions:
+// protoc-gen-ts_proto v2.11.5
+// protoc v7.34.0
+// source: CancelAccountUpdatesMulti.proto
+
+/* eslint-disable */
+import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
+
+export const protobufPackage = "protobuf";
+
+export interface CancelAccountUpdatesMulti {
+ reqId?: number | undefined;
+}
+
+function createBaseCancelAccountUpdatesMulti(): CancelAccountUpdatesMulti {
+ return { reqId: undefined };
+}
+
+export const CancelAccountUpdatesMulti: MessageFns = {
+ encode(message: CancelAccountUpdatesMulti, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.reqId !== undefined) {
+ writer.uint32(8).int32(message.reqId);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): CancelAccountUpdatesMulti {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ const end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCancelAccountUpdatesMulti();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 8) {
+ break;
+ }
+
+ message.reqId = reader.int32();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CancelAccountUpdatesMulti {
+ return { reqId: isSet(object.reqId) ? globalThis.Number(object.reqId) : undefined };
+ },
+
+ toJSON(message: CancelAccountUpdatesMulti): unknown {
+ const obj: any = {};
+ if (message.reqId !== undefined) {
+ obj.reqId = Math.round(message.reqId);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial): CancelAccountUpdatesMulti {
+ return CancelAccountUpdatesMulti.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial