Skip to main content
POST
/
operations
/
merge-position
Merge position
curl --request POST \
  --url https://relayer.forka.st/operations/merge-position \
  --header 'Content-Type: application/json' \
  --data '
{
  "collateral_token": "0x2791Bca1F2de4661ED88A30C99A7a9449Aa84174",
  "contract": "0xCeAfDb29f9fC7c25fF6F0768d45b288c9b7C5cA5",
  "condition_id": "0xf1013774fef741c35a375718d6b1f542d98382cc0d3a0fd2fd0c12e3b3c6f6e5",
  "parent_collection_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "partition": [
    "1",
    "2"
  ],
  "amount": "10000000"
}
'
{
  "txHash": "0x0123...",
  "confirmations": 1
}
Trigger mergePositions so the relayer converts outcome tokens back into collateral on your behalf. Use this once you no longer need the split exposure or after outcomes converge.
Use https://relayer.forka.st/operations/merge-position with the same L2 authentication headers. The relayer signs and broadcasts the merge transaction from its custodial wallet.

Request body

merge-position accepts the exact same schema as split-position:
FieldTypeRequiredDescription
collateral_tokenstringYesERC-20 collateral token to receive after merging.
contractstringYesConditional Tokens contract you want to call.
condition_idstringYesCondition you previously split.
parent_collection_idstringYesParent collection identifier.
partitionarray<string>YesThe same partition used when splitting.
amountstringYesAmount of collateral you expect after merging.

Notes

  • The relayer needs to hold the outcome tokens being merged; ensure they are already in custody or transferred before calling this endpoint.
  • Merge requests are idempotent when the on-chain state is unchanged. Replays return the same txHash.
  • Expect 400 responses when the supplied partition does not match the split history for the given parent collection.

Body

application/json
collateral_token
string
required
contract
string
required
condition_id
string
required
parent_collection_id
string
required
partition
string[]
required
amount
string
required

Response

Transaction broadcast by the relayer.

txHash
string
required
confirmations
integer<int32>
required