Overview
MarketContextMsg describes the DEX pool and protocol used for a token’s market. It appears in:
position_openedserver eventsexit_signal_with_txserver eventsBuildSellTxRequest(optional, to skip server side resolution)
MarketContextMsg Schema
Exactly one of the nested objects should be present, matching the
market_type.
The
market_type value uses underscores (e.g. pump_fun) while the nested object key does not (e.g. pumpfun). Match the exact casing shown in the tables below.market_type Values
Nested Context Objects
PumpFunContextMsg
Empty object. Pump.fun bonding curve tokens do not require additional pool context.
PumpSwapContextMsg
MeteoraDbcContextMsg
MeteoraDammV2ContextMsg
RaydiumLaunchpadContextMsg
RaydiumCpmmContextMsg
Passing Market Context in Build Requests
You can includemarket_context in a BuildSellTxRequest to skip server side pool resolution. This is useful when you already have the context from a position_opened or exit_signal_with_tx event.

