Skip to main content
POST
/
operations
/
split-position
Split position
curl --request POST \
  --url https://relayer.forka.st/operations/split-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
}
Ask the relayer to call splitPosition on Conditional Tokens, transforming collateral into outcome tokens for the provided condition and partition.
POST to https://relayer.forka.st/operations/split-position with the same L2 authentication headers. The relayer executes the transaction from its managed operator and returns the broadcast hash.

Request body

FieldTypeRequiredDescription
collateral_tokenstringYesERC-20 collateral that backs the position (e.g., USDC).
contractstringYesConditional Tokens contract to invoke.
condition_idstringYesBytes32 condition identifier you want to split.
parent_collection_idstringYesParent collection (use zero hash for top-level splits).
partitionarray<string>YesOutcome partitions, expressed as decimal strings.
amountstringYesCollateral amount to convert, in token base units.

Notes

  • Make sure you have granted allowances via POST /operations/approve before splitting.
  • The relayer enforces deterministic casing and 0x prefixes for all identifier fields; malformed values return 400.
  • Once mined, the resulting outcome tokens are held by the relayer-managed account until you transfer or merge them.

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