wenrange Solver WebSocket Protocol 1.0.0

The orchestrator ↔ solver link is JSON over WebSocket. Solvers connect to the orchestrator, complete an EIP-191 challenge/response handshake, then receive quote-request commands and reply with prices (and, for non-_quote commands, a signed EIP-712 commitment).

All frames are JSON text frames. There is no global envelope discriminator: message types are identified by their top-level type (handshake) or command (quote request) field, and solver responses are identified by the direction of the connection.

Handshake timeout: 5 seconds. Liveness: orchestrator sends a WebSocket PING every 20 seconds; solver must answer PONG within 60 seconds or the connection is closed (ClosePolicyViolation).

Servers

  • wss://orchestrator.wenrange.com/wssproduction

    Production

  • ws://localhost:8080/wslocal

    Local development

Operations

  • SEND /solver

    Solver session. One connection per registered solver.

    Orchestrator sends a random nonce on connect.

    Operation IDsendChallenge

    Available only on servers:

    Accepts the following message:

    Auth challenge (orchestrator → solver)

    Sent immediately on connect.

    Message IDauthChallenge
    object

    Examples

  • RECEIVE /solver

    Solver session. One connection per registered solver.

    Solver returns an EIP-191 signature over the challenge.

    Operation IDreceiveAuthResponse

    Available only on servers:

    Accepts the following message:

    Auth response (solver → orchestrator)

    Solver's EIP-191 signature over the message `"OptionsMarket solver auth v1\nnonce: 0x<hex from challenge>"`, hashed with the standard `\x19Ethereum Signed Message:\n<len>...` prefix.

    Message IDauthResponse
    object

    Examples

  • SEND /solver

    Solver session. One connection per registered solver.

    Orchestrator accepts or rejects the auth.

    Operation IDsendAuthResult

    Available only on servers:

    Accepts the following message:

    Auth result (orchestrator → solver)

    Acceptance (`auth_ok`) or rejection (`auth_reject`).

    Message IDauthResult
    oneOf

    Examples

  • SEND /solver

    Solver session. One connection per registered solver.

    Orchestrator broadcasts a quote request.

    Operation IDsendCommand

    Available only on servers:

    Accepts one of the following messages:

    • #0Quote a new position (price only)
      Message IDpositionOpenQuoteCommand
      allOf

      Examples

    • #1Quote a new position (with commitment)
      Message IDpositionOpenCommand
      allOf

      Examples

    • #2Quote a buyback (price only)
      Message IDpositionCloseQuoteCommand
      allOf

      Examples

    • #3Quote a buyback (with commitment)
      Message IDpositionCloseCommand
      allOf

      Examples

  • RECEIVE /solver

    Solver session. One connection per registered solver.

    Solver replies with a price (and commitment, for non-quote commands).

    Operation IDreceiveResponse

    Available only on servers:

    Accepts the following message:

    Solver response (solver → orchestrator)

    Reply to a quote command. `commitment_packed` and `commitment_signature` are present only for the non-`_quote` commands. Set `error` to decline a request.

    Message IDsolverResponse
    object

    Examples

Messages

  • #1Auth challenge (orchestrator → solver)

    Sent immediately on connect.

    Message IDAuthChallenge
    object
  • #2Auth response (solver → orchestrator)

    Solver's EIP-191 signature over the message `"OptionsMarket solver auth v1\nnonce: 0x<hex from challenge>"`, hashed with the standard `\x19Ethereum Signed Message:\n<len>...` prefix.

    Message IDAuthResponse
    object
  • #3Auth result (orchestrator → solver)

    Acceptance (`auth_ok`) or rejection (`auth_reject`).

    Message IDAuthResult
    oneOf
  • #4Quote a new position (price only)
    Message IDPositionOpenQuoteCommand
    allOf
  • #5Quote a new position (with commitment)
    Message IDPositionOpenCommand
    allOf
  • #6Quote a buyback (price only)
    Message IDPositionCloseQuoteCommand
    allOf
  • #7Quote a buyback (with commitment)
    Message IDPositionCloseCommand
    allOf
  • #8Solver response (solver → orchestrator)

    Reply to a quote command. `commitment_packed` and `commitment_signature` are present only for the non-`_quote` commands. Set `error` to decline a request.

    Message IDSolverResponse
    object

Schemas

  • object
  • object
  • oneOf
  • object
  • object
  • object
  • allOf
  • allOf
  • allOf
  • allOf
  • object
  • allOf
  • object
  • allOf
  • object
  • string
  • string

    ERC-1155 token ID as decimal string (uint256).