Skip to main content
POST
/
operations
/
merge-position
Merge position
curl --request POST \
  --url https://relayer.kuest.com/operations/merge-position \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "SAFE",
  "from": "0x0B2B3E6B323C0Cd7bEaf4B7cC73b983D4E9B12c7",
  "to": "0xCeAfDb29f9fC7c25fF6F0768d45b288c9b7C5cA5",
  "proxyWallet": "0x3f8Be6FC21f4a5127A42CE1aF58d8bCb8A94F3c1",
  "data": "0x5fd8c710...",
  "nonce": "8",
  "value": "0",
  "signature": "0xf368488355b0566e99eff3bccc35e98b77d8f3a6e6866176188488c34f0305b07e4a4c600c7a1592e4ac1e96b5887ebff2cb26987a3ad501006b39944df098c21f",
  "signatureParams": {
    "operation": "0",
    "safeTxnGas": "0",
    "baseGas": "0",
    "gasPrice": "0",
    "gasToken": "0x0000000000000000000000000000000000000000",
    "refundReceiver": "0x0000000000000000000000000000000000000000"
  },
  "metadata": "merge position"
}
'
{
  "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.kuest.com/operations/merge-position with the same L2 authentication headers. The relayer broadcasts the signed Safe transaction; execution happens from the Safe proxy.

Request body

merge-position accepts the same payload as POST /submit. Use:
  • type: SAFE
  • proxyWallet: Safe address executing the call
  • to: Conditional Tokens contract address
  • data: ABI-encoded mergePositions(...) calldata
All other fields (from, nonce, signature, signatureParams, value, metadata) follow the /submit schema.

Notes

  • The Safe must hold the outcome tokens being merged.
  • The nonce must match GET /nonce with type=SAFE; mismatches return 409.
  • Expect 400 responses when the supplied calldata is malformed or incompatible with the on-chain state.

Body

application/json

Signed SAFE payload executed immediately by relayer operations.

type
enum<string>
required
Available options:
SAFE
from
string
required

Safe owner submitting the request.

to
string
required

Contract to execute.

proxyWallet
string
required

Existing Safe proxy address.

data
string
required
nonce
string
required
signature
string
required
signatureParams
object
required
value
string
default:0
metadata
string | null

Response

Transaction broadcast by the relayer.

txHash
string
required
confirmations
integer<int32>
required