Skip to main content

Module types

Module types 

Source
Expand description

Shared types for dYdX v4 execution module.

This module centralizes type definitions used across order submission, transaction management, and WebSocket handling components.

Structs§

LimitOrderParams
Parameters for a limit order in batch submission.
OrderContext
Order context passed from submission to WebSocket confirmation handler.
PreparedTransaction
Contains the raw bytes and metadata for retry handling.

Enums§

ConditionalOrderType
Conditional order types supported by dYdX.
OrderLifetime
Order lifetime type determined by time_in_force and expire_time.

Constants§

GTC_CONDITIONAL_ORDER_EXPIRATION_DAYS
Default expiration for GTC conditional orders (90 days).
ORDER_FLAG_CONDITIONAL
Order flag for conditional orders (stop-loss, take-profit).
ORDER_FLAG_LONG_TERM
Order flag for long-term/stateful orders (expire by timestamp).
ORDER_FLAG_SHORT_TERM
Order flag for short-term orders (expire by block height).

Functions§

calculate_conditional_order_expiration
Calculates the expiration time for conditional orders based on TimeInForce.