Versions in this module Expand all Collapse all v0 v0.4.0 Aug 2, 2026 Changes in this version + const DefaultMarketEventBuffer + const FundingRateScale + const USDNotionalScale + type BookLevel struct + Price decimal.Decimal + Size decimal.Decimal + type BookSnapshotEvent struct + Book OrderBook + type FundingRate struct + IntervalHours int + NextFundingTime *time.Time + Rate decimal.Decimal + Symbol Symbol + VenueID VenueID + type MarketConnectedEvent struct + VenueID VenueID + type MarketDataClient interface + FundingRate func(ctx context.Context) (FundingRate, error) + MarketStats func(ctx context.Context) (MarketStats, error) + VenueID func() VenueID + type MarketDisconnectedEvent struct + VenueID VenueID + type MarketEvent interface + type MarketStats struct + OpenInterestUSD decimal.Decimal + Symbol Symbol + VenueID VenueID + Volume24hUSD decimal.Decimal + type MarketStream interface + Close func() error + Events func() <-chan MarketEvent + Start func(ctx context.Context) error + VenueID func() VenueID + type OrderBook struct + Asks []BookLevel + Bids []BookLevel + ReceivedAt time.Time + Symbol Symbol + VenueID VenueID v0.3.0 Aug 1, 2026 Changes in this version + const ReasonCanceledByRequest type VenueID + const VenueHyperliquid v0.2.0 Jul 27, 2026 Changes in this version type VenueID + const VenueDydx v0.1.0 Jul 23, 2026 Changes in this version + const DefaultAccountEventBuffer + const MarginUsageScale + var ErrClosed = errors.New("godex: executor closed") + var ErrNotConnected = errors.New("godex: executor not connected") + var ErrTxOutcomeUnknown = errors.New("godex: transaction outcome unknown") + var ErrUnknownOrder = errors.New("godex: unknown order id") + func ComputeMarginUsage(total, available string) (decimal.Decimal, error) + func QuantizeReduceOnlySize(size, step decimal.Decimal) (decimal.Decimal, error) + func QuantizeSize(size, step, minSize decimal.Decimal) (decimal.Decimal, error) + func RoundPriceToTick(price, tick decimal.Decimal, side Side) (decimal.Decimal, error) + func SizeForNotional(notional, price, step decimal.Decimal) (decimal.Decimal, error) + type AccountEvent interface + type AckStatus string + const AckRejected + const AckSubmitted + type ConnectedEvent struct + VenueID VenueID + type DisconnectedEvent struct + VenueID VenueID + type ExecutionMetadata struct + MaintenanceMarginFraction decimal.Decimal + SizeStep decimal.Decimal + type FillEvent struct + OrderID OrderID + Price decimal.Decimal + Side Side + Size decimal.Decimal + Time time.Time + type MarginEvent struct + EquityUSD decimal.Decimal + Time time.Time + UsageRatio decimal.Decimal + type NewOrder struct + Intent OrderIntent + Price decimal.Decimal + ReduceOnly bool + Side Side + Size decimal.Decimal + Symbol Symbol + type OrderAck struct + OrderID OrderID + Status AckStatus + Time time.Time + VenueID VenueID + type OrderID string + type OrderIntent string + const IntentIOC + const IntentPostOnly + type OrderRejectedEvent struct + OrderID OrderID + Reason string + type Position struct + EntryPrice decimal.Decimal + Size decimal.Decimal + Symbol Symbol + Time time.Time + UnrealizedPnL decimal.Decimal + VenueID VenueID + type PositionEvent struct + Position Position + type ReconnectConfig struct + IdleTimeout time.Duration + InitialDelay time.Duration + MaxDelay time.Duration + Multiplier float64 + func DefaultReconnectConfig() ReconnectConfig + func (c ReconnectConfig) IsZero() bool + func (c ReconnectConfig) Validate() error + type Side string + const SideBuy + const SideSell + type Symbol string + type VenueExecutor interface + AccountEvents func() <-chan AccountEvent + CancelOrder func(ctx context.Context, id OrderID) error + Close func() error + Connect func(ctx context.Context) (ExecutionMetadata, error) + PlaceOrder func(ctx context.Context, order NewOrder) (OrderAck, error) + VenueID func() VenueID + type VenueID string + const VenueLighter