Skip to content

Split USDC into Outcome Tokens

POST /ctf/split

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

Auth: L2 (API key required)

Tags: CTF

For every unit of USDC you split, you receive one unit of each outcome token in the market (e.g., 100 USDC yields 100 Yes + 100 No). The server debits your USDC balance, credits the outcome tokens, and — when running in on-chain mode — relays an ERC1155 split transaction.


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

200 — Split completed.

{
"success": true,
"conditionId": "0xbd31dc8a...",
"amount": "1000",
"tokens": ["1234...", "5678..."],
"txHash": "0xabc..."
}

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

400conditionId and amount required or insufficient USDC: need X, have Y.


Terminal window
curl -X POST "https://api.openfish.fun/ctf/split" \
-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"}'