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

# Create Onchain Transaction

> Create an onchain transaction.



## OpenAPI

````yaml POST  /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/onchain_transaction
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
tags:
  - name: PrimeRESTAPI
paths:
  /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/onchain_transaction:
    post:
      tags:
        - Transactions
      summary: Create Onchain Transaction
      description: Create an onchain transaction.
      operationId: PrimeRESTAPI_CreateOnchainTransaction
      parameters:
        - name: portfolio_id
          in: path
          description: The portfolio ID
          required: true
          schema:
            type: string
        - name: wallet_id
          in: path
          description: The wallet ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - raw_unsigned_txn
              type: object
              properties:
                raw_unsigned_txn:
                  type: string
                  description: >-
                    Raw unsigned transaction in Hex format (Supports EVM and
                    Solana)
                  example: >-
                    [EVM Example]:
                    02f00180830f424085057db95cdf825208942225166893d26f2064a15cc84f5b897591a7e6938642a13798e59d80c0808080

                    [Solana Example]:
                    010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080010002045bae9ac3406b6ad02953cef2646a07966df84f35c0d754d5cc628d452299fcc606c34c7ae7b6d15777787f4f5217d8f2537e7efecabf3d96c39952ed2144322e00000000000000000000000000000000000000000000000000000000000000000306466fe5211732ffecadba72c39be7bc8ce5bbc5f7126b2c439b3a40000000dc34215f010238fbe5a955301891d29cdc1ea2b1f175e36c01c7cde0126ba58303020200010c02000000364b16000000000003000903102700000000000003000502400d030000
                rpc:
                  $ref: '#/components/schemas/coinbase.public_rest_api.RpcConfig'
                evm_params:
                  $ref: >-
                    #/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionRequest.EvmParams
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.CreateOnchainTransactionResponse
components:
  schemas:
    coinbase.public_rest_api.RpcConfig:
      type: object
      properties:
        skip_broadcast:
          type: boolean
          description: If true, transaction will not be broadcast to the network
          example: false
        url:
          type: string
          description: Custom blockchain node RPC URL. (EVM-only)
          example: https://rpc.flashbots.net/fast
    coinbase.public_rest_api.CreateOnchainTransactionRequest.EvmParams:
      type: object
      properties:
        disable_dynamic_gas:
          type: boolean
          description: >-
            Option to disable dynamic gas price adjustment for EVM transactions
            prior to signing and broadcast. Defaults to false.
          example: false
        disable_dynamic_nonce:
          type: boolean
          description: >-
            Option to disable dynamic nonce when creating a transaction.
            Defaults to false.
          example: false
        replaced_transaction_id:
          type: string
          description: >-
            Transaction ID to replace (for speed-up/cancel operations). Common
            use cases: 1) Gas Price Adjustments: When a transaction is stuck due
            to low gas price, a new transaction with the same nonce but higher
            gas price can be submitted to replace it. 2) Transaction
            Cancellation: A user might want to cancel a pending transaction by
            replacing it with a new transaction (often a 0-value transfer to
            themselves with higher gas price). Note: When using this field, the
            disable_dynamic_nonce option must be set to false because the nonce
            would be automatically managed by the system.
          example: 0bf7bf1e-bafa-4d7e-9312-fa0bf3b63f27
        chain_id:
          type: string
          description: Chain ID for EVM transactions. (EVM-only)
          example: '1'
        network_name:
          type: string
          description: Network name for EVM transactions. (EVM-only)
          example: Ethereum
    coinbase.public_rest_api.CreateOnchainTransactionResponse:
      type: object
      properties:
        transaction_id:
          type: string
          description: Unique identifier for the created transaction
          example: 0bf7bf1e-bafa-4d7e-9312-fa0bf3b63f27

````