Time SeventeenDocs
API Reference

Errors

The structured error envelope, stable code families, HTTP mapping, and retryability rules.

Draft v0.1 — design contract, not yet a live service

This documentation set defines a proposed Time Seventeen protocol for review and implementation planning. https://api.t17.capital is the approved and reserved REST origin, but neither that origin nor any documented endpoint is claimed to be live. The WebSocket origin remains unspecified. Credentials, chain IDs, contract addresses, rate limits, and SLAs remain unapproved; IDs, prices, and timestamps shown throughout are illustrative, not real production data.

HTTP status conveys the transport-level failure class. The stable error.code field conveys the protocol-level behavior a client should branch on — clients SHOULD switch on code, not on the HTTP status or the message text.

Envelope

{
  "error": {
    "code": "ORDER_POST_ONLY_WOULD_TAKE",
    "message": "The order would execute immediately and cannot be posted as maker-only.",
    "retryable": false,
    "details": {},
    "field_violations": [],
    "request_id": "req_demo_001"
  }
}
FieldDescription
codeStable, machine-readable error code from one of the families below
messageHuman-readable explanation; not stable across releases
retryableWhether an unmodified retry of the same request could plausibly succeed
detailsStructured, code-specific context
field_violationsArray of { "field": string, "reason": string } for validation failures
request_idCorrelates the error with meta.request_id / T17-Request-Id for support

Field violation example

{
  "error": {
    "code": "VALIDATION_FIELD_INVALID",
    "message": "One or more fields failed validation.",
    "retryable": false,
    "details": {},
    "field_violations": [
      { "field": "price", "reason": "must be a positive fixed-point decimal string" },
      { "field": "time_in_force", "reason": "unrecognized enum value" }
    ],
    "request_id": "req_demo_003"
  }
}

Code families

FamilyPurpose
AUTH_*Missing, invalid, expired, or insufficiently scoped credential
SIGNATURE_*Request-signature or EIP-712 signature verification failure
REPLAY_*Timestamp/nonce outside tolerance, or a previously used (key_id, nonce)
VALIDATION_*Malformed input, unknown enum/filter/sort/expand value, schema violation
MARKET_*Market/outcome not found, closed, halted, or otherwise ineligible for the request
ORDER_*Order-specific rejection (tick/lot size, post-only crossing, duplicate client ID, and so on)
RISK_*Position limits, price protection, or account risk-policy rejection
BALANCE_*Insufficient balance/collateral for the requested action
RATE_LIMIT_*Request exceeds the caller’s configured rate-limit class
STREAM_*WebSocket subscription, resume, or sequence-gap error
SETTLEMENT_*Settlement/redemption-specific failure
INTERNAL_*Unexpected server-side failure; always retryable: true unless documented otherwise
IDEMPOTENCY_CONFLICTAn Idempotency-Key was reused with a different canonical request body

Representative failure matrix

codeTypical HTTP statusretryableNotes
AUTH_INVALID_SIGNATURE401falseCanonical request signature does not verify
AUTH_KEY_REVOKED401falseAPI key has been rotated or revoked
REPLAY_NONCE_REUSED409false(key_id, nonce) pair already accepted
REPLAY_TIMESTAMP_SKEW401falseRequest timestamp outside the accepted clock-skew window
SIGNATURE_DOMAIN_MISMATCH400falseEIP-712 domain does not match the expected protocol/version/environment
VALIDATION_FIELD_INVALID400falseOne or more fields failed schema/format validation
IDEMPOTENCY_CONFLICT409falseSame Idempotency-Key, different canonical body
MARKET_NOT_TRADABLE409falseMarket/outcome status does not permit new orders
ORDER_TICK_SIZE_INVALID400falsePrice does not align to the market’s price increment
ORDER_POST_ONLY_WOULD_TAKE409falsepost_only order would cross the book
ORDER_DUPLICATE_CLIENT_ID409falseClient order ID already used by a non-terminal order
RISK_POSITION_LIMIT_EXCEEDED409falseOrder would breach a configured position limit
BALANCE_INSUFFICIENT_COLLATERAL409falseAccount lacks sufficient collateral/balance
RATE_LIMIT_EXCEEDED429trueCaller exceeded the applicable rate-limit class; honor T17-RateLimit-Reset
STREAM_RESUME_UNAVAILABLE— (WS)falseResume cursor outside retention; client must request a fresh snapshot
SETTLEMENT_FAILED409falseSettlement attempt failed; see Settlement for retry semantics
INTERNAL_ERROR500trueUnexpected server failure

Batch errors

A batch endpoint (see Orders → batch placement) never fails the whole request because one item failed. Each item reports its own status and, on failure, its own error object using the same code families as above.

Where to go next

  • Conventions for the response envelope and rate-limit header shape these errors sit inside.
  • Authentication for the AUTH_*, SIGNATURE_*, and REPLAY_* families in context.
  • Orders for the full order-validation pipeline and its rejection reasons.