import { AccountCode, TransferCode } from "../../ledger/v1/catalog_pb.js"; import { U128 } from "../../polyester/type/v1/u128_pb.js"; import { BatchReplaceAdmissionStatus, ErrorCode, FeeAsset, ModifyActionTaken, OrderType, SelfTradePreventionMode, Side, StopLossPolicy, TakeProfitPolicy, TimeInForce, TrailingStopPolicy } from "./orders_pb.js"; import { Message } from "@bufbuild/protobuf"; import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { Timestamp } from "@bufbuild/protobuf/wkt"; declare namespace orders_read_pb_d_exports { export { AttachedRisk, AttachedRiskLegState, AttachedRiskLegStateSchema, AttachedRiskLegState_Status, AttachedRiskLegState_StatusSchema, AttachedRiskSchema, AttachedRiskStopLoss, AttachedRiskStopLossSchema, AttachedRiskTakeProfit, AttachedRiskTakeProfitSchema, AttachedRiskTrailingStop, AttachedRiskTrailingStopSchema, BatchReplacePhase, BatchReplacePhaseSchema, BatchReplaceStatusItem, BatchReplaceStatusItemSchema, CancelReason, CancelReasonSchema, GetBatchReplaceStatusRequest, GetBatchReplaceStatusRequestSchema, GetBatchReplaceStatusResponse, GetBatchReplaceStatusResponseSchema, GetOpenOrdersRequest, GetOpenOrdersRequestSchema, GetOpenOrdersResponse, GetOpenOrdersResponseSchema, GetOrderHistoryRequest, GetOrderHistoryRequestSchema, GetOrderHistoryResponse, GetOrderHistoryResponseSchema, GetOrderRequest, GetOrderRequestSchema, GetOrderResponse, GetOrderResponseSchema, GetUserTradesRequest, GetUserTradesRequestSchema, GetUserTradesResponse, GetUserTradesResponseSchema, Order, OrderFeeTotal, OrderFeeTotalSchema, OrderLineage, OrderLineageSchema, OrderOrigin, OrderOriginSchema, OrderOriginScope, OrderOriginScopeSchema, OrderSchema, OrderStatus, OrderStatusSchema, OrderTransfer, OrderTransferSchema, OrderTriggerType, OrderTriggerTypeSchema, OrdersReadService, UserTrade, UserTradeBatch, UserTradeBatchSchema, UserTradeSchema, file_orders_v1_orders_read }; } /** * Describes the file orders/v1/orders_read.proto. */ declare const file_orders_v1_orders_read: GenFile; /** * OrderOrigin explains why an order exists and where it came from. * * Population rules: * - direct/manual orders: scope=DIRECT; trigger fields unset/unspecified. * - attached children: scope=ATTACHED_RISK; parent_order_id is set. * - standalone trigger children: scope=STANDALONE_TRIGGER. * - child_seq is set for multi-child strategies (for example TWAP/LADDER). * * @generated from message orders.v1.OrderOrigin */ type OrderOrigin = Message<"orders.v1.OrderOrigin"> & { /** * Broad class describing how the order was created. * * @generated from field: orders.v1.OrderOriginScope scope = 1; */ scope: OrderOriginScope; /** * Trigger strategy that created this order. Not set for direct orders; JSON * and REST responses then omit it. * * @generated from field: orders.v1.OrderTriggerType trigger_type = 2; */ triggerType: OrderTriggerType; /** * Trigger identifier when the order was created by a trigger. * * @generated from field: optional fixed64 trigger_id = 3; */ triggerId?: bigint | undefined; /** * Parent order ID for attached-risk child orders. * * @generated from field: optional fixed64 parent_order_id = 4; */ parentOrderId?: bigint | undefined; /** * Child sequence number for multi-child trigger strategies. Zero when not applicable. * * @generated from field: uint32 child_seq = 5; */ childSeq: number; }; /** * Describes the message orders.v1.OrderOrigin. * Use `create(OrderOriginSchema)` to create a new message. */ declare const OrderOriginSchema: GenMessage; /** * AttachedRiskLegState provides runtime linkage/state for one attached-risk leg. * * @generated from message orders.v1.AttachedRiskLegState */ type AttachedRiskLegState = Message<"orders.v1.AttachedRiskLegState"> & { /** * Current runtime lifecycle status for this attached-risk leg. * * @generated from field: orders.v1.AttachedRiskLegState.Status status = 1; */ status: AttachedRiskLegState_Status; /** * Time the leg was armed, in nanoseconds since epoch (UTC). Zero if not armed. * * @generated from field: uint64 armed_ts_ns = 2; */ armedTsNs: bigint; /** * Time the leg reached a terminal state, in nanoseconds since epoch (UTC). Zero if not terminal. * * @generated from field: uint64 terminal_ts_ns = 3; */ terminalTsNs: bigint; /** * Trigger identifier for this attached-risk leg. * * @generated from field: optional fixed64 trigger_id = 4; */ triggerId?: bigint | undefined; /** * Child order ID created by this leg after it fires. * * @generated from field: optional fixed64 child_order_id = 5; */ childOrderId?: bigint | undefined; }; /** * Describes the message orders.v1.AttachedRiskLegState. * Use `create(AttachedRiskLegStateSchema)` to create a new message. */ declare const AttachedRiskLegStateSchema: GenMessage; /** * Runtime lifecycle for an attached-risk trigger leg. * * @generated from enum orders.v1.AttachedRiskLegState.Status */ declare enum AttachedRiskLegState_Status { /** * Attached-risk leg status was not provided. * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ STATUS_UNSPECIFIED = 0, /** * No leg configured on the parent order. * * @generated from enum value: NOT_CONFIGURED = 1; */ NOT_CONFIGURED = 1, /** * Trigger persisted, waiting for admission/arming. * * @generated from enum value: CREATED = 2; */ CREATED = 2, /** * Trigger is actively armed. * * @generated from enum value: ARMED = 3; */ ARMED = 3, /** * Trigger is executing runtime work (for example multi-step workflows). * * @generated from enum value: RUNNING = 4; */ RUNNING = 4, /** * Trigger finished successfully. * * @generated from enum value: COMPLETED = 5; */ COMPLETED = 5, /** * Trigger was canceled. * * @generated from enum value: CANCELED = 6; */ CANCELED = 6, /** * Trigger failed. * * @generated from enum value: FAILED = 7; */ FAILED = 7, /** * Trigger is paused. * * @generated from enum value: PAUSED = 8; */ PAUSED = 8 } /** * Describes the enum orders.v1.AttachedRiskLegState.Status. */ declare const AttachedRiskLegState_StatusSchema: GenEnum; /** * AttachedRiskTakeProfit carries both take-profit config and runtime state. * * @generated from message orders.v1.AttachedRiskTakeProfit */ type AttachedRiskTakeProfit = Message<"orders.v1.AttachedRiskTakeProfit"> & { /** * Take-profit policy configured on the parent order. * * @generated from field: orders.v1.TakeProfitPolicy policy = 1; */ policy?: TakeProfitPolicy | undefined; /** * Runtime state for the take-profit leg. * * @generated from field: orders.v1.AttachedRiskLegState state = 2; */ state?: AttachedRiskLegState | undefined; }; /** * Describes the message orders.v1.AttachedRiskTakeProfit. * Use `create(AttachedRiskTakeProfitSchema)` to create a new message. */ declare const AttachedRiskTakeProfitSchema: GenMessage; /** * AttachedRiskStopLoss carries both stop-loss config and runtime state. * * @generated from message orders.v1.AttachedRiskStopLoss */ type AttachedRiskStopLoss = Message<"orders.v1.AttachedRiskStopLoss"> & { /** * Stop-loss policy configured on the parent order. * * @generated from field: orders.v1.StopLossPolicy policy = 1; */ policy?: StopLossPolicy | undefined; /** * Runtime state for the stop-loss leg. * * @generated from field: orders.v1.AttachedRiskLegState state = 2; */ state?: AttachedRiskLegState | undefined; }; /** * Describes the message orders.v1.AttachedRiskStopLoss. * Use `create(AttachedRiskStopLossSchema)` to create a new message. */ declare const AttachedRiskStopLossSchema: GenMessage; /** * AttachedRiskTrailingStop carries both trailing-stop config and runtime state. * * @generated from message orders.v1.AttachedRiskTrailingStop */ type AttachedRiskTrailingStop = Message<"orders.v1.AttachedRiskTrailingStop"> & { /** * Trailing-stop policy configured on the parent order. * * @generated from field: orders.v1.TrailingStopPolicy policy = 1; */ policy?: TrailingStopPolicy | undefined; /** * Runtime state for the trailing-stop leg. * * @generated from field: orders.v1.AttachedRiskLegState state = 2; */ state?: AttachedRiskLegState | undefined; }; /** * Describes the message orders.v1.AttachedRiskTrailingStop. * Use `create(AttachedRiskTrailingStopSchema)` to create a new message. */ declare const AttachedRiskTrailingStopSchema: GenMessage; /** * AttachedRisk is the single parent-side view for attached-risk configuration * and runtime status. * * @generated from message orders.v1.AttachedRisk */ type AttachedRisk = Message<"orders.v1.AttachedRisk"> & { /** * Take-profit leg, if configured or if state exists. * * @generated from field: orders.v1.AttachedRiskTakeProfit take_profit = 1; */ takeProfit?: AttachedRiskTakeProfit | undefined; /** * Stop-loss leg, if configured or if state exists. * * @generated from field: orders.v1.AttachedRiskStopLoss stop_loss = 2; */ stopLoss?: AttachedRiskStopLoss | undefined; /** * Trailing-stop leg, if configured or if state exists. * * @generated from field: orders.v1.AttachedRiskTrailingStop trailing_stop = 3; */ trailingStop?: AttachedRiskTrailingStop | undefined; /** * True while the parent's legs were placed with oco and both the * take-profit and a stop leg (stop-loss or trailing stop) are present. * False once either leg is removed. A leg that ended, including one * canceled with TRIGGER_CANCEL_REASON_OCO, stays present. * * @generated from field: bool oco = 4; */ oco: boolean; }; /** * Describes the message orders.v1.AttachedRisk. * Use `create(AttachedRiskSchema)` to create a new message. */ declare const AttachedRiskSchema: GenMessage; /** * OrderLineage identifies a logical order and one of its accepted generations. * * @generated from message orders.v1.OrderLineage */ type OrderLineage = Message<"orders.v1.OrderLineage"> & { /** * Stable logical-order ID: the first generation's public order ID. * Replace preserves this ID; an independent new order starts a new lineage. * * @generated from field: fixed64 id = 1; */ id: bigint; /** * One-based replacement generation, distinct from per-order state version. * * @generated from field: uint32 generation = 2; */ generation: number; }; /** * Describes the message orders.v1.OrderLineage. * Use `create(OrderLineageSchema)` to create a new message. */ declare const OrderLineageSchema: GenMessage; /** * OrderFeeTotal is the total fee of an order's fills, net of rebates, as * settled. A fill's fee is recorded shortly after the fill executes, so the * total can trail the fills the order shows: qty_scaled says which fills it * covers. * * @generated from message orders.v1.OrderFeeTotal */ type OrderFeeTotal = Message<"orders.v1.OrderFeeTotal"> & { /** * Net fee magnitude in fixed 18-decimal units of the order's fee_asset: * the fees of the covered fills less their rebates. Zero when they charged * no fee. * * @generated from field: polyester.type.v1.U128 amount_e18 = 1; */ amountE18?: U128 | undefined; /** * True when the covered fills' rebates exceed their fees, so the amount * was credited to the account rather than charged. * * @generated from field: bool is_rebate = 2; */ isRebate: boolean; /** * Executed quantity of the fills the total covers, scaled by the pair's * base_quantity_scale from GetSpotConfig. Equal to the order's * cum_qty_scaled once every fill's fee is recorded. While a fill is still * being recorded the two differ, and a later read of the order includes * it. * * @generated from field: int64 qty_scaled = 3; */ qtyScaled: bigint; }; /** * Describes the message orders.v1.OrderFeeTotal. * Use `create(OrderFeeTotalSchema)` to create a new message. */ declare const OrderFeeTotalSchema: GenMessage; /** * Order is the Connect-facing order view with compact binary fields. * * @generated from message orders.v1.Order */ type Order = Message<"orders.v1.Order"> & { /** * Public order identifier as fixed64. * * @generated from field: fixed64 order_id = 1; */ orderId: bigint; /** * Trading symbol numeric identifier. * * @generated from field: uint32 symbol_id = 3; */ symbolId: number; /** * Client-provided, account-scoped identifier for correlation, lookup, and * cancellation. Empty when none was supplied. * * @generated from field: string client_order_id = 4; */ clientOrderId: string; /** * Order side. * * @generated from field: orders.v1.Side side = 5; */ side: Side; /** * Current order lifecycle status. * * @generated from field: orders.v1.OrderStatus status = 6; */ status: OrderStatus; /** * Order type. * * @generated from field: orders.v1.OrderType order_type = 7; */ orderType: OrderType; /** * Time-in-force policy. * * @generated from field: orders.v1.TimeInForce time_in_force = 8; */ timeInForce: TimeInForce; /** * Self-trade prevention mode. * * @generated from field: orders.v1.SelfTradePreventionMode self_trade_prevention_mode = 9; */ selfTradePreventionMode: SelfTradePreventionMode; /** * Fee asset selected for fills. * * @generated from field: orders.v1.FeeAsset fee_asset = 10; */ feeAsset: FeeAsset; /** * True if the order was submitted as post-only (maker-only). * * @generated from field: bool post_only = 11; */ postOnly: boolean; /** * Current accepted total order quantity, updated by successful modifies, * scaled by the pair's base_quantity_scale from GetSpotConfig for symbol_id. * * @generated from field: int64 orig_qty_scaled = 12; */ origQtyScaled: bigint; /** * Cumulative filled quantity across the lineage through this generation, * scaled by the pair's base_quantity_scale from GetSpotConfig for symbol_id. * * @generated from field: int64 cum_qty_scaled = 13; */ cumQtyScaled: bigint; /** * Cumulative filled base quantity inherited from predecessors when this * replacement was accepted, scaled by the pair's base_quantity_scale from * GetSpotConfig for symbol_id. Zero for the original order and immutable * within a generation. cum_qty_scaled minus this value is the quantity * executed by this generation, not the quantity new to a client session. * * @generated from field: int64 inherited_cum_qty_scaled = 33; */ inheritedCumQtyScaled: bigint; /** * Remaining working quantity scaled by the pair's base_quantity_scale from * GetSpotConfig for symbol_id. Zero for terminal orders. * * @generated from field: int64 leaves_qty_scaled = 20; */ leavesQtyScaled: bigint; /** * Average execution price across the lineage through this generation, * in quote units scaled by 1e9, rounded down. Zero if no fills. * avg_price_e18 carries the exact average. * * @generated from field: int64 avg_price_ticks = 14; */ avgPriceTicks: bigint; /** * Average execution price across the lineage through this generation, in * quote units scaled by 1e18: the exact executed quote amount divided by * cum_qty_scaled, rounded half to even at the 18th decimal. Unset if no * fills. * * @generated from field: polyester.type.v1.U128 avg_price_e18 = 36; */ avgPriceE18?: U128 | undefined; /** * Exact quote amount of the fills across the lineage through this * generation, before fees: the sum over the fills of their quantity, * scaled as cum_qty_scaled, times their price in quote units scaled by * 1e9. It is in quote units scaled by 10^(9 + base_quantity_scale), with * the pair's base_quantity_scale from GetSpotConfig for symbol_id; REST * shows it in quote units. avg_price_e18 is this amount over * cum_qty_scaled. Unset if no fills. A fill settles its quote rounded down * to 18 decimal places, which is this amount exactly unless * base_quantity_scale is above 9. * * For a BUY sized by a quote amount (submitted_max_quote_debit_scaled), * the quote the order used is this amount plus fee_total's amount_e18 * when fee_asset is QUOTE, or minus it when fee_total's is_rebate is true, * since a rebate is credited; it is this amount alone when fee_asset is * BASE, whose fee is taken from the base received. What it left unspent is * submitted_max_quote_debit_scaled less the quote it used. * * @generated from field: polyester.type.v1.U128 cum_notional = 37; */ cumNotional?: U128 | undefined; /** * Total fee of the fills across the lineage through this generation, net * of rebates, in the order's fee asset. Order history reads and * single-order reads that include execution history (the default) carry * it. It can trail the order's fills: its quantity shows which fills it * covers. Open-order reads, single-order reads without execution history * and private stream order updates leave it unset. * * @generated from field: orders.v1.OrderFeeTotal fee_total = 38; */ feeTotal?: OrderFeeTotal | undefined; /** * Limit price in quote units scaled by 1e9. Zero for MARKET orders. * * @generated from field: int64 price_ticks = 15; */ priceTicks: bigint; /** * Creation timestamp in nanoseconds since epoch (UTC). * * @generated from field: uint64 created_ts_ns = 16; */ createdTsNs: bigint; /** * Terminal timestamp in nanoseconds since epoch (UTC). Zero for open orders. * * @generated from field: uint64 terminal_ts_ns = 17; */ terminalTsNs: bigint; /** * For a REJECTED order, why it was refused: the same error code the Orders * API returns for the same refusal. Not set for every other status; JSON and * REST responses then omit it. * * @generated from field: orders.v1.ErrorCode reject_reason = 34; */ rejectReason: ErrorCode; /** * For a CANCELED order, why it ended. Not set for every other status; JSON * and REST responses then omit it. * * @generated from field: orders.v1.CancelReason cancel_reason = 35; */ cancelReason: CancelReason; /** * Attached risk controls + runtime state on the parent order. * Empty when no attached risk exists. Order reads include it only when the * request asks for it (include_attached_risk, include_attached_risk_state): * an omission on request, never a removal. The private WebSocket always * carries it in full, as a read asking for both does. * * @generated from field: orders.v1.AttachedRisk attached_risk = 21; */ attachedRisk?: AttachedRisk | undefined; /** * Runtime lineage metadata (why the order exists and what generated it). * * @generated from field: orders.v1.OrderOrigin origin = 22; */ origin?: OrderOrigin | undefined; /** * Optional client-side reference price used for MARKET slippage protection, * in quote units scaled by 1e9. * * @generated from field: int64 market_client_ref_price_ticks = 23; */ marketClientRefPriceTicks: bigint; /** * Non-negative MARKET maximum absolute price delta in Q9 execution-price ticks * (1 tick = 1e-9 quote units). Zero means no absolute cap is configured. * * @generated from field: int64 market_max_slippage_ticks = 24; */ marketMaxSlippageTicks: bigint; /** * Optional MARKET max slippage in basis points (1 bp = 0.01%). * * @generated from field: int32 market_max_slippage_bps = 25; */ marketMaxSlippageBps: number; /** * Per-order state version: 0 while the order is accepted but not yet on * the book (status PENDING), then 1 from its first book state and higher * for every later published execution-state change. Higher values identify * newer execution state. Fee totals and requested enrichments are not covered * by this version and may differ between responses with the same version. * * @generated from field: uint32 version = 26; */ version: number; /** * Batch-replace identity that admitted this order. Zero for other origins. * * @generated from field: fixed64 batch_request_id = 27; */ batchRequestId: bigint; /** * Submitted hard all-in quote debit limit, scaled by the pair's * quote_quantity_scale from GetSpotConfig. Present only when that sizing * method was submitted. * * @generated from field: optional int64 submitted_max_quote_debit_scaled = 28; */ submittedMaxQuoteDebitScaled?: bigint | undefined; /** * Logical-order identity and requested generation. Always populated by order reads. * * @generated from field: orders.v1.OrderLineage lineage = 31; */ lineage?: OrderLineage | undefined; /** * Exact UTC expiry time for GTD orders, within the supported signed * Unix-nanosecond range from 1677-09-21T00:12:43.145224193Z through * 2262-04-11T23:47:16.854775807Z. Omitted for all other time-in-force policies. * The order cannot execute when the current time equals this value. * * @generated from field: google.protobuf.Timestamp expire_at = 32; */ expireAt?: Timestamp | undefined; }; /** * Describes the message orders.v1.Order. * Use `create(OrderSchema)` to create a new message. */ declare const OrderSchema: GenMessage; /** * UserTrade is the Connect-facing per-user trade fill view. * * @generated from message orders.v1.UserTrade */ type UserTrade = Message<"orders.v1.UserTrade"> & { /** * Trading symbol numeric identifier. * * @generated from field: uint32 symbol_id = 2; */ symbolId: number; /** * Match identifier (monotonic per symbol). * * @generated from field: uint64 match_id = 3; */ matchId: bigint; /** * Order identifier as fixed64. * * @generated from field: fixed64 order_id = 4; */ orderId: bigint; /** * Fill side. * * @generated from field: orders.v1.Side side = 5; */ side: Side; /** * True if this fill was maker-side. * * @generated from field: bool is_maker = 6; */ isMaker: boolean; /** * Execution price in quote units scaled by 1e9. * * @generated from field: int64 price_ticks = 7; */ priceTicks: bigint; /** * Executed quantity scaled by the pair's base_quantity_scale from * GetSpotConfig for symbol_id. * * @generated from field: int64 qty_scaled = 8; */ qtyScaled: bigint; /** * Exact fee magnitude in fixed 18-decimal units of fee_asset. * * @generated from field: polyester.type.v1.U128 fee_amount_e18 = 9; */ feeAmountE18?: U128 | undefined; /** * Fee asset charged or credited for this fill. * * @generated from field: orders.v1.FeeAsset fee_asset = 10; */ feeAsset: FeeAsset; /** * Exact referral share magnitude in fixed 18-decimal units of fee_asset. * * @generated from field: polyester.type.v1.U128 referral_share_amount_e18 = 12; */ referralShareAmountE18?: U128 | undefined; /** * Execution timestamp in nanoseconds since epoch. * * @generated from field: uint64 ts_ns = 13; */ tsNs: bigint; /** * Whether this fill earned a rebate instead of paying a fee. * * @generated from field: bool fee_is_rebate = 14; */ feeIsRebate: boolean; /** * Logical-order identity and the generation that executed this fill. * Always populated by execution reads; order_id retains its original identity. * * @generated from field: orders.v1.OrderLineage lineage = 17; */ lineage?: OrderLineage | undefined; }; /** * Describes the message orders.v1.UserTrade. * Use `create(UserTradeSchema)` to create a new message. */ declare const UserTradeSchema: GenMessage; /** * UserTradeBatch is one realtime publication on an account's trade stream: * every fill queued for the stream when it was sent, at most 256 and at most * 64 KiB. Fills of one trading symbol arrive in execution order; fills of * different symbols have no defined order relative to each other. * * (match_id, order_id) identifies a fill; order_id tells apart the two fills * of a trade between two orders of the same account. Apply fills in array * order and in publication order; a fill whose identity was already received * replaces the earlier copy. When the subscription reports that missed * publications could not be recovered, reload recent fills over REST. * * @generated from message orders.v1.UserTradeBatch */ type UserTradeBatch = Message<"orders.v1.UserTradeBatch"> & { /** * Fills, oldest first per trading symbol. At least one fill. * * @generated from field: repeated orders.v1.UserTrade events = 1; */ events: UserTrade[]; }; /** * Describes the message orders.v1.UserTradeBatch. * Use `create(UserTradeBatchSchema)` to create a new message. */ declare const UserTradeBatchSchema: GenMessage; /** * OrderTransfer is the Connect-facing minimal per-leg transfer view. * * @generated from message orders.v1.OrderTransfer */ type OrderTransfer = Message<"orders.v1.OrderTransfer"> & { /** * Match identifier that linked this transfer to an execution, scoped by symbol_id. * * @generated from field: uint64 match_id = 1; */ matchId: bigint; /** * Market of the execution; together with match_id identifies its match. * * @generated from field: uint32 symbol_id = 10; */ symbolId: number; /** * Asset identifier for the transferred asset. * * @generated from field: uint32 asset_id = 2; */ assetId: number; /** * Transfer amount at fixed 18-decimal ledger scale. * * @generated from field: polyester.type.v1.U128 amount_e18 = 3; */ amountE18?: U128 | undefined; /** * True when the transfer debits the account; false when it credits the account. * * @generated from field: bool is_debit = 5; */ isDebit: boolean; /** * Product reason for this transfer leg. * * @generated from field: ledger.v1.TransferCode transfer_code = 6; */ transferCode: TransferCode; /** * Account bucket affected by this transfer leg. * * @generated from field: ledger.v1.AccountCode account_code = 7; */ accountCode: AccountCode; /** * Transfer timestamp in nanoseconds since epoch (UTC). * * @generated from field: uint64 ts_ns = 8; */ tsNs: bigint; /** * Transfer transaction identifier. * * @generated from field: string tx_id = 9; */ txId: string; }; /** * Describes the message orders.v1.OrderTransfer. * Use `create(OrderTransferSchema)` to create a new message. */ declare const OrderTransferSchema: GenMessage; /** * GetOpenOrdersRequest lists currently non-terminal orders for an account. * * @generated from message orders.v1.GetOpenOrdersRequest */ type GetOpenOrdersRequest = Message<"orders.v1.GetOpenOrdersRequest"> & { /** * Optional public subaccount ID. When omitted, subaccount-scoped API keys * use their bound subaccount; other callers use their authenticated root * account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Optional filter by symbol_id values. Empty means all symbols. * * @generated from field: repeated uint32 symbol_id = 2; */ symbolId: number[]; /** * Optional side filter. * * @generated from field: orders.v1.Side side = 3; */ side: Side; /** * Max number of orders to return (1-1000, default 100). * * @generated from field: optional uint32 limit = 10; */ limit?: number | undefined; /** * Opaque keyset cursor from a previous response. The cursor is exclusive and * bound to the authenticated account, sub-account scope, filters, and sort * order. * * @generated from field: string page_token = 11; */ pageToken: string; /** * Include attached-risk policy details in each order (defaults to false when unset). * * @generated from field: optional bool include_attached_risk = 12; */ includeAttachedRisk?: boolean | undefined; /** * Include attached-risk state details in each order (defaults to false when unset). * * @generated from field: optional bool include_attached_risk_state = 13; */ includeAttachedRiskState?: boolean | undefined; /** * Optional trigger identifier. When set, returns only child orders created by * that trigger. * * @generated from field: optional fixed64 trigger_id = 14; */ triggerId?: bigint | undefined; }; /** * Describes the message orders.v1.GetOpenOrdersRequest. * Use `create(GetOpenOrdersRequestSchema)` to create a new message. */ declare const GetOpenOrdersRequestSchema: GenMessage; /** * GetOpenOrdersResponse returns open orders and an optional next-page cursor. * * @generated from message orders.v1.GetOpenOrdersResponse */ type GetOpenOrdersResponse = Message<"orders.v1.GetOpenOrdersResponse"> & { /** * Open orders ordered newest-first. * * @generated from field: repeated orders.v1.Order orders = 1; */ orders: Order[]; /** * Opaque cursor for the next page. Empty when no more results exist. * * @generated from field: string next_page_token = 2; */ nextPageToken: string; }; /** * Describes the message orders.v1.GetOpenOrdersResponse. * Use `create(GetOpenOrdersResponseSchema)` to create a new message. */ declare const GetOpenOrdersResponseSchema: GenMessage; /** * GetOrderHistoryRequest lists terminal orders for an account. * * @generated from message orders.v1.GetOrderHistoryRequest */ type GetOrderHistoryRequest = Message<"orders.v1.GetOrderHistoryRequest"> & { /** * Optional public subaccount ID. When omitted, subaccount-scoped API keys * use their bound subaccount; other callers use their authenticated root * account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Optional filter by symbol_id values. Empty means all symbols. * * @generated from field: repeated uint32 symbol_id = 2; */ symbolId: number[]; /** * Optional side filter. * * @generated from field: orders.v1.Side side = 3; */ side: Side; /** * Optional status filter. * * @generated from field: orders.v1.OrderStatus status = 4; */ status: OrderStatus; /** * Inclusive start of the time range, in nanoseconds since epoch (UTC). * * @generated from field: optional uint64 start_ts_ns = 10; */ startTsNs?: bigint | undefined; /** * Inclusive end of the time range, in nanoseconds since epoch (UTC). * * @generated from field: optional uint64 end_ts_ns = 11; */ endTsNs?: bigint | undefined; /** * Max number of orders to return (1-1000, default 100). * * @generated from field: optional uint32 limit = 12; */ limit?: number | undefined; /** * Opaque keyset cursor from a previous response. The cursor is exclusive and * bound to the authenticated account, sub-account scope, filters, time range, * and sort order. * * @generated from field: string page_token = 13; */ pageToken: string; /** * Include attached-risk policy details in each order (defaults to false when unset). * * @generated from field: optional bool include_attached_risk = 14; */ includeAttachedRisk?: boolean | undefined; /** * Include attached-risk state details in each order (defaults to false when unset). * * @generated from field: optional bool include_attached_risk_state = 15; */ includeAttachedRiskState?: boolean | undefined; /** * Optional trigger identifier. When set, returns only child orders created by * that trigger. * * @generated from field: optional fixed64 trigger_id = 16; */ triggerId?: bigint | undefined; }; /** * Describes the message orders.v1.GetOrderHistoryRequest. * Use `create(GetOrderHistoryRequestSchema)` to create a new message. */ declare const GetOrderHistoryRequestSchema: GenMessage; /** * GetOrderHistoryResponse returns historical orders and an optional next-page cursor. * * @generated from message orders.v1.GetOrderHistoryResponse */ type GetOrderHistoryResponse = Message<"orders.v1.GetOrderHistoryResponse"> & { /** * Historical orders ordered newest-first. * * @generated from field: repeated orders.v1.Order orders = 1; */ orders: Order[]; /** * Opaque cursor for the next page. A page may hold fewer orders than * requested, or none; continue while this token is non-empty. Empty when no * more results exist. * * @generated from field: string next_page_token = 2; */ nextPageToken: string; }; /** * Describes the message orders.v1.GetOrderHistoryResponse. * Use `create(GetOrderHistoryResponseSchema)` to create a new message. */ declare const GetOrderHistoryResponseSchema: GenMessage; /** * GetUserTradesRequest lists trade fills for an account. * * @generated from message orders.v1.GetUserTradesRequest */ type GetUserTradesRequest = Message<"orders.v1.GetUserTradesRequest"> & { /** * Optional public subaccount ID. When omitted, subaccount-scoped API keys * use their bound subaccount; other callers use their authenticated root * account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Optional filter by symbol_id. * * @generated from field: uint32 symbol_id = 2; */ symbolId: number; /** * Optional side filter. * * @generated from field: orders.v1.Side side = 3; */ side: Side; /** * Inclusive start of the time range, in nanoseconds since epoch (UTC). * * @generated from field: optional uint64 start_ts_ns = 10; */ startTsNs?: bigint | undefined; /** * Inclusive end of the time range, in nanoseconds since epoch (UTC). * * @generated from field: optional uint64 end_ts_ns = 11; */ endTsNs?: bigint | undefined; /** * Max number of trades to return (1-1000, default 100). * * @generated from field: optional uint32 limit = 12; */ limit?: number | undefined; /** * Opaque keyset cursor from a previous response. The cursor is exclusive and * bound to the authenticated account, sub-account scope, filters, time range, * and sort order. * * @generated from field: string page_token = 13; */ pageToken: string; /** * Return only durable fills whose per-symbol match ID is greater than this * value. Subscribe to the execution WebSocket before calling this method and * de-duplicate overlapping results by (symbol_id, match_id, order_id). * * @generated from field: optional uint64 after_match_id = 14; */ afterMatchId?: bigint | undefined; /** * Optional execution scope. Omitting it returns all matching account fills. * order_id and lineage_id are mutually exclusive. * * @generated from oneof orders.v1.GetUserTradesRequest.execution_scope */ executionScope: { /** * Exactly this physical order's executions; never includes predecessors. * * @generated from field: fixed64 order_id = 15; */ value: bigint; case: "orderId"; } | { /** * Executions across this logical order's accepted generations. * * @generated from field: fixed64 lineage_id = 16; */ value: bigint; case: "lineageId"; } | { case: undefined; value?: undefined; }; /** * Inclusive generation ceiling; requires lineage_id. * Does not freeze an actively filling generation. * * @generated from field: optional uint32 through_generation = 17; */ throughGeneration?: number | undefined; /** * Include account settlement legs linked to matches on this page. * Legs may repeat across pages when two fills share a match; deduplicate by tx_id. * * @generated from field: bool include_transfers = 18; */ includeTransfers: boolean; }; /** * Describes the message orders.v1.GetUserTradesRequest. * Use `create(GetUserTradesRequestSchema)` to create a new message. */ declare const GetUserTradesRequestSchema: GenMessage; /** * GetUserTradesResponse returns user trade fills and an optional next-page cursor. * * @generated from message orders.v1.GetUserTradesResponse */ type GetUserTradesResponse = Message<"orders.v1.GetUserTradesResponse"> & { /** * Trades ordered by timestamp, symbol, match and physical order, descending. * Projection is eventual: an empty page is not proof of order-state reconciliation. * * @generated from field: repeated orders.v1.UserTrade trades = 1; */ trades: UserTrade[]; /** * Opaque cursor for the next page. Empty when no more results exist. * * @generated from field: string next_page_token = 2; */ nextPageToken: string; /** * Settlement legs for matches represented on this page, when requested. * * @generated from field: repeated orders.v1.OrderTransfer transfers = 3; */ transfers: OrderTransfer[]; }; /** * Describes the message orders.v1.GetUserTradesResponse. * Use `create(GetUserTradesResponseSchema)` to create a new message. */ declare const GetUserTradesResponseSchema: GenMessage; /** * GetOrderRequest retrieves one physical order and a bounded page of its lineage executions. * * @generated from message orders.v1.GetOrderRequest */ type GetOrderRequest = Message<"orders.v1.GetOrderRequest"> & { /** * Optional public subaccount ID. When omitted, subaccount-scoped API keys * use their bound subaccount; other callers use their authenticated root * account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Order lookup key. Exactly one identifier is required. * * @generated from oneof orders.v1.GetOrderRequest.key */ key: { /** * Public order ID (base58-encoded fixed64 on REST). * * @generated from field: fixed64 order_id = 2; */ value: bigint; case: "orderId"; } | { /** * Client order ID. When provided, server resolves latest matching order for the account. * * @generated from field: string client_order_id = 3; */ value: string; case: "clientOrderId"; } | { case: undefined; value?: undefined; }; /** * Include attached-risk policy details in response.order (defaults to false when unset). * * @generated from field: optional bool include_attached_risk = 10; */ includeAttachedRisk?: boolean | undefined; /** * Include attached-risk state details in response.order (defaults to false when unset). * * @generated from field: optional bool include_attached_risk_state = 11; */ includeAttachedRiskState?: boolean | undefined; /** * Include a page of lineage trades and their settlement transfers (default true). * Set false for state-only polling; limit and page_token must then be omitted. * * @generated from field: optional bool include_execution_history = 12; */ includeExecutionHistory?: boolean | undefined; /** * Maximum executions to return (1-1000, default 100). * * @generated from field: optional uint32 limit = 13; */ limit?: number | undefined; /** * Execution cursor from this order's previous response. Use order_id rather * than a reused client_order_id to keep the requested generation stable. * * @generated from field: string page_token = 14; */ pageToken: string; }; /** * Describes the message orders.v1.GetOrderRequest. * Use `create(GetOrderRequestSchema)` to create a new message. */ declare const GetOrderRequestSchema: GenMessage; /** * GetOrderResponse returns order details and a bounded execution page. * The order shows a fill as soon as it executes; its trades are recorded * shortly after. executions_complete says whether the trades already account * for every execution the order shows. Transfers are eventually consistent and * can trail the trades they settle. * * @generated from message orders.v1.GetOrderResponse */ type GetOrderResponse = Message<"orders.v1.GetOrderResponse"> & { /** * Requested order, if found. * * @generated from field: orders.v1.Order order = 1; */ order?: Order | undefined; /** * Lineage executions through the requested generation, newest first, retaining * original executing order IDs. Omitted when execution history is disabled. * * @generated from field: repeated orders.v1.UserTrade trades = 2; */ trades: UserTrade[]; /** * Account settlement legs for matches on this page. Deduplicate by tx_id when * multiple execution pages contain legs of the same match. * * @generated from field: repeated orders.v1.OrderTransfer transfers = 3; */ transfers: OrderTransfer[]; /** * Cursor for the next execution page. Empty when no further rows are visible; * this is not a settlement or order-state reconciliation watermark. * * @generated from field: string next_page_token = 6; */ nextPageToken: string; /** * True when the order's trades through its generation, across every page, * add up exactly to its cum_qty_scaled. False while a recent execution is * still being recorded: trades then lists the executions recorded so far, * and a later read returns the rest. Always false when execution history is * not included. * * @generated from field: bool executions_complete = 7; */ executionsComplete: boolean; }; /** * Describes the message orders.v1.GetOrderResponse. * Use `create(GetOrderResponseSchema)` to create a new message. */ declare const GetOrderResponseSchema: GenMessage; /** * GetBatchReplaceStatusRequest retrieves one accepted batch by server identity. * A batch's status is retained for 60 seconds from its acceptance, the same * time-limited window in which an identical retry replays its admission. It * is readable as soon as BatchReplaceOrders returns; each item's execution * phase then advances asynchronously. UNAVAILABLE means the status cannot be * established yet: retry the same request within the window. NOT_FOUND means * the account has no retained batch with this identity: none was accepted for * it, or the window ended. NOT_FOUND never proves that a replacement was * rejected. After the window, reconcile the individual orders, and never * submit an accepted batch again because its status is not found. * * @generated from message orders.v1.GetBatchReplaceStatusRequest */ type GetBatchReplaceStatusRequest = Message<"orders.v1.GetBatchReplaceStatusRequest"> & { /** * Optional public subaccount ID. When omitted, subaccount-scoped API keys * use their bound subaccount; other callers use their authenticated root * account. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; /** * Server-issued batch identity from BatchReplaceOrders. * * @generated from field: fixed64 batch_request_id = 2; */ batchRequestId: bigint; }; /** * Describes the message orders.v1.GetBatchReplaceStatusRequest. * Use `create(GetBatchReplaceStatusRequestSchema)` to create a new message. */ declare const GetBatchReplaceStatusRequestSchema: GenMessage; /** * BatchReplaceStatusItem is the index-stable execution status for one replacement. * * @generated from message orders.v1.BatchReplaceStatusItem */ type BatchReplaceStatusItem = Message<"orders.v1.BatchReplaceStatusItem"> & { /** * Zero-based item index from the write request. * * @generated from field: uint32 item_index = 1; */ itemIndex: number; /** * Current recoverable phase. * * @generated from field: orders.v1.BatchReplacePhase phase = 2; */ phase: BatchReplacePhase; /** * Original order targeted by the replacement. * * @generated from field: fixed64 old_order_id = 3; */ oldOrderId: bigint; /** * Assigned successor order ID. Zero for an amended item or rejection before assignment. * * @generated from field: fixed64 replacement_order_id = 4; */ replacementOrderId: bigint; /** * Current successor status, or the amended order's status, when available. * * @generated from field: orders.v1.OrderStatus order_status = 5; */ orderStatus: OrderStatus; /** * Stable rejection or terminal error code. Empty when none. * * @generated from field: string code = 6; */ code: string; /** * Latest status timestamp in nanoseconds since epoch. For an item refused * after its admission, this is when the refusal was recorded, or a later * time at which the service recovered and observed it, so two reads may * show different times for the same refusal. Do not use it to identify the * refusal. * * @generated from field: uint64 updated_ts_ns = 7; */ updatedTsNs: bigint; /** * REPLACED admits a successor. AMENDED keeps the order under old_order_id with * no successor, and order_status describes it. Unspecified for rejected items. * * @generated from field: orders.v1.ModifyActionTaken action_taken = 8; */ actionTaken: ModifyActionTaken; }; /** * Describes the message orders.v1.BatchReplaceStatusItem. * Use `create(BatchReplaceStatusItemSchema)` to create a new message. */ declare const BatchReplaceStatusItemSchema: GenMessage; /** * GetBatchReplaceStatusResponse returns a batch's admission and each item's * current execution phase. * * @generated from message orders.v1.GetBatchReplaceStatusResponse */ type GetBatchReplaceStatusResponse = Message<"orders.v1.GetBatchReplaceStatusResponse"> & { /** * Server-issued batch identity. * * @generated from field: fixed64 batch_request_id = 1; */ batchRequestId: bigint; /** * Aggregate admission status returned by the write receipt. * * @generated from field: orders.v1.BatchReplaceAdmissionStatus admission_status = 2; */ admissionStatus: BatchReplaceAdmissionStatus; /** * Per-item statuses in request order. * * @generated from field: repeated orders.v1.BatchReplaceStatusItem items = 3; */ items: BatchReplaceStatusItem[]; /** * Number of admitted items. * * @generated from field: uint32 accepted_count = 4; */ acceptedCount: number; /** * Number of rejected items. * * @generated from field: uint32 rejected_count = 5; */ rejectedCount: number; /** * Server acceptance timestamp in nanoseconds since epoch. * * @generated from field: uint64 accepted_ts_ns = 6; */ acceptedTsNs: bigint; /** * Latest batch status timestamp in nanoseconds since epoch: the latest of * its acceptance and its items' update times, so it can show a recovery * time as an item's can. * * @generated from field: uint64 updated_ts_ns = 7; */ updatedTsNs: bigint; }; /** * Describes the message orders.v1.GetBatchReplaceStatusResponse. * Use `create(GetBatchReplaceStatusResponseSchema)` to create a new message. */ declare const GetBatchReplaceStatusResponseSchema: GenMessage; /** * OrderStatus describes the order's execution lifecycle state on read surfaces. * CreateOrder acknowledges admission without returning execution status. * * @generated from enum orders.v1.OrderStatus */ declare enum OrderStatus { /** * Order status was not provided. * * @generated from enum value: ORDER_STATUS_UNSPECIFIED = 0; */ ORDER_STATUS_UNSPECIFIED = 0, /** * Accepted and submitted for execution, but not yet confirmed as working. * * @generated from enum value: PENDING = 1; */ PENDING = 1, /** * Cancel requested; may still be working until cancel is confirmed. * * @generated from enum value: PENDING_CANCEL = 2; */ PENDING_CANCEL = 2, /** * Accepted and actively working (resting and/or matching). * * @generated from enum value: WORKING = 3; */ WORKING = 3, /** * Fully filled (no remaining quantity). A buy sized by a quote amount * (max_quote_debit_scaled) is fully filled once it has spent that amount: * what is left of it buys no further quantity step at the next price the * order could fill at. Its quantity is then what it bought. * * @generated from enum value: FILLED = 4; */ FILLED = 4, /** * Canceled and no longer working. * * @generated from enum value: CANCELED = 5; */ CANCELED = 5, /** * Rejected and never entered the working state. * * @generated from enum value: REJECTED = 6; */ REJECTED = 6 } /** * Describes the enum orders.v1.OrderStatus. */ declare const OrderStatusSchema: GenEnum; /** * CancelReason is why a CANCELED order ended. A cancel is no error: a * refused order is REJECTED and names its refusal with an ErrorCode instead. * Fills before the cancel stand, and the order's remaining reserved funds are * released. * * @generated from enum orders.v1.CancelReason */ declare enum CancelReason { /** * The order is not canceled. * * @generated from enum value: CANCEL_REASON_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * A cancel the account sent: a cancel, a batch cancel or a cancel-all. * * @generated from enum value: CANCEL_REASON_USER_REQUEST = 1; */ USER_REQUEST = 1, /** * The unfilled remainder of an immediate-or-cancel order. A buy sized by a * quote amount (max_quote_debit_scaled) that spends that amount ends * FILLED instead. * * @generated from enum value: CANCEL_REASON_IOC_REMAINDER = 2; */ IOC_REMAINDER = 2, /** * The unfilled remainder of a market order: the book ran out, the next * price was past the order's protection price, or the order reached the * market's maximum order quantity. A market buy sized by a quote amount * (max_quote_debit_scaled) that spends that amount, so that what is left * buys no further quantity step, ends FILLED instead. * * @generated from enum value: CANCEL_REASON_MARKET_REMAINDER = 3; */ MARKET_REMAINDER = 3, /** * Self-trade prevention canceled this resting order when an incoming order * belonging to the same root account, including another subaccount of that * root, would have matched it. * * @generated from enum value: CANCEL_REASON_STP_EXPIRE_MAKER = 4; */ STP_EXPIRE_MAKER = 4, /** * Self-trade prevention canceled this incoming order instead of matching a * resting order belonging to the same root account, including another * subaccount of that root. * * @generated from enum value: CANCEL_REASON_STP_EXPIRE_TAKER = 5; */ STP_EXPIRE_TAKER = 5, /** * Self-trade prevention canceled both this order and the order belonging to * the same root account, including another subaccount of that root, that it * would have matched. * * @generated from enum value: CANCEL_REASON_STP_EXPIRE_BOTH = 6; */ STP_EXPIRE_BOTH = 6, /** * A replace ended this order and created its successor. * * @generated from enum value: CANCEL_REASON_REPLACED = 7; */ REPLACED = 7, /** * A good-till-date order reached its expiry time. * * @generated from enum value: CANCEL_REASON_GTD_EXPIRED = 8; */ GTD_EXPIRED = 8, /** * An amend or replace set the order's total quantity at or below its filled * quantity, so the order ended at its filled quantity. * * @generated from enum value: CANCEL_REASON_QTY_AT_OR_BELOW_FILLED = 9; */ QTY_AT_OR_BELOW_FILLED = 9, /** * The market was disabled: the exchange canceled its resting orders. * * @generated from enum value: CANCEL_REASON_PAIR_DRAIN = 10; */ PAIR_DRAIN = 10, /** * The market refused one of the order's attached take-profit, stop-loss or * trailing-stop legs, so the order's remainder and its other legs were * canceled. * * @generated from enum value: CANCEL_REASON_ATTACHED_RISK_REFUSED = 11; */ ATTACHED_RISK_REFUSED = 11, /** * The account's cancel-all-after timer reached its deadline without a * heartbeat. * * @generated from enum value: CANCEL_REASON_CANCEL_ALL_AFTER = 12; */ CANCEL_ALL_AFTER = 12, /** * Canceled by the exchange while it recovered the account. Place new orders * once the account trades again. * * @generated from enum value: CANCEL_REASON_ACCOUNT_REPAIR = 13; */ ACCOUNT_REPAIR = 13, /** * A TWAP slice its TWAP canceled at the next slice's due time; its unfilled * remainder moves to the TWAP's later slices. * * @generated from enum value: CANCEL_REASON_TWAP_ROLLOVER = 14; */ TWAP_ROLLOVER = 14, /** * An order a trigger placed, such as a TWAP slice, a ladder level, a stop's * child or an attached leg's exit, canceled because its trigger ended or * another leg took over the exit. * * @generated from enum value: CANCEL_REASON_STRATEGY_CANCEL = 15; */ STRATEGY_CANCEL = 15, /** * The exchange canceled the order for a reason it does not name. * * @generated from enum value: CANCEL_REASON_SYSTEM = 16; */ SYSTEM = 16, /** * The market was halted: the exchange canceled every open order of the * market. Fills before the cancel stand. The market refuses new orders until * it trades again. * * @generated from enum value: CANCEL_REASON_MARKET_HALTED = 17; */ MARKET_HALTED = 17, /** * The order's attached take-profit, stop-loss or trailing stop fired while * the order still rested: the exchange canceled the order's unfilled * remainder before placing the attached order, so the two never trade with * each other. Fills before the cancel stand. * * @generated from enum value: CANCEL_REASON_ATTACHED_EXIT_FIRED = 18; */ ATTACHED_EXIT_FIRED = 18 } /** * Describes the enum orders.v1.CancelReason. */ declare const CancelReasonSchema: GenEnum; /** * BatchReplacePhase is the recoverable execution phase for one replacement. * * @generated from enum orders.v1.BatchReplacePhase */ declare enum BatchReplacePhase { /** * Phase is unavailable. * * @generated from enum value: BATCH_REPLACE_PHASE_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * The operation was admitted and handed to execution, amended items included. * * @generated from enum value: BATCH_REPLACE_PHASE_ADMITTED = 1; */ ADMITTED = 1, /** * The successor order, or the amended order, is active. * * @generated from enum value: BATCH_REPLACE_PHASE_WORKING = 2; */ WORKING = 2, /** * The replacement was rejected. * * @generated from enum value: BATCH_REPLACE_PHASE_REJECTED = 3; */ REJECTED = 3, /** * The successor, or the amended order, reached a terminal state. * * @generated from enum value: BATCH_REPLACE_PHASE_TERMINAL = 4; */ TERMINAL = 4 } /** * Describes the enum orders.v1.BatchReplacePhase. */ declare const BatchReplacePhaseSchema: GenEnum; /** * OrderOriginScope captures broad origin classes for an order. * * @generated from enum orders.v1.OrderOriginScope */ declare enum OrderOriginScope { /** * Order origin scope was not provided. * * @generated from enum value: ORDER_ORIGIN_SCOPE_UNSPECIFIED = 0; */ ORDER_ORIGIN_SCOPE_UNSPECIFIED = 0, /** * User/manual order (non-trigger path). * * @generated from enum value: DIRECT = 1; */ DIRECT = 1, /** * Child generated by attached TP/SL/Trailing risk on a parent order. * * @generated from enum value: ATTACHED_RISK = 2; */ ATTACHED_RISK = 2, /** * Child generated by a standalone trigger (STOP/TWAP/LADDER...). * * @generated from enum value: STANDALONE_TRIGGER = 3; */ STANDALONE_TRIGGER = 3, /** * System-managed automation, such as liquidation or account-protection actions. * * @generated from enum value: SYSTEM = 4; */ SYSTEM = 4 } /** * Describes the enum orders.v1.OrderOriginScope. */ declare const OrderOriginScopeSchema: GenEnum; /** * OrderTriggerType captures the trigger strategy that generated the order. * * @generated from enum orders.v1.OrderTriggerType */ declare enum OrderTriggerType { /** * Trigger type was not provided or the order was not generated by a trigger. * * @generated from enum value: ORDER_TRIGGER_TYPE_UNSPECIFIED = 0; */ ORDER_TRIGGER_TYPE_UNSPECIFIED = 0, /** * Order was generated by a stop-loss trigger. * * @generated from enum value: STOP_LOSS = 1; */ STOP_LOSS = 1, /** * Order was generated by a take-profit trigger. * * @generated from enum value: TAKE_PROFIT = 2; */ TAKE_PROFIT = 2, /** * Order was generated by a trailing-stop trigger. * * @generated from enum value: TRAILING_STOP = 3; */ TRAILING_STOP = 3, /** * Order was generated by a time-weighted execution trigger. * * @generated from enum value: TWAP = 4; */ TWAP = 4, /** * Order was generated by a ladder execution trigger. * * @generated from enum value: LADDER = 5; */ LADDER = 5 } /** * Describes the enum orders.v1.OrderTriggerType. */ declare const OrderTriggerTypeSchema: GenEnum; /** * @generated from service orders.v1.OrdersReadService */ declare const OrdersReadService: GenService<{ /** * Retrieve non-terminal orders for an account. * Supports optional subaccount, trigger, symbol, and side filters with cursor pagination. * While the current state of an order in scope is temporarily unavailable, the call * fails with a retryable UNAVAILABLE rather than omitting the order or returning a * stale state; retry the same request. * * @generated from rpc orders.v1.OrdersReadService.GetOpenOrders */ getOpenOrders: { methodKind: "unary"; input: typeof GetOpenOrdersRequestSchema; output: typeof GetOpenOrdersResponseSchema; }; /** * Retrieve terminal order history for an account. * Supports optional subaccount, trigger, symbol, side, status, and time-range filters with cursor pagination. * While the current state of an order on the page is temporarily unavailable, the call * fails with a retryable UNAVAILABLE rather than returning a stale state; retry the * same request. * * @generated from rpc orders.v1.OrdersReadService.GetOrderHistory */ getOrderHistory: { methodKind: "unary"; input: typeof GetOrderHistoryRequestSchema; output: typeof GetOrderHistoryResponseSchema; }; /** * Retrieve per-user trade fills for an account. * Supports exact physical-order or logical-lineage scope, an inclusive generation * cutoff, and subaccount, symbol, side and time filters with cursor pagination. * * @generated from rpc orders.v1.OrdersReadService.GetUserTrades */ getUserTrades: { methodKind: "unary"; input: typeof GetUserTradesRequestSchema; output: typeof GetUserTradesResponseSchema; }; /** * Retrieve order state and a bounded page of its lineage executions by order or client order ID. * Use GetUserTrades for paginated execution history and optional settlement legs. * Recent accepted orders may wait briefly for read availability; retry UNAVAILABLE with the same lookup key. * * @generated from rpc orders.v1.OrdersReadService.GetOrder */ getOrder: { methodKind: "unary"; input: typeof GetOrderRequestSchema; output: typeof GetOrderResponseSchema; }; /** * Retrieve the execution status of one accepted batch replacement, retained * for 60 seconds from its acceptance. Retry UNAVAILABLE with the same * request; NOT_FOUND means no retained batch, never a rejected replacement. * * @generated from rpc orders.v1.OrdersReadService.GetBatchReplaceStatus */ getBatchReplaceStatus: { methodKind: "unary"; input: typeof GetBatchReplaceStatusRequestSchema; output: typeof GetBatchReplaceStatusResponseSchema; }; }>; //#endregion export { AttachedRisk, AttachedRiskLegState, AttachedRiskLegStateSchema, AttachedRiskLegState_Status, AttachedRiskLegState_StatusSchema, AttachedRiskSchema, AttachedRiskStopLoss, AttachedRiskStopLossSchema, AttachedRiskTakeProfit, AttachedRiskTakeProfitSchema, AttachedRiskTrailingStop, AttachedRiskTrailingStopSchema, BatchReplacePhase, BatchReplacePhaseSchema, BatchReplaceStatusItem, BatchReplaceStatusItemSchema, CancelReason, CancelReasonSchema, GetBatchReplaceStatusRequest, GetBatchReplaceStatusRequestSchema, GetBatchReplaceStatusResponse, GetBatchReplaceStatusResponseSchema, GetOpenOrdersRequest, GetOpenOrdersRequestSchema, GetOpenOrdersResponse, GetOpenOrdersResponseSchema, GetOrderHistoryRequest, GetOrderHistoryRequestSchema, GetOrderHistoryResponse, GetOrderHistoryResponseSchema, GetOrderRequest, GetOrderRequestSchema, GetOrderResponse, GetOrderResponseSchema, GetUserTradesRequest, GetUserTradesRequestSchema, GetUserTradesResponse, GetUserTradesResponseSchema, Order, OrderFeeTotal, OrderFeeTotalSchema, OrderLineage, OrderLineageSchema, OrderOrigin, OrderOriginSchema, OrderOriginScope, OrderOriginScopeSchema, OrderSchema, OrderStatus, OrderStatusSchema, OrderTransfer, OrderTransferSchema, OrderTriggerType, OrderTriggerTypeSchema, OrdersReadService, UserTrade, UserTradeBatch, UserTradeBatchSchema, UserTradeSchema, file_orders_v1_orders_read, orders_read_pb_d_exports }; //# sourceMappingURL=orders_read_pb.d.ts.map