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

# Create Group with Fresh Wallets



## OpenAPI

````yaml POST /api/v2/wallet-groups/with-wallets
openapi: 3.0.3
info:
  description: Multi-chain DEX trading API for developers
  license:
    name: ''
  title: Shuriken API v2
  version: 2.0.0
servers:
  - url: https://api.shuriken.trade
security: []
tags:
  - description: SplitNOW cross-chain split plan + execute
    name: V2 Splits
  - description: Wallet archive lifecycle (archive / unarchive / bulk-archive)
    name: Wallets
  - description: Token discovery, metadata, and pricing
    name: V2 Tokens
  - description: Quote and execute swaps
    name: V2 Swap
  - description: Limit orders and stop-loss
    name: V2 Trigger
  - description: Managed-agent invocation
    name: V2 Agents
  - description: Portfolio positions and PnL
    name: V2 Portfolio
  - description: User account management
    name: V2 Account
  - description: WebSocket stream discovery, session bootstrap, and channel authorization
    name: V2 WebSocket
  - description: Perpetual trading on Hyperliquid
    name: V2 Perps
  - description: Agent-proposed trade suggestions
    name: V2 Suggestions
paths:
  /api/v2/wallet-groups/with-wallets:
    post:
      tags:
        - super::wallet_groups
      summary: >-
        Atomic: create N fresh wallets and a wallet group containing them in a

        single transaction. Used by the treasury-agent surface and the
        terminal's

        "Generate new wallets" pathway.
      operationId: create_wallet_group_with_wallets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWalletGroupWithWalletsBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_WalletGroup'
          description: ''
        '400':
          description: >-
            GROUP_CHAIN_MISMATCH | GROUP_LIMIT_EXCEEDED |
            GROUP_COUNT_OUT_OF_RANGE | GROUP_NAME_INVALID | WALLET_CREATE_FAILED
      security:
        - bearer_auth: []
components:
  schemas:
    CreateWalletGroupWithWalletsBody:
      description: >-
        Request body for `POST /api/v2/wallet-groups/with-wallets`.


        Atomically creates a fresh wallet group plus N freshly-generated wallets
        on

        `chain`, in a single Prisma transaction. Wallets are auto-named

        `<name> 1..N` server-side.
      properties:
        chain:
          description: Chain. svm | base | bsc.
          type: string
        name:
          description: Group name (1-32 chars). Wallets are auto-named `<name> 1..N`.
          type: string
        walletCount:
          description: Number of fresh wallets. 1..=16.
          format: int32
          maximum: 16
          minimum: 1
          type: integer
      required:
        - name
        - chain
        - walletCount
      type: object
    ApiResponse_WalletGroup:
      description: V2 success response envelope
      properties:
        data:
          properties:
            archived:
              description: >-
                Derived: true iff every member wallet is ARCHIVED and members is
                non-empty.
              type: boolean
            chain:
              nullable: true
              type: string
            createdAt:
              type: string
            groupId:
              type: string
            name:
              type: string
            updatedAt:
              type: string
            walletIds:
              items:
                type: string
              type: array
          required:
            - groupId
            - name
            - walletIds
            - createdAt
            - updatedAt
            - archived
          type: object
        pagination:
          $ref: '#/components/schemas/PaginationInfo'
          nullable: true
        requestId:
          type: string
      required:
        - data
        - requestId
      type: object
    PaginationInfo:
      description: Page-based pagination info (per RFC)
      properties:
        hasMore:
          type: boolean
        limit:
          format: int32
          minimum: 0
          type: integer
        page:
          format: int32
          minimum: 0
          type: integer
        total:
          format: int32
          minimum: 0
          nullable: true
          type: integer
      required:
        - page
        - limit
        - hasMore
      type: object
  securitySchemes:
    bearer_auth:
      bearerFormat: JWT or sk_{keyId}_{secret}
      description: >-
        Use `Authorization: Bearer <jwt>` for user auth or `Authorization:
        Bearer sk_{keyId}_{secret}` for API key auth.
      scheme: bearer
      type: http

````