import { BatchCancelOrdersRequest, BatchCancelOrdersResponse, BatchCreateOrdersRequest, BatchCreateOrdersResponse, BatchReplaceOrdersRequest, BatchReplaceOrdersResponse, CancelAllAfterRequest, CancelAllAfterResponse, CancelAllOrdersRequest, CancelAllOrdersResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, ErrorDetail, ModifyOrderRequest, ModifyOrderResponse } from "../../orders/v1/orders_pb.js"; import { Message } from "@bufbuild/protobuf"; import { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; declare namespace trade_ws_pb_d_exports { export { AckResponse, AckResponseSchema, ClientFrame, ClientFrameSchema, CommandReject, CommandRejectSchema, OverloadResponse, OverloadResponseSchema, PingRequest, PingRequestSchema, PongResponse, PongResponseSchema, ServerFrame, ServerFrameSchema, TerminalSessionEvent, TerminalSessionEventSchema, file_tradews_v1_trade_ws }; } /** * Describes the file tradews/v1/trade_ws.proto. */ declare const file_tradews_v1_trade_ws: GenFile; /** * ClientFrame is the protobuf write-websocket envelope. Its payloads reuse the * public Orders API request contracts so every transport shares one order model. * * @generated from message tradews.v1.ClientFrame */ type ClientFrame = Message<"tradews.v1.ClientFrame"> & { /** * Monotonic per-connection client sequence number, starting at 1. * * @generated from field: uint64 seq = 1; */ seq: bigint; /** * Client correlation token echoed in every server response. * * @generated from field: string correlation_id = 2; */ correlationId: string; /** * Optional client time the command was sent, in milliseconds since the Unix * epoch. When set, the command is processed only until timestamp_ms plus * recv_window_ms: a command that arrives, or waits to be sent on for * admission, past then is rejected with REQUEST_DEADLINE_EXCEEDED and * changes nothing, but it has taken its seq, so the next command uses the * next seq. A timestamp more than 1 second ahead of the server clock is * rejected with BAD_REQUEST, without taking the seq. Zero sets no * deadline. Ping ignores it. * * @generated from field: int64 timestamp_ms = 3; */ timestampMs: bigint; /** * Optional receive window in milliseconds, from 1 to 60000, applied to * timestamp_ms. Zero uses 5000. Setting it without timestamp_ms is * rejected with BAD_REQUEST. * * @generated from field: uint32 recv_window_ms = 4; */ recvWindowMs: number; /** * @generated from oneof tradews.v1.ClientFrame.payload */ payload: { /** * Liveness request that does not submit an order command. * * @generated from field: tradews.v1.PingRequest ping = 10; */ value: PingRequest; case: "ping"; } | { /** * Create-order command using the public Orders API request contract, * including its required base-quantity or maximum-quote-debit sizing choice. * * @generated from field: orders.v1.CreateOrderRequest create_order = 11; */ value: CreateOrderRequest; case: "createOrder"; } | { /** * Cancel-order command using the public Orders API request contract. * * @generated from field: orders.v1.CancelOrderRequest cancel_order = 12; */ value: CancelOrderRequest; case: "cancelOrder"; } | { /** * Modify-order command using the public Orders API request contract. * * @generated from field: orders.v1.ModifyOrderRequest modify_order = 13; */ value: ModifyOrderRequest; case: "modifyOrder"; } | { /** * Cancel-all command using the public Orders API request contract. * * @generated from field: orders.v1.CancelAllOrdersRequest cancel_all_orders = 14; */ value: CancelAllOrdersRequest; case: "cancelAllOrders"; } | { /** * Batch create command using the public Orders API request contract: up * to 20 orders, each admitted or rejected on its own. request_id is the * same account-scoped idempotency key as the Orders API's: resending the * same request_id and items, over this WebSocket or the Orders API, * replays the original per-item results instead of creating orders again. * * @generated from field: orders.v1.BatchCreateOrdersRequest batch_create_orders = 15; */ value: BatchCreateOrdersRequest; case: "batchCreateOrders"; } | { /** * Batch replace command using the public Orders API request contract: up * to 50 orders on one trading pair, each amended in place or replaced as * the Orders API decides, under the same request_id idempotency as the * Orders API. * * @generated from field: orders.v1.BatchReplaceOrdersRequest batch_replace_orders = 16; */ value: BatchReplaceOrdersRequest; case: "batchReplaceOrders"; } | { /** * Batch cancel command using the public Orders API request contract: up * to 50 cancellations, each accepted or rejected on its own, under the * same request_id idempotency as the Orders API. * * @generated from field: orders.v1.BatchCancelOrdersRequest batch_cancel_orders = 17; */ value: BatchCancelOrdersRequest; case: "batchCancelOrders"; } | { /** * Cancel-all-after command using the public Orders API request * contract: arms, refreshes or disarms the account's dead-man switch, * the same switch as the Orders API's CancelAllAfter, with the same * symbol and side scope and the same timeout rule (0 disarms; 10 to 120 * seconds arms or refreshes). On expiry it cancels the account's open * orders in scope, including orders that triggers placed, and no * trigger. The switch belongs to the account, not to this connection: * closing the connection neither disarms nor fires it. Refresh it well * within the timeout, for example every 15 to 30 seconds with a * 60-second timeout. Resending a request is safe: an arm restarts the * timer from when it applies, and a disarm is idempotent. request_id is * required, as on the Orders API; subaccount_id must be omitted. * * @generated from field: orders.v1.CancelAllAfterRequest cancel_all_after = 18; */ value: CancelAllAfterRequest; case: "cancelAllAfter"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message tradews.v1.ClientFrame. * Use `create(ClientFrameSchema)` to create a new message. */ declare const ClientFrameSchema: GenMessage; /** * PingRequest carries an opaque payload that is echoed by PongResponse. * * @generated from message tradews.v1.PingRequest */ type PingRequest = Message<"tradews.v1.PingRequest"> & { /** * Opaque client payload echoed by the server. * * @generated from field: bytes payload = 1; */ payload: Uint8Array; }; /** * Describes the message tradews.v1.PingRequest. * Use `create(PingRequestSchema)` to create a new message. */ declare const PingRequestSchema: GenMessage; /** * ServerFrame is the protobuf write-websocket response envelope. * * @generated from message tradews.v1.ServerFrame */ type ServerFrame = Message<"tradews.v1.ServerFrame"> & { /** * Client sequence number copied from the accepted or rejected frame. * * @generated from field: uint64 seq = 1; */ seq: bigint; /** * Client correlation token copied from the accepted or rejected frame. * * @generated from field: string correlation_id = 2; */ correlationId: string; /** * @generated from oneof tradews.v1.ServerFrame.payload */ payload: { /** * Liveness response for PingRequest. * * @generated from field: tradews.v1.PongResponse pong = 10; */ value: PongResponse; case: "pong"; } | { /** * Successful command acknowledgement. A batch acknowledgement carries * each item's own result, accepted or rejected. * * @generated from field: tradews.v1.AckResponse ack = 11; */ value: AckResponse; case: "ack"; } | { /** * Command-level reject with a stable machine-readable code. A batch * rejected as busy (ENGINE_BUSY or UNAVAILABLE), or one whose * acknowledgement never arrived, may have taken effect for some items: * resend it with the same request_id and items to resolve or replay it, * and do not assume it placed or canceled no orders. * * @generated from field: tradews.v1.CommandReject reject = 12; */ value: CommandReject; case: "reject"; } | { /** * Server overload response when the session cannot admit more work. * * @generated from field: tradews.v1.OverloadResponse overload = 13; */ value: OverloadResponse; case: "overload"; } | { /** * Terminal session-level response after which the server closes the stream. * * @generated from field: tradews.v1.TerminalSessionEvent terminal = 14; */ value: TerminalSessionEvent; case: "terminal"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message tradews.v1.ServerFrame. * Use `create(ServerFrameSchema)` to create a new message. */ declare const ServerFrameSchema: GenMessage; /** * PongResponse echoes a PingRequest payload. * * @generated from message tradews.v1.PongResponse */ type PongResponse = Message<"tradews.v1.PongResponse"> & { /** * Opaque payload copied from PingRequest. * * @generated from field: bytes payload = 1; */ payload: Uint8Array; }; /** * Describes the message tradews.v1.PongResponse. * Use `create(PongResponseSchema)` to create a new message. */ declare const PongResponseSchema: GenMessage; /** * AckResponse carries the command-specific public Orders API acknowledgement. * * @generated from message tradews.v1.AckResponse */ type AckResponse = Message<"tradews.v1.AckResponse"> & { /** * @generated from oneof tradews.v1.AckResponse.result */ result: { /** * Accepted create-order response. * * @generated from field: orders.v1.CreateOrderResponse create_order = 1; */ value: CreateOrderResponse; case: "createOrder"; } | { /** * Accepted cancel-order response. * * @generated from field: orders.v1.CancelOrderResponse cancel_order = 2; */ value: CancelOrderResponse; case: "cancelOrder"; } | { /** * Accepted modify-order response. * * @generated from field: orders.v1.ModifyOrderResponse modify_order = 3; */ value: ModifyOrderResponse; case: "modifyOrder"; } | { /** * Accepted cancel-all response. * * @generated from field: orders.v1.CancelAllOrdersResponse cancel_all_orders = 4; */ value: CancelAllOrdersResponse; case: "cancelAllOrders"; } | { /** * Batch create response with one result per requested order, in request * order. A rejected item carries its typed error; the others still count. * * @generated from field: orders.v1.BatchCreateOrdersResponse batch_create_orders = 5; */ value: BatchCreateOrdersResponse; case: "batchCreateOrders"; } | { /** * Batch replace admission receipt with one result per requested * replacement, in request order. * * @generated from field: orders.v1.BatchReplaceOrdersResponse batch_replace_orders = 6; */ value: BatchReplaceOrdersResponse; case: "batchReplaceOrders"; } | { /** * Batch cancel response with one result per requested cancellation, in * request order. * * @generated from field: orders.v1.BatchCancelOrdersResponse batch_cancel_orders = 7; */ value: BatchCancelOrdersResponse; case: "batchCancelOrders"; } | { /** * Cancel-all-after response: the account's dead-man switch after the * request applied, its deadline and its recorded scope. * * @generated from field: orders.v1.CancelAllAfterResponse cancel_all_after = 8; */ value: CancelAllAfterResponse; case: "cancelAllAfter"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message tradews.v1.AckResponse. * Use `create(AckResponseSchema)` to create a new message. */ declare const AckResponseSchema: GenMessage; /** * CommandReject reports a command-level failure without closing the session. * * @generated from message tradews.v1.CommandReject */ type CommandReject = Message<"tradews.v1.CommandReject"> & { /** * Stable machine-readable reject code. * * @generated from field: string code = 1; */ code: string; /** * Client-safe diagnostic detail. * * @generated from field: string detail = 2; */ detail: string; /** * Structured error details, including retry guidance for rate-limit rejections. * * @generated from field: orders.v1.ErrorDetail error = 3; */ error?: ErrorDetail | undefined; }; /** * Describes the message tradews.v1.CommandReject. * Use `create(CommandRejectSchema)` to create a new message. */ declare const CommandRejectSchema: GenMessage; /** * OverloadResponse reports that the session exceeded server admission limits. * * @generated from message tradews.v1.OverloadResponse */ type OverloadResponse = Message<"tradews.v1.OverloadResponse"> & { /** * Stable machine-readable overload code. * * @generated from field: string code = 1; */ code: string; /** * Client-safe diagnostic detail. * * @generated from field: string detail = 2; */ detail: string; }; /** * Describes the message tradews.v1.OverloadResponse. * Use `create(OverloadResponseSchema)` to create a new message. */ declare const OverloadResponseSchema: GenMessage; /** * TerminalSessionEvent reports a terminal session condition. * * @generated from message tradews.v1.TerminalSessionEvent */ type TerminalSessionEvent = Message<"tradews.v1.TerminalSessionEvent"> & { /** * Stable machine-readable terminal code. * * @generated from field: string code = 1; */ code: string; /** * Client-safe diagnostic detail. * * @generated from field: string detail = 2; */ detail: string; }; /** * Describes the message tradews.v1.TerminalSessionEvent. * Use `create(TerminalSessionEventSchema)` to create a new message. */ declare const TerminalSessionEventSchema: GenMessage; //#endregion export { AckResponse, AckResponseSchema, ClientFrame, ClientFrameSchema, CommandReject, CommandRejectSchema, OverloadResponse, OverloadResponseSchema, PingRequest, PingRequestSchema, PongResponse, PongResponseSchema, ServerFrame, ServerFrameSchema, TerminalSessionEvent, TerminalSessionEventSchema, file_tradews_v1_trade_ws, trade_ws_pb_d_exports }; //# sourceMappingURL=trade_ws_pb.d.ts.map