> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oceanx.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Limit, TWAP or snipe (unavailable)

> Closed intake pending signing-contracts. The scope is reserved, unavailable in the dashboard and never added to existing keys. Authentication, key/IP policy and a bounded read of the exact wire bytes precede mandatory request-signature admission. The signature gate runs before JSON parsing, input validation and provider wallet lookup, so unsigned callers cannot probe wallet ownership. Every state-changing call requires per-key request signing before activation: signed timestamp, nonce, method/path and exact body hash, with an atomic bounded replay window. No signing wire/verifier is released; bearer credentials or caller-supplied signature headers cannot pass the independent request-signing gate even if a backend signer becomes available. No order, journal, permit, signature or submission is created. After future signature verification, amount is input atoms (quoteToken on buy, token on sell), bounded by u64 on Solana/u256 on EVM; addresses must match the explicit chain. Strict input validation, ownership checks and an independent signer refusal remain in the verified continuation. This is not an execution preview or admission proof. Enabling requires a reviewed released backend contract, not removal of the refusal.



## OpenAPI

````yaml https://www.oceanx.trade/api/v1/openapi.json post /api/v1/spot/orders
openapi: 3.1.0
info:
  title: OceanX Developer API
  version: 1.0.0
  description: >-
    OceanX Developer API v1 (beta). Covers every public route and method: market
    data, charts, token/risk facts, wallet analytics, tracker, copy reads,
    alerts, owned account wallet/funding reads, spot quotes and perps. Scope and
    availability are operation-specific. Spot execution, copy execution, account
    withdrawals, developer webhooks and prediction trading are not public v1
    capabilities. Perps order submission and collateral rebalance remain
    unavailable; their error contracts are explicit. Documentation:
    https://docs.oceanx.trade/api/overview.
  contact:
    url: https://docs.oceanx.trade
  termsOfService: https://www.oceanx.trade/legal/terms
  license:
    name: Proprietary
    url: https://www.oceanx.trade/legal/terms
servers:
  - url: https://www.oceanx.trade
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Perps
    description: Cross-venue market data and explicit account-wallet execution limitations.
  - name: Router
    description: >-
      Read-only Raptor route quotes and public Solana transaction status. Build
      and execution remain separately gated.
  - name: Market Data
    description: Read-only OceanX market context sourced and cached by VM producers.
  - name: Spot
    description: >-
      Executable Solana swap quotes off OceanX's own router, and the exit
      checker that reports whether a whole position can be sold.
  - name: Callouts
    description: >-
      Public token callouts — user-posted token calls with live click/volume
      attribution stats. Read-only.
  - name: Copy Trading
    description: Key-owner follow, fill and PnL reads; no execution authority.
  - name: Price Alerts
    description: Key-owner alert management through the existing evaluator; no webhooks.
