TEE Perp Trading

Authenticate one app-key-signed trigger order, admit it through the

journaled batch command, then ask Nitro to sign and submit it.

post/v1/tee-perp/orders/submit-trigger

Request

  • Base URL: https://testnet-api.hypercall.xyz
  • URL: https://testnet-api.hypercall.xyz/v1/tee-perp/orders/submit-trigger
  • Auth: none declared

Request body

accountstring required

Ethereum wallet address serialized as a checksummed 0x-prefixed hex string.

noncestring required
signaturestring required

App-key EIP-712 signature over HCPerpTriggerOrder.

Example request

{
  "account": "0x1234567890abcdef1234567890abcdef12345678"
}

Response

Same-call TEE trigger-order submission result

accountstring required

Ethereum wallet address serialized as a checksummed 0x-prefixed hex string.

apiWalletstring required

Ethereum wallet address serialized as a checksummed 0x-prefixed hex string.

batchIdstring required
engineSeqstring nullable

WAL offset for a newly committed batch. Exact retries return null.

errorCode'engine_admission_rejected' | 'duplicate_directive' | 'trading_unavailable' | 'execution_unavailable' | 'authorization_failed' | 'invalid_request' | 'wallet_not_admitted' | 'wallet_admission_mismatch' | 'wallet_admission_unavailable' | 'parent_credentials_unavailable' | 'parent_kms_request_invalid' | 'enclave_unavailable' | 'enclave_kms_request_invalid' | 'enclave_wallet_unavailable' | 'enclave_clock_unavailable' | 'enclave_policy_rejected' | 'enclave_authorization_rejected' | 'enclave_wallet_mismatch' | 'enclave_intent_expired' | 'enclave_intent_ttl_exceeded' | 'enclave_signing_failed' | 'enclave_attestation_failed' | 'enclave_response_invalid' | 'parent_response_invalid' | 'signed_request_invalid' | 'internal_unavailable' | 'venue_rejected' | 'builder_not_approved' | 'submission_outcome_unknown'

Stable, non-sensitive failure classification returned to TEE perp clients.

grouping'na' | 'normalTpsl' | 'positionTpsl' required
messagestring nullable
reasonCode'insufficient_margin' | 'mode_change_with_position' | 'stale_position_snapshot' | 'market_not_supported' | 'unified_mode_required' | 'reduce_only_exceeds_position' | 'trading_halted' | 'account_not_pm' | 'venue_risk_unavailable' | 'price_unavailable' | 'liquidation_pending' | 'account_health_unavailable' | 'leverage_requires_flat_account' | 'action_not_supported' | 'invalid_order' | 'engine_rejected'

Stable machine code for why a perp action is (or would be) rejected. The preview and the real submit responses carry the same code for the same rejection.

stage'accepted' | 'rejected' | 'not_submitted' | 'unknown' required
venueResponseHashstring nullable

Example response

{
  "account": "0x1234567890abcdef1234567890abcdef12345678",
  "apiWallet": "0x1234567890abcdef1234567890abcdef12345678"
}

Changes

No recorded changes to this operation across all 1 revision of this API.