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

# Simulate an enter

> Estimate gas for an enter action without creating an action or transactions.

Same body as [Enter a yield](/api-reference/ActionsController_enterYield). Returns `200` with an `ActionSimulationDto`: `gas` (aggregate `amount`, `token`, `gasLimit`, and a per-transaction `transactions[]` breakdown) and, for Solana enters, `entryReserveEstimate`. Nothing is created or persisted, so there are no transactions to sign and no action id.

A `200` does not guarantee the real action succeeds on-chain, because construction-level prechecks can be skipped. Errors: `400`, `403` (geo-blocked), `400` (unknown or not enabled yield) and `412` when the yield is closed for new deposits. See [Errors and retries](/api-reference/errors-retries).


## OpenAPI

````yaml openapi.json POST /v1/actions/enter/simulate
openapi: 3.0.0
info:
  title: 'Yield API: Earn'
  description: API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.yield.xyz
    description: Production
security: []
tags:
  - name: Discovery
    description: >-
      Browse and discover yield opportunities, networks, and providers, plus
      yield-level risk, reward rate, and TVL data
  - name: Portfolio
    description: User-specific balances and KYC status
  - name: Actions
    description: Generate transactions to enter, exit, and manage yields
externalDocs:
  description: For more information
  url: https://docs.yield.xyz
paths:
  /v1/actions/enter/simulate:
    post:
      tags:
        - Actions
      summary: Simulate entering a yield
      description: >-
        Simulates an enter action without creating or persisting an action or
        transactions. The response is sectioned so it can grow additively: v1
        returns `gas` (and `entryReserveEstimate` for Solana enters); fee and
        execution-outcome sections will be added as further optional keys. A 200
        does not guarantee the action would succeed on-chain —
        construction-level prechecks may be skipped during simulation.
      operationId: ActionsController_simulateEnter_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateActionDto'
      responses:
        '200':
          description: Simulation result for the enter action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionSimulationDto'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Validation failed
                  error:
                    type: string
                    example: Bad Request
                  statusCode:
                    type: number
                    example: 400
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid API key
                  error:
                    type: string
                    example: Unauthorized
                  statusCode:
                    type: number
                    example: 401
        '403':
          description: Access denied due to geolocation restrictions
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Access denied from US (US-CA)
                  error:
                    type: string
                    example: Forbidden
                  statusCode:
                    type: number
                    example: 403
        '404':
          description: Yield not found with the specified ID
        '412':
          description: Yield is currently closed for new deposits
        '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:
                  message:
                    type: string
                    example: Rate limit exceeded
                  error:
                    type: string
                    example: Too Many Requests
                  statusCode:
                    type: number
                    example: 429
                  retryAfter:
                    type: number
                    example: 30
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Internal server error
                  error:
                    type: string
                    example: Internal Server Error
                  statusCode:
                    type: number
                    example: 500
      security:
        - ApiKey: []
