> ## 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 Wallet

> Create a wallet. Note: The first ONCHAIN wallet for each network family must be created through the Prime UI.

<Info>
  **Supported Types**

  Currently, this endpoint can be used only to create vault wallets and onchain wallets that do not require key generation. The first EVM and first Solana onchain wallet in a portfolio must be created prior to creating subsequent EVM or Solana wallets in a portfolio via API.
</Info>

Use the Prime SDK or CLI to test this endpoint by following the [quickstart](/prime/introduction/quickstart) guide and running with the following examples

<Tabs>
  <Tab title="Java">
    ```java theme={null}
    WalletsService walletsService = PrimeServiceFactory.createWalletsService(client);

    CreateWalletRequest request = new CreateWalletRequest.Builder()
        .portfolioId("PORTFOLIO_ID_HERE")
        .type(WalletType.VAULT)
        .name("PRIME_API_EXAMPLE")
        .symbol("ETH")
        .build();

    CreateWalletResponse response = walletsService.createWallet(request);
    ```

    For more information, please visit the [Prime Java SDK](https://github.com/coinbase-samples/prime-sdk-java).
  </Tab>

  <Tab title=".NET">
    ```csharp wrap theme={null}
    var walletsService = new WalletsService(client);

    var request = new CreateWalletRequest("PORTFOLIO_ID_HERE")
    {
        Type = WalletType.VAULT,
        Name = "PRIME_API_EXAMPLE",
        Symbol = "ETH",
    }

    var response = walletsService.CreateWallet(request);
    ```

    For more information, please visit the [Prime .NET SDK](https://github.com/coinbase-samples/prime-sdk-dotnet).
  </Tab>

  <Tab title="Go">
    ```go wrap theme={null}
    walletsService := users.NewWalletsService(client)

    request := &users.CreateWalletRequest{
        PortfolioId: "PORTFOLIO_ID_HERE",
        Type: "VAULT",
        Name: "PRIME_API_EXAMPLE",
        Symbol: "ETH",
    }

    response, err := walletsService.CreateWallet(context.Background(), request)
    ```

    For more information, please visit the [Prime Go SDK](https://github.com/coinbase-samples/prime-sdk-go).
  </Tab>

  <Tab title="Python">
    ```python wrap theme={null}
    prime_client = PrimeClient(credentials)

    request = CreateWalletRequest(
        portfolio_id="PORTFOLIO_ID_HERE",
        name="PRIME_API_EXAMPLE",
        symbol="ETH",
        wallet_type="VAULT",
    )

    response = prime_client.create_wallet(request)
    ```

    For more information, please visit the [Prime Python SDK](https://github.com/coinbase-samples/prime-sdk-py).
  </Tab>

  <Tab title="CLI">
    ```bash wrap theme={null}
    primectl create-wallet --help
    ```

    For more information, please visit the [Prime CLI](https://github.com/coinbase-samples/prime-cli).
  </Tab>

  <Tab title="TS/JS">
    ```typescript wrap theme={null}
    const walletsService = new WalletsService(client);

    walletsService.getWalletDepositInstructions({
        portfolioId: 'PORTFOLIO_ID_HERE',
        type: WalletType.VAULT,
        name: "PRIME_API_EXAMPLE",
        symbol: "ETH",
    }).then(async (response) => {
        console.log('Wallet: ', response);
    })
    ```

    For more information, please visit the [Prime TS SDK](https://github.com/coinbase-samples/prime-sdk-ts).
  </Tab>
</Tabs>


## OpenAPI

````yaml POST  /v1/portfolios/{portfolio_id}/wallets
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:
    post:
      tags:
        - Wallets
      summary: Create Wallet
      description: >-
        Create a wallet. Note: The first ONCHAIN wallet for each network family
        must be created through the Prime UI.
      operationId: PrimeRESTAPI_CreateWallet
      parameters:
        - name: portfolio_id
          in: path
          description: Portfolio ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - name
                - symbol
              type: object
              properties:
                name:
                  title: The name of the wallet
                  type: string
                symbol:
                  title: >-
                    The asset stored in the wallet. Should not be specified when
                    wallet_type is ONCHAIN
                  type: string
                wallet_type:
                  $ref: '#/components/schemas/coinbase.public_rest_api.WalletType'
                idempotency_key:
                  title: idem
                  type: string
                network_family:
                  $ref: '#/components/schemas/coinbase.public_rest_api.NetworkFamily'
                network:
                  $ref: '#/components/schemas/coinbase.public_rest_api.Network'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.CreateWalletResponse
components:
  schemas:
    coinbase.public_rest_api.WalletType:
      title: Indicates the wallet type
      type: string
      description: |-
        - VAULT: A crypto vault
         - TRADING: A trading wallet
         - WALLET_TYPE_OTHER: Other wallet types (like consumer, etc)
         - QC: A QC Wallet
         - ONCHAIN: An Onchain wallet
      enum:
        - VAULT
        - TRADING
        - WALLET_TYPE_OTHER
        - QC
        - ONCHAIN
    coinbase.public_rest_api.NetworkFamily:
      type: string
      default: NETWORK_FAMILY_UNSPECIFIED
      enum:
        - NETWORK_FAMILY_UNSPECIFIED
        - NETWORK_FAMILY_EVM
        - NETWORK_FAMILY_SOLANA
    coinbase.public_rest_api.Network:
      type: object
      properties:
        id:
          title: The name of the network
          type: string
          description: 'The network id: base, bitcoin, ethereum, solana etc'
        type:
          title: The network type
          type: string
          description: 'The network type: mainnet, testnet, etc'
    coinbase.public_rest_api.CreateWalletResponse:
      type: object
      properties:
        activity_id:
          title: The id of activity
          type: string
        name:
          title: The name of the wallet
          type: string
        symbol:
          title: The asset stored in the wallet
          type: string
        wallet_type:
          $ref: '#/components/schemas/coinbase.public_rest_api.WalletType'
        network_family:
          $ref: '#/components/schemas/coinbase.public_rest_api.NetworkFamily'

````