import { RateLimitDetail } from "../../polyester/ratelimit/v1/types_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_pb_d_exports { export { BatchCancelItem, BatchCancelItemSchema, BatchCancelOrdersRequest, BatchCancelOrdersRequestSchema, BatchCancelOrdersResponse, BatchCancelOrdersResponseSchema, BatchCancelResultItem, BatchCancelResultItemSchema, BatchCancelResultItem_Status, BatchCancelResultItem_StatusSchema, BatchCreateAccepted, BatchCreateAcceptedSchema, BatchCreateOrdersRequest, BatchCreateOrdersRequestSchema, BatchCreateOrdersResponse, BatchCreateOrdersResponseSchema, BatchCreateRejected, BatchCreateRejectedSchema, BatchCreateResultItem, BatchCreateResultItemSchema, BatchReplaceAdmissionItem, BatchReplaceAdmissionItemSchema, BatchReplaceAdmissionStatus, BatchReplaceAdmissionStatusSchema, BatchReplaceItemAdmissionStatus, BatchReplaceItemAdmissionStatusSchema, BatchReplaceOrderItem, BatchReplaceOrderItemSchema, BatchReplaceOrdersRequest, BatchReplaceOrdersRequestSchema, BatchReplaceOrdersResponse, BatchReplaceOrdersResponseSchema, CancelAllAfterRequest, CancelAllAfterRequestSchema, CancelAllAfterResponse, CancelAllAfterResponseSchema, CancelAllAfterResponse_Status, CancelAllAfterResponse_StatusSchema, CancelAllOrdersRequest, CancelAllOrdersRequestSchema, CancelAllOrdersResponse, CancelAllOrdersResponseSchema, CancelAllOrdersResponse_ListingStatus, CancelAllOrdersResponse_ListingStatusSchema, CancelAllOrdersResponse_Status, CancelAllOrdersResponse_StatusSchema, CancelOrderRequest, CancelOrderRequestSchema, CancelOrderResponse, CancelOrderResponseSchema, CancelOrderResponse_Status, CancelOrderResponse_StatusSchema, CancelledOrder, CancelledOrderSchema, CreateOrderRequest, CreateOrderRequestSchema, CreateOrderResponse, CreateOrderResponseSchema, DeadManSwitchScope, DeadManSwitchScopeSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, FeeAsset, FeeAssetSchema, FieldViolation, FieldViolationSchema, LimitFok, LimitFokSchema, LimitGtc, LimitGtcSchema, LimitGtd, LimitGtdSchema, LimitIoc, LimitIocSchema, MarketIoc, MarketIocSchema, ModifyActionTaken, ModifyActionTakenSchema, ModifyBehavior, ModifyBehaviorSchema, ModifyOrderRequest, ModifyOrderRequestSchema, ModifyOrderResponse, ModifyOrderResponseSchema, OrderIntent, OrderIntentSchema, OrderType, OrderTypeSchema, OrdersService, PreviewOrderRequest, PreviewOrderRequestSchema, PreviewOrderResponse, PreviewOrderResponseSchema, RiskExecution, RiskExecutionSchema, RiskLimitGtc, RiskLimitGtcSchema, RiskMarketIoc, RiskMarketIocSchema, RiskPolicy, RiskPolicySchema, SelfTradePreventionMode, SelfTradePreventionModeSchema, Side, SideSchema, StopLossPolicy, StopLossPolicySchema, TakeProfitPolicy, TakeProfitPolicySchema, TimeInForce, TimeInForceSchema, TrailingStopPolicy, TrailingStopPolicySchema, TriggerDirection, TriggerDirectionSchema, TriggerPriceSource, TriggerPriceSourceSchema, file_orders_v1_orders }; } /** * Describes the file orders/v1/orders.proto. */ declare const file_orders_v1_orders: GenFile; /** * MarketIoc configures a market order. Market orders always execute as * immediate-or-cancel and therefore cannot rest or be post-only. * * @generated from message orders.v1.MarketIoc */ type MarketIoc = Message<"orders.v1.MarketIoc"> & { /** * Optional max slippage override. If omitted, the pair default is used. * * @generated from oneof orders.v1.MarketIoc.max_slippage */ maxSlippage: { /** * Positive maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units). * * @generated from field: int64 max_slippage_ticks = 1; */ value: bigint; case: "maxSlippageTicks"; } | { /** * Maximum allowed slippage in basis points (1 bp = 0.01%). * * @generated from field: int32 max_slippage_bps = 2; */ value: number; case: "maxSlippageBps"; } | { case: undefined; value?: undefined; }; /** * Optional client reference price in quote units scaled by 1e9. When * omitted, admission uses server-side reference pricing. * * @generated from field: int64 client_ref_price_ticks = 3; */ clientRefPriceTicks: bigint; }; /** * Describes the message orders.v1.MarketIoc. * Use `create(MarketIocSchema)` to create a new message. */ declare const MarketIocSchema: GenMessage; /** * LimitGtc configures a good-til-canceled limit order. * * @generated from message orders.v1.LimitGtc */ type LimitGtc = Message<"orders.v1.LimitGtc"> & { /** * Limit price in quote units scaled by 1e9. * * @generated from field: int64 price_ticks = 1; */ priceTicks: bigint; /** * Reject the order instead of taking liquidity. Post-only is available only * on this resting limit-order variant. * * @generated from field: bool post_only = 2; */ postOnly: boolean; }; /** * Describes the message orders.v1.LimitGtc. * Use `create(LimitGtcSchema)` to create a new message. */ declare const LimitGtcSchema: GenMessage; /** * LimitGtd configures a limit order that may remain active only before an * exact expiry time. * * @generated from message orders.v1.LimitGtd */ type LimitGtd = Message<"orders.v1.LimitGtd"> & { /** * Limit price in quote units scaled by 1e9. * * @generated from field: int64 price_ticks = 1; */ priceTicks: bigint; /** * Reject the order instead of taking liquidity. * * @generated from field: bool post_only = 2; */ postOnly: boolean; /** * Exact expiry time in UTC. It must be at least 1 second and at most 30 days * after validation time. The order cannot execute when the current time equals * this value. * * @generated from field: google.protobuf.Timestamp expire_at = 3; */ expireAt?: Timestamp | undefined; }; /** * Describes the message orders.v1.LimitGtd. * Use `create(LimitGtdSchema)` to create a new message. */ declare const LimitGtdSchema: GenMessage; /** * LimitIoc configures an immediate-or-cancel limit order. * * @generated from message orders.v1.LimitIoc */ type LimitIoc = Message<"orders.v1.LimitIoc"> & { /** * Limit price in quote units scaled by 1e9. * * @generated from field: int64 price_ticks = 1; */ priceTicks: bigint; }; /** * Describes the message orders.v1.LimitIoc. * Use `create(LimitIocSchema)` to create a new message. */ declare const LimitIocSchema: GenMessage; /** * LimitFok configures a fill-or-kill limit order. * * @generated from message orders.v1.LimitFok */ type LimitFok = Message<"orders.v1.LimitFok"> & { /** * Limit price in quote units scaled by 1e9. * * @generated from field: int64 price_ticks = 1; */ priceTicks: bigint; }; /** * Describes the message orders.v1.LimitFok. * Use `create(LimitFokSchema)` to create a new message. */ declare const LimitFokSchema: GenMessage; /** * OrderIntent contains one order's complete, transport-independent placement * intent. Single and batch create use this same message. * * @generated from message orders.v1.OrderIntent */ type OrderIntent = Message<"orders.v1.OrderIntent"> & { /** * Stable numeric pair ID from GetSpotConfig. * * @generated from field: uint32 symbol_id = 1; */ symbolId: number; /** * Order side. * * @generated from field: orders.v1.Side side = 2; */ side: Side; /** * Required order sizing intent. Exactly one sizing method must be supplied. * * @generated from oneof orders.v1.OrderIntent.sizing */ sizing: { /** * Exact gross base quantity scaled by the pair's base_quantity_scale from * GetSpotConfig. * * @generated from field: int64 base_qty_scaled = 3; */ value: bigint; case: "baseQtyScaled"; } | { /** * Hard all-in quote debit limit scaled by the pair's quote_quantity_scale * from GetSpotConfig. Valid only for BUY market IOC and BUY limit IOC. * The order spends up to this amount at the prices it fills at. Once what * is left buys no further quantity step, it ends FILLED; if the book or * its price limit stops it first, its remainder is canceled. It can carry * attached_risk: the legs protect the quantity it actually buys. * * @generated from field: int64 max_quote_debit_scaled = 4; */ value: bigint; case: "maxQuoteDebitScaled"; } | { case: undefined; value?: undefined; }; /** * Required execution behavior. The selected variant exposes only fields that * can be honored together. * * @generated from oneof orders.v1.OrderIntent.execution */ execution: { /** * Market order with implicit IOC behavior. * * @generated from field: orders.v1.MarketIoc market_ioc = 10; */ value: MarketIoc; case: "marketIoc"; } | { /** * Resting GTC limit order, optionally post-only. * * @generated from field: orders.v1.LimitGtc limit_gtc = 11; */ value: LimitGtc; case: "limitGtc"; } | { /** * Immediate-or-cancel limit order. * * @generated from field: orders.v1.LimitIoc limit_ioc = 12; */ value: LimitIoc; case: "limitIoc"; } | { /** * Fill-or-kill limit order. * * @generated from field: orders.v1.LimitFok limit_fok = 13; */ value: LimitFok; case: "limitFok"; } | { /** * Limit order with an exact expiry time. * * @generated from field: orders.v1.LimitGtd limit_gtd = 14; */ value: LimitGtd; case: "limitGtd"; } | { case: undefined; value?: undefined; }; /** * Optional account-scoped identifier for correlation, lookup, and cancellation. * While this identifier is retained, reuse returns * CONFLICT_DUPLICATE_CLIENT_ORDER_ID for every new submission, even with the * same payload. This identifier enables GetOrder reconciliation after a * timeout; it does not provide exact replay. * * @generated from field: string client_order_id = 20; */ clientOrderId: string; /** * Asset charged for fees. Defaults to QUOTE. BASE is available only for BUY * orders; SELL orders must use QUOTE. * * @generated from field: orders.v1.FeeAsset fee_asset = 21; */ feeAsset: FeeAsset; /** * Self-trade prevention mode against orders of the same root account, * including all its subaccounts. Defaults to EXPIRE_MAKER if unspecified. * * @generated from field: orders.v1.SelfTradePreventionMode self_trade_prevention_mode = 22; */ selfTradePreventionMode: SelfTradePreventionMode; /** * Optional attached risk controls that arm after the parent order fills. * * @generated from field: orders.v1.RiskPolicy attached_risk = 30; */ attachedRisk?: RiskPolicy | undefined; }; /** * Describes the message orders.v1.OrderIntent. * Use `create(OrderIntentSchema)` to create a new message. */ declare const OrderIntentSchema: GenMessage; /** * CreateOrderRequest submits one independent order intent for admission. * Single creates do not provide exact replay and are not automatically retried * after an ambiguous transport timeout. Supply client_order_id to reconcile * through GetOrder; without it, a lost acknowledgement may leave the outcome * unknown. An immediate lookup miss does not prove that admission failed. * A create sent but not confirmed in time fails with * ORDER_CREATE_OUTCOME_UNKNOWN: the order may have been accepted, so read it * back before retrying. UNAVAILABLE means the order was not accepted. * * @generated from message orders.v1.CreateOrderRequest */ type CreateOrderRequest = Message<"orders.v1.CreateOrderRequest"> & { /** * 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 to admit. * * @generated from field: orders.v1.OrderIntent order = 2; */ order?: OrderIntent | undefined; }; /** * Describes the message orders.v1.CreateOrderRequest. * Use `create(CreateOrderRequestSchema)` to create a new message. */ declare const CreateOrderRequestSchema: GenMessage; /** * CreateOrderResponse acknowledges admission only. It does not report whether * the order is working, filled, canceled, or rejected after admission; use * order reads or realtime streams for execution state. * * @generated from message orders.v1.CreateOrderResponse */ type CreateOrderResponse = Message<"orders.v1.CreateOrderResponse"> & { /** * Assigned order ID. * * @generated from field: fixed64 order_id = 1; */ orderId: bigint; /** * Echoed client order ID when one was supplied. * * @generated from field: string client_order_id = 2; */ clientOrderId: string; /** * Time admission completed. * * @generated from field: google.protobuf.Timestamp accepted_at = 3; */ acceptedAt?: Timestamp | undefined; /** * Admission completion time as epoch nanoseconds (UTC). * * @generated from field: uint64 accepted_at_ts_ns = 4; */ acceptedAtTsNs: bigint; /** * Gross base quantity resolved for execution, scaled by the pair's * base_quantity_scale from GetSpotConfig. * * @generated from field: int64 resolved_base_qty_scaled = 5; */ resolvedBaseQtyScaled: 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 = 6; */ submittedMaxQuoteDebitScaled?: bigint | undefined; /** * Trigger ID for attached take-profit. * * @generated from field: optional uint64 take_profit_trigger_id = 20; */ takeProfitTriggerId?: bigint | undefined; /** * Trigger ID for attached stop-loss. * * @generated from field: optional uint64 stop_loss_trigger_id = 21; */ stopLossTriggerId?: bigint | undefined; /** * Trigger ID for attached trailing stop. * * @generated from field: optional uint64 trailing_stop_trigger_id = 22; */ trailingStopTriggerId?: bigint | undefined; }; /** * Describes the message orders.v1.CreateOrderResponse. * Use `create(CreateOrderResponseSchema)` to create a new message. */ declare const CreateOrderResponseSchema: GenMessage; /** * PreviewOrderRequest asks whether one complete order intent is currently * admissible. It uses the same order contract as CreateOrderRequest. Previewing * creates no order, hold, reservation, or client-order-ID claim. * * @generated from message orders.v1.PreviewOrderRequest */ type PreviewOrderRequest = Message<"orders.v1.PreviewOrderRequest"> & { /** * 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 intent to evaluate without submitting it. * * @generated from field: orders.v1.OrderIntent order = 2; */ order?: OrderIntent | undefined; }; /** * Describes the message orders.v1.PreviewOrderRequest. * Use `create(PreviewOrderRequestSchema)` to create a new message. */ declare const PreviewOrderRequestSchema: GenMessage; /** * PreviewOrderResponse reports whether an order is currently admissible and * returns any sizing and price-protection values resolved during evaluation. * Quote debit and fees are not returned. * The result is advisory: account, market, and policy inputs may change, and * CreateOrder always evaluates the intent again. * * @generated from message orders.v1.PreviewOrderResponse */ type PreviewOrderResponse = Message<"orders.v1.PreviewOrderResponse"> & { /** * Whether the order passed the current validation, policy, risk, and * available-balance checks. * * @generated from field: optional bool admissible = 1; */ admissible?: boolean | undefined; /** * Typed reason the order is not currently admissible. Omitted when * admissible is true. * * @generated from field: orders.v1.ErrorDetail rejection = 2; */ rejection?: ErrorDetail | undefined; /** * Gross base quantity resolved for execution. REST returns resolvedBaseQty as * a decimal string in base asset units, for example "0.005". Protobuf uses the * pair's base_quantity_scale from GetSpotConfig. Present when sizing was resolved. * * @generated from field: optional int64 resolved_base_qty_scaled = 3; */ resolvedBaseQtyScaled?: bigint | undefined; /** * Protective execution boundary. REST returns protectedPriceBound as a decimal * string in quote asset units per base asset unit, for example "2751.6". * Protobuf uses quote units scaled by 1e9. This is not an expected fill price. * Present when price protection was resolved. * * @generated from field: optional int64 protected_price_bound_ticks = 4; */ protectedPriceBoundTicks?: bigint | undefined; /** * Time at which this admission evaluation completed. * * @generated from field: google.protobuf.Timestamp evaluated_at = 5; */ evaluatedAt?: Timestamp | undefined; }; /** * Describes the message orders.v1.PreviewOrderResponse. * Use `create(PreviewOrderResponseSchema)` to create a new message. */ declare const PreviewOrderResponseSchema: GenMessage; /** * CancelOrderRequest is the binary (protobuf) request for canceling orders. * * @generated from message orders.v1.CancelOrderRequest */ type CancelOrderRequest = Message<"orders.v1.CancelOrderRequest"> & { /** * @generated from oneof orders.v1.CancelOrderRequest.key */ key: { /** * Order ID as fixed64. * * @generated from field: fixed64 order_id = 1; */ value: bigint; case: "orderId"; } | { /** * Client order ID. * * @generated from field: string client_order_id = 2; */ value: string; case: "clientOrderId"; } | { case: undefined; value?: undefined; }; /** * Optional trading symbol numeric identifier. When set, it must match the * order's symbol, or the order is reported unknown (ERROR_CODE_ORDER_UNKNOWN) * and nothing is canceled. An order that ended a while ago may instead be * reported ended (ERROR_CODE_ORDER_ALREADY_TERMINAL). When omitted, the * order's own symbol is used. * * @generated from field: uint32 symbol_id = 3; */ symbolId: number; /** * 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 = 4; */ subaccountId?: bigint | undefined; }; /** * Describes the message orders.v1.CancelOrderRequest. * Use `create(CancelOrderRequestSchema)` to create a new message. */ declare const CancelOrderRequestSchema: GenMessage; /** * CancelOrderResponse is the binary (protobuf) response after canceling an order. * * @generated from message orders.v1.CancelOrderResponse */ type CancelOrderResponse = Message<"orders.v1.CancelOrderResponse"> & { /** * Cancellation submission outcome. * * @generated from field: orders.v1.CancelOrderResponse.Status status = 1; */ status: CancelOrderResponse_Status; /** * Order ID as fixed64. * * @generated from field: fixed64 order_id = 2; */ orderId: bigint; /** * Server timestamp. * * @generated from field: google.protobuf.Timestamp ts = 3; */ ts?: Timestamp | undefined; /** * Server timestamp as epoch nanoseconds (for bots). * * @generated from field: uint64 ts_ns = 4; */ tsNs: bigint; }; /** * Describes the message orders.v1.CancelOrderResponse. * Use `create(CancelOrderResponseSchema)` to create a new message. */ declare const CancelOrderResponseSchema: GenMessage; /** * Cancellation submission outcome. * * @generated from enum orders.v1.CancelOrderResponse.Status */ declare enum CancelOrderResponse_Status { /** * Cancellation status was not provided. * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ STATUS_UNSPECIFIED = 0, /** * The cancellation request was accepted for processing. * * @generated from enum value: ACCEPTED = 1; */ ACCEPTED = 1 } /** * Describes the enum orders.v1.CancelOrderResponse.Status. */ declare const CancelOrderResponse_StatusSchema: GenEnum; /** * FieldViolation describes one actionable request validation failure. * * @generated from message orders.v1.FieldViolation */ type FieldViolation = Message<"orders.v1.FieldViolation"> & { /** * Protobuf field path relative to the request, using canonical field names. * * @generated from field: string field_path = 1; */ fieldPath: string; /** * Stable validation rule identifier suitable for programmatic matching. * * @generated from field: string rule_id = 2; */ ruleId: string; /** * Human-readable explanation of the violation. * * @generated from field: string message = 3; */ message: string; }; /** * Describes the message orders.v1.FieldViolation. * Use `create(FieldViolationSchema)` to create a new message. */ declare const FieldViolationSchema: GenMessage; /** * ErrorDetail is attached to ConnectRPC errors for structured error handling. * Clients can inspect this to get a stable machine-readable error code. * * @generated from message orders.v1.ErrorDetail */ type ErrorDetail = Message<"orders.v1.ErrorDetail"> & { /** * Stable error code matching the REST problem+json "code" field. * * @generated from field: orders.v1.ErrorCode code = 1; */ code: ErrorCode; /** * Field-level validation failures. Empty for non-validation domain errors. * * @generated from field: repeated orders.v1.FieldViolation violations = 2; */ violations: FieldViolation[]; /** * Structured quota state. Present only for rate-limit rejections. * * @generated from field: polyester.ratelimit.v1.RateLimitDetail rate_limit = 3; */ rateLimit?: RateLimitDetail | undefined; /** * Public order ID holding this account's client order ID when a create is * rejected with CONFLICT_DUPLICATE_CLIENT_ORDER_ID. Present only when an * existing holder is known; omitted for duplicates rejected within the same * batch before an order is assigned. Use GetOrder to obtain its current state. * * @generated from field: optional fixed64 existing_order_id = 4; */ existingOrderId?: bigint | undefined; }; /** * Describes the message orders.v1.ErrorDetail. * Use `create(ErrorDetailSchema)` to create a new message. */ declare const ErrorDetailSchema: GenMessage; /** * RiskMarketIoc configures an attached risk leg that submits a market child * with implicit immediate-or-cancel behavior. * * @generated from message orders.v1.RiskMarketIoc */ type RiskMarketIoc = Message<"orders.v1.RiskMarketIoc"> & {}; /** * Describes the message orders.v1.RiskMarketIoc. * Use `create(RiskMarketIocSchema)` to create a new message. */ declare const RiskMarketIocSchema: GenMessage; /** * RiskLimitGtc configures an attached risk leg that submits a resting limit * child. Attached risk legs do not support post-only. * * @generated from message orders.v1.RiskLimitGtc */ type RiskLimitGtc = Message<"orders.v1.RiskLimitGtc"> & { /** * Limit price in quote units scaled by 1e9. * * @generated from field: int64 price_ticks = 1; */ priceTicks: bigint; }; /** * Describes the message orders.v1.RiskLimitGtc. * Use `create(RiskLimitGtcSchema)` to create a new message. */ declare const RiskLimitGtcSchema: GenMessage; /** * RiskExecution selects the child execution supported by attached take-profit * and stop-loss policies. * * @generated from message orders.v1.RiskExecution */ type RiskExecution = Message<"orders.v1.RiskExecution"> & { /** * @generated from oneof orders.v1.RiskExecution.execution */ execution: { /** * Market child with implicit IOC behavior. * * @generated from field: orders.v1.RiskMarketIoc market_ioc = 1; */ value: RiskMarketIoc; case: "marketIoc"; } | { /** * Resting GTC limit child. * * @generated from field: orders.v1.RiskLimitGtc limit_gtc = 2; */ value: RiskLimitGtc; case: "limitGtc"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message orders.v1.RiskExecution. * Use `create(RiskExecutionSchema)` to create a new message. */ declare const RiskExecutionSchema: GenMessage; /** * TakeProfitPolicy defines a take-profit attached to an order. It watches the * last traded price or the index price (trigger_price_source), arms after the * parent fills, and submits the selected child. * * @generated from message orders.v1.TakeProfitPolicy */ type TakeProfitPolicy = Message<"orders.v1.TakeProfitPolicy"> & { /** * Trigger price in quote units scaled by 1e9. * * @generated from field: int64 trigger_price_ticks = 1; */ triggerPriceTicks: bigint; /** * Child execution when the threshold is crossed. * * @generated from field: orders.v1.RiskExecution child = 2; */ child?: RiskExecution | undefined; /** * Price the take-profit watches. Unspecified or LAST_PRICE watches the last * traded price. INDEX_PRICE watches the market's index price; on a market * without an index price the order is rejected with terminal reason * INDEX_PRICE_UNAVAILABLE before any fill, and a modify that adds such a leg * is refused with ERROR_CODE_TRIGGER_PRICE_SOURCE_UNSUPPORTED, leaving the * order and its legs unchanged. MARK_PRICE is not supported. A modify naming * another source replaces the leg. * * @generated from field: orders.v1.TriggerPriceSource trigger_price_source = 3; */ triggerPriceSource: TriggerPriceSource; }; /** * Describes the message orders.v1.TakeProfitPolicy. * Use `create(TakeProfitPolicySchema)` to create a new message. */ declare const TakeProfitPolicySchema: GenMessage; /** * StopLossPolicy defines a stop-loss attached to an order. It watches the last * traded price or the index price (trigger_price_source), arms after the * parent fills, and submits the selected child. * * @generated from message orders.v1.StopLossPolicy */ type StopLossPolicy = Message<"orders.v1.StopLossPolicy"> & { /** * Trigger price in quote units scaled by 1e9. * * @generated from field: int64 trigger_price_ticks = 1; */ triggerPriceTicks: bigint; /** * Child execution when the threshold is crossed. * * @generated from field: orders.v1.RiskExecution child = 2; */ child?: RiskExecution | undefined; /** * Price the stop-loss watches. Unspecified or LAST_PRICE watches the last * traded price. INDEX_PRICE watches the market's index price; on a market * without an index price the order is rejected with terminal reason * INDEX_PRICE_UNAVAILABLE before any fill, and a modify that adds such a leg * is refused with ERROR_CODE_TRIGGER_PRICE_SOURCE_UNSUPPORTED, leaving the * order and its legs unchanged. MARK_PRICE is not supported. A modify naming * another source replaces the leg. * * @generated from field: orders.v1.TriggerPriceSource trigger_price_source = 3; */ triggerPriceSource: TriggerPriceSource; }; /** * Describes the message orders.v1.StopLossPolicy. * Use `create(StopLossPolicySchema)` to create a new message. */ declare const StopLossPolicySchema: GenMessage; /** * TrailingStopPolicy defines a trailing stop attached to an order. * Tracks peak (for sell) or trough (for buy) and fires when price reverses by * the distance. * * @generated from message orders.v1.TrailingStopPolicy */ type TrailingStopPolicy = Message<"orders.v1.TrailingStopPolicy"> & { /** * Trailing distance. Exactly one of these should be set. * * @generated from oneof orders.v1.TrailingStopPolicy.trailing_distance */ trailingDistance: { /** * Trailing distance as a price delta in 1e-9 quote-unit ticks. * * @generated from field: int64 trailing_distance_ticks = 1; */ value: bigint; case: "trailingDistanceTicks"; } | { /** * Trailing distance in basis points (1 bp = 0.01%). * * @generated from field: int32 trailing_distance_bps = 2; */ value: number; case: "trailingDistanceBps"; } | { case: undefined; value?: undefined; }; /** * Optional slippage override for the trailing-stop child. When set, the * child uses an IOC limit bounded by this delta from the trigger price and, * for a buy, by limit_price_ticks. When omitted, a market child uses the * pair's default market slippage for its side, or 200 basis points if no * positive default is configured. A buy child remains bounded by * limit_price_ticks. Set at most one of these fields. * * @generated from oneof orders.v1.TrailingStopPolicy.max_slippage */ maxSlippage: { /** * Positive maximum absolute price delta in Q9 execution-price ticks (1 tick = 1e-9 quote units). * * @generated from field: int64 max_slippage_ticks = 6; */ value: bigint; case: "maxSlippageTicks"; } | { /** * Maximum allowed slippage in basis points (1 bp = 0.01%), from 1 to 9999 * whichever side the exit trades. An order whose trailing stop sets 10000 * is rejected with ERROR_CODE_MAX_SLIPPAGE_INVALID, because a 100% cap * would leave an exit that sells no positive price to sell at. * * @generated from field: int32 max_slippage_bps = 7; */ value: number; case: "maxSlippageBps"; } | { case: undefined; value?: undefined; }; /** * Optional activation price: trailing only starts after this price is * reached. If omitted, trailing starts immediately after the parent order * fills. Expressed in quote units scaled by 1e9. * * @generated from field: int64 activation_price_ticks = 3; */ activationPriceTicks: bigint; /** * Price the trailing stop watches and trails: its peak or trough, activation * and fire all follow this price. Unspecified or LAST_PRICE watches the last * traded price. INDEX_PRICE watches the market's index price; on a market * without an index price the order is rejected with terminal reason * INDEX_PRICE_UNAVAILABLE before any fill, and a modify that adds such a leg * is refused with ERROR_CODE_TRIGGER_PRICE_SOURCE_UNSUPPORTED, leaving the * order and its legs unchanged. MARK_PRICE is not supported. A modify naming * another source replaces the leg. * * @generated from field: orders.v1.TriggerPriceSource trigger_price_source = 8; */ triggerPriceSource: TriggerPriceSource; /** * Maximum price of a trailing stop that buys back, in quote units scaled by * 1e9: the most its exit pays per unit, at which the quote it may spend is * reserved with the exit's fee. Required when the parent order sells, so * the trailing stop buys; must be unset when the parent order buys. A rise * that fires above it still fires, and the exit fills only at or below it. * Changing it with ModifyOrder replaces the leg. * * @generated from field: int64 limit_price_ticks = 4; */ limitPriceTicks: bigint; }; /** * Describes the message orders.v1.TrailingStopPolicy. * Use `create(TrailingStopPolicySchema)` to create a new message. */ declare const TrailingStopPolicySchema: GenMessage; /** * RiskPolicy defines optional risk controls (take-profit, stop-loss or * trailing stop) attached to an order. The legs protect the parent order's * filled position: they arm as the parent fills and follow its later fills. * A buy sized by max_quote_debit_scaled has no fixed quantity: its legs * protect what its fills buy. When the order is created, each leg's exit is * checked against the pair's minimums at the quantity the whole amount buys * at the order's limit price, or a market order's maximum slippage price: * the least it buys if it spends the amount. * * The legs of one parent share that position, whether or not oco is set, and * only one exit works at a time. The first leg whose condition is met submits * an exit for the whole remaining position, rounded down to the pair's step * size; a remainder below one step stays in the balance. If another leg's * condition is met while that exit works, the working exit is canceled; once * it ends, that leg is checked again against the latest price it watches and, * if its condition still holds, exits what remains. After an exit ends, the legs keep * protecting whatever position remains, unless you canceled the exit: canceling * a leg's exit order, alone or with a cancel-all, ends that leg, and with oco * set the other leg too. * * The legs end once the parent order is terminal and no position they can * exit remains: the leg whose exit ended last completes, and the others are * canceled with TRIGGER_CANCEL_REASON_OCO. If the parent order ends without a * fill, the legs are canceled with * TRIGGER_CANCEL_REASON_PARENT_CANCELED_NO_FILL. If no exit ran and the * parent's whole fill is below one step, the legs fail. * * The legs reserve what their exits would sell or spend, once for both legs: * the base a sell exit sells, as each parent fill settles, and the quote a * buy-back may spend at its legs' highest maximum price. A buy-back is * reserved from the order's creation for the part of that cost the sale * itself may not return, so an order whose balance cannot cover it is * rejected with ERROR_CODE_INSUFFICIENT_FUNDS. The reserve shows in the * balance's reserved amount, and an exit uses it when it is submitted. While * the legs protect a position, orders and withdrawals that would use the * reserved funds are rejected with ERROR_CODE_INSUFFICIENT_FUNDS: reduce or * cancel the legs first. What the legs no longer need is released as they * change and in full when they end. * * @generated from message orders.v1.RiskPolicy */ type RiskPolicy = Message<"orders.v1.RiskPolicy"> & { /** * Optional take-profit configuration. * * @generated from field: orders.v1.TakeProfitPolicy take_profit = 1; */ takeProfit?: TakeProfitPolicy | undefined; /** * At most one stop leg can be configured for attached risk. * * @generated from oneof orders.v1.RiskPolicy.stop_leg */ stopLeg: { /** * Optional stop-loss configuration. * * @generated from field: orders.v1.StopLossPolicy stop_loss = 2; */ value: StopLossPolicy; case: "stopLoss"; } | { /** * Optional trailing stop configuration. * * @generated from field: orders.v1.TrailingStopPolicy trailing_stop = 3; */ value: TrailingStopPolicy; case: "trailingStop"; } | { case: undefined; value?: undefined; }; /** * If true, the take-profit and the configured stop leg (stop-loss or * trailing stop) are linked and shown as one-cancels-the-other. Requires a * take-profit and exactly one stop leg. The legs of every parent share one * position and end together as described on RiskPolicy, so this setting * does not change when exits are submitted. It decides what canceling an * exit order ends: with oco set, canceling one leg's exit ends both legs; * without it, only that leg ends and the other keeps protecting the * remaining position. Changing only this setting with ModifyOrder keeps * the existing legs, with their IDs, arming and a trailing stop's tracked * peak; changing a leg's terms, such as its trigger price, limit price or * trailing distance, still replaces that leg. Default is false. * * @generated from field: bool oco = 4; */ oco: boolean; }; /** * Describes the message orders.v1.RiskPolicy. * Use `create(RiskPolicySchema)` to create a new message. */ declare const RiskPolicySchema: GenMessage; /** * CancelAllOrdersRequest cancels all matching open orders for an account. * It cancels orders only, never triggers: see CancelAllOrders for what * happens to stop-loss, take-profit and trailing stops, TWAPs, ladders and * attached legs, and how to stop them too. * * @generated from message orders.v1.CancelAllOrdersRequest */ type CancelAllOrdersRequest = Message<"orders.v1.CancelAllOrdersRequest"> & { /** * 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 trading-pair IDs from GetSpotConfig. Empty matches all symbols. * At most 100 positive IDs; duplicates are ignored and ordering is immaterial. * * @generated from field: repeated uint32 symbol_ids = 2; */ symbolIds: number[]; /** * Side filter. When set, only orders on this side are canceled. * * @generated from field: orders.v1.Side side = 3; */ side: Side; /** * If true, return matched counts without actually canceling. * * @generated from field: bool dry_run = 4; */ dryRun: boolean; /** * Idempotency key (required). Reuse the same key and criteria for retries. * Completed results are retained for at least two minutes. Use a fresh key * for a new cancellation; do not reuse a key after its replay window. * * @generated from field: string request_id = 6; */ requestId: string; }; /** * Describes the message orders.v1.CancelAllOrdersRequest. * Use `create(CancelAllOrdersRequestSchema)` to create a new message. */ declare const CancelAllOrdersRequestSchema: GenMessage; /** * CancelledOrder identifies one order whose cancellation a cancel-all * requested. * * @generated from message orders.v1.CancelledOrder */ type CancelledOrder = Message<"orders.v1.CancelledOrder"> & { /** * Order ID. * * @generated from field: fixed64 order_id = 1; */ orderId: bigint; /** * The order's client order ID; empty when the order has none. * * @generated from field: string client_order_id = 2; */ clientOrderId: string; }; /** * Describes the message orders.v1.CancelledOrder. * Use `create(CancelledOrderSchema)` to create a new message. */ declare const CancelledOrderSchema: GenMessage; /** * CancelAllOrdersResponse returns the result of a cancel-all operation. * The response confirms that cancellation was requested for every matching * order; each order's final state is reported on the order update stream and * read paths. * * @generated from message orders.v1.CancelAllOrdersResponse */ type CancelAllOrdersResponse = Message<"orders.v1.CancelAllOrdersResponse"> & { /** * Cancel-all submission outcome. * * @generated from field: orders.v1.CancelAllOrdersResponse.Status status = 1; */ status: CancelAllOrdersResponse_Status; /** * Number of open orders that matched the filter when the request was * accepted, including orders whose cancellation was already in progress * and open orders that triggers placed. Triggers themselves are never * counted. Orders placed after acceptance are not counted. Unless * `dry_run` is set, equals `submitted_cancels` plus `failed_cancels`. * * @generated from field: uint32 matched_orders = 2; */ matchedOrders: number; /** * Number of matched orders for which cancellation was requested, including * orders whose cancellation was already in progress. Observe order updates or * reads for final outcomes; orders may execute before cancellation takes * effect. Zero when `dry_run` is set. * * @generated from field: uint32 submitted_cancels = 3; */ submittedCancels: number; /** * Number of matched orders that could not be submitted for cancellation * because the cancel-all could not be recorded for their symbol. This * request does not cancel them; send a new cancel-all with a new * `request_id` if they are still open. Zero when `dry_run` is set. * * @generated from field: uint32 failed_cancels = 4; */ failedCancels: number; /** * Server timestamp. * * @generated from field: google.protobuf.Timestamp ts = 5; */ ts?: Timestamp | undefined; /** * Server timestamp as epoch nanoseconds (for bots). * * @generated from field: uint64 ts_ns = 6; */ tsNs: bigint; /** * Orders whose cancellation was requested, oldest first (the order in * which they were created), at most 200. When more orders were canceled, * these are the 200 oldest and `truncated` is true; the order update stream * and read paths report every one. Empty when `dry_run` is set. Retrying * with the same `request_id` and criteria within 120 seconds returns the * original status, counts and timestamp, an empty list, and * `listing_status = NOT_RETAINED_READ_OPEN_ORDERS`. It requests no new * cancellations. Read open orders for current state and use order updates * for final outcomes. * * @generated from field: repeated orders.v1.CancelledOrder cancelled_orders = 7; */ cancelledOrders: CancelledOrder[]; /** * Number of orders whose cancellation was requested, including those not * listed in `cancelled_orders`. Equals `submitted_cancels`. Zero when * `dry_run` is set. * * @generated from field: uint32 total_cancelled = 8; */ totalCancelled: number; /** * True when more orders were canceled than `cancelled_orders` lists. * * @generated from field: bool truncated = 9; */ truncated: boolean; /** * Availability of the historical listing. An empty retry listing does not * change the original counts or mean that no cancellations were requested. * * @generated from field: orders.v1.CancelAllOrdersResponse.ListingStatus listing_status = 10; */ listingStatus: CancelAllOrdersResponse_ListingStatus; }; /** * Describes the message orders.v1.CancelAllOrdersResponse. * Use `create(CancelAllOrdersResponseSchema)` to create a new message. */ declare const CancelAllOrdersResponseSchema: GenMessage; /** * Cancel-all submission outcome. * * @generated from enum orders.v1.CancelAllOrdersResponse.Status */ declare enum CancelAllOrdersResponse_Status { /** * Cancel-all status was not provided. * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ STATUS_UNSPECIFIED = 0, /** * Matching cancellation requests were submitted for processing. * * @generated from enum value: SUBMITTED = 1; */ SUBMITTED = 1, /** * The request only counted matching orders and submitted no cancellations. * * @generated from enum value: DRY_RUN = 2; */ DRY_RUN = 2 } /** * Describes the enum orders.v1.CancelAllOrdersResponse.Status. */ declare const CancelAllOrdersResponse_StatusSchema: GenEnum; /** * Availability of the order listing, separate from the submission outcome. * * @generated from enum orders.v1.CancelAllOrdersResponse.ListingStatus */ declare enum CancelAllOrdersResponse_ListingStatus { /** * Listing availability was not provided. * * @generated from enum value: LISTING_UNSPECIFIED = 0; */ LISTING_UNSPECIFIED = 0, /** * The initial response includes its listing, possibly empty, up to 200 orders. * * @generated from enum value: INCLUDED = 1; */ INCLUDED = 1, /** * A retry returns its original outcome and counts without the historical * listing. Read open orders for current state and use order updates for * final outcomes. No new cancellations are requested by the retry. * * @generated from enum value: NOT_RETAINED_READ_OPEN_ORDERS = 2; */ NOT_RETAINED_READ_OPEN_ORDERS = 2 } /** * Describes the enum orders.v1.CancelAllOrdersResponse.ListingStatus. */ declare const CancelAllOrdersResponse_ListingStatusSchema: GenEnum; /** * CancelAllAfterRequest arms/disables a dead-man switch for automatic cancel-all. * When the switch fires, it cancels what a CancelAllOrders with the same * scope cancels: open orders, never triggers. See CancelAllAfter. * * @generated from message orders.v1.CancelAllAfterRequest */ type CancelAllAfterRequest = Message<"orders.v1.CancelAllAfterRequest"> & { /** * 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; /** * Heartbeat timeout in seconds. * - 0 disables the dead-man switch for this account. * - 10..120 arms or refreshes the switch. * * @generated from field: uint32 timeout_sec = 2; */ timeoutSec: number; /** * Optional symbol ID filter. When set, only orders on this symbol are * canceled on expiry. When zero, all symbols are canceled. * * @generated from field: uint32 symbol_id = 3; */ symbolId: number; /** * Optional side filter for cancel-on-expiry. * * @generated from field: orders.v1.Side side = 4; */ side: Side; /** * Idempotency/trace key from caller (required). * * @generated from field: string request_id = 5; */ requestId: string; }; /** * Describes the message orders.v1.CancelAllAfterRequest. * Use `create(CancelAllAfterRequestSchema)` to create a new message. */ declare const CancelAllAfterRequestSchema: GenMessage; /** * DeadManSwitchScope describes the recorded scope of an armed dead-man switch. * Expiry cancels working orders in this scope, including orders that * triggers placed. It cancels no trigger: armed stop-loss, take-profit and * trailing stops and running TWAPs remain active and may create further * orders after expiry. Cancel them with TriggersService.CancelTrigger. * * @generated from message orders.v1.DeadManSwitchScope */ type DeadManSwitchScope = Message<"orders.v1.DeadManSwitchScope"> & { /** * Public ID of the account or sub-account whose orders are canceled. * * @generated from field: fixed64 account_id = 1; */ accountId: bigint; /** * Symbol ID whose orders are canceled. Zero or omitted means all symbols. * * @generated from field: uint32 symbol_id = 2; */ symbolId: number; /** * Order side that is canceled. Not set means both sides; JSON and REST * responses then omit it. * * @generated from field: orders.v1.Side side = 3; */ side: Side; }; /** * Describes the message orders.v1.DeadManSwitchScope. * Use `create(DeadManSwitchScopeSchema)` to create a new message. */ declare const DeadManSwitchScopeSchema: GenMessage; /** * CancelAllAfterResponse returns dead-man switch arming/disable status. * * @generated from message orders.v1.CancelAllAfterResponse */ type CancelAllAfterResponse = Message<"orders.v1.CancelAllAfterResponse"> & { /** * Dead-man switch state after applying the request. * * @generated from field: orders.v1.CancelAllAfterResponse.Status status = 1; */ status: CancelAllAfterResponse_Status; /** * Effective timeout in seconds (0 when disabled). * * @generated from field: uint32 effective_timeout_sec = 2; */ effectiveTimeoutSec: number; /** * Expiry timestamp in epoch nanoseconds (0 when disabled). * * @generated from field: uint64 expires_at_ts_ns = 3; */ expiresAtTsNs: bigint; /** * Server timestamp. * * @generated from field: google.protobuf.Timestamp ts = 4; */ ts?: Timestamp | undefined; /** * Server timestamp as epoch nanoseconds (for bots). * * @generated from field: uint64 ts_ns = 5; */ tsNs: bigint; /** * Recorded scope after arming or refreshing. Absent when disabled. * Describes the current armed switch only. Cancellations already in progress * are unaffected by a later refresh or disable. * * @generated from field: orders.v1.DeadManSwitchScope effective_scope = 6; */ effectiveScope?: DeadManSwitchScope | undefined; }; /** * Describes the message orders.v1.CancelAllAfterResponse. * Use `create(CancelAllAfterResponseSchema)` to create a new message. */ declare const CancelAllAfterResponseSchema: GenMessage; /** * Dead-man switch state after applying the request. * * @generated from enum orders.v1.CancelAllAfterResponse.Status */ declare enum CancelAllAfterResponse_Status { /** * Dead-man switch status was not provided. * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ STATUS_UNSPECIFIED = 0, /** * The dead-man switch is armed or refreshed. * * @generated from enum value: ARMED = 1; */ ARMED = 1, /** * The dead-man switch is disabled. * * @generated from enum value: DISABLED = 2; */ DISABLED = 2 } /** * Describes the enum orders.v1.CancelAllAfterResponse.Status. */ declare const CancelAllAfterResponse_StatusSchema: GenEnum; /** * BatchCreateAccepted contains the assigned identifiers for an admitted item. * * @generated from message orders.v1.BatchCreateAccepted */ type BatchCreateAccepted = Message<"orders.v1.BatchCreateAccepted"> & { /** * Assigned order ID. * * @generated from field: fixed64 order_id = 1; */ orderId: bigint; /** * Trigger ID for attached take-profit (when accepted and configured). * * @generated from field: optional uint64 take_profit_trigger_id = 2; */ takeProfitTriggerId?: bigint | undefined; /** * Trigger ID for attached stop-loss (when accepted and configured). * * @generated from field: optional uint64 stop_loss_trigger_id = 3; */ stopLossTriggerId?: bigint | undefined; /** * Trigger ID for attached trailing stop (when accepted and configured). * * @generated from field: optional uint64 trailing_stop_trigger_id = 4; */ trailingStopTriggerId?: bigint | undefined; /** * Gross base quantity resolved for execution, scaled by the pair's * base_quantity_scale from GetSpotConfig. * * @generated from field: int64 resolved_base_qty_scaled = 5; */ resolvedBaseQtyScaled: bigint; /** * Submitted hard all-in quote debit limit, scaled by the pair's * quote_quantity_scale from GetSpotConfig. Present only when submitted. * * @generated from field: optional int64 submitted_max_quote_debit_scaled = 6; */ submittedMaxQuoteDebitScaled?: bigint | undefined; }; /** * Describes the message orders.v1.BatchCreateAccepted. * Use `create(BatchCreateAcceptedSchema)` to create a new message. */ declare const BatchCreateAcceptedSchema: GenMessage; /** * BatchCreateRejected contains the typed reason an item was not admitted. * * @generated from message orders.v1.BatchCreateRejected */ type BatchCreateRejected = Message<"orders.v1.BatchCreateRejected"> & { /** * Structured rejection detail. * * @generated from field: orders.v1.ErrorDetail error = 1; */ error?: ErrorDetail | undefined; }; /** * Describes the message orders.v1.BatchCreateRejected. * Use `create(BatchCreateRejectedSchema)` to create a new message. */ declare const BatchCreateRejectedSchema: GenMessage; /** * BatchCreateResultItem contains exactly one per-item batch outcome. * * @generated from message orders.v1.BatchCreateResultItem */ type BatchCreateResultItem = Message<"orders.v1.BatchCreateResultItem"> & { /** * Echoed client order ID. * * @generated from field: string client_order_id = 1; */ clientOrderId: string; /** * Accepted or rejected outcome. * * @generated from oneof orders.v1.BatchCreateResultItem.outcome */ outcome: { /** * Item was admitted. * * @generated from field: orders.v1.BatchCreateAccepted accepted = 2; */ value: BatchCreateAccepted; case: "accepted"; } | { /** * Item was rejected before admission. * * @generated from field: orders.v1.BatchCreateRejected rejected = 3; */ value: BatchCreateRejected; case: "rejected"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message orders.v1.BatchCreateResultItem. * Use `create(BatchCreateResultItemSchema)` to create a new message. */ declare const BatchCreateResultItemSchema: GenMessage; /** * BatchCreateOrdersRequest places multiple orders in one request. * * @generated from message orders.v1.BatchCreateOrdersRequest */ type BatchCreateOrdersRequest = Message<"orders.v1.BatchCreateOrdersRequest"> & { /** * 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; /** * Required account-scoped idempotency key for the entire ordered batch. * Reusing it with the same payload within 15 minutes returns each decided * item's original result and result time, and retries the items still * unresolved, never admitting an already admitted item again. Reusing it * with a different payload during that window returns * CONFLICT_IDEMPOTENCY_KEY_REUSE. After 15 minutes the ID is free: a repeat * is a new request and can place its orders again, so read the items back * instead of repeating an older batch. * * @generated from field: string request_id = 2; */ requestId: string; /** * Orders to create (max 20). client_order_id is optional per item. For a new * request_id, a reused client_order_id rejects only that item with * CONFLICT_DUPLICATE_CLIENT_ORDER_ID; other valid items continue. * * @generated from field: repeated orders.v1.OrderIntent items = 3; */ items: OrderIntent[]; }; /** * Describes the message orders.v1.BatchCreateOrdersRequest. * Use `create(BatchCreateOrdersRequestSchema)` to create a new message. */ declare const BatchCreateOrdersRequestSchema: GenMessage; /** * BatchCreateOrdersResponse returns per-item results for a batch create. * * @generated from message orders.v1.BatchCreateOrdersResponse */ type BatchCreateOrdersResponse = Message<"orders.v1.BatchCreateOrdersResponse"> & { /** * Per-item results in same order as request. * * @generated from field: repeated orders.v1.BatchCreateResultItem results = 1; */ results: BatchCreateResultItem[]; /** * Number of requested orders that were accepted. * * @generated from field: uint32 accepted_count = 2; */ acceptedCount: number; /** * Number of requested orders that were rejected. * * @generated from field: uint32 rejected_count = 3; */ rejectedCount: number; /** * Server timestamp. * * @generated from field: google.protobuf.Timestamp ts = 4; */ ts?: Timestamp | undefined; /** * Server timestamp as epoch nanoseconds (for bots). * * @generated from field: uint64 ts_ns = 5; */ tsNs: bigint; }; /** * Describes the message orders.v1.BatchCreateOrdersResponse. * Use `create(BatchCreateOrdersResponseSchema)` to create a new message. */ declare const BatchCreateOrdersResponseSchema: GenMessage; /** * ModifyOrderRequest updates an existing order using policy-driven amend/replace behavior. * * @generated from message orders.v1.ModifyOrderRequest */ type ModifyOrderRequest = Message<"orders.v1.ModifyOrderRequest"> & { /** * 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; /** * Target key. * * @generated from oneof orders.v1.ModifyOrderRequest.key */ key: { /** * Order ID as fixed64. * * @generated from field: fixed64 order_id = 2; */ value: bigint; case: "orderId"; } | { /** * Client order ID to resolve within the caller account. * * @generated from field: string client_order_id = 3; */ value: string; case: "clientOrderId"; } | { case: undefined; value?: undefined; }; /** * Idempotency key (required). Outstanding modifications retain this key; * identical retries replay the final result for 60 seconds after the answer. * * @generated from field: string request_id = 4; */ requestId: string; /** * Patch fields (presence-based). * New limit price in quote units scaled by 1e9. Required for price changes. * * @generated from field: optional int64 new_price_ticks = 5; */ newPriceTicks?: bigint | undefined; /** * Target total quantity after modify/replace, scaled by the pair's * base_quantity_scale from GetSpotConfig. * * @generated from field: optional int64 new_qty_scaled = 6; */ newQtyScaled?: bigint | undefined; /** * Replacement attached-risk policy for the order. The order's change and its * take-profit, stop-loss and trailing legs apply together: either all of * them change, or the whole modify is refused and the order and its legs * stay as they were. * * @generated from field: orders.v1.RiskPolicy new_attached_risk = 7; */ newAttachedRisk?: RiskPolicy | undefined; /** * Modify behavior policy. * MODIFY_BEHAVIOR_UNSPECIFIED is treated as AMEND_OR_REPLACE. * * @generated from field: orders.v1.ModifyBehavior behavior = 8; */ behavior: ModifyBehavior; /** * Optional new client order id when replace path is taken. * * @generated from field: string new_client_order_id = 9; */ newClientOrderId: string; /** * Trading symbol numeric identifier. Required for API-key market policy and * must match the target order. * * @generated from field: uint32 symbol_id = 10; */ symbolId: number; }; /** * Describes the message orders.v1.ModifyOrderRequest. * Use `create(ModifyOrderRequestSchema)` to create a new message. */ declare const ModifyOrderRequestSchema: GenMessage; /** * ModifyOrderResponse returns deterministic modify outcome. * * @generated from message orders.v1.ModifyOrderResponse */ type ModifyOrderResponse = Message<"orders.v1.ModifyOrderResponse"> & { /** * Action applied; unspecified when rejected. * * @generated from field: orders.v1.ModifyActionTaken action_taken = 1; */ actionTaken: ModifyActionTaken; /** * Original order ID that was amended or replaced. * * @generated from field: fixed64 old_order_id = 2; */ oldOrderId: bigint; /** * Final active order ID; same as old_order_id for amendments. * * @generated from field: fixed64 final_order_id = 3; */ finalOrderId: bigint; /** * Error code if rejected. * * @generated from field: string code = 4; */ code: string; /** * Trigger ID for attached take-profit after modification, when configured. * * @generated from field: optional uint64 take_profit_trigger_id = 5; */ takeProfitTriggerId?: bigint | undefined; /** * Trigger ID for attached stop-loss after modification, when configured. * * @generated from field: optional uint64 stop_loss_trigger_id = 6; */ stopLossTriggerId?: bigint | undefined; /** * Trigger ID for attached trailing stop after modification, when configured. * * @generated from field: optional uint64 trailing_stop_trigger_id = 7; */ trailingStopTriggerId?: bigint | undefined; /** * Server timestamp. * * @generated from field: google.protobuf.Timestamp ts = 8; */ ts?: Timestamp | undefined; /** * Server timestamp as epoch nanoseconds (for bots). * * @generated from field: uint64 ts_ns = 9; */ tsNs: bigint; }; /** * Describes the message orders.v1.ModifyOrderResponse. * Use `create(ModifyOrderResponseSchema)` to create a new message. */ declare const ModifyOrderResponseSchema: GenMessage; /** * BatchReplaceOrderItem identifies one order to modify inside a quote-refresh * batch. Each item follows ModifyOrder's default AMEND_OR_REPLACE rule: an item * that keeps the order's price (new_price_ticks unset or equal to it), does not * raise its total quantity and keeps its client order ID amends the order in * place, under the same order ID and with its queue priority kept. A new * price, a larger total quantity or a new client order ID replaces it with a * successor order under a new order ID, with its queue priority reset. To * force a replacement, use ModifyOrder with REPLACE_ONLY. * * @generated from message orders.v1.BatchReplaceOrderItem */ type BatchReplaceOrderItem = Message<"orders.v1.BatchReplaceOrderItem"> & { /** * @generated from oneof orders.v1.BatchReplaceOrderItem.key */ key: { /** * Order ID as fixed64. Exactly one of order_id or client_order_id. * * @generated from field: fixed64 order_id = 1; */ value: bigint; case: "orderId"; } | { /** * Client order ID. Exactly one of order_id or client_order_id. * * @generated from field: string client_order_id = 2; */ value: string; case: "clientOrderId"; } | { case: undefined; value?: undefined; }; /** * New limit price in quote units scaled by 1e9. * * @generated from field: optional int64 new_price_ticks = 3; */ newPriceTicks?: bigint | undefined; /** * Target total quantity after modify/replace, scaled by the pair's * base_quantity_scale from GetSpotConfig. * * @generated from field: optional int64 new_qty_scaled = 4; */ newQtyScaled?: bigint | undefined; /** * Replacement attached-risk policy for the order. * * @generated from field: orders.v1.RiskPolicy new_attached_risk = 5; */ newAttachedRisk?: RiskPolicy | undefined; /** * Optional client order ID for the successor. A value other than the order's * client order ID makes the item a replacement. * * @generated from field: string new_client_order_id = 6; */ newClientOrderId: string; }; /** * Describes the message orders.v1.BatchReplaceOrderItem. * Use `create(BatchReplaceOrderItemSchema)` to create a new message. */ declare const BatchReplaceOrderItemSchema: GenMessage; /** * BatchReplaceAdmissionItem contains the index-stable admission result for one item. * * @generated from message orders.v1.BatchReplaceAdmissionItem */ type BatchReplaceAdmissionItem = Message<"orders.v1.BatchReplaceAdmissionItem"> & { /** * Zero-based index in the request. * * @generated from field: uint32 item_index = 1; */ itemIndex: number; /** * Admission result for this item. * * @generated from field: orders.v1.BatchReplaceItemAdmissionStatus status = 2; */ status: BatchReplaceItemAdmissionStatus; /** * Original order targeted by the replacement: the requested order ID, or the * order the requested client order ID names. Rejected items keep it too. Unset * only when the requested client order ID names no order. * * @generated from field: fixed64 old_order_id = 3; */ oldOrderId: bigint; /** * Assigned successor order ID, for a REPLACED item only. Unset for an AMENDED * item, whose order keeps old_order_id, and for rejected items. * * @generated from field: fixed64 replacement_order_id = 4; */ replacementOrderId: bigint; /** * Client order ID assigned to the successor, for a REPLACED item only. * * @generated from field: string client_order_id = 5; */ clientOrderId: string; /** * Stable rejection code. Empty for admitted items. * * @generated from field: string code = 6; */ code: string; /** * Structured rejection details. Present for rate-limit guidance and other typed failures. * * @generated from field: orders.v1.ErrorDetail error = 7; */ error?: ErrorDetail | undefined; /** * REPLACED admits a successor under replacement_order_id, with queue priority * reset. AMENDED keeps the order under old_order_id with no successor: the * order is amended in place and keeps its queue priority, or, when the new * total quantity is at or below its filled quantity, ends at its filled * quantity. Keep tracking old_order_id for an AMENDED item. Not set for * rejected items; JSON and REST responses then omit it. * * @generated from field: orders.v1.ModifyActionTaken action_taken = 8; */ actionTaken: ModifyActionTaken; }; /** * Describes the message orders.v1.BatchReplaceAdmissionItem. * Use `create(BatchReplaceAdmissionItemSchema)` to create a new message. */ declare const BatchReplaceAdmissionItemSchema: GenMessage; /** * BatchReplaceOrdersRequest modifies same-symbol orders as one quote refresh: * each item is amended in place or replaced as ModifyOrder decides by default. * Identical retries replay the admission result for 60 seconds from acceptance; * a different payload under the same key conflicts. Use a fresh key for a new batch. * Read the batch's status with GetBatchReplaceStatus within the same window; * after it, reconcile the individual orders and never resubmit an accepted batch. * The response answers admission, before an admitted item's change completes. * Until it completes, a later change of that order, an item of the next batch * included, is rejected with a retryable code: ORDER_MODIFY_IN_PROGRESS when it * names the order by client order ID, and ORDER_PLACEMENT_PENDING (or * ORDER_MODIFY_IN_PROGRESS) when it names the replacement_order_id returned * here. Resend only the rejected items, in a new batch under a fresh key, after * a short backoff: the rejected batch's key keeps replaying its rejection, and * admitted items must not be sent again. * * @generated from message orders.v1.BatchReplaceOrdersRequest */ type BatchReplaceOrdersRequest = Message<"orders.v1.BatchReplaceOrdersRequest"> & { /** * 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; /** * Trading symbol shared by every replacement. An item whose order is on * another symbol is refused alone as an unknown order. * * @generated from field: uint32 symbol_id = 2; */ symbolId: number; /** * Client idempotency key (required). * * @generated from field: string request_id = 3; */ requestId: string; /** * Replacement items. * * @generated from field: repeated orders.v1.BatchReplaceOrderItem items = 4; */ items: BatchReplaceOrderItem[]; }; /** * Describes the message orders.v1.BatchReplaceOrdersRequest. * Use `create(BatchReplaceOrdersRequestSchema)` to create a new message. */ declare const BatchReplaceOrdersRequestSchema: GenMessage; /** * BatchReplaceOrdersResponse is the durable admission receipt for a batch. * * @generated from message orders.v1.BatchReplaceOrdersResponse */ type BatchReplaceOrdersResponse = Message<"orders.v1.BatchReplaceOrdersResponse"> & { /** * Server-issued opaque identity used for status and private realtime correlation. * * @generated from field: fixed64 batch_request_id = 1; */ batchRequestId: bigint; /** * Aggregate admission status. * * @generated from field: orders.v1.BatchReplaceAdmissionStatus status = 2; */ status: BatchReplaceAdmissionStatus; /** * Per-item admission results in request order. * * @generated from field: repeated orders.v1.BatchReplaceAdmissionItem results = 3; */ results: BatchReplaceAdmissionItem[]; /** * Number of items admitted and handed to execution. * * @generated from field: uint32 accepted_count = 4; */ acceptedCount: number; /** * Number of items rejected before execution handoff. * * @generated from field: uint32 rejected_count = 5; */ rejectedCount: number; /** * Server acceptance timestamp. * * @generated from field: google.protobuf.Timestamp accepted_ts = 6; */ acceptedTs?: Timestamp | undefined; /** * Server acceptance timestamp as epoch nanoseconds. * * @generated from field: uint64 accepted_ts_ns = 7; */ acceptedTsNs: bigint; }; /** * Describes the message orders.v1.BatchReplaceOrdersResponse. * Use `create(BatchReplaceOrdersResponseSchema)` to create a new message. */ declare const BatchReplaceOrdersResponseSchema: GenMessage; /** * BatchCancelItem identifies a single order to cancel within a batch. * * @generated from message orders.v1.BatchCancelItem */ type BatchCancelItem = Message<"orders.v1.BatchCancelItem"> & { /** * Order ID as fixed64. Exactly one of order_id or client_order_id. * * @generated from field: fixed64 order_id = 1; */ orderId: bigint; /** * Client order ID. Exactly one of order_id or client_order_id. * * @generated from field: string client_order_id = 2; */ clientOrderId: string; /** * Optional trading symbol numeric identifier. When set, it must match the * order's symbol, or the item is refused as an unknown order. When omitted, * the order's own symbol is used. * * @generated from field: uint32 symbol_id = 3; */ symbolId: number; }; /** * Describes the message orders.v1.BatchCancelItem. * Use `create(BatchCancelItemSchema)` to create a new message. */ declare const BatchCancelItemSchema: GenMessage; /** * BatchCancelResultItem contains the per-item result of a batch cancel. * * @generated from message orders.v1.BatchCancelResultItem */ type BatchCancelResultItem = Message<"orders.v1.BatchCancelResultItem"> & { /** * Per-item cancellation outcome. * * @generated from field: orders.v1.BatchCancelResultItem.Status status = 1; */ status: BatchCancelResultItem_Status; /** * Resolved order ID (populated on accept). * * @generated from field: fixed64 order_id = 2; */ orderId: bigint; /** * Echoed client order ID (when provided). * * @generated from field: string client_order_id = 3; */ clientOrderId: string; /** * Error code if rejected. * * @generated from field: string code = 4; */ code: string; /** * Structured rejection details. Present for rate-limit guidance and other typed failures. * * @generated from field: orders.v1.ErrorDetail error = 5; */ error?: ErrorDetail | undefined; }; /** * Describes the message orders.v1.BatchCancelResultItem. * Use `create(BatchCancelResultItemSchema)` to create a new message. */ declare const BatchCancelResultItemSchema: GenMessage; /** * Per-item cancellation outcome. * * @generated from enum orders.v1.BatchCancelResultItem.Status */ declare enum BatchCancelResultItem_Status { /** * Batch cancellation outcome was not provided. * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ STATUS_UNSPECIFIED = 0, /** * The cancellation request was accepted for processing. * * @generated from enum value: ACCEPTED = 1; */ ACCEPTED = 1, /** * The cancellation request was rejected. * * @generated from enum value: REJECTED = 2; */ REJECTED = 2 } /** * Describes the enum orders.v1.BatchCancelResultItem.Status. */ declare const BatchCancelResultItem_StatusSchema: GenEnum; /** * BatchCancelOrdersRequest cancels multiple orders by explicit ID. * * @generated from message orders.v1.BatchCancelOrdersRequest */ type BatchCancelOrdersRequest = Message<"orders.v1.BatchCancelOrdersRequest"> & { /** * 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; /** * Idempotency key (required). * * @generated from field: string request_id = 2; */ requestId: string; /** * Orders to cancel (max 50). * * @generated from field: repeated orders.v1.BatchCancelItem items = 3; */ items: BatchCancelItem[]; }; /** * Describes the message orders.v1.BatchCancelOrdersRequest. * Use `create(BatchCancelOrdersRequestSchema)` to create a new message. */ declare const BatchCancelOrdersRequestSchema: GenMessage; /** * BatchCancelOrdersResponse returns per-item results for a batch cancel. * * @generated from message orders.v1.BatchCancelOrdersResponse */ type BatchCancelOrdersResponse = Message<"orders.v1.BatchCancelOrdersResponse"> & { /** * Per-item results in same order as request. * * @generated from field: repeated orders.v1.BatchCancelResultItem results = 1; */ results: BatchCancelResultItem[]; /** * Number of requested cancellations that were accepted. * * @generated from field: uint32 accepted_count = 2; */ acceptedCount: number; /** * Number of requested cancellations that were rejected. * * @generated from field: uint32 rejected_count = 3; */ rejectedCount: number; /** * Server timestamp. * * @generated from field: google.protobuf.Timestamp ts = 4; */ ts?: Timestamp | undefined; /** * Server timestamp as epoch nanoseconds (for bots). * * @generated from field: uint64 ts_ns = 5; */ tsNs: bigint; }; /** * Describes the message orders.v1.BatchCancelOrdersResponse. * Use `create(BatchCancelOrdersResponseSchema)` to create a new message. */ declare const BatchCancelOrdersResponseSchema: GenMessage; /** * Side identifies whether an order buys or sells the base asset. * * @generated from enum orders.v1.Side */ declare enum Side { /** * Side was not provided. * * @generated from enum value: SIDE_UNSPECIFIED = 0; */ SIDE_UNSPECIFIED = 0, /** * Buy base asset using quote asset. * * @generated from enum value: BUY = 1; */ BUY = 1, /** * Sell base asset for quote asset. * * @generated from enum value: SELL = 2; */ SELL = 2 } /** * Describes the enum orders.v1.Side. */ declare const SideSchema: GenEnum; /** * OrderType identifies whether an order uses limit-price or market execution. * * @generated from enum orders.v1.OrderType */ declare enum OrderType { /** * Order type was not provided. * * @generated from enum value: ORDER_TYPE_UNSPECIFIED = 0; */ ORDER_TYPE_UNSPECIFIED = 0, /** * Limit order with an explicit price. * * @generated from enum value: LIMIT = 1; */ LIMIT = 1, /** * Market order executed against available liquidity. * * @generated from enum value: MARKET = 2; */ MARKET = 2 } /** * Describes the enum orders.v1.OrderType. */ declare const OrderTypeSchema: GenEnum; /** * TimeInForce controls how long an order may remain active and whether it must * fill completely. * * @generated from enum orders.v1.TimeInForce */ declare enum TimeInForce { /** * Time-in-force was not provided. Create requests must select an execution * variant, which determines time-in-force. * * @generated from enum value: TIME_IN_FORCE_UNSPECIFIED = 0; */ TIME_IN_FORCE_UNSPECIFIED = 0, /** * Good-til-canceled. * * @generated from enum value: GTC = 1; */ GTC = 1, /** * Immediate-or-cancel. * * @generated from enum value: IOC = 2; */ IOC = 2, /** * Fill-or-kill. * * @generated from enum value: FOK = 3; */ FOK = 3, /** * Good-til-date; the order may remain active only before its exact expiry time. * * @generated from enum value: GTD = 4; */ GTD = 4 } /** * Describes the enum orders.v1.TimeInForce. */ declare const TimeInForceSchema: GenEnum; /** * FeeAsset identifies the asset in which an order fee is charged. * * @generated from enum orders.v1.FeeAsset */ declare enum FeeAsset { /** * Fee asset was not provided; orders default to QUOTE. * * @generated from enum value: FEE_ASSET_UNSPECIFIED = 0; */ FEE_ASSET_UNSPECIFIED = 0, /** * Fees are charged in the quote asset. SELL fees always use quote asset. * * @generated from enum value: QUOTE = 1; */ QUOTE = 1, /** * BUY-only option: fees are deducted from the received base asset. * * @generated from enum value: BASE = 2; */ BASE = 2 } /** * Describes the enum orders.v1.FeeAsset. */ declare const FeeAssetSchema: GenEnum; /** * SelfTradePreventionMode controls which orders expire when an order would * trade against another order of the same root account, including all its * subaccounts: two subaccounts of one root never trade with each other. The * incoming order's mode decides which orders expire. * * @generated from enum orders.v1.SelfTradePreventionMode */ declare enum SelfTradePreventionMode { /** * Self-trade prevention mode was not provided; create requests default to EXPIRE_MAKER. * * @generated from enum value: SELF_TRADE_PREVENTION_MODE_UNSPECIFIED = 0; */ SELF_TRADE_PREVENTION_MODE_UNSPECIFIED = 0, /** * Cancel the resting maker order on self-trade. * * @generated from enum value: EXPIRE_MAKER = 1; */ EXPIRE_MAKER = 1, /** * Cancel the incoming taker order on self-trade. * * @generated from enum value: EXPIRE_TAKER = 2; */ EXPIRE_TAKER = 2, /** * Cancel both maker and taker orders on self-trade. * * @generated from enum value: EXPIRE_BOTH = 3; */ EXPIRE_BOTH = 3 } /** * Describes the enum orders.v1.SelfTradePreventionMode. */ declare const SelfTradePreventionModeSchema: GenEnum; /** * ErrorCode enumerates stable machine-readable error codes for the Orders API. * These mirror the REST problem+json "code" field for parity between REST and * ConnectRPC clients. * * @generated from enum orders.v1.ErrorCode */ declare enum ErrorCode { /** * Error code was not provided. * * @generated from enum value: ERROR_CODE_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * Request could not be parsed or was structurally invalid. * * @generated from enum value: ERROR_CODE_BAD_REQUEST = 1; */ BAD_REQUEST = 1, /** * Request fields failed validation. * * @generated from enum value: ERROR_CODE_INVALID_ARGUMENT = 2; */ INVALID_ARGUMENT = 2, /** * Account does not have enough available balance for the order. * * @generated from enum value: ERROR_CODE_INSUFFICIENT_FUNDS = 3; */ INSUFFICIENT_FUNDS = 3, /** * Requested trading symbol is unknown. * * @generated from enum value: ERROR_CODE_UNKNOWN_SYMBOL = 4; */ UNKNOWN_SYMBOL = 4, /** * Price is invalid for the requested order. * * @generated from enum value: ERROR_CODE_BAD_PRICE = 5; */ BAD_PRICE = 5, /** * Quantity is invalid for the requested order. * * @generated from enum value: ERROR_CODE_BAD_QTY = 6; */ BAD_QTY = 6, /** * Order notional is below the pair minimum. * * @generated from enum value: ERROR_CODE_MIN_NOTIONAL = 7; */ MIN_NOTIONAL = 7, /** * Quantity does not align with the pair step size. * * @generated from enum value: ERROR_CODE_QTY_STEP_SIZE = 8; */ QTY_STEP_SIZE = 8, /** * Client order ID is already in use on this account, by an open order or by * an order that ended recently; an ended order keeps its client order ID * reserved for at least 60 seconds. Reuse returns this code even with the * same payload. Use GetOrder to reconcile, then retry with a new client * order ID. * * @generated from enum value: ERROR_CODE_CONFLICT_DUPLICATE_CLIENT_ORDER_ID = 9; */ CONFLICT_DUPLICATE_CLIENT_ORDER_ID = 9, /** * Service is temporarily unavailable. * * @generated from enum value: ERROR_CODE_UNAVAILABLE = 10; */ UNAVAILABLE = 10, /** * Caller is not authenticated. * * @generated from enum value: ERROR_CODE_UNAUTHENTICATED = 11; */ UNAUTHENTICATED = 11, /** * Caller is authenticated but not allowed to perform this action. * * @generated from enum value: ERROR_CODE_PERMISSION_DENIED = 12; */ PERMISSION_DENIED = 12, /** * Requested order or resource was not found. * * @generated from enum value: ERROR_CODE_NOT_FOUND = 13; */ NOT_FOUND = 13, /** * Upstream dependency returned an error. * * @generated from enum value: ERROR_CODE_UPSTREAM_ERROR = 14; */ UPSTREAM_ERROR = 14, /** * Requested fee asset is not allowed for this order. * * @generated from enum value: ERROR_CODE_FEE_ASSET_NOT_ALLOWED = 15; */ FEE_ASSET_NOT_ALLOWED = 15, /** * Pair is disabled and does not accept orders. * * @generated from enum value: ERROR_CODE_PAIR_DISABLED = 16; */ PAIR_DISABLED = 16, /** * Referenced order could not be resolved. * * @generated from enum value: ERROR_CODE_ORDER_UNKNOWN = 17; */ ORDER_UNKNOWN = 17, /** * Order processing failed because of an unexpected error. * * @generated from enum value: ERROR_CODE_INTERNAL_ERROR = 18; */ INTERNAL_ERROR = 18, /** * Sub-account is present but not in an active state (disabled, deleted, * etc.). * * @generated from enum value: ERROR_CODE_SUBACCOUNT_INACTIVE = 19; */ SUBACCOUNT_INACTIVE = 19, /** * Sub-account policy prevented trading on this market (e.g. pair mask). * * @generated from enum value: ERROR_CODE_POLICY_MARKET_DENY = 20; */ POLICY_MARKET_DENY = 20, /** * Sub-account policy max order notional exceeded. * * @generated from enum value: ERROR_CODE_POLICY_MAX_NOTIONAL = 21; */ POLICY_MAX_NOTIONAL = 21, /** * Trading has been globally halted for this sub-account. * * @generated from enum value: ERROR_CODE_POLICY_TRADING_HALTED = 22; */ POLICY_TRADING_HALTED = 22, /** * Sub-account policy does not allow spot trading (action mask). * * @generated from enum value: ERROR_CODE_POLICY_SPOT_TRADE_DENY = 23; */ POLICY_SPOT_TRADE_DENY = 23, /** * API key is scoped to the master/root account and cannot trade on * sub-accounts. * * @generated from enum value: ERROR_CODE_API_KEY_ROOT_SCOPE_ONLY = 24; */ API_KEY_ROOT_SCOPE_ONLY = 24, /** * API key is scoped to a specific sub-account and cannot trade on the * master/root account. * * @generated from enum value: ERROR_CODE_API_KEY_SUB_SCOPE_ONLY = 25; */ API_KEY_SUB_SCOPE_ONLY = 25, /** * API key is scoped to a different sub-account than the one requested. * * @generated from enum value: ERROR_CODE_API_KEY_SUBACCOUNT_MISMATCH = 26; */ API_KEY_SUBACCOUNT_MISMATCH = 26, /** * API key must have an attached policy before it can be used for trading. * * @generated from enum value: ERROR_CODE_API_KEY_POLICY_REQUIRED = 27; */ API_KEY_POLICY_REQUIRED = 27, /** * API key referenced in the request could not be resolved by the Orders * service. * * @generated from enum value: ERROR_CODE_API_KEY_UNKNOWN = 28; */ API_KEY_UNKNOWN = 28, /** * API key policy does not allow trading this market, even though the * sub-account policy does. * * @generated from enum value: ERROR_CODE_API_KEY_MARKET_DENY = 29; */ API_KEY_MARKET_DENY = 29, /** * Price must align with the pair tick size, including trigger and activation prices. * * @generated from enum value: ERROR_CODE_PRICE_TICK_SIZE = 30; */ PRICE_TICK_SIZE = 30, /** * Quantity is below the pair minimum quantity (base units). * * @generated from enum value: ERROR_CODE_MIN_QTY = 31; */ MIN_QTY = 31, /** * Post-only is only valid for LIMIT orders. * * @generated from enum value: ERROR_CODE_POST_ONLY_LIMIT_ONLY = 32; */ POST_ONLY_LIMIT_ONLY = 32, /** * Batch size exceeds the maximum allowed. * * @generated from enum value: ERROR_CODE_BATCH_TOO_LARGE = 33; */ BATCH_TOO_LARGE = 33, /** * Sub-account policy maximum number of open orders has been reached. * * @generated from enum value: ERROR_CODE_POLICY_MAX_OPEN_ORDERS = 34; */ POLICY_MAX_OPEN_ORDERS = 34, /** * Modify request in AMEND_ONLY mode requires replace semantics. * * @generated from enum value: ERROR_CODE_MODIFICATION_REQUIRES_REPLACE = 35; */ MODIFICATION_REQUIRES_REPLACE = 35, /** * Idempotency key was reused with a different payload. * * @generated from enum value: ERROR_CODE_CONFLICT_IDEMPOTENCY_KEY_REUSE = 36; */ CONFLICT_IDEMPOTENCY_KEY_REUSE = 36, /** * MARKET BUY cannot be reserved because no reference/top-of-book price is available. * * @generated from enum value: ERROR_CODE_MARKET_PRICE_UNAVAILABLE = 37; */ MARKET_PRICE_UNAVAILABLE = 37, /** * Pair exists but is not listed yet. * * @generated from enum value: ERROR_CODE_PAIR_NOT_LISTED_YET = 50; */ PAIR_NOT_LISTED_YET = 50, /** * Pair was delisted and is no longer tradable. * * @generated from enum value: ERROR_CODE_PAIR_DELISTED = 51; */ PAIR_DELISTED = 51, /** * Pair is in cancel-only mode. * * @generated from enum value: ERROR_CODE_PAIR_CANCEL_ONLY = 52; */ PAIR_CANCEL_ONLY = 52, /** * Pair is in post-only mode and requires post_only=true. * * @generated from enum value: ERROR_CODE_PAIR_POST_ONLY = 53; */ PAIR_POST_ONLY = 53, /** * Pair is in reduce-only mode and does not accept new spot orders. * * @generated from enum value: ERROR_CODE_PAIR_REDUCE_ONLY = 54; */ PAIR_REDUCE_ONLY = 54, /** * Account-level risk limits were exceeded. * * @generated from enum value: ERROR_CODE_RISK_LIMIT = 55; */ RISK_LIMIT = 55, /** * Market is halted. * * @generated from enum value: ERROR_CODE_MARKET_HALTED = 56; */ MARKET_HALTED = 56, /** * Referenced account could not be resolved by the trading service. * * @generated from enum value: ERROR_CODE_ACCOUNT_UNKNOWN = 57; */ ACCOUNT_UNKNOWN = 57, /** * Post-only order would cross the book. * * @generated from enum value: ERROR_CODE_POST_ONLY_CROSS = 58; */ POST_ONLY_CROSS = 58, /** * Reduce-only policy blocked the order. * * @generated from enum value: ERROR_CODE_REDUCE_ONLY_BLOCKED = 59; */ REDUCE_ONLY_BLOCKED = 59, /** * Price band guard rejected the order. * * @generated from enum value: ERROR_CODE_PRICE_BAND_VIOLATION = 60; */ PRICE_BAND_VIOLATION = 60, /** * Market-cap guard rejected the order. * * @generated from enum value: ERROR_CODE_MARKET_CAP_VIOLATION = 61; */ MARKET_CAP_VIOLATION = 61, /** * Market order could not execute due to empty book. * * @generated from enum value: ERROR_CODE_EMPTY_BOOK = 62; */ EMPTY_BOOK = 62, /** * FOK order rejected due to insufficient immediate liquidity. * * @generated from enum value: ERROR_CODE_FOK_INSUFFICIENT_LIQUIDITY = 63; */ FOK_INSUFFICIENT_LIQUIDITY = 63, /** * The order has already ended (filled, canceled or expired). * * @generated from enum value: ERROR_CODE_ORDER_ALREADY_TERMINAL = 64; */ ORDER_ALREADY_TERMINAL = 64, /** * Trigger-specific error codes (40-49 range). * Trigger price is invalid (e.g., TP below current price for long). * * @generated from enum value: ERROR_CODE_TRIGGER_PRICE_INVALID = 40; */ TRIGGER_PRICE_INVALID = 40, /** * Trigger price source not supported (e.g., INDEX_PRICE before it's * available). * * @generated from enum value: ERROR_CODE_TRIGGER_PRICE_SOURCE_UNSUPPORTED = 41; */ TRIGGER_PRICE_SOURCE_UNSUPPORTED = 41, /** * Trailing stop distance must be positive. * * @generated from enum value: ERROR_CODE_TRAILING_DISTANCE_INVALID = 42; */ TRAILING_DISTANCE_INVALID = 42, /** * Trigger not found (for cancel/get operations). * * @generated from enum value: ERROR_CODE_TRIGGER_NOT_FOUND = 43; */ TRIGGER_NOT_FOUND = 43, /** * Trigger status does not allow requested lifecycle operation. * * @generated from enum value: ERROR_CODE_TRIGGER_STATUS_INVALID = 45; */ TRIGGER_STATUS_INVALID = 45, /** * Trigger type/state does not support requested lifecycle operation. * * @generated from enum value: ERROR_CODE_TRIGGER_NOT_MODIFIABLE = 46; */ TRIGGER_NOT_MODIFIABLE = 46, /** * Client trigger ID is already used, either by a trigger with a different * payload or by an earlier create that failed or was rolled back. List * triggers to reconcile by client trigger ID, then retry with a new client * trigger ID. * * @generated from enum value: ERROR_CODE_CONFLICT_DUPLICATE_CLIENT_TRIGGER_ID = 47; */ CONFLICT_DUPLICATE_CLIENT_TRIGGER_ID = 47, /** * Max slippage (ticks or bps) is out of range or leaves no valid execution * price bound. Applies to market orders and to standalone and attached * trailing stops, on create and on modify; for example, a 10000 bps cap on a * market order or trailing stop that sells. * * @generated from enum value: ERROR_CODE_MAX_SLIPPAGE_INVALID = 48; */ MAX_SLIPPAGE_INVALID = 48, /** * Client reference price is stale compared to server-side BBO/drift policy. * * @generated from enum value: ERROR_CODE_STALE_QUOTE = 65; */ STALE_QUOTE = 65, /** * Request failed structural or cross-field validation. * * @generated from enum value: ERROR_CODE_VALIDATION_ERROR = 66; */ VALIDATION_ERROR = 66, /** * The account already has its maximum order requests in flight; nothing was * admitted. ConnectRPC returns RESOURCE_EXHAUSTED (HTTP 429); REST returns * HTTP 503. No Retry-After or RateLimit-* headers are supplied. Retry after * one of the outstanding requests completes. * * @generated from enum value: ERROR_CODE_OVERLOADED = 67; */ OVERLOADED = 67, /** * The all-in quote budget cannot resolve one valid step-aligned base quantity. * * @generated from enum value: ERROR_CODE_MAX_QUOTE_DEBIT_TOO_SMALL = 68; */ MAX_QUOTE_DEBIT_TOO_SMALL = 68, /** * The account exhausted its current order-admission quota. * * @generated from enum value: ERROR_CODE_RATE_LIMIT_EXCEEDED = 69; */ RATE_LIMIT_EXCEEDED = 69, /** * Caller has a sub-account role that does not allow reading spot data. * * @generated from enum value: ERROR_CODE_SUBACCOUNT_READ_FORBIDDEN = 70; */ SUBACCOUNT_READ_FORBIDDEN = 70, /** * Sub-account policy does not allow reading spot data. * * @generated from enum value: ERROR_CODE_POLICY_SPOT_READ_DENY = 71; */ POLICY_SPOT_READ_DENY = 71, /** * API key policy does not allow reading spot data. * * @generated from enum value: ERROR_CODE_API_KEY_SPOT_READ_DENY = 72; */ API_KEY_SPOT_READ_DENY = 72, /** * The cancel request exceeded its bounded internal replay window. * * @generated from enum value: ERROR_CODE_CANCEL_REQUEST_EXPIRED = 73; */ CANCEL_REQUEST_EXPIRED = 73, /** * Quantity is above the pair maximum: the market-order maximum for MARKET * orders, the limit-order maximum otherwise (base units). * * @generated from enum value: ERROR_CODE_MAX_QTY = 74; */ MAX_QTY = 74, /** * Order notional is above the pair maximum (quote units). A stricter * sub-account policy cap returns POLICY_MAX_NOTIONAL instead. * * @generated from enum value: ERROR_CODE_MAX_NOTIONAL = 75; */ MAX_NOTIONAL = 75, /** * The replacement total quantity is at or below the order's filled * quantity: the order ended at its filled quantity and no replacement order * was created. * * @generated from enum value: ERROR_CODE_QTY_AT_OR_BELOW_FILLED = 76; */ QTY_AT_OR_BELOW_FILLED = 76, /** * The trading gateway that took the request is misconfigured for the order * service behind it. An operator must correct it; retrying does not help. * * @generated from enum value: ERROR_CODE_GATEWAY_MISCONFIGURED = 77; */ GATEWAY_MISCONFIGURED = 77, /** * The order identifier or the replacement order identifier is not valid. * * @generated from enum value: ERROR_CODE_INVALID_ORDER_ID = 80; */ INVALID_ORDER_ID = 80, /** * The quantity of a trigger's child order or a ladder order can't be raised * above its planned quantity. Nothing changed. * * @generated from enum value: ERROR_CODE_CHILD_QTY_RAISE_NOT_ALLOWED = 81; */ CHILD_QTY_RAISE_NOT_ALLOWED = 81, /** * Attached take-profit, stop-loss or trailing legs can't be applied here: * this market takes none, an attached trailing stop isn't offered yet, or * the modify changes them together with the order's price, quantity, client * order ID or a replace. Nothing changed. * * @generated from enum value: ERROR_CODE_ATTACHED_RISK_NOT_SUPPORTED = 82; */ ATTACHED_RISK_NOT_SUPPORTED = 82, /** * The account has too many filled or ended orders whose settlement has not * completed yet. Nothing changed; the request is accepted again once settlement * catches up. * * @generated from enum value: ERROR_CODE_SETTLEMENT_BACKLOGGED = 84; */ SETTLEMENT_BACKLOGGED = 84, /** * The order would take the total quantity resting at its price past the * most a price level can hold, even if some quantity still fits. Nothing * changed: a new order was not placed, a modified order keeps resting as it * was, and the other orders at that price are unchanged. Another price or a * smaller quantity, or the same order once less quantity rests at that * price, is accepted. * * @generated from enum value: ERROR_CODE_PRICE_LEVEL_QUANTITY_LIMIT = 127; */ PRICE_LEVEL_QUANTITY_LIMIT = 127, /** * The market order carried no client reference price, and the pair's reference * quote (top of book) was older than its freshness bound when the order was * admitted. * * @generated from enum value: ERROR_CODE_MARKET_QUOTE_STALE = 200; */ MARKET_QUOTE_STALE = 200, /** * The market order carried no client reference price, and the pair's reference * quote could not be used to price it, for example because it postdated the * order or carried an invalid price. * * @generated from enum value: ERROR_CODE_MARKET_QUOTE_UNHEALTHY = 201; */ MARKET_QUOTE_UNHEALTHY = 201, /** * The time in force, or its expiry time, is not accepted for this order or for * a trigger's child order type. * * @generated from enum value: ERROR_CODE_INVALID_TIME_IN_FORCE = 202; */ INVALID_TIME_IN_FORCE = 202, /** * The request carried QuickSwap terms that the account or market does not * accept. * * @generated from enum value: ERROR_CODE_QUICKSWAP_NOT_PERMITTED = 203; */ QUICKSWAP_NOT_PERMITTED = 203, /** * The order identifier assigned to the request is already in use by another * order of the market. Nothing changed. * * @generated from enum value: ERROR_CODE_DUPLICATE_ORDER_ID = 204; */ DUPLICATE_ORDER_ID = 204, /** * The account has reached its maximum number of open orders across all markets. * A stricter sub-account policy cap returns POLICY_MAX_OPEN_ORDERS instead. * * @generated from enum value: ERROR_CODE_MAX_OPEN_ORDERS_TOTAL = 205; */ MAX_OPEN_ORDERS_TOTAL = 205, /** * The self-trade prevention mode is not one the venue accepts for this order. * * @generated from enum value: ERROR_CODE_STP_MODE_NOT_ALLOWED = 206; */ STP_MODE_NOT_ALLOWED = 206, /** * The trading pair is busy with the account's earlier requests, so this one was * not admitted and nothing was reserved. Retry shortly. * * @generated from enum value: ERROR_CODE_PAIR_BACKLOGGED = 207; */ PAIR_BACKLOGGED = 207, /** * The order book of the market holds its maximum number of distinct price * levels, so an order at a new price cannot rest. Nothing changed. * * @generated from enum value: ERROR_CODE_PRICE_LEVELS_EXHAUSTED = 208; */ PRICE_LEVELS_EXHAUSTED = 208, /** * The account reserves its maximum number of client order IDs, including those * of recently ended orders. Retry once they expire, or send the request without * a client order ID. * * @generated from enum value: ERROR_CODE_CLIENT_ORDER_IDS_EXHAUSTED = 209; */ CLIENT_ORDER_IDS_EXHAUSTED = 209, /** * The order identifier is held by a different, earlier order, so the request * was not applied. Nothing changed. * * @generated from enum value: ERROR_CODE_ORDER_ID_CONFLICT = 210; */ ORDER_ID_CONFLICT = 210, /** * The order side, or a trigger's child order side, is not a known side. * * @generated from enum value: ERROR_CODE_INVALID_SIDE = 211; */ INVALID_SIDE = 211, /** * The order type, or a trigger's child order type, is not a known order type. * * @generated from enum value: ERROR_CODE_INVALID_ORDER_TYPE = 212; */ INVALID_ORDER_TYPE = 212, /** * The self-trade prevention mode is not a known mode. * * @generated from enum value: ERROR_CODE_INVALID_STP_MODE = 213; */ INVALID_STP_MODE = 213, /** * An order flag is unknown, or not accepted with this order type or time in * force, or on a trigger's child order. * * @generated from enum value: ERROR_CODE_INVALID_ORDER_FLAGS = 214; */ INVALID_ORDER_FLAGS = 214, /** * Another item of the same batch was invalid, so this item was not applied * either. Nothing in the batch changed. * * @generated from enum value: ERROR_CODE_BATCH_OTHER_ITEM_INVALID = 215; */ BATCH_OTHER_ITEM_INVALID = 215, /** * The replacement order identifier equals the identifier of the order it * replaces. * * @generated from enum value: ERROR_CODE_REPLACE_ONTO_OWN_ID = 216; */ REPLACE_ONTO_OWN_ID = 216, /** * The client order ID is longer than 36 bytes or otherwise not valid. * * @generated from enum value: ERROR_CODE_INVALID_CLIENT_ORDER_ID = 217; */ INVALID_CLIENT_ORDER_ID = 217, /** * The account used every order identifier available to it in this market. * Retrying does not help; contact support. * * @generated from enum value: ERROR_CODE_ORDER_SEQUENCE_EXHAUSTED = 218; */ ORDER_SEQUENCE_EXHAUSTED = 218, /** * The order handling mode is not a known or accepted mode. * * @generated from enum value: ERROR_CODE_INVALID_HANDLING_MODE = 219; */ INVALID_HANDLING_MODE = 219, /** * The fees that apply to the order cannot be determined right now, so it was * not admitted. Retry later. * * @generated from enum value: ERROR_CODE_FEE_SCHEDULE_UNAVAILABLE = 220; */ FEE_SCHEDULE_UNAVAILABLE = 220, /** * The account's trading policy cannot be evaluated right now, so the order was * not admitted. Retry later. * * @generated from enum value: ERROR_CODE_POLICY_UNAVAILABLE = 221; */ POLICY_UNAVAILABLE = 221, /** * The cancel-all-after timeout is neither 0, which disarms it, nor between 10 * and 120 seconds. * * @generated from enum value: ERROR_CODE_CANCEL_ALL_AFTER_TIMEOUT_INVALID = 222; */ CANCEL_ALL_AFTER_TIMEOUT_INVALID = 222, /** * The cancel-all request named more than 100 symbols. * * @generated from enum value: ERROR_CODE_CANCEL_SCOPE_TOO_LARGE = 223; */ CANCEL_SCOPE_TOO_LARGE = 223, /** * No usable rate-limit policy applies to the account right now, so the request * was refused rather than admitted unlimited. Retry later. * * @generated from enum value: ERROR_CODE_RATE_LIMIT_POLICY_UNAVAILABLE = 224; */ RATE_LIMIT_POLICY_UNAVAILABLE = 224, /** * The venue-wide admission rate that the account shares with other accounts is * exhausted. The account's own limit was not reached; retry shortly. * * @generated from enum value: ERROR_CODE_SYSTEM_RATE_LIMITED = 225; */ SYSTEM_RATE_LIMITED = 225, /** * An earlier amend or replace of the order has not completed yet. A batch * replace answer means its items were admitted, not completed, so the next * refresh of the same order can get this code. Retry after a short backoff. * For a batch item, resend only that item in a new batch under a fresh request * ID, because the rejected batch's request ID returns this rejection again. * * @generated from enum value: ERROR_CODE_ORDER_MODIFY_IN_PROGRESS = 226; */ ORDER_MODIFY_IN_PROGRESS = 226, /** * The placement of the order, or of the replacement an earlier replace * created, has not been confirmed yet, so it cannot be modified. It may already * rest on the book. A refresh that names the replacement order ID from a batch * whose replace has not been confirmed yet gets this code. Retry after a short * backoff, as for ORDER_MODIFY_IN_PROGRESS. * * @generated from enum value: ERROR_CODE_ORDER_PLACEMENT_PENDING = 227; */ ORDER_PLACEMENT_PENDING = 227, /** * The modify behavior is not a known behavior. * * @generated from enum value: ERROR_CODE_INVALID_MODIFY_BEHAVIOR = 228; */ INVALID_MODIFY_BEHAVIOR = 228, /** * No longer returned: each BatchReplaceOrders item follows ModifyOrder's * default amend-or-replace rule. The value stays reserved. * * @generated from enum value: ERROR_CODE_BATCH_REPLACE_ONLY_REQUIRED = 229; */ BATCH_REPLACE_ONLY_REQUIRED = 229, /** * An item of the batch modify named no symbol, or another symbol than the * batch's first item, so the batch was refused. * * @generated from enum value: ERROR_CODE_BATCH_SINGLE_SYMBOL_REQUIRED = 230; */ BATCH_SINGLE_SYMBOL_REQUIRED = 230, /** * The account keeps its maximum number of recent modify or batch requests for * duplicate detection. Retry once earlier ones expire. * * @generated from enum value: ERROR_CODE_REQUEST_RECEIPTS_EXHAUSTED = 231; */ REQUEST_RECEIPTS_EXHAUSTED = 231, /** * The cancel-all or cancel-all-after request carried an intent identifier of * zero. * * @generated from enum value: ERROR_CODE_INTENT_ID_INVALID = 232; */ INTENT_ID_INVALID = 232, /** * The cancel-all request's dry-run flag was neither 0 nor 1. * * @generated from enum value: ERROR_CODE_DRY_RUN_INVALID = 233; */ DRY_RUN_INVALID = 233, /** * A cancel-all-after is already due to fire, and the re-arm's scope does not * cover every symbol of the pending one. * * @generated from enum value: ERROR_CODE_CANCEL_ALL_AFTER_SCOPE_CONFLICT = 234; */ CANCEL_ALL_AFTER_SCOPE_CONFLICT = 234, /** * The venue holds its maximum number of account access records, so an account * trading this market for the first time cannot be admitted. Retry later. * * @generated from enum value: ERROR_CODE_NEW_ACCOUNT_CAPACITY_REACHED = 235; */ NEW_ACCOUNT_CAPACITY_REACHED = 235, /** * The modify patched the trigger's child limit price or price mode, which the * trigger does not accept. * * @generated from enum value: ERROR_CODE_TRIGGER_CHILD_PRICE_NOT_MODIFIABLE = 236; */ TRIGGER_CHILD_PRICE_NOT_MODIFIABLE = 236, /** * The trigger reached its last modification. Nothing changed; cancel it and * create a new trigger instead. * * @generated from enum value: ERROR_CODE_TRIGGER_GENERATIONS_EXHAUSTED = 237; */ TRIGGER_GENERATIONS_EXHAUSTED = 237, /** * The account has its maximum number of trigger changes whose outcome is still * pending. Retry shortly. * * @generated from enum value: ERROR_CODE_TRIGGER_CONTROL_SHARE_EXHAUSTED = 238; */ TRIGGER_CONTROL_SHARE_EXHAUSTED = 238, /** * The venue's capacity for pending trigger changes is exhausted across * accounts. Retry shortly. * * @generated from enum value: ERROR_CODE_TRIGGER_CONTROLS_BUSY = 239; */ TRIGGER_CONTROLS_BUSY = 239, /** * The trigger type is valid but not supported on this venue yet. * * @generated from enum value: ERROR_CODE_TRIGGER_TYPE_NOT_SUPPORTED = 240; */ TRIGGER_TYPE_NOT_SUPPORTED = 240, /** * The trigger type is not a known type. * * @generated from enum value: ERROR_CODE_INVALID_TRIGGER_TYPE = 241; */ INVALID_TRIGGER_TYPE = 241, /** * The trigger direction is neither ABOVE nor BELOW. * * @generated from enum value: ERROR_CODE_TRIGGER_DIRECTION_INVALID = 242; */ TRIGGER_DIRECTION_INVALID = 242, /** * The trigger's child order quantity is not positive. * * @generated from enum value: ERROR_CODE_TRIGGER_QTY_INVALID = 243; */ TRIGGER_QTY_INVALID = 243, /** * A buy trailing stop's child order is not a LIMIT order with a maximum * price; its funds are reserved at that price. * * @generated from enum value: ERROR_CODE_TRIGGER_BUY_REQUIRES_LIMIT = 244; */ TRIGGER_BUY_REQUIRES_LIMIT = 244, /** * The account's trading route is not configured for triggers, so the trigger * was not admitted. Contact support if it persists. * * @generated from enum value: ERROR_CODE_ACCOUNT_ROUTING_INVALID = 245; */ ACCOUNT_ROUTING_INVALID = 245, /** * The account has its maximum number of live and recently ended triggers. * * @generated from enum value: ERROR_CODE_TRIGGER_LIMIT_EXCEEDED = 246; */ TRIGGER_LIMIT_EXCEEDED = 246, /** * An earlier change of the trigger has not completed yet. Retry once it * completes. * * @generated from enum value: ERROR_CODE_TRIGGER_CONTROL_IN_PROGRESS = 247; */ TRIGGER_CONTROL_IN_PROGRESS = 247, /** * The trigger modify named no field to change. * * @generated from enum value: ERROR_CODE_TRIGGER_PATCH_EMPTY = 248; */ TRIGGER_PATCH_EMPTY = 248, /** * The client trigger ID is empty, longer than 36 bytes or otherwise not valid. * * @generated from enum value: ERROR_CODE_CLIENT_TRIGGER_ID_INVALID = 249; */ CLIENT_TRIGGER_ID_INVALID = 249, /** * The trailing trigger's activation price is not positive or not on the pair's * tick. * * @generated from enum value: ERROR_CODE_TRIGGER_ACTIVATION_PRICE_INVALID = 250; */ TRIGGER_ACTIVATION_PRICE_INVALID = 250, /** * The trigger's slippage bound in ticks is not valid for its child order. * * @generated from enum value: ERROR_CODE_SLIPPAGE_TICKS_INVALID = 251; */ SLIPPAGE_TICKS_INVALID = 251, /** * The trigger's slippage bound in basis points is not valid for its child * order. * * @generated from enum value: ERROR_CODE_SLIPPAGE_BPS_INVALID = 252; */ SLIPPAGE_BPS_INVALID = 252, /** * The trigger change was not confirmed within its time bound. Its outcome is * unknown and it may still apply; read the trigger before retrying. * * @generated from enum value: ERROR_CODE_TRIGGER_CONTROL_OUTCOME_UNKNOWN = 253; */ TRIGGER_CONTROL_OUTCOME_UNKNOWN = 253, /** * The venue holds its maximum number of triggers across accounts right now. * Retry later. * * @generated from enum value: ERROR_CODE_TRIGGER_CAPACITY_REACHED = 254; */ TRIGGER_CAPACITY_REACHED = 254, /** * The venue's capacity for fund reservations is exhausted right now, so the * trigger's child order could not be reserved. Retry later. * * @generated from enum value: ERROR_CODE_RESERVATION_CAPACITY_REACHED = 255; */ RESERVATION_CAPACITY_REACHED = 255, /** * The venue's capacity for reserved client order IDs is exhausted right now, so * the trigger's child order could not reserve one. Retry later. * * @generated from enum value: ERROR_CODE_CLIENT_ORDER_ID_CAPACITY_REACHED = 256; */ CLIENT_ORDER_ID_CAPACITY_REACHED = 256, /** * The account's open orders and triggers hold its maximum number of fund * reservations. * * @generated from enum value: ERROR_CODE_ACCOUNT_RESERVATION_LIMIT_REACHED = 257; */ ACCOUNT_RESERVATION_LIMIT_REACHED = 257, /** * The requested trigger operation is not a known operation. * * @generated from enum value: ERROR_CODE_INVALID_TRIGGER_CONTROL = 258; */ INVALID_TRIGGER_CONTROL = 258, /** * A trigger operation other than modify carried field changes. * * @generated from enum value: ERROR_CODE_TRIGGER_PATCH_NOT_ALLOWED = 259; */ TRIGGER_PATCH_NOT_ALLOWED = 259, /** * The trigger modify named a field that is not known. * * @generated from enum value: ERROR_CODE_TRIGGER_PATCH_FIELD_UNKNOWN = 260; */ TRIGGER_PATCH_FIELD_UNKNOWN = 260, /** * The trigger modify carried a value for a field its change mask does not name. * * @generated from enum value: ERROR_CODE_TRIGGER_PATCH_VALUE_UNMASKED = 261; */ TRIGGER_PATCH_VALUE_UNMASKED = 261, /** * The trigger modify's price mode is not a known mode. * * @generated from enum value: ERROR_CODE_TRIGGER_PATCH_PRICE_MODE_INVALID = 262; */ TRIGGER_PATCH_PRICE_MODE_INVALID = 262, /** * New orders, changes and trigger orders on this account are suspended until * a balance issue is resolved; cancels still work. Nothing changed. * * @generated from enum value: ERROR_CODE_ACCOUNT_ORDERS_SUSPENDED = 263; */ ACCOUNT_ORDERS_SUSPENDED = 263, /** * A trailing stop's side is not supported. Trailing stops accept either * side, so this code is not currently returned. * * @generated from enum value: ERROR_CODE_TRAILING_SIDE_NOT_SUPPORTED = 264; */ TRAILING_SIDE_NOT_SUPPORTED = 264, /** * A trailing stop that sells must have a MARKET child order. * * @generated from enum value: ERROR_CODE_TRAILING_CHILD_NOT_MARKET = 265; */ TRAILING_CHILD_NOT_MARKET = 265, /** * The TWAP duration is shorter than 1 second or longer than about 292 years, * the longest the venue's clock represents. * * @generated from enum value: ERROR_CODE_TWAP_DURATION_INVALID = 266; */ TWAP_DURATION_INVALID = 266, /** * The TWAP sets a slippage bound, but its slices are LIMIT orders, which take * none. * * @generated from enum value: ERROR_CODE_LIMIT_CHILD_SLIPPAGE_SET = 267; */ LIMIT_CHILD_SLIPPAGE_SET = 267, /** * The slippage bound is given both in ticks and in basis points; give only one. * * @generated from enum value: ERROR_CODE_SLIPPAGE_BOUNDS_CONFLICT = 268; */ SLIPPAGE_BOUNDS_CONFLICT = 268, /** * The TWAP slice interval is shorter than 100 milliseconds or longer than its * duration. * * @generated from enum value: ERROR_CODE_TWAP_INTERVAL_INVALID = 269; */ TWAP_INTERVAL_INVALID = 269, /** * One of the ladder's orders can't be placed, so the ladder was not created. * Nothing changed. * * @generated from enum value: ERROR_CODE_LADDER_LEVEL_REJECTED = 270; */ LADDER_LEVEL_REJECTED = 270, /** * The ladder's price range is too narrow to place its orders at least one * price tick apart. * * @generated from enum value: ERROR_CODE_LADDER_RANGE_TOO_NARROW = 271; */ LADDER_RANGE_TOO_NARROW = 271, /** * A ladder places from 2 to 100 orders. * * @generated from enum value: ERROR_CODE_LADDER_LEVELS_INVALID = 272; */ LADDER_LEVELS_INVALID = 272, /** * This market's order limits aren't set yet, so it can't take new orders. * * @generated from enum value: ERROR_CODE_ORDER_LIMITS_UNAVAILABLE = 273; */ ORDER_LIMITS_UNAVAILABLE = 273, /** * This market is in an auction call and takes only limit orders that rest * without crossing the book; market, immediate-or-cancel and fill-or-kill * orders are refused. Nothing changed. * * @generated from enum value: ERROR_CODE_ORDER_TYPE_NOT_ALLOWED_IN_AUCTION = 274; */ ORDER_TYPE_NOT_ALLOWED_IN_AUCTION = 274, /** * This market is in an auction call; new post-only orders are refused. * Nothing changed. * * @generated from enum value: ERROR_CODE_POST_ONLY_NOT_ALLOWED_IN_AUCTION = 275; */ POST_ONLY_NOT_ALLOWED_IN_AUCTION = 275, /** * The request's QuickSwap fee details are incomplete: a fee schedule needs a * broker, and a broker or broker fee terms need a fee schedule. * * @generated from enum value: ERROR_CODE_QUICKSWAP_FEE_DETAILS_INCOMPLETE = 276; */ QUICKSWAP_FEE_DETAILS_INCOMPLETE = 276, /** * The requested QuickSwap fee schedule doesn't price this market. * * @generated from enum value: ERROR_CODE_QUICKSWAP_MARKET_NOT_PRICED = 277; */ QUICKSWAP_MARKET_NOT_PRICED = 277, /** * The broker fee terms belong to another broker. * * @generated from enum value: ERROR_CODE_QUICKSWAP_BROKER_FEE_TERMS_MISMATCH = 278; */ QUICKSWAP_BROKER_FEE_TERMS_MISMATCH = 278, /** * A QuickSwap fee would be paid into the account placing the order. * * @generated from enum value: ERROR_CODE_QUICKSWAP_FEE_RECIPIENT_IS_PAYER = 279; */ QUICKSWAP_FEE_RECIPIENT_IS_PAYER = 279, /** * The broker fee terms aren't available yet; retry shortly. * * @generated from enum value: ERROR_CODE_QUICKSWAP_BROKER_FEE_TERMS_UNAVAILABLE = 280; */ QUICKSWAP_BROKER_FEE_TERMS_UNAVAILABLE = 280, /** * The broker's fee account isn't available yet; retry shortly. * * @generated from enum value: ERROR_CODE_QUICKSWAP_BROKER_ACCOUNT_UNAVAILABLE = 281; */ QUICKSWAP_BROKER_ACCOUNT_UNAVAILABLE = 281, /** * The QuickSwap account is not ready yet; no order was placed. Retry shortly. * * @generated from enum value: ERROR_CODE_QUICKSWAP_ACCOUNT_OWNER_UNKNOWN = 301; */ QUICKSWAP_ACCOUNT_OWNER_UNKNOWN = 301, /** * QuickSwap isn't enabled for this account's trading. * * @generated from enum value: ERROR_CODE_QUICKSWAP_DISABLED = 282; */ QUICKSWAP_DISABLED = 282, /** * QuickSwap orders can't carry take-profit or stop-loss legs. * * @generated from enum value: ERROR_CODE_QUICKSWAP_ATTACHED_RISK_NOT_ALLOWED = 283; */ QUICKSWAP_ATTACHED_RISK_NOT_ALLOWED = 283, /** * QuickSwap orders can't be amended or replaced. * * @generated from enum value: ERROR_CODE_QUICKSWAP_ORDER_NOT_MODIFIABLE = 284; */ QUICKSWAP_ORDER_NOT_MODIFIABLE = 284, /** * The QuickSwap fees together would exceed the order's value. * * @generated from enum value: ERROR_CODE_QUICKSWAP_FEE_TOTAL_TOO_HIGH = 285; */ QUICKSWAP_FEE_TOTAL_TOO_HIGH = 285, /** * The broker fee terms are invalid and can't be used. * * @generated from enum value: ERROR_CODE_QUICKSWAP_BROKER_FEE_TERMS_INVALID = 286; */ QUICKSWAP_BROKER_FEE_TERMS_INVALID = 286, /** * The broker's QuickSwap setup is invalid and can't be used. * * @generated from enum value: ERROR_CODE_QUICKSWAP_BROKER_INVALID = 287; */ QUICKSWAP_BROKER_INVALID = 287, /** * The QuickSwap fee schedule is invalid and can't be used. * * @generated from enum value: ERROR_CODE_QUICKSWAP_FEE_SCHEDULE_INVALID = 288; */ QUICKSWAP_FEE_SCHEDULE_INVALID = 288, /** * The QuickSwap fee for this market is invalid and can't be used. * * @generated from enum value: ERROR_CODE_QUICKSWAP_MARKET_FEE_INVALID = 289; */ QUICKSWAP_MARKET_FEE_INVALID = 289, /** * QuickSwap's setup is invalid, so QuickSwap orders can't be placed. * * @generated from enum value: ERROR_CODE_QUICKSWAP_SETUP_INVALID = 290; */ QUICKSWAP_SETUP_INVALID = 290, /** * QuickSwap's capacity for fee settings is reached; this order can't be * placed. * * @generated from enum value: ERROR_CODE_QUICKSWAP_CAPACITY_REACHED = 291; */ QUICKSWAP_CAPACITY_REACHED = 291, /** * An exit order placed by one of the order's attached take-profit or stop * legs is still working, so the order's attached legs can't be added, * edited, paused or resumed now; removing a leg is still accepted. Nothing * changed; retry once the exit completes. * * @generated from enum value: ERROR_CODE_ATTACHED_EXIT_WORKING = 292; */ ATTACHED_EXIT_WORKING = 292, /** * The account already has the most triggers one account may have on this * market, attached take-profit, stop-loss and trailing legs included. * Nothing changed; retry once one of them ends. * * @generated from enum value: ERROR_CODE_MARKET_TRIGGER_LIMIT_EXCEEDED = 293; */ MARKET_TRIGGER_LIMIT_EXCEEDED = 293, /** * The account already has the most TWAP orders one account may have on * this market. Nothing changed; retry once one of them ends. * * @generated from enum value: ERROR_CODE_MARKET_TWAP_LIMIT_EXCEEDED = 294; */ MARKET_TWAP_LIMIT_EXCEEDED = 294, /** * The account already has the most ladder orders one account may have on * this market. Nothing changed; retry once one of them ends. * * @generated from enum value: ERROR_CODE_MARKET_LADDER_LIMIT_EXCEEDED = 295; */ MARKET_LADDER_LIMIT_EXCEEDED = 295, /** * The new quantity of a TWAP order's slice would leave more than the TWAP's * remaining quantity. Nothing changed; a slice can be raised up to what the * TWAP still has to execute. * * @generated from enum value: ERROR_CODE_CHILD_QTY_EXCEEDS_REMAINING = 296; */ CHILD_QTY_EXCEEDS_REMAINING = 296, /** * The order cancellation was sent but not confirmed in time. Its outcome is * unknown and it may still apply; read the order before retrying. For a batch * cancellation, every item's outcome is unknown; read them back. For a cancel * all, some or all of the matching orders may be canceled; read open orders. * For a cancel all after heartbeat, the switch may or may not have been armed, * refreshed or disabled; send the heartbeat again. * * @generated from enum value: ERROR_CODE_ORDER_CANCEL_OUTCOME_UNKNOWN = 297; */ ORDER_CANCEL_OUTCOME_UNKNOWN = 297, /** * The order modification was sent but not confirmed in time. Its outcome is * unknown and it may still apply; read the order before retrying. For a batch * replacement, every item's outcome is unknown; read them back. * * @generated from enum value: ERROR_CODE_ORDER_MODIFY_OUTCOME_UNKNOWN = 298; */ ORDER_MODIFY_OUTCOME_UNKNOWN = 298, /** * This order is being canceled while the account's balances are brought back * in line, so it can't be changed. Nothing changed; cancels still work, and * the account's other orders can still be changed. * * @generated from enum value: ERROR_CODE_ORDER_REPAIRING = 299; */ ORDER_REPAIRING = 299, /** * This account's orders are being canceled while its balances are brought * back in line, so new orders, changes and trigger orders are paused for a * short time. Nothing changed; cancels still work. Try again shortly. * * @generated from enum value: ERROR_CODE_ACCOUNT_REPAIRING = 300; */ ACCOUNT_REPAIRING = 300, /** * The change would act on the trigger at once. The new trigger price of a * stop-loss or take-profit, or the trigger price a new trailing distance * gives an activated trailing stop, is already reached by the price the * trigger watches (at or past it), so the trigger would fire at once and send * its order; or the new activation price of a trailing stop not yet * activated is already reached by that price, so it would activate at once. * Nothing changed; the trigger keeps its previous settings. Returned by * ModifyTrigger, and by an order modify that moves an attached take-profit, * stop-loss or trailing stop of an order with a fill. Choose a price the * market has not reached. * * @generated from enum value: ERROR_CODE_TRIGGER_WOULD_TRIGGER_IMMEDIATELY = 302; */ TRIGGER_WOULD_TRIGGER_IMMEDIATELY = 302, /** * The order was sent but not confirmed in time. Its outcome is unknown and * it may have been accepted; read the order by its client order ID, or read * open orders, before retrying. For a batch create, every item's outcome is * unknown; read them back, or repeat the batch with the same request ID and * payload within 15 minutes, which returns decided items' original results * and retries the rest without admitting any item twice. * * @generated from enum value: ERROR_CODE_ORDER_CREATE_OUTCOME_UNKNOWN = 303; */ ORDER_CREATE_OUTCOME_UNKNOWN = 303, /** * The trigger was sent but not confirmed in time. Its outcome is unknown and * it may have been created; read the triggers for its client trigger ID * before retrying. * * @generated from enum value: ERROR_CODE_TRIGGER_CREATE_OUTCOME_UNKNOWN = 304; */ TRIGGER_CREATE_OUTCOME_UNKNOWN = 304, /** * The request names a listed trading pair other than the trigger's own, so * it was refused. Nothing changed; name the trigger's own pair, or omit the * symbol. A pair that is not listed is ERROR_CODE_UNKNOWN_SYMBOL. * * @generated from enum value: ERROR_CODE_TRIGGER_SYMBOL_MISMATCH = 305; */ TRIGGER_SYMBOL_MISMATCH = 305, /** * The account has reached its maximum number of resting orders in this * market. Good-till-cancelled and good-till-date orders count until they * end; immediate-or-cancel, fill-or-kill and market orders never count, and * a replace keeps its order's place. Nothing changed; cancel a resting order * in this market first. * * @generated from enum value: ERROR_CODE_MAX_OPEN_ORDERS_PER_PAIR = 306; */ MAX_OPEN_ORDERS_PER_PAIR = 306, /** * Self-trade prevention expired the order of an attached take-profit, * stop-loss or trailing stop because it would have traded with another of * the account's resting orders. It is reported as the trigger's fire refusal * reason, never as the answer to a request: the attached order stays active. * New trades and price updates do not fire it while the other order is first * in line at the best price; once that order is gone or no longer first * there, it fires again if its trigger condition still holds. * * @generated from enum value: ERROR_CODE_SELF_TRADE_PREVENTED = 307; */ SELF_TRADE_PREVENTED = 307, /** * The order already carries every attached leg it may hold, so another * attached leg was refused. Legs being cancelled count until they end: * retry once they have ended. * * @generated from enum value: ERROR_CODE_ATTACHED_LEGS_EXCEEDED = 86; */ ATTACHED_LEGS_EXCEEDED = 86, /** * The trigger's fee asset was not valid. * * @generated from enum value: ERROR_CODE_FEE_ASSET_INVALID = 87; */ FEE_ASSET_INVALID = 87, /** * The trigger's maximum fee rate was not valid. * * @generated from enum value: ERROR_CODE_FEE_CEILING_INVALID = 88; */ FEE_CEILING_INVALID = 88, /** * The trigger set a field that must be left unset. * * @generated from enum value: ERROR_CODE_UNSUPPORTED_FIELD_SET = 89; */ UNSUPPORTED_FIELD_SET = 89, /** * The trigger could not fire again. * * @generated from enum value: ERROR_CODE_TRIGGER_FIRE_LIMIT_REACHED = 90; */ TRIGGER_FIRE_LIMIT_REACHED = 90, /** * The trigger's condition flags were not valid. * * @generated from enum value: ERROR_CODE_CONDITION_FLAGS_INVALID = 91; */ CONDITION_FLAGS_INVALID = 91, /** * The trigger set a condition parameter its condition does not take. * * @generated from enum value: ERROR_CODE_CONDITION_PARAMETER_SET = 92; */ CONDITION_PARAMETER_SET = 92, /** * The market had no room for another TWAP order. * * @generated from enum value: ERROR_CODE_TWAP_CAPACITY_REACHED = 93; */ TWAP_CAPACITY_REACHED = 93, /** * The trigger's child order did not match the order the trigger requested, * so the trigger failed and the child order was canceled. * * @generated from enum value: ERROR_CODE_CHILD_ORDER_INCONSISTENT = 94; */ CHILD_ORDER_INCONSISTENT = 94, /** * A non-empty resource ID in the REST request body differs from the path ID. * Nothing changed. Use the same ID in both places, or omit the body ID. * * @generated from enum value: ERROR_CODE_PATH_BODY_ID_MISMATCH = 95; */ PATH_BODY_ID_MISMATCH = 95, /** * The request's receive window ended before it was sent on for admission: * the request was not processed and changed nothing. The window is the * request's timestamp plus its receive window: the X-API-RECV-WINDOW header * of a signed request, or recv_window_ms of a WebSocket command. Send a new * request with a fresh timestamp. * * @generated from enum value: ERROR_CODE_REQUEST_DEADLINE_EXCEEDED = 308; */ REQUEST_DEADLINE_EXCEEDED = 308 } /** * Describes the enum orders.v1.ErrorCode. */ declare const ErrorCodeSchema: GenEnum; /** * TriggerPriceSource defines which price a trigger watches. Standalone * stop-loss, take-profit and trailing-stop triggers watch LAST_PRICE unless * INDEX_PRICE is requested; MARK_PRICE is not supported on spot markets. * * @generated from enum orders.v1.TriggerPriceSource */ declare enum TriggerPriceSource { /** * Trigger price source was not provided; spot triggers default to LAST_PRICE. * * @generated from enum value: TRIGGER_PRICE_SOURCE_UNSPECIFIED = 0; */ TRIGGER_PRICE_SOURCE_UNSPECIFIED = 0, /** * Last traded price on the market (default for spot). * * @generated from enum value: LAST_PRICE = 1; */ LAST_PRICE = 1, /** * The market's index price, aggregated from external exchanges. A trigger * that watches it acts only on a current index value: while the index is * stale or unavailable the trigger stays armed and waits, and never fires on * an outdated value. * * @generated from enum value: INDEX_PRICE = 2; */ INDEX_PRICE = 2, /** * Mark price for perpetuals; not supported on spot markets. * * @generated from enum value: MARK_PRICE = 3; */ MARK_PRICE = 3 } /** * Describes the enum orders.v1.TriggerPriceSource. */ declare const TriggerPriceSourceSchema: GenEnum; /** * TriggerDirection defines whether the trigger fires when price goes above or * below threshold. * * @generated from enum orders.v1.TriggerDirection */ declare enum TriggerDirection { /** * Trigger direction was not provided. * * @generated from enum value: TRIGGER_DIRECTION_UNSPECIFIED = 0; */ TRIGGER_DIRECTION_UNSPECIFIED = 0, /** * Fire when price >= trigger_price (e.g., take-profit for long, stop-loss for * short). * * @generated from enum value: ABOVE = 1; */ ABOVE = 1, /** * Fire when price <= trigger_price (e.g., stop-loss for long, take-profit for * short). * * @generated from enum value: BELOW = 2; */ BELOW = 2 } /** * Describes the enum orders.v1.TriggerDirection. */ declare const TriggerDirectionSchema: GenEnum; /** * ModifyBehavior controls how ModifyOrder should handle amend-vs-replace paths. * MODIFY_BEHAVIOR_UNSPECIFIED is treated as AMEND_OR_REPLACE by server logic. * * @generated from enum orders.v1.ModifyBehavior */ declare enum ModifyBehavior { /** * Behavior was not provided; server treats this as AMEND_OR_REPLACE. * * @generated from enum value: MODIFY_BEHAVIOR_UNSPECIFIED = 0; */ MODIFY_BEHAVIOR_UNSPECIFIED = 0, /** * Try in-place amend first; if patch cannot be amended, fall back to replace. * * @generated from enum value: AMEND_OR_REPLACE = 1; */ AMEND_OR_REPLACE = 1, /** * In-place amend only; reject if patch requires replace semantics. * * @generated from enum value: AMEND_ONLY = 2; */ AMEND_ONLY = 2, /** * Always attempt replace semantics. * * @generated from enum value: REPLACE_ONLY = 3; */ REPLACE_ONLY = 3 } /** * Describes the enum orders.v1.ModifyBehavior. */ declare const ModifyBehaviorSchema: GenEnum; /** * ModifyActionTaken describes what action was applied for a modify request. * * @generated from enum orders.v1.ModifyActionTaken */ declare enum ModifyActionTaken { /** * Modify action is unknown or the request was rejected. * * @generated from enum value: MODIFY_ACTION_UNSPECIFIED = 0; */ MODIFY_ACTION_UNSPECIFIED = 0, /** * Existing order was amended in place. * * @generated from enum value: AMENDED = 1; */ AMENDED = 1, /** * Existing order was canceled and replaced with a new order. * * @generated from enum value: REPLACED = 2; */ REPLACED = 2 } /** * Describes the enum orders.v1.ModifyActionTaken. */ declare const ModifyActionTakenSchema: GenEnum; /** * BatchReplaceAdmissionStatus summarizes admission of one quote-refresh batch. * * @generated from enum orders.v1.BatchReplaceAdmissionStatus */ declare enum BatchReplaceAdmissionStatus { /** * Admission status is unavailable. * * @generated from enum value: BATCH_REPLACE_ADMISSION_STATUS_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * Every requested operation was admitted, amended items included. * * @generated from enum value: BATCH_REPLACE_ADMISSION_STATUS_ADMITTED = 1; */ ADMITTED = 1, /** * Some requested replacements were admitted and others were rejected. * * @generated from enum value: BATCH_REPLACE_ADMISSION_STATUS_PARTIALLY_ADMITTED = 2; */ PARTIALLY_ADMITTED = 2, /** * No requested replacement was admitted. * * @generated from enum value: BATCH_REPLACE_ADMISSION_STATUS_REJECTED = 3; */ REJECTED = 3 } /** * Describes the enum orders.v1.BatchReplaceAdmissionStatus. */ declare const BatchReplaceAdmissionStatusSchema: GenEnum; /** * BatchReplaceItemAdmissionStatus describes admission of one replacement. * * @generated from enum orders.v1.BatchReplaceItemAdmissionStatus */ declare enum BatchReplaceItemAdmissionStatus { /** * Item admission status is unavailable. * * @generated from enum value: BATCH_REPLACE_ITEM_ADMISSION_STATUS_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * The operation was admitted and handed to execution. action_taken tells whether * the order was amended under its own order ID or replaced by a successor. * * @generated from enum value: BATCH_REPLACE_ITEM_ADMISSION_STATUS_ADMITTED = 1; */ ADMITTED = 1, /** * The replacement was rejected before execution handoff. * * @generated from enum value: BATCH_REPLACE_ITEM_ADMISSION_STATUS_REJECTED = 2; */ REJECTED = 2 } /** * Describes the enum orders.v1.BatchReplaceItemAdmissionStatus. */ declare const BatchReplaceItemAdmissionStatusSchema: GenEnum; /** * @generated from service orders.v1.OrdersService */ declare const OrdersService: GenService<{ /** * Check whether an order is currently admissible without creating an order, * claiming its client order ID, or reserving funds. * * @generated from rpc orders.v1.OrdersService.PreviewOrder */ previewOrder: { methodKind: "unary"; input: typeof PreviewOrderRequestSchema; output: typeof PreviewOrderResponseSchema; }; /** * Create a new order. * REST clients submit decimal quantity and price strings. ConnectRPC clients * submit scaled integer values. * * @generated from rpc orders.v1.OrdersService.CreateOrder */ createOrder: { methodKind: "unary"; input: typeof CreateOrderRequestSchema; output: typeof CreateOrderResponseSchema; }; /** * Cancels an existing order by id or client order id. * REST clients submit base58 order IDs. ConnectRPC clients submit fixed64 * order IDs. * A cancel of an order that has already ended returns * ERROR_CODE_ORDER_ALREADY_TERMINAL, including a cancel retried after a * timeout once the order has ended: treat it as already done. A repeat * while an earlier cancel of the order is still in progress is accepted * again and changes nothing. A client order ID keeps naming its order for * at least a minute after the order ends; a cancel by client order ID sent * later may return ERROR_CODE_ORDER_UNKNOWN instead. Retry by order ID, or * read the order, to tell an ended order from an unknown one. * * @generated from rpc orders.v1.OrdersService.CancelOrder */ cancelOrder: { methodKind: "unary"; input: typeof CancelOrderRequestSchema; output: typeof CancelOrderResponseSchema; }; /** * Cancels all matching open orders for an account (kill switch). * Evaluates matching orders from a consistent snapshot at request start and * requests cancellation of every one, however many match. The response * lists up to 200 of them, oldest first, with the total count. * Final state is confirmed via the order update stream or read path. * * It cancels orders, not triggers. Open orders that triggers placed match * like any other order and are canceled: a TWAP's working slice, a * ladder's levels, the order a fired stop placed, and the working exit of * an attached take-profit, stop-loss or trailing stop. The triggers * themselves are not canceled, and their reserved funds stay reserved: * - A stop-loss, take-profit or trailing stop that has not fired stays * armed and places its order when its condition is met. * - A TWAP keeps running and places its next slice when it is due. * - A ladder ends once none of its levels remains open: canceled when * none of them filled, completed when any did. * - An attached leg whose working exit is canceled ends canceled, and so * do the parent's other legs when oco is set. Attached legs without a * working exit keep protecting the parent's filled position, even when * the parent order itself is canceled; they end only if the parent is * canceled before any fill. * - A paused trigger stays paused and can be resumed. * * To stop all automated trading, cancel each live trigger with * TriggersService.CancelTrigger, then cancel the orders: a trigger that * fires before its cancel places an order that the cancel-all then * cancels. TriggersService.ListTriggers with the statuses STATUS_CREATED, * STATUS_ARMED, STATUS_RUNNING and STATUS_PAUSED lists the live triggers, * attached legs included. * * @generated from rpc orders.v1.OrdersService.CancelAllOrders */ cancelAllOrders: { methodKind: "unary"; input: typeof CancelAllOrdersRequestSchema; output: typeof CancelAllOrdersResponseSchema; }; /** * Set cancel-all-after (dead-man switch). * Arms or disables automatic cancel-all if heartbeat is not refreshed before expiry. * When the switch fires, it cancels what CancelAllOrders with the same * symbol and side scope cancels: open orders, including those that * triggers placed, and no trigger. Standalone stop-loss, take-profit and * trailing stops and running TWAPs stay active and can place new orders * after it fires, and attached legs end or keep protecting the position * exactly as after CancelAllOrders. The switch does not stop them: only * TriggersService.CancelTrigger cancels a trigger. * * @generated from rpc orders.v1.OrdersService.CancelAllAfter */ cancelAllAfter: { methodKind: "unary"; input: typeof CancelAllAfterRequestSchema; output: typeof CancelAllAfterResponseSchema; }; /** * Places multiple orders in a single request (best-effort per item). * * @generated from rpc orders.v1.OrdersService.BatchCreateOrders */ batchCreateOrders: { methodKind: "unary"; input: typeof BatchCreateOrdersRequestSchema; output: typeof BatchCreateOrdersResponseSchema; }; /** * Modifies an existing order using explicit behavior policy. * * @generated from rpc orders.v1.OrdersService.ModifyOrder */ modifyOrder: { methodKind: "unary"; input: typeof ModifyOrderRequestSchema; output: typeof ModifyOrderResponseSchema; }; /** * Amends or replaces same-symbol orders and returns after authoritative * admission. * * @generated from rpc orders.v1.OrdersService.BatchReplaceOrders */ batchReplaceOrders: { methodKind: "unary"; input: typeof BatchReplaceOrdersRequestSchema; output: typeof BatchReplaceOrdersResponseSchema; }; /** * Cancels multiple orders by explicit ID in a single request. * Per-item results are returned; partial success is the default. * Final state is confirmed via the order update stream or read path. * * @generated from rpc orders.v1.OrdersService.BatchCancelOrders */ batchCancelOrders: { methodKind: "unary"; input: typeof BatchCancelOrdersRequestSchema; output: typeof BatchCancelOrdersResponseSchema; }; }>; //#endregion export { BatchCancelItem, BatchCancelItemSchema, BatchCancelOrdersRequest, BatchCancelOrdersRequestSchema, BatchCancelOrdersResponse, BatchCancelOrdersResponseSchema, BatchCancelResultItem, BatchCancelResultItemSchema, BatchCancelResultItem_Status, BatchCancelResultItem_StatusSchema, BatchCreateAccepted, BatchCreateAcceptedSchema, BatchCreateOrdersRequest, BatchCreateOrdersRequestSchema, BatchCreateOrdersResponse, BatchCreateOrdersResponseSchema, BatchCreateRejected, BatchCreateRejectedSchema, BatchCreateResultItem, BatchCreateResultItemSchema, BatchReplaceAdmissionItem, BatchReplaceAdmissionItemSchema, BatchReplaceAdmissionStatus, BatchReplaceAdmissionStatusSchema, BatchReplaceItemAdmissionStatus, BatchReplaceItemAdmissionStatusSchema, BatchReplaceOrderItem, BatchReplaceOrderItemSchema, BatchReplaceOrdersRequest, BatchReplaceOrdersRequestSchema, BatchReplaceOrdersResponse, BatchReplaceOrdersResponseSchema, CancelAllAfterRequest, CancelAllAfterRequestSchema, CancelAllAfterResponse, CancelAllAfterResponseSchema, CancelAllAfterResponse_Status, CancelAllAfterResponse_StatusSchema, CancelAllOrdersRequest, CancelAllOrdersRequestSchema, CancelAllOrdersResponse, CancelAllOrdersResponseSchema, CancelAllOrdersResponse_ListingStatus, CancelAllOrdersResponse_ListingStatusSchema, CancelAllOrdersResponse_Status, CancelAllOrdersResponse_StatusSchema, CancelOrderRequest, CancelOrderRequestSchema, CancelOrderResponse, CancelOrderResponseSchema, CancelOrderResponse_Status, CancelOrderResponse_StatusSchema, CancelledOrder, CancelledOrderSchema, CreateOrderRequest, CreateOrderRequestSchema, CreateOrderResponse, CreateOrderResponseSchema, DeadManSwitchScope, DeadManSwitchScopeSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, FeeAsset, FeeAssetSchema, FieldViolation, FieldViolationSchema, LimitFok, LimitFokSchema, LimitGtc, LimitGtcSchema, LimitGtd, LimitGtdSchema, LimitIoc, LimitIocSchema, MarketIoc, MarketIocSchema, ModifyActionTaken, ModifyActionTakenSchema, ModifyBehavior, ModifyBehaviorSchema, ModifyOrderRequest, ModifyOrderRequestSchema, ModifyOrderResponse, ModifyOrderResponseSchema, OrderIntent, OrderIntentSchema, OrderType, OrderTypeSchema, OrdersService, PreviewOrderRequest, PreviewOrderRequestSchema, PreviewOrderResponse, PreviewOrderResponseSchema, RiskExecution, RiskExecutionSchema, RiskLimitGtc, RiskLimitGtcSchema, RiskMarketIoc, RiskMarketIocSchema, RiskPolicy, RiskPolicySchema, SelfTradePreventionMode, SelfTradePreventionModeSchema, Side, SideSchema, StopLossPolicy, StopLossPolicySchema, TakeProfitPolicy, TakeProfitPolicySchema, TimeInForce, TimeInForceSchema, TrailingStopPolicy, TrailingStopPolicySchema, TriggerDirection, TriggerDirectionSchema, TriggerPriceSource, TriggerPriceSourceSchema, file_orders_v1_orders, orders_pb_d_exports }; //# sourceMappingURL=orders_pb.d.ts.map