Skip to content

Merge Outcome Tokens into USDC

POST /ctf/merge

Server: https://api.openfish.fun (port 3002)

Auth: L2 (API key required)

Tags: CTF

You must hold the specified amount of every outcome token in the market. The server debits each outcome token from your balance and credits the equivalent USDC. When running in on-chain mode, the server also relays an ERC1155 merge transaction.


FieldTypeRequiredDescription
conditionIdstringYesMarket condition ID (32-byte hex, 0x...)
amountstringYesAmount to merge, as a decimal string
{
"conditionId": "0xbd31dc8a...",
"amount": "1000"
}

200 — Merge completed.

{
"success": true,
"conditionId": "0xbd31dc8a...",
"amount": "1000",
"txHash": "0xabc..."
}

txHash is null when the server is running in off-chain settlement mode.

400conditionId and amount required or insufficient {tokenId} balance: need X, have Y.


Terminal window
curl -X POST "https://api.openfish.fun/ctf/merge" \
-H "Content-Type: application/json" \
-H "OPENFISH_ADDRESS: 0x..." \
-H "OPENFISH_SIGNATURE: ..." \
-H "OPENFISH_TIMESTAMP: ..." \
-H "OPENFISH_API_KEY: ..." \
-H "OPENFISH_PASSPHRASE: ..." \
-d '{"conditionId": "0xbd31dc8a...", "amount": "1000"}'