Skip to main content
Signed private requests are wallet-authorized actions submitted to the operator through REST. They cover placing orders, canceling orders, canceling all orders in one strategy, updating profile settings, and requesting collateral withdrawals.

Endpoints

MethodPathPurposeBody or response
GET/v2/encryption-keyReturns the current operator public key for request encryption.The public key used as the encryption recipient.
POST/v2/requestAccepts one signed and encrypted private request.Encrypted bytes, not a JSON object.

Submission envelope

The signed plaintext is a JSON object with request-type field t and content field c.
{
  "t": "Order",
  "c": {
    "symbol": "ETHP",
    "strategy": "main",
    "side": "Bid",
    "orderType": 0,
    "nonce": "0x3137373038373530313938323238333436363300000000000000000000000000",
    "amount": "0.1",
    "price": "1800",
    "stopPrice": "0",
    "sessionKeySignature": null,
    "signature": "0x..."
  }
}
FieldTypeMeaning
tenumRequest type. Supported values are Order, CancelOrder, CancelAll, ProfileUpdate, and Withdraw.
cobjectRequest content for the type named by t.
Encrypt the UTF-8 JSON bytes and send the encrypted byte payload to POST /v2/request. Do not wrap the encrypted bytes in another JSON object.

Common content fields

FieldApplies toTypeMeaning
nonceall request kindsbytes32 hex stringMonotonically increasing request nonce for the signer.
signatureall request kindshex stringEIP-712 signature for the fields in that request type.
sessionKeySignatureorder, modify-order, cancel, cancel-all requestshex string or nullDelegated-session payload. When present, the delegated session key signs the request.
client_timestamp_msgateway replay-window deploymentsinteger millisecondsClient wall-clock timestamp included in the signed payload.
recv_window_msgateway replay-window deploymentsinteger millisecondsMaximum age window for the signed payload.
Replay-window fields are paired. Send both client_timestamp_ms and recv_window_ms when the target deployment enforces replay windows; sending only one is malformed. The current public cap for recv_window_ms is 60000, and timestamps more than 1000ms ahead of server time are rejected.

Order content

Order places one order.
FieldTypeMeaning
symbolstringMarket symbol, such as ETHP.
strategystringTrader strategy label.
sideenumBid or Ask; EIP-712 signing uses 0 for Bid and 1 for Ask.
orderTypeenum integer0 limit, 1 market, 2 stop, 3 limit-post-only.
noncebytes32 hex stringMonotonically increasing signer nonce.
amountdecimal stringOrder size, scaled at six decimal places for signing.
pricedecimal stringLimit price. Use 0 for market orders.
stopPricedecimal stringStop trigger price. Use 0 when the order is not a stop order.
sessionKeySignaturehex string or nullDelegated-session payload for session-key orders.
signaturehex stringEIP-712 signature over OrderParams.

Cancel-order content

CancelOrder cancels one order by hash.
FieldTypeMeaning
symbolstringMarket symbol.
orderHashhex stringHash of the order intent to cancel.
noncebytes32 hex stringMonotonically increasing signer nonce.
sessionKeySignaturehex string or nullDelegated-session payload for session-key cancels.
signaturehex stringEIP-712 signature over CancelOrderParams.

Cancel-all content

CancelAll cancels all orders for one strategy and symbol.
FieldTypeMeaning
symbolstringMarket symbol.
strategystringStrategy whose orders should be canceled.
noncebytes32 hex stringMonotonically increasing signer nonce.
sessionKeySignaturehex string or nullDelegated-session payload for session-key cancel-all requests.
signaturehex stringEIP-712 signature over CancelAllParams.

Profile-update content

