Pump Hooks
02 / Hooks / trading-hours

Trading Hours

Routed trades only inside a daily window on chosen weekdays.

ACCESSruntime moduleunaudited
01

Behavior

  • Opening and closing time in a fixed UTC offset, with optional US or EU daylight saving.
  • Overnight sessions (closing before opening) count toward the day they opened.
  • Can apply to buys, sells or both.
  • Market-hours preset: 09:30–16:00 New York time, Monday to Friday.
Limitation. Applies to trades routed through Pump Hooks only. A transaction that trades on Pump directly is not affected.
Limitation. Uses the cluster clock; public holidays are not observed.
02

Callbacks

ABI v1 · wire values frozen
#CallbackSubscribableDefaultSemantics
0BeforeBuyyesRouted buy, before the Pump CPI. Can deny.
1AfterBuy—Routed buy, after the Pump CPI. Sees executed amounts; can still fail the transaction.
2BeforeSellyesRouted sell, before the Pump CPI. Can deny.
3AfterSell—Routed sell, after the Pump CPI.
4BeforeSwapyes●Either side, before the Pump CPI. Can deny.
5AfterSwap—Either side, after the Pump CPI.
6BeforeLiquidityreservedReserved (wire value 6).
7AfterLiquidityreservedReserved (wire value 7).
8BeforeFeeActionreservedReserved (wire value 8).
9AfterFeeActionreservedReserved (wire value 9).
10OnGraduationreservedReserved (wire value 10).
11OnStrategySignalreservedReserved (wire value 11).
03

Capabilities

granted at install; enforced by the executor
■READ_MARKETRead market config, venue reserves and the trade context
■VETO_ROUTED_SWAPDeny a routed trade in a before-callback (reverts the transaction)
□WRITE_HOOK_STATEPersist its 48-byte slot state on the market
□WRITE_USER_STATEUpdate the trading wallet's per-market state
□AWARD_POINTSCredit XP / points in the wallet's per-market ledger
□TREASURY_SIGNALEmit treasury allocation intents for the strategy vault
□STRATEGY_EXECUTIONBound or request vault strategy execution (TWAP, orders)
□ORACLE_READRead an external oracle account (reserved; not granted in V1)
□EXTERNAL_CPICall an external hook program (reserved; no permissionless CPI hooks in V1)
□EMIT_SIGNALEmit or consume signed strategy signals
04

Config schema

48 bytes · little-endian
FieldTypeOffsetUnitPresetDescription
weekdaysu80flags31Days trading is open; none = every day (bit0 Mon … bit6 Sun)
dstu81flags1Daylight-saving rule for the time zone (0 none, 1 US, 2 EU)
tzOffsetMini162minutes-300Time zone: standard-time offset from UTC, in minutes
openMinu164minutes570Opening time, local (minutes after midnight)
closeMinu166minutes960Closing time, local; earlier than opening = overnight session
sidesu88flags0Trades the hours apply to; none = both (bit0 buys, bit1 sells)
05

Identity

Module ID
12 (0x000c)
Version
v1
Developer
Pump Hooks
Program
91kRNewiED… (built-in)
Priority range
0–999 · default 50
Markets
bonding-curve · pumpswap
Source
crates/hook-runtime/src/modules/trading_hours.rs
Verification
source in this repository; reproducible-build verification not yet published
Audit
unaudited
06

Registry

Install on a Pump market ›