paths:
  /api/v1/spot/orders:
    post:
      tags:
        - Spot
      summary: Limit, TWAP or snipe (unavailable)
      description: >-
        Closed intake pending signing-contracts. The scope is reserved,
        unavailable in the dashboard and never added to existing keys.
        Authentication, key/IP policy and a bounded read of the exact wire bytes
        precede mandatory request-signature admission. The signature gate runs
        before JSON parsing, input validation and provider wallet lookup, so
        unsigned callers cannot probe wallet ownership. Every state-changing
        call requires per-key request signing before activation: signed
        timestamp, nonce, method/path and exact body hash, with an atomic
        bounded replay window. No signing wire/verifier is released; bearer
        credentials or caller-supplied signature headers cannot pass the
        independent request-signing gate even if a backend signer becomes
        available. No order, journal, permit, signature or submission is
        created. After future signature verification, amount is input atoms
        (quoteToken on buy, token on sell), bounded by u64 on Solana/u256 on
        EVM; addresses must match the explicit chain. Strict input validation,
        ownership checks and an independent signer refusal remain in the
        verified continuation. This is not an execution preview or admission
        proof. Enabling requires a reviewed released backend contract, not
        removal of the refusal.
      operationId: createSpotAutomation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TradingOrderRequest'
      responses:
        '400':
          description: >-
            Query parameters or unreadable/body over 8 KiB; after future
            signature verification, invalid JSON/UTF-8, unknown fields,
            chain/address/amount, expiry or schedule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Missing, invalid or revoked API key. Session cookies never authorize
            this route.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Missing reserved scope, denied IP or wallet not owned by this key's
            account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Content-Type must be application/json.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Per-key REST admission exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: API-key verification dependency failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            signer_unavailable: released API signing/automation authority is
            unavailable; or trading_unavailable/rate_limit_unavailable on
            dependency failure. No side effect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TradingOrderRequest:
      $schema: https://json-schema.org/draft/2020-12/schema
      oneOf:
        - type: object
          properties:
            chain:
              type: string
            wallet:
              type: string
              maxLength: 44
            token:
              type: string
              maxLength: 44
            quoteToken:
              type: string
              maxLength: 44
            side:
              type: string
              enum:
                - buy
                - sell
            amount:
              type: string
              maxLength: 78
              pattern: ^[1-9]\d*$
            slippageBps:
              type: integer
              minimum: 1
              maximum: 1000
            clientOrderId:
              type: string
              minLength: 1
              maxLength: 64
              pattern: ^[A-Za-z0-9_-]+$
            orderType:
              type: string
              const: limit
            limitPriceUsd:
              type: string
              maxLength: 48
              pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          required:
            - chain
            - wallet
            - token
            - quoteToken
            - side
            - amount
            - slippageBps
            - clientOrderId
            - orderType
            - limitPriceUsd
            - expiresAt
          additionalProperties: false
        - type: object
          properties:
            chain:
              type: string
            wallet:
              type: string
              maxLength: 44
            token:
              type: string
              maxLength: 44
            quoteToken:
              type: string
              maxLength: 44
            side:
              type: string
              enum:
                - buy
                - sell
            amount:
              type: string
              maxLength: 78
              pattern: ^[1-9]\d*$
            slippageBps:
              type: integer
              minimum: 1
              maximum: 1000
            clientOrderId:
              type: string
              minLength: 1
              maxLength: 64
              pattern: ^[A-Za-z0-9_-]+$
            orderType:
              type: string
              const: twap
            slices:
              type: integer
              minimum: 2
              maximum: 100
            durationSeconds:
              type: integer
              minimum: 2
              maximum: 7689600
            jitterSeconds:
              type: integer
              minimum: 0
              maximum: 86400
          required:
            - chain
            - wallet
            - token
            - quoteToken
            - side
            - amount
            - slippageBps
            - clientOrderId
            - orderType
            - slices
            - durationSeconds
            - jitterSeconds
          additionalProperties: false
        - type: object
          properties:
            chain:
              type: string
            wallet:
              type: string
              maxLength: 44
            token:
              type: string
              maxLength: 44
            quoteToken:
              type: string
              maxLength: 44
            side:
              type: string
              const: buy
            amount:
              type: string
              maxLength: 78
              pattern: ^[1-9]\d*$
            slippageBps:
              type: integer
              minimum: 1
              maximum: 1000
            clientOrderId:
              type: string
              minLength: 1
              maxLength: 64
              pattern: ^[A-Za-z0-9_-]+$
            orderType:
              type: string
              const: snipe
            trigger:
              type: string
              enum:
                - first_liquidity
                - migration
            migrationFromPool:
              type: string
              maxLength: 44
            maxPriceUsd:
              type: string
              maxLength: 48
              pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          required:
            - chain
            - wallet
            - token
            - quoteToken
            - side
            - amount
            - slippageBps
            - clientOrderId
            - orderType
            - trigger
            - maxPriceUsd
            - expiresAt
          additionalProperties: false
    Error:
      type: object
      required:
        - error
      properties:
        requestId:
          type: string
          description: Request identifier on new token endpoints.
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable code. Branch on this, not the message.
              example: no_route
            message:
              type: string
              description: Human-readable detail. May change.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An OceanX API key, created in the app under Settings → Developer API.
        Send it as `Authorization: Bearer ox_live_…`. Required scopes are
        operation-specific: market reads use md.read, tracker uses tracker.read,
        copy reads use copy.read, alert operations use alerts.read or
        alerts.write, and owned wallet/funding reads require explicit
        account.read. New scopes require explicit selection and grant no trading
        authority. Existing perps operations retain their documented scopes.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.