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

# Create Trigger Order



## OpenAPI

````yaml POST /api/v2/trigger/order
openapi: 3.0.3
info:
  description: Multi-chain DEX trading API for developers
  license:
    name: ''
  title: Shuriken API v2
  version: 2.0.0
servers:
  - url: https://api.shuriken.trade
security: []
tags:
  - description: SplitNOW cross-chain split plan + execute
    name: V2 Splits
  - description: Wallet archive lifecycle (archive / unarchive / bulk-archive)
    name: Wallets
  - description: Token discovery, metadata, and pricing
    name: V2 Tokens
  - description: Quote and execute swaps
    name: V2 Swap
  - description: Limit orders and stop-loss
    name: V2 Trigger
  - description: Managed-agent invocation
    name: V2 Agents
  - description: Portfolio positions and PnL
    name: V2 Portfolio
  - description: User account management
    name: V2 Account
  - description: WebSocket stream discovery, session bootstrap, and channel authorization
    name: V2 WebSocket
  - description: Perpetual trading on Hyperliquid
    name: V2 Perps
  - description: Agent-proposed trade suggestions
    name: V2 Suggestions
paths:
  /api/v2/trigger/order:
    post:
      tags:
        - V2 Trigger
      summary: POST /api/v2/trigger/order — Create a trigger order
      operationId: create_trigger_order
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_TriggerOrder'
          description: Order created
        '400':
          description: Invalid params
      security:
        - bearer_auth: []
components:
  schemas:
    CreateOrderRequest:
      description: POST /api/v2/trigger/order request body
      properties:
        amount:
          description: Amount in base units
          type: string
        chain:
          description: 'Chain: "solana", "base", "bsc"'
          type: string
        expiryHours:
          description: 'Expiry in hours (default: 24)'
          format: int32
          minimum: 0
          nullable: true
          type: integer
        inputToken:
          description: Token address to sell
          type: string
        outputToken:
          description: Token address to buy
          type: string
        slippageBps:
          description: 'Slippage in basis points (default: 1000 = 10%)'
          format: int32
          nullable: true
          type: integer
        trailingPercentage:
          description: Required for "trailing" behavior (0.01–99.0)
          format: float
          nullable: true
          type: number
        triggerBehavior:
          description: '"immediate" (default) or "trailing"'
          nullable: true
          type: string
        triggerDirection:
          description: '"above" or "below"'
          type: string
        triggerMetric:
          description: '"price_usd", "market_cap_usd", "liquidity_usd"'
          type: string
        triggerValue:
          description: Required for "immediate" behavior
          nullable: true
          type: string
        walletId:
          description: Shuriken wallet ID
          type: string
      required:
        - chain
        - inputToken
        - outputToken
        - amount
        - walletId
        - triggerMetric
        - triggerDirection
      type: object
    ApiResponse_TriggerOrder:
      description: V2 success response envelope
      properties:
        data:
          properties:
            amount:
              type: string
            chain:
              type: string
            createdAt:
              type: string
            inputToken:
              type: string
            orderId:
              type: string
            outputToken:
              type: string
            status:
              type: string
            trigger:
              $ref: '#/components/schemas/TriggerDetail'
          required:
            - orderId
            - status
            - chain
            - inputToken
            - outputToken
            - amount
            - trigger
            - createdAt
          type: object
        pagination:
          $ref: '#/components/schemas/PaginationInfo'
          nullable: true
        requestId:
          type: string
      required:
        - data
        - requestId
      type: object
    TriggerDetail:
      properties:
        direction:
          type: string
        metric:
          type: string
        trailingPercentage:
          format: float
          nullable: true
          type: number
        value:
          nullable: true
          type: string
      required:
        - metric
        - direction
      type: object
    PaginationInfo:
      description: Page-based pagination info (per RFC)
      properties:
        hasMore:
          type: boolean
        limit:
          format: int32
          minimum: 0
          type: integer
        page:
          format: int32
          minimum: 0
          type: integer
        total:
          format: int32
          minimum: 0
          nullable: true
          type: integer
      required:
        - page
        - limit
        - hasMore
      type: object
  securitySchemes:
    bearer_auth:
      bearerFormat: JWT or sk_{keyId}_{secret}
      description: >-
        Use `Authorization: Bearer <jwt>` for user auth or `Authorization:
        Bearer sk_{keyId}_{secret}` for API key auth.
      scheme: bearer
      type: http

````