Trade Protection Rules

The matching engine enforces rate limits, minimum notional requirements, and other trade protections.

Protection Rules

ProtectionRule
Rate limitingWeighted action rate per symbol (see below).
Minimum notionalMinimum order size according to fee tier.
Quote restMinimum time between price-improving modifications.
Self-trade preventionOrders from the same account do not match each other.
Market slippageOptional slippage_bps on market / stop-market caps walk vs mark; omitted → venue max.

Rejects: Error Codes.

Rate Limiting — Weighted Action Costs

Not every operation costs the same. GoDark uses a weighted action cost model:

ActionWeightMinimum IntervalDescription
Order placement1—New order
Cancel1—Cancel one order
Modify1—Amend one order
Batch cancel / modify2—Batch operation
Mass quote5—One batch, up to 20 legs
Cancel all / close all5—Account-wide operation

Credits are charged against the request's trading rate class; mass quote is in the order-generating class.

Minimum Notional

Each order must have a notional value specified in the fee tier. Calculate notional as:

notional = quantity × price

Quote Rest Period

Quotes must rest for at least 500 ms before a price-improving replacement.

Self-Trade Prevention

stp_mode determines whether the maker, taker, or both are cancelled when the same account would self-match.