Skip to main content
POST
/
v2
/
markets
/
{id}
/
redeem
curl -X POST https://api.pmx.trade/v2/markets/1/redeem \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "7xKXabc123...",
    "side": "UP"
  }'
{
  "success": true,
  "data": {
    "transaction": "AQAAAAAAA...base64...",
    "message": "Sign this transaction and submit to redeem your winnings."
  }
}
Returns an unsigned Solana transaction that the caller must sign locally and submit to the network. The API never holds private keys. After a market resolves, holders of the winning outcome token can redeem them for USDC.
  • AMM markets: Each winning token is worth exactly $1 USDC.
  • Pool markets: Payout is proportional — all USDC in the pool is split among winning token holders.

Idempotent

This endpoint is idempotent. If the wallet has already redeemed (token balance is 0), or never held tokens on this side, the endpoint returns a success response with alreadyRedeemed: true instead of an error. This means you can safely call it multiple times without worrying about errors.

Path parameters

id
integer
required
The market ID. Must be a resolved or cancelled market.

Request body

wallet
string
required
Wallet address holding the winning tokens.
side
string
required
The winning outcome side to redeem. Use the market’s ticker name (e.g. UP, DOWN) or the canonical YES/NO.

Response

success
boolean
alreadyRedeemed
boolean
true if the wallet has no tokens to redeem (already redeemed or never held). Only present when this is the case.
note
string
Explanation when alreadyRedeemed is true.
data
object
Only present when there are tokens to redeem.
curl -X POST https://api.pmx.trade/v2/markets/1/redeem \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "7xKXabc123...",
    "side": "UP"
  }'
{
  "success": true,
  "data": {
    "transaction": "AQAAAAAAA...base64...",
    "message": "Sign this transaction and submit to redeem your winnings."
  }
}
This endpoint only works on resolved or cancelled markets. Calling it on an active market will return a 409 Conflict error with the marketStatus field.
The side parameter accepts the market’s custom ticker names. For example, if a market uses UP/DOWN tickers, pass "side": "UP" or "side": "DOWN". You can also always use the canonical YES/NO.
Markets with uninitialized mints (broken markets) will return alreadyRedeemed: true since there are no tokens to redeem.