ProfileUpdate changes trader-level profile settings.
FieldTypeMeaning
noncebytes32 hex stringMonotonically increasing signer nonce.
payFeesInDdxbooleanRequested value for the trader’s pay-fees-in-DDX setting.
referralAddressaddress or nullOptional one-time referral address mutation.
deniedDelegatedSessionUpdateobject or nullOptional delegated-session deny-list update.
signaturehex stringEIP-712 signature over UpdateProfileParams.
EIP-712 signing maps profile-update fields to payFeesInDdxState, referralAddress, deniedDelegatedSessionAction, deniedDelegatedSessionAddress, deniedDelegatedSessionExpiry, and nonce.

Delegated-session deny-list update

FormFieldsMeaning
Adddelegated, expiryDenies a delegated session key until its Unix-second expiry.
Removeaddress stringRemoves the delegated session key from the deny list.
EmptynullLeaves the deny list unchanged.

Withdraw content

Withdraw requests a collateral withdrawal.
FieldTypeMeaning
strategyIdstringStrategy label to withdraw from.
currencyaddressERC-20 collateral token address.
amountdecimal stringAmount to withdraw, scaled at six decimal places for signing.
noncebytes32 hex stringMonotonically increasing signer nonce.
signaturehex stringEIP-712 signature over WithdrawParams.

Delegated sessions

Delegated sessions are supported for order, modify-order, cancel-order, and cancel-all requests.
Field or valueMeaning
sessionKeySignatureEncoded delegated-session authorization payload included in the request content.
Session signerThe session key signs the request hash when sessionKeySignature is present.
Trader signerThe trader wallet signs the delegated-session payload that authorizes the session key.
expiryUnix timestamp after which the session key is no longer valid.
acl_scopeAllowed session actions. Codes are 0 unrestricted, 1 order, 2 modify-order, 3 cancel-order, 4 cancel-all.
Delegated-session expiry or action-scope violations return 403 Forbidden. A denied delegated-session signer also returns 403 Forbidden.

Successful receipt

Accepted requests return a receipt with t: "Sequenced".
{
  "t": "Sequenced",
  "c": {
    "nonce": "0x...",
    "requestHash": "0x...",
    "requestIndex": 123,
    "sender": "0x...",
    "enclaveSignature": "0x..."
  }
}
Receipt fieldTypeMeaning
noncebytes32 hex stringNonce from the accepted request.
requestHashhex stringHash of the accepted request.
requestIndexintegerOperator sequencing index assigned to the request.
senderaddressTrader address recovered from the request signature.
enclaveSignaturehex stringOperator enclave signature over the receipt.

Safety-failure receipt

A request can also return a structured safety-failure receipt.
{
  "t": "SafetyFailure",
  "c": {
    "message": "Safety failure encountered during sequencing validation",
    "inner": "OMFLessThanIMF"
  }
}
Receipt fieldTypeMeaning
messagestringHuman-readable rejection detail.
innerenumSafety-failure reason. See Error Reference.

HTTP errors

These errors happen before the request returns a sequenced or safety-failure receipt.
Error reasonStatusMeaning
InvalidRequestPayload400The encrypted body decrypted to malformed request content, or required replay-window fields were missing or only partly populated on deployments that enforce them.
SignerNotFound401Signature recovery succeeded, but the signer is not a recognized trader.
Forbidden403Delegated-session expiry, deny-list, action-scope, or policy authorization rejected the request.
KycNotFound404Required KYC state is missing or expired.
IllegalNonce412The signer nonce did not increase monotonically.
ExpiredTimestamp412The signed replay window has expired on deployments that enforce replay windows.
FutureTimestamp412The client timestamp is too far ahead of server time on deployments that enforce replay windows.
NotAcceptingRequests421The operator cannot currently accept this request path.
InvalidEncryption422The operator could not decrypt the submitted bytes.
SafetyFailure422Request validation rejected the action before normal sequencing.
RateLimit429The trader or gateway request bucket was exceeded.
InternalServerError500The operator failed before returning a final result.
ServiceUnavailable503A required dependency was not ready, including current mark-price availability.
Last modified on May 1, 2026