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

# Submit a transaction

> Submit the signed payload for an action transaction, or record the hash of one you already broadcast.

There is one submit route in the Perps API and no separate submit-hash route. Send exactly one body field:

| Body | Use when | Result `status` |
| - | - | - |
| `{ "signedPayload": "..." }` | Yield.xyz submits it. For `EIP712_TYPED_DATA` transactions this is the signature. | `QUEUED` for Hyperliquid and Arbitrum typed-data transactions; otherwise the broadcast result |
| `{ "transactionHash": "..." }` | You already broadcast the transaction yourself. | `BROADCASTED` |

Sending both returns `400` `SUBMIT_PAYLOAD_CONFLICT`; sending neither fails validation with `400`. These are not the Earn field names `signedTransaction` and `hash`.

A transaction can be submitted once: it must be in status `CREATED`, otherwise the call returns `400` `SUBMIT_ALREADY_PROCESSED`. Do not resubmit; poll [Get an action](https://docs.yield.xyz/api-reference/perps-api/actions/get-action.md) for the outcome. Submit transactions in the order returned by [Execute an action](https://docs.yield.xyz/api-reference/perps-api/actions/execute-action.md).

| Status | `details.code` | Cause |
| - | - | - |
| 400 | `SUBMIT_ALREADY_PROCESSED` | Transaction is no longer `CREATED` |
| 400 | `SUBMIT_PAYLOAD_CONFLICT` | Both `signedPayload` and `transactionHash` sent |
| 400 | `SUBMIT_PAYLOAD_MISSING` | Neither body field sent (normally caught by validation first) |
| 403 | `SUBMIT_FORBIDDEN` | Transaction belongs to another project (checked after the status check, so an already processed transaction returns `400` first) |
| 404 | `SUBMIT_NOT_FOUND` | Unknown `transactionId` |
| 404 | `SUBMIT_PROVIDER_NOT_FOUND` | The transaction's provider is not available |
| 500 | `SUBMIT_INTERNAL` | Unexpected server error |
| 503 | `SUBMIT_BROADCAST_FAILED` | Broadcast failed |

Error envelope: [Errors and retries](https://docs.yield.xyz/api-reference/errors-retries.md).


## OpenAPI

````yaml openapi-perps.json POST /v1/transactions/{transactionId}/submit
openapi: 3.0.0
info:
  title: 'Yield API: Trade (Perps)'
  description: >-
    API Documentation. Errors follow a uniform envelope with `details.code` from
    the public catalog (https://docs.yield.xyz). ValidationPipe failures use
    `validation.message: string[]`.
  version: '1.0'
  contact: {}
servers:
  - url: https://perps.yield.xyz
    description: Production
security: []
tags:
  - name: Discovery
    description: Browse and discover perps markets, networks, and providers
  - name: Portfolio
    description: User-specific positions, orders, and balances
  - name: Actions
    description: Generate transactions to open, close, and manage positions
externalDocs:
  description: For more information
  url: https://docs.yield.xyz
paths:
  /v1/transactions/{transactionId}/submit:
    post:
      tags:
        - Transactions
        - Actions
      summary: Submit transaction
      description: >-
        Submit a signed transaction to the blockchain or protocol, or record a
        transaction hash if already submitted. Provide either signedPayload (to
        have us broadcast) or transactionHash (if already submitted). The
        transaction must have been created via the actions endpoint.
      operationId: TransactionsController_submitTransaction_v1
      parameters:
        - name: transactionId
          required: true
          in: path
          description: Transaction ID from action response (UUID)
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitTransactionDto'
      responses:
        '200':
          description: Transaction submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitTransactionResponseDto'
        '400':
          description: >-
            See https://docs.yield.xyz for `details.code` values. ValidationPipe
            failures use `validation.message: string[]` in place of `details`.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - statusCode
                      - timestamp
                      - path
                      - message
                      - validation
                    properties:
                      statusCode:
                        type: number
                      timestamp:
                        type: string
                        format: date-time
                      path:
                        type: string
                      message:
                        type: string
                      validation:
                        type: object
                        required:
                          - message
                        properties:
                          message:
                            type: array
                            items:
                              type: string
                            description: Class-validator constraint messages.
                  - type: object
                    required:
                      - statusCode
                      - timestamp
                      - path
                      - message
                    properties:
                      statusCode:
                        type: number
                      timestamp:
                        type: string
                        format: date-time
                      path:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - SUBMIT_ALREADY_PROCESSED
                              - SUBMIT_PAYLOAD_CONFLICT
                              - SUBMIT_PAYLOAD_MISSING
                            description: >-
                              Public error code — see https://docs.yield.xyz for
                              the full list.
                          error:
                            type: string
                            description: HTTP status text (e.g. "Bad Request").
                          message:
                            type: string
                            description: Domain message when present.
                          reason:
                            type: string
                            description: Provider reason when present.
                          retryAfter:
                            type: number
                            description: >-
                              Seconds to wait before retrying (rate-limit
                              responses only).
                      validation:
                        type: object
                        description: >-
                          Present on ValidationPipe failures instead of
                          `details`.
                        properties:
                          message:
                            type: array
                            items:
                              type: string
                            description: Class-validator constraint messages.
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  timestamp:
                    type: string
                    example: '2026-05-04T12:00:00.000Z'
                  path:
                    type: string
                    example: /v1/actions
                  message:
                    type: string
                    example: Invalid API key
                  details:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Invalid API key
                      code:
                        type: string
                        example: AUTH_INVALID_API_KEY
        '403':
          description: >-
            See https://docs.yield.xyz for `details.code` values. ValidationPipe
            failures use `validation.message: string[]` in place of `details`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - statusCode
                  - timestamp
                  - path
                  - message
                properties:
                  statusCode:
                    type: number
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - SUBMIT_FORBIDDEN
                        description: >-
                          Public error code — see https://docs.yield.xyz for the
                          full list.
                      error:
                        type: string
                        description: HTTP status text (e.g. "Bad Request").
                      message:
                        type: string
                        description: Domain message when present.
                      reason:
                        type: string
                        description: Provider reason when present.
                      retryAfter:
                        type: number
                        description: >-
                          Seconds to wait before retrying (rate-limit responses
                          only).
                  validation:
                    type: object
                    description: Present on ValidationPipe failures instead of `details`.
                    properties:
                      message:
                        type: array
                        items:
                          type: string
                        description: Class-validator constraint messages.
        '404':
          description: >-
            See https://docs.yield.xyz for `details.code` values. ValidationPipe
            failures use `validation.message: string[]` in place of `details`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - statusCode
                  - timestamp
                  - path
                  - message
                properties:
                  statusCode:
                    type: number
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - SUBMIT_NOT_FOUND
                          - SUBMIT_PROVIDER_NOT_FOUND
                        description: >-
                          Public error code — see https://docs.yield.xyz for the
                          full list.
                      error:
                        type: string
                        description: HTTP status text (e.g. "Bad Request").
                      message:
                        type: string
                        description: Domain message when present.
                      reason:
                        type: string
                        description: Provider reason when present.
                      retryAfter:
                        type: number
                        description: >-
                          Seconds to wait before retrying (rate-limit responses
                          only).
                  validation:
                    type: object
                    description: Present on ValidationPipe failures instead of `details`.
                    properties:
                      message:
                        type: array
                        items:
                          type: string
                        description: Class-validator constraint messages.
        '429':
          description: Rate limit exceeded
          headers:
            x-ratelimit-limit:
              description: Request limit per window
              schema:
                type: string
            x-ratelimit-remaining:
              description: Remaining requests (will be 0)
              schema:
                type: string
            x-ratelimit-reset:
              description: Unix timestamp when window resets
              schema:
                type: string
            retry-after:
              description: Seconds to wait before retrying
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 429
                  timestamp:
                    type: string
                    example: '2026-05-04T12:00:00.000Z'
                  path:
                    type: string
                    example: /v1/actions
                  message:
                    type: string
                    example: Rate limit exceeded
                  details:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Rate limit exceeded
                      code:
                        type: string
                        example: RATE_LIMIT_EXCEEDED
                      error:
                        type: string
                        example: Too Many Requests
                      retryAfter:
                        type: number
                        example: 30
        '500':
          description: >-
            See https://docs.yield.xyz for `details.code` values. ValidationPipe
            failures use `validation.message: string[]` in place of `details`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - statusCode
                  - timestamp
                  - path
                  - message
                properties:
                  statusCode:
                    type: number
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - SUBMIT_INTERNAL
                        description: >-
                          Public error code — see https://docs.yield.xyz for the
                          full list.
                      error:
                        type: string
                        description: HTTP status text (e.g. "Bad Request").
                      message:
                        type: string
                        description: Domain message when present.
                      reason:
                        type: string
                        description: Provider reason when present.
                      retryAfter:
                        type: number
                        description: >-
                          Seconds to wait before retrying (rate-limit responses
                          only).
                  validation:
                    type: object
                    description: Present on ValidationPipe failures instead of `details`.
                    properties:
                      message:
                        type: array
                        items:
                          type: string
                        description: Class-validator constraint messages.
        '503':
          description: >-
            See https://docs.yield.xyz for `details.code` values. ValidationPipe
            failures use `validation.message: string[]` in place of `details`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - statusCode
                  - timestamp
                  - path
                  - message
                properties:
                  statusCode:
                    type: number
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - SUBMIT_BROADCAST_FAILED
                        description: >-
                          Public error code — see https://docs.yield.xyz for the
                          full list.
                      error:
                        type: string
                        description: HTTP status text (e.g. "Bad Request").
                      message:
                        type: string
                        description: Domain message when present.
                      reason:
                        type: string
                        description: Provider reason when present.
                      retryAfter:
                        type: number
                        description: >-
                          Seconds to wait before retrying (rate-limit responses
                          only).
                  validation:
                    type: object
                    description: Present on ValidationPipe failures instead of `details`.
                    properties:
                      message:
                        type: array
                        items:
                          type: string
                        description: Class-validator constraint messages.
      security:
        - ApiKey: []
components:
  schemas:
    SubmitTransactionDto:
      type: object
      properties:
        signedPayload:
          type: string
          description: >-
            Signed transaction payload (hex string or signed EIP-712 data).
            Required if transactionHash is not provided.
          example: 0x1234567890abcdef...
        transactionHash:
          type: string
          description: >-
            Transaction hash if already submitted by the user. Required if
            signedPayload is not provided.
          example: 0xabcdef1234567890...
    SubmitTransactionResponseDto:
      type: object
      properties:
        transactionHash:
          type: string
          description: Transaction hash or order ID (undefined for immediate actions)
          example: 0x1234567890abcdef...
        link:
          type: string
          description: Link to view transaction on provider platform
          example: https://app.hyperliquid.xyz/exchange
        status:
          description: Transaction status after submission
          example: CONFIRMED
          allOf:
            - $ref: '#/components/schemas/PerpTransactionStatus'
        error:
          type: string
          description: Error message if status is FAILED
          example: 'Order rejected: Insufficient margin'
        details:
          type: object
          description: Additional provider-specific details
          example:
            orderStatus: filled
            fillPrice: 3900
      required:
        - link
        - status
    PerpTransactionStatus:
      type: string
      enum:
        - CREATED
        - QUEUED
        - BROADCASTED
        - CONFIRMED
        - FAILED
        - NOT_FOUND
      description: Current transaction status
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````

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