components:
  schemas:
    CreateActionDto:
      type: object
      properties:
        yieldId:
          type: string
          description: Yield ID to perform the action on
          example: ethereum-eth-lido-staking
        address:
          type: string
          description: User wallet address
          example: 0x1234...
        arguments:
          description: Arguments for the action
          allOf:
            - $ref: '#/components/schemas/ActionArgumentsDto'
      required:
        - yieldId
        - address
    ActionSimulationDto:
      type: object
      properties:
        gas:
          description: Estimated gas cost of the action, aggregated and per transaction.
          allOf:
            - $ref: '#/components/schemas/SimulationGasDto'
        entryReserveEstimate:
          type: string
          description: >-
            Total SOL side-reserve required for enter validation: account rent
            plus ~0.005 SOL priority-fee buffer. For max native-SOL deposit use
            balance minus this value; do not also subtract the gas amount. Only
            returned on enter simulations; omitted for exits and when
            unavailable.
      required:
        - gas
    ActionArgumentsDto:
      type: object
      properties:
        amount:
          type: string
          description: >-
            Amount in human-readable token units, not the smallest denomination.
            For example, "1.500000" for 1.5 USDC (6 decimals) or "0.01" for 0.01
            ETH (18 decimals). Precision up to the token's decimal places is
            supported. Mutually exclusive with amountRaw.
          example: '1.500000'
        amountRaw:
          type: string
          description: >-
            Amount in the smallest denomination (wei for ETH, satoshi for BTC,
            etc.). For example, "1500000" for 1.5 USDC (6 decimals) or
            "10000000000000000" for 0.01 ETH (18 decimals). Mutually exclusive
            with amount.
          example: '1000000000000000000'
        amounts:
          description: >-
            Amounts in human-readable token units, not the smallest
            denomination. Precision up to the token's decimal places is
            supported.
          example:
            - '1.500000'
            - '2.000000'
          type: array
          items:
            type: string
        shareAmount:
          type: string
          description: Share amount to withdraw
          example: '1.500000'
        shareAmountRaw:
          type: string
          description: Share amount to withdraw in raw decimals
          example: '1500000'
        validatorAddress:
          type: string
          description: Validator address for single validator selection
          example: cosmosvaloper1...
        validatorAddresses:
          description: Multiple validator addresses
          example:
            - cosmosvaloper1...
            - cosmosvaloper2...
          type: array
          items:
            type: string
        providerId:
          type: string
          description: Provider ID for Ethereum native staking
          example: kiln
        duration:
          type: number
          description: Duration for Avalanche native staking (in seconds)
          example: 1209600
        inputToken:
          type: string
          description: >-
            Token for deposits. Use "0x" for native token or provide the token
            address. For cross-chain deposits, also provide inputTokenNetwork.
          example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
        inputTokenNetwork:
          type: string
          description: >-
            Network for the input token. Required for cross-chain deposits when
            the token is on a different network than the vault.
          enum:
            - ethereum
            - ethereum-goerli
            - ethereum-holesky
            - ethereum-sepolia
            - ethereum-hoodi
            - arbitrum
            - base
            - base-sepolia
            - gnosis
            - optimism
            - polygon
            - polygon-amoy
            - starknet
            - zksync
            - linea
            - unichain
            - plume
            - monad-testnet
            - monad
            - robinhood
            - robinhood-testnet
            - arc-testnet
            - arc
            - avalanche-c
            - avalanche-c-atomic
            - avalanche-p
            - binance
            - celo
            - fantom
            - harmony
            - moonriver
            - okc
            - viction
            - core
            - sonic
            - plasma
            - katana
            - hyperevm
            - tempo
            - pharos
            - agoric
            - akash
            - axelar
            - band-protocol
            - bitsong
            - canto
            - chihuahua
            - comdex
            - coreum
            - cosmos
            - crescent
            - cronos
            - cudos
            - desmos
            - dydx
            - evmos
            - fetch-ai
            - gravity-bridge
            - injective
            - irisnet
            - juno
            - kava
            - ki-network
            - mars-protocol
            - nym
            - okex-chain
            - onomy
            - osmosis
            - persistence
            - quicksilver
            - regen
            - secret
            - sentinel
            - sommelier
            - stafi
            - stargaze
            - stride
            - teritori
            - tgrade
            - umee
            - sei
            - mantra
            - celestia
            - saga
            - zetachain
            - dymension
            - humansai
            - neutron
            - polkadot
            - kusama
            - westend
            - bittensor
            - aptos
            - binancebeacon
            - cardano
            - near
            - solana
            - solana-devnet
            - stellar
            - stellar-testnet
            - sui
            - tezos
            - tron
            - ton
            - ton-testnet
            - hyperliquid
        outputToken:
          type: string
          description: >-
            Token for withdrawals. Use "0x" for native token or provide the
            token address. For cross-chain withdrawals, also provide
            outputTokenNetwork.
          example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
        outputTokenNetwork:
          type: string
          description: >-
            Network for the output token. Required for cross-chain withdrawals
            when the destination is on a different network than the vault.
          enum:
            - ethereum
            - ethereum-goerli
            - ethereum-holesky
            - ethereum-sepolia
            - ethereum-hoodi
            - arbitrum
            - base
            - base-sepolia
            - gnosis
            - optimism
            - polygon
            - polygon-amoy
            - starknet
            - zksync
            - linea
            - unichain
            - plume
            - monad-testnet
            - monad
            - robinhood
            - robinhood-testnet
            - arc-testnet
            - arc
            - avalanche-c
            - avalanche-c-atomic
            - avalanche-p
            - binance
            - celo
            - fantom
            - harmony
            - moonriver
            - okc
            - viction
            - core
            - sonic
            - plasma
            - katana
            - hyperevm
            - tempo
            - pharos
            - agoric
            - akash
            - axelar
            - band-protocol
            - bitsong
            - canto
            - chihuahua
            - comdex
            - coreum
            - cosmos
            - crescent
            - cronos
            - cudos
            - desmos
            - dydx
            - evmos
            - fetch-ai
            - gravity-bridge
            - injective
            - irisnet
            - juno
            - kava
            - ki-network
            - mars-protocol
            - nym
            - okex-chain
            - onomy
            - osmosis
            - persistence
            - quicksilver
            - regen
            - secret
            - sentinel
            - sommelier
            - stafi
            - stargaze
            - stride
            - teritori
            - tgrade
            - umee
            - sei
            - mantra
            - celestia
            - saga
            - zetachain
            - dymension
            - humansai
            - neutron
            - polkadot
            - kusama
            - westend
            - bittensor
            - aptos
            - binancebeacon
            - cardano
            - near
            - solana
            - solana-devnet
            - stellar
            - stellar-testnet
            - sui
            - tezos
            - tron
            - ton
            - ton-testnet
            - hyperliquid
        subnetId:
          type: number
          description: Subnet ID for Bittensor staking
          example: 1
        tronResource:
          type: string
          description: Tron resource type for Tron staking
          enum:
            - BANDWIDTH
            - ENERGY
        feeConfigurationId:
          type: string
          description: Fee configuration ID for custom fee settings
          example: custom-fee-config-1
        cosmosPubKey:
          type: string
          description: Cosmos public key for Cosmos staking
          example: cosmospub1...
        tezosPubKey:
          type: string
          description: Tezos public key for Tezos staking
          example: edpk...
        cAddressBech:
          type: string
          description: Avalanche C-chain address
          example: 0x123...
        pAddressBech:
          type: string
          description: Avalanche P-chain address
          example: P-avax1...
        executionMode:
          type: string
          description: Transaction execution mode
          enum:
            - individual
            - batched
          example: individual
        ledgerWalletApiCompatible:
          type: boolean
          description: >-
            Transactions should have Ledger wallet API compatibility for
            hardware wallet users
          example: true
        useMaxAmount:
          type: boolean
          description: Use max amount for ERC4626 withdraw
          example: true
        useInstantExecution:
          type: boolean
          description: Use instant execution for exit (faster but may have fees)
          example: true
        useAutoClaim:
          type: boolean
          description: >-
            Authorize the redeem operator to auto-claim settled async
            redemptions (one-time per wallet)
          example: true
        skipPrechecks:
          type: boolean
          description: Skip pre-flight balance and rent checks
          example: false
        useMaxAllowance:
          type: boolean
          description: >-
            When true, ERC20 approval transactions use the maximum allowance
            (uint256.max) instead of the exact deposit amount. Useful to avoid
            repeated approval transactions on subsequent deposits.
          example: true
        feePayerAddress:
          type: string
          description: >-
            Fee payer address for gas-sponsored wallets (Solana). When provided,
            this address is used as the payer for account creation instructions
            and as the transaction-level fee payer.
          example: 7Qo3awoTH4y5Vui1FQwsncq2arYDzUuivdeWhwgnAvVo
        receiverAddress:
          type: string
          description: >-
            Receiver wallet address: ERC4626 vault flows, or on Solana the
            address for tokens after an optional post-exit swap
        rangeMin:
          type: string
          description: >-
            Minimum price bound for concentrated liquidity pools (as decimal
            string). Must be non-negative (can be 0) and less than rangeMax.
          example: '0.0'
        rangeMax:
          type: string
          description: >-
            Maximum price bound for concentrated liquidity pools (as decimal
            string). Must be positive and greater than rangeMin.
          example: '1.0'
        percentage:
          type: number
          description: >-
            Percentage of liquidity to exit (0-100). Required for partial exits
            from liquidity positions.
          example: 50
          minimum: 0
          maximum: 100
        tokenId:
          type: string
          description: >-
            NFT token ID for concentrated liquidity positions. Required for
            exiting specific positions.
          example: '12345'
    SimulationGasDto:
      type: object
      properties:
        amount:
          type: string
          nullable: true
        token:
          $ref: '#/components/schemas/TokenDto'
        gasLimit:
          type: string
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/TransactionGasEstimateDto'
      required:
        - amount
        - token
        - transactions
    TokenDto:
      type: object
      properties:
        symbol:
          type: string
          description: Token symbol
          example: ETH
        name:
          type: string
          description: Token name
          example: Ethereum
        decimals:
          type: number
          description: Token decimal places
          example: 18
        network:
          type: string
          description: Token network
          enum:
            - ethereum
            - ethereum-goerli
            - ethereum-holesky
            - ethereum-sepolia
            - ethereum-hoodi
            - arbitrum
            - base
            - base-sepolia
            - gnosis
            - optimism
            - polygon
            - polygon-amoy
            - starknet
            - zksync
            - linea
            - unichain
            - plume
            - monad-testnet
            - monad
            - robinhood
            - robinhood-testnet
            - arc-testnet
            - arc
            - avalanche-c
            - avalanche-c-atomic
            - avalanche-p
            - binance
            - celo
            - fantom
            - harmony
            - moonriver
            - okc
            - viction
            - core
            - sonic
            - plasma
            - katana
            - hyperevm
            - tempo
            - pharos
            - agoric
            - akash
            - axelar
            - band-protocol
            - bitsong
            - canto
            - chihuahua
            - comdex
            - coreum
            - cosmos
            - crescent
            - cronos
            - cudos
            - desmos
            - dydx
            - evmos
            - fetch-ai
            - gravity-bridge
            - injective
            - irisnet
            - juno
            - kava
            - ki-network
            - mars-protocol
            - nym
            - okex-chain
            - onomy
            - osmosis
            - persistence
            - quicksilver
            - regen
            - secret
            - sentinel
            - sommelier
            - stafi
            - stargaze
            - stride
            - teritori
            - tgrade
            - umee
            - sei
            - mantra
            - celestia
            - saga
            - zetachain
            - dymension
            - humansai
            - neutron
            - polkadot
            - kusama
            - westend
            - bittensor
            - aptos
            - binancebeacon
            - cardano
            - near
            - solana
            - solana-devnet
            - stellar
            - stellar-testnet
            - sui
            - tezos
            - tron
            - ton
            - ton-testnet
            - hyperliquid
          example: Ethereum
        address:
          type: string
          description: Token address (if applicable)
          example: 0x...
        logoURI:
          type: string
          description: Token logo URI
          example: https://...
        isPoints:
          type: boolean
          description: Token is points
          example: true
        coinGeckoId:
          type: string
          description: Token CoinGecko ID
          example: ethereum
      required:
        - symbol
        - name
        - decimals
        - network
    TransactionGasEstimateDto:
      type: object
      properties:
        amount:
          type: string
          nullable: true
        token:
          $ref: '#/components/schemas/TokenDto'
        gasLimit:
          type: string
        stepIndex:
          type: number
        type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TransactionType'
      required:
        - amount
        - token
        - stepIndex
        - type
    TransactionType:
      type: string
      enum:
        - SWAP
        - DEPOSIT
        - APPROVAL
        - STAKE
        - SET_OPERATOR
        - CLAIM_UNSTAKED
        - CLAIM_REWARDS
        - RESTAKE_REWARDS
        - UNSTAKE
        - SPLIT
        - MERGE
        - LOCK
        - UNLOCK
        - SUPPLY
        - ADD_LIQUIDITY
        - REMOVE_LIQUIDITY
        - BRIDGE
        - VOTE
        - REVOKE
        - RESTAKE
        - REBOND
        - WITHDRAW
        - WITHDRAW_ALL
        - CREATE_ACCOUNT
        - REVEAL
        - MIGRATE
        - DELEGATE
        - UNDELEGATE
        - UTXO_P_TO_C_IMPORT
        - UTXO_C_TO_P_IMPORT
        - WRAP
        - UNWRAP
        - UNFREEZE_LEGACY
        - UNFREEZE_LEGACY_BANDWIDTH
        - UNFREEZE_LEGACY_ENERGY
        - UNFREEZE_BANDWIDTH
        - UNFREEZE_ENERGY
        - FREEZE_BANDWIDTH
        - FREEZE_ENERGY
        - UNDELEGATE_BANDWIDTH
        - UNDELEGATE_ENERGY
        - P2P_NODE_REQUEST
        - CREATE_EIGENPOD
        - VERIFY_WITHDRAW_CREDENTIALS
        - START_CHECKPOINT
        - VERIFY_CHECKPOINT_PROOFS
        - QUEUE_WITHDRAWALS
        - COMPLETE_QUEUED_WITHDRAWALS
        - LZ_DEPOSIT
        - LZ_WITHDRAW
        - LUGANODES_PROVISION
        - LUGANODES_EXIT_REQUEST
        - INFSTONES_PROVISION
        - INFSTONES_EXIT_REQUEST
        - INFSTONES_CLAIM_REQUEST
        - BATCH
  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.