Skip to main content
POST
/
execute
curl -X POST https://api.convallax.com/execute \
  -H "Content-Type: application/json" \
  -d '{
    "rfq": {
      "payload": {
        "version": 2,
        "rfqId": "abc-123",
        "wallet": "0xTrader...",
        "createdAt": "2026-06-15T12:00:00.000Z",
        "market": {
          "conditionId": "0xa4ddc188...",
          "yesTokenId": "51508280778..."
        },
        "option": {
          "strikeBps": 50,
          "expiryMs": 1735689600000,
          "optionType": "call",
          "tauDays": 7,
          "sigmaL": 2.0,
          "currentYesPrice": 0.62
        },
        "trade": { "side": "buy", "size": 10 }
      },
      "signature": "0x...",
      "signatureEncoding": "eip712"
    },
    "quote": {
      "rfq_id": "abc-123",
      "side": "buy",
      "price": 0.12,
      "size": 10
    }
  }'
{
  "success": true,
  "message": "Order signed — taker must call fill() on-chain",
  "mode": "onchain",
  "execution": {
    "execution_id": "e1f2a3b4-...",
    "rfq_id": "abc-123",
    "executed_at": "2026-06-15T12:00:01.234Z"
  },
  "onchain": {
    "settlementAddress": "0xC6Eb814Cc01189e20B2DB2D2a22Ed2DcAC404992",
    "order": {
      "maker": "0x1234...abcd",
      "seriesId": "98765432109876543210",
      "optionAmount": "10000000",
      "premiumAmount": "1200000",
      "makerSelling": true,
      "taker": "0xTrader...",
      "validUntil": 1717189320,
      "nonce": 1717189200042
    },
    "makerSignature": "0xabcdef...",
    "domain": {
      "name": "ConvallaxRFQSettlement",
      "version": "1",
      "chainId": 80002,
      "verifyingContract": "0xC6Eb814Cc01189e20B2DB2D2a22Ed2DcAC404992"
    },
    "chainId": 80002
  }
}
Accept a winning quote from a previous RFQ and receive a signed on-chain order. The relay resolves the option seriesId, ensures the market maker has sufficient option token inventory (auto-minting via ConvallaxCore.mint() if needed), sets ERC-1155 and USDC approvals, and signs an EIP-712 Order struct with the market maker’s private key. The response contains everything the taker needs to call fill() on ConvallaxRFQSettlement for atomic on-chain settlement.
If the on-chain environment is not configured (missing RPC_URL, MM_PRIVATE_KEY, etc.), the relay returns a simulated execution response instead.

Request Body

rfq
object
required
The full signed RFQ envelope from the POST /rfq request, including payload, signature, and signatureEncoding. The relay re-validates the EIP-712 signature.
quote
object
required
The winning quote object returned by POST /rfq.

Response

success
boolean
Whether the order was successfully signed.
message
string
Human-readable status message.
mode
string
"onchain" for real execution, "simulated" if on-chain is not configured.
execution
object
Execution metadata.
onchain
object
Everything needed for on-chain settlement. Only present when mode is "onchain".
curl -X POST https://api.convallax.com/execute \
  -H "Content-Type: application/json" \
  -d '{
    "rfq": {
      "payload": {
        "version": 2,
        "rfqId": "abc-123",
        "wallet": "0xTrader...",
        "createdAt": "2026-06-15T12:00:00.000Z",
        "market": {
          "conditionId": "0xa4ddc188...",
          "yesTokenId": "51508280778..."
        },
        "option": {
          "strikeBps": 50,
          "expiryMs": 1735689600000,
          "optionType": "call",
          "tauDays": 7,
          "sigmaL": 2.0,
          "currentYesPrice": 0.62
        },
        "trade": { "side": "buy", "size": 10 }
      },
      "signature": "0x...",
      "signatureEncoding": "eip712"
    },
    "quote": {
      "rfq_id": "abc-123",
      "side": "buy",
      "price": 0.12,
      "size": 10
    }
  }'
{
  "success": true,
  "message": "Order signed — taker must call fill() on-chain",
  "mode": "onchain",
  "execution": {
    "execution_id": "e1f2a3b4-...",
    "rfq_id": "abc-123",
    "executed_at": "2026-06-15T12:00:01.234Z"
  },
  "onchain": {
    "settlementAddress": "0xC6Eb814Cc01189e20B2DB2D2a22Ed2DcAC404992",
    "order": {
      "maker": "0x1234...abcd",
      "seriesId": "98765432109876543210",
      "optionAmount": "10000000",
      "premiumAmount": "1200000",
      "makerSelling": true,
      "taker": "0xTrader...",
      "validUntil": 1717189320,
      "nonce": 1717189200042
    },
    "makerSignature": "0xabcdef...",
    "domain": {
      "name": "ConvallaxRFQSettlement",
      "version": "1",
      "chainId": 80002,
      "verifyingContract": "0xC6Eb814Cc01189e20B2DB2D2a22Ed2DcAC404992"
    },
    "chainId": 80002
  }
}