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

# Create One-Time Wallet

> Creates the one-time wallet a lending position lives in. The returned `smart_wallet_id` identifies that position on every subsequent [`/borrow/initiate`](/api-reference/lending/initiate) and [`/borrow/settle`](/api-reference/lending/settle) call.

Unlike a trade wallet, this one is reused for the life of the position - provision it once, not per action. Requires a signature valid for 10 minutes; see [Signing Requests](/guide/integration/signing#signing-requests) and the [Lending Flow](/guide/integration/lending#open-a-position).



## OpenAPI

````yaml POST /borrow/smart-wallet
openapi: 3.0.1
info:
  title: Vanish Core API
  description: API endpoints for the Vanish Core service.
  license:
    name: MIT
  version: 2.0.0
servers:
  - url: https://core-api-dev.vanish.trade
security:
  - ApiKeyAuth: []
paths:
  /borrow/smart-wallet:
    post:
      summary: Create One-Time Wallet
      description: >-
        Creates the one-time wallet a lending position lives in. The returned
        `smart_wallet_id` identifies that position on every subsequent
        [`/borrow/initiate`](/api-reference/lending/initiate) and
        [`/borrow/settle`](/api-reference/lending/settle) call.


        Unlike a trade wallet, this one is reused for the life of the position -
        provision it once, not per action. Requires a signature valid for 10
        minutes; see [Signing
        Requests](/guide/integration/signing#signing-requests) and the [Lending
        Flow](/guide/integration/lending#open-a-position).
      requestBody:
        description: Details of the one-time wallet request.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BorrowCreateSmartWalletRequest'
        required: true
      responses:
        '200':
          description: Successful one-time wallet response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowCreateSmartWalletResponse'
        '400':
          description: >-
            Bad request. The user address format is invalid, or the timestamp is
            outside the freshness window.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
        '401':
          description: >-
            Unauthorized. The request is missing a valid API key or the
            signature is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
        '429':
          description: >-
            Rate limit exceeded. Contact the Vanish team to raise your team's
            requests-per-second cap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
components:
  schemas:
    BorrowCreateSmartWalletRequest:
      required:
        - user_address
        - protocol_label
        - timestamp
        - user_signature
      type: object
      properties:
        user_address:
          description: The wallet address of the user who will own this one-time wallet.
          type: string
        protocol_label:
          description: >-
            Label identifying the protocol or integration this position belongs
            to. Free-form text - use it to identify the position in your own
            system.
          type: string
          example: kamino-lend-v2
        timestamp:
          description: >-
            Unix timestamp of the request (in milliseconds). Must be within 10
            minutes of server time. Can be provided as a string or a number
          oneOf:
            - type: string
              pattern: ^[0-9]+$
            - type: integer
              format: int64
        user_signature:
          description: >-
            A digital signature of 'By signing, I hereby agree to Vanish's Terms
            of Service and agree to be bound by them
            (docs.vanish.trade/legal/TOS)


            Details: borrow-smart-wallet:{protocol_label}:{timestamp}', signed
            by the user's wallet.
          type: string
    BorrowCreateSmartWalletResponse:
      required:
        - smart_wallet_id
        - address
      type: object
      properties:
        smart_wallet_id:
          description: >-
            Identifier of the position's one-time wallet. Pass this to
            /borrow/initiate and /borrow/settle.
          type: integer
          example: 4821
        address:
          description: >-
            The one-time wallet's Solana address. Set it as the signer for the
            instructions you send in main_tx.
          type: string
    BorrowError:
      required:
        - error
      type: object
      properties:
        error:
          description: >-
            The error code or short description. Endpoint errors use the HTTP
            status text (for example '400 Bad Request'); errors raised by the
            API key middleware and the rate limiter carry the description here
            instead.
          type: string
        message:
          description: >-
            The specific reason for the failure. Null on a signature
            verification failure, and absent entirely on API key and rate limit
            errors - check for the presence of this field rather than assuming
            every error body has the same shape.
          type: string
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````