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

# Create new Wallet



## OpenAPI

````yaml Wallet post /
openapi: 3.0.1
info:
  title: Wallet
  description: wallet
  version: 1.0.0
servers:
  - url: https://gateway.varchev.com/wallet
security:
  - default: []
paths:
  /:
    post:
      tags:
        - Wallets
      summary: Create new Wallet
      operationId: rootPOST
      parameters:
        - name: tenantId
          in: header
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Sample Payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWalletequest'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWalletsResponse'
              examples:
                trading_wallet_master_hot_01:
                  value:
                    $ref: >-
                      #/components/examples/demo_trading_wallet_hot_with_references/value
                trading_wallet_master_cold_01:
                  value:
                    $ref: '#/components/examples/demo_trading_wallet_cold/value'
                trading_wallet_cold_01:
                  value:
                    $ref: '#/components/examples/demo_customer_trading_wallet/value'
                gp_wallet_master_hot_01:
                  value:
                    $ref: >-
                      #/components/examples/demo_general_purpose_wallet_hot/value
                gp_wallet_master_cold_01:
                  value:
                    $ref: >-
                      #/components/examples/demo_general_purpose_wallet_cold/value
                gp_wallet_cold_01:
                  value:
                    $ref: >-
                      #/components/examples/demo_customer_general_purpose_wallet/value
                saving_wallet_cold_01:
                  value:
                    $ref: '#/components/examples/demo_customer_saving_wallet/value'
        default:
          description: unsuccessful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - default: []
components:
  schemas:
    CreateWalletequest:
      required:
        - customerId
        - isLive
        - ownerId
        - purpose
      type: object
      properties:
        purpose:
          type: string
        ownerId:
          type: integer
        isLive:
          type: boolean
        customerId:
          type: integer
        parentWalletId:
          type: string
    GetWalletsResponse:
      properties:
        value:
          $ref: '#/components/schemas/Wallet'
      example:
        value:
          Status:
            isError: true
            code: 6
            description: description
            type: done
          isLive: true
          assets: ''
          purpose: purpose
          customerId: 0
          linkedWallets: ''
          parentWalletId:
            refferTo: ''
          id:
            auditData:
              createdAt: '2000-01-23T04:56:07.000Z'
              archivedAt: '2000-01-23T04:56:07.000Z'
              deletedAt: '2000-01-23T04:56:07.000Z'
              updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
              createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
              deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
              updatedAt: '2000-01-23T04:56:07.000Z'
            tenantId: tenantId
            entityId: ''
            ownerId: ownerId
          type: general_purpose
    ErrorResponse:
      properties:
        httpCode:
          type: number
        internalCode:
          type: number
        internalType:
          type: string
        severity:
          type: string
        description:
          type: string
    Wallet:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        purpose:
          type: string
        customerId:
          type: integer
          format: int64
        parentWalletId:
          $ref: '#/components/schemas/IdRef'
        isLive:
          type: boolean
        assets:
          oneOf:
            - $ref: '#/components/schemas/AssetCollection'
            - $ref: '#/components/schemas/ManyReferences'
        type:
          $ref: '#/components/schemas/WalletType'
        Status:
          $ref: '#/components/schemas/WalletStatus'
      example:
        Status:
          isError: true
          code: 6
          description: description
          type: done
        isLive: true
        assets: ''
        purpose: purpose
        customerId: 0
        linkedWallets: ''
        parentWalletId:
          refferTo: ''
        id:
          auditData:
            createdAt: '2000-01-23T04:56:07.000Z'
            archivedAt: '2000-01-23T04:56:07.000Z'
            deletedAt: '2000-01-23T04:56:07.000Z'
            updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            updatedAt: '2000-01-23T04:56:07.000Z'
          tenantId: tenantId
          entityId: ''
          ownerId: ownerId
        type: general_purpose
    Identity:
      type: object
      properties:
        tenantId:
          type: string
        ownerId:
          type: string
        entityId:
          oneOf:
            - $ref: '#/components/schemas/GlobalID'
            - $ref: '#/components/schemas/StringID'
            - $ref: '#/components/schemas/NumericID'
        auditData:
          $ref: '#/components/schemas/AuditDetail'
      example:
        auditData:
          createdAt: '2000-01-23T04:56:07.000Z'
          archivedAt: '2000-01-23T04:56:07.000Z'
          deletedAt: '2000-01-23T04:56:07.000Z'
          updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          updatedAt: '2000-01-23T04:56:07.000Z'
        tenantId: tenantId
        entityId: ''
        ownerId: ownerId
    IdRef:
      type: object
      properties:
        refferTo:
          oneOf:
            - $ref: '#/components/schemas/GlobalID'
            - $ref: '#/components/schemas/StringID'
            - $ref: '#/components/schemas/NumericID'
      example:
        refferTo: ''
    AssetCollection:
      type: object
      properties:
        hasMore:
          type: boolean
          default: true
        totalCount:
          type: number
          default: 0
        assets:
          type: array
          items:
            $ref: '#/components/schemas/Asset'
    ManyReferences:
      type: object
      properties:
        lazyLoad:
          type: boolean
          default: true
        totalNumber:
          type: number
          default: 0
        refferences:
          type: array
          items:
            $ref: '#/components/schemas/IdRef'
    WalletType:
      type: string
      enum:
        - general_purpose
        - spot_trading
        - saving
        - vault
        - shared
        - nostro
        - futures
        - stake
        - system_wallet
    WalletStatus:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        isError:
          type: boolean
        code:
          type: integer
        description:
          type: string
        type:
          type: string
          enum:
            - done
            - in_progress
            - error
            - unknown
            - cancelled
            - validation_fail
            - unauthorized
      example:
        isError: true
        code: 6
        description: description
        type: done
    GlobalID:
      type: object
      properties:
        v:
          type: string
          format: uuid
    StringID:
      type: object
      properties:
        v:
          type: string
    NumericID:
      type: object
      properties:
        v:
          type: string
    AuditDetail:
      properties:
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
        archivedAt:
          type: string
          format: date-time
        createdBy:
          type: string
          format: uuid
        updatedBy:
          type: string
          format: uuid
        deletedBy:
          type: string
          format: uuid
      example:
        createdAt: '2000-01-23T04:56:07.000Z'
        archivedAt: '2000-01-23T04:56:07.000Z'
        deletedAt: '2000-01-23T04:56:07.000Z'
        updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        updatedAt: '2000-01-23T04:56:07.000Z'
    Asset:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        purpose:
          type: string
        type:
          $ref: '#/components/schemas/AssetType'
        instance:
          oneOf:
            - $ref: '#/components/schemas/Currency'
            - $ref: '#/components/schemas/AnyObject'
        instanceBase:
          oneOf:
            - $ref: '#/components/schemas/CurrencyAlias'
            - $ref: '#/components/schemas/AnyObject'
        status:
          type: string
          description: wallet status in the asset
          enum:
            - new
            - available
            - pending
            - sold
            - verification
            - verification_denied
            - on_hold
            - suspicious
            - under_investigation
            - dispute_started
            - dispute_resolved
            - sanctioned
            - black_listed
            - transferred
            - close_requested
            - closed
        availableBalance:
          $ref: '#/components/schemas/AssetBalance'
        currentBalance:
          $ref: '#/components/schemas/AssetBalance'
        allowedOperations:
          oneOf:
            - $ref: '#/components/schemas/AssetOperationCollection'
            - $ref: '#/components/schemas/ManyReferences'
      example:
        instance: ''
        allowedOperations: ''
        purpose: purpose
        instanceBase: ''
        id:
          auditData:
            createdAt: '2000-01-23T04:56:07.000Z'
            archivedAt: '2000-01-23T04:56:07.000Z'
            deletedAt: '2000-01-23T04:56:07.000Z'
            updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            updatedAt: '2000-01-23T04:56:07.000Z'
          tenantId: tenantId
          entityId: ''
          ownerId: ownerId
        type: currency
        status: new
        availableBalance:
          balanceType: current
          name: name
          instanceRef:
            refferTo: ''
          value: value
    AssetType:
      type: string
      description: type of asset that can be storred in the walled
      enum:
        - currency
        - cryptocurrency
        - bank-card
        - transport-card
        - id-card
        - qr-code
        - linked_account
        - linked_external_account
    Currency:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - fiat
            - crypto
        decimal:
          type: number
        max_value:
          type: number
        aliases:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyAlias'
        blockchain:
          $ref: '#/components/schemas/BlockChain'
      example:
        euro:
          $ref: '#/components/examples/euro_currency'
    AnyObject:
      required:
        - name
        - type
        - value
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        name:
          type: string
        type:
          type: string
          enum:
            - number
            - boolean
            - json
            - string
            - json_array
            - protobuf
            - binary
            - timestamp
            - date
            - currency_ref
            - id_ref
        value:
          type: string
      example:
        name: name
        type: number
        value: value
    CurrencyAlias:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        name:
          type: string
        shortname:
          type: string
        scale:
          type: number
        sign:
          type: string
        picture:
          type: string
          format: base64
      example:
        euro_cent:
          $ref: '#/components/examples/euro_cent_currency_alias'
    AssetBalance:
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        name:
          type: string
        balanceType:
          type: string
          enum:
            - current
            - available
        value:
          type: string
        instanceRef:
          $ref: '#/components/schemas/IdRef'
        instanceBaseRef:
          $ref: '#/components/schemas/IdRef'
      example:
        balanceType: current
        name: name
        instanceRef:
          refferTo: ''
        value: value
    AssetOperationCollection:
      type: object
      properties:
        lazyLoad:
          type: boolean
          default: true
        totalNumber:
          type: number
          default: 0
        operations:
          type: array
          items:
            $ref: '#/components/schemas/AssetOperation'
    BlockChain:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - test
            - experimental
            - established
        users:
          type: array
          items:
            type: string
            enum:
              - persons
              - organizations
              - any
        walletTypes:
          type: array
          items:
            type: string
            enum:
              - dex
              - cex
        definition:
          $ref: '#/components/schemas/BlockChainDefinition'
        createdAt:
          type: string
        updatedAt:
          type: string
        tenantId:
          type: string
      example:
        bitcoin:
          $ref: '#/components/examples/bitcoin_blockchain'
    AssetOperation:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        operationType:
          type: string
          enum:
            - buy
            - sell
            - deposit
            - withdraw
            - transfer
            - freeze
            - reverse
        assetType:
          $ref: '#/components/schemas/AssetType'
        name:
          type: string
        isSameWallet:
          type: boolean
        operationDestination:
          $ref: '#/components/schemas/OperationDestination'
        limits:
          type: array
          items:
            $ref: '#/components/schemas/OperationLimit'
        fees:
          type: array
          items:
            $ref: '#/components/schemas/OperationFee'
      example:
        operationDestination:
          operationDestinationAddress:
            data:
              - name: name
                type: number
                value: value
              - name: name
                type: number
                value: value
            type: wallet_owner_platform
          type: asset
          direction: source
        isSameWallet: true
        fees:
          - paidBy: source
            feeSharing:
              destination:
                - null
                - null
            appliedTo: base
            feeApi: feeApi
            feeValue:
              balanceType: current
              name: name
              instanceRef:
                refferTo: ''
              value: value
            type: fixed
            group: 5.637376656633329
            order: 2.3021358869347655
          - paidBy: source
            feeSharing:
              destination:
                - null
                - null
            appliedTo: base
            feeApi: feeApi
            feeValue:
              balanceType: current
              name: name
              instanceRef:
                refferTo: ''
              value: value
            type: fixed
            group: 5.637376656633329
            order: 2.3021358869347655
        name: name
        operationType: buy
        id:
          auditData:
            createdAt: '2000-01-23T04:56:07.000Z'
            archivedAt: '2000-01-23T04:56:07.000Z'
            deletedAt: '2000-01-23T04:56:07.000Z'
            updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
            updatedAt: '2000-01-23T04:56:07.000Z'
          tenantId: tenantId
          entityId: ''
          ownerId: ownerId
        limits:
          - action: deny
            priority: 0.8008281904610115
            conditions:
              - priority: 1.4658129805029452
                operation: lessThan
                requirementType: kyc
                order: 5.962133916683182
              - priority: 1.4658129805029452
                operation: lessThan
                requirementType: kyc
                order: 5.962133916683182
            enforcementPoint:
              - UI
              - UI
            order: 6.027456183070403
          - action: deny
            priority: 0.8008281904610115
            conditions:
              - priority: 1.4658129805029452
                operation: lessThan
                requirementType: kyc
                order: 5.962133916683182
              - priority: 1.4658129805029452
                operation: lessThan
                requirementType: kyc
                order: 5.962133916683182
            enforcementPoint:
              - UI
              - UI
            order: 6.027456183070403
        assetType: currency
    BlockChainDefinition:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        data:
          type: array
          items:
            $ref: '#/components/schemas/AnyObject'
    OperationDestination:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        type:
          type: string
          enum:
            - asset
            - external_source
            - external_destination
        direction:
          type: string
          enum:
            - source
            - destination
        operationDestinationAddress:
          $ref: '#/components/schemas/OperationDestinationAddress'
      example:
        operationDestinationAddress:
          data:
            - name: name
              type: number
              value: value
            - name: name
              type: number
              value: value
          type: wallet_owner_platform
        type: asset
        direction: source
    OperationLimit:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        priority:
          type: number
          description: Highest the number highest priroty
        order:
          type: number
          description: order of condition in the group with same priority
          default: 0
        enforcementPoint:
          type: array
          items:
            type: string
            enum:
              - UI
              - Backend
              - Database
        action:
          type: string
          enum:
            - deny
            - allow_and_report
            - deny_and_report
            - ask_user
            - allow_once
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/LimitCondition'
      example:
        action: deny
        priority: 0.8008281904610115
        conditions:
          - priority: 1.4658129805029452
            operation: lessThan
            requirementType: kyc
            order: 5.962133916683182
          - priority: 1.4658129805029452
            operation: lessThan
            requirementType: kyc
            order: 5.962133916683182
        enforcementPoint:
          - UI
          - UI
        order: 6.027456183070403
    OperationFee:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        group:
          type: number
          description: group
          default: 0
        order:
          type: number
          description: order of fee in the group
          default: 0
        appliedTo:
          type: string
          enum:
            - base
            - result
        type:
          type: string
          enum:
            - fixed
            - fraction
        feeLimit:
          $ref: '#/components/schemas/OperationLimit'
        feeValue:
          $ref: '#/components/schemas/AssetBalance'
        paidBy:
          type: string
          enum:
            - source
            - destination
            - shared
            - tenant
            - owner
        feeSharing:
          $ref: '#/components/schemas/FeeSharing'
        feeApi:
          type: string
        defaultApiFee:
          $ref: '#/components/schemas/AssetBalance'
      example:
        paidBy: source
        feeSharing:
          destination:
            - null
            - null
        appliedTo: base
        feeApi: feeApi
        feeValue:
          balanceType: current
          name: name
          instanceRef:
            refferTo: ''
          value: value
        type: fixed
        group: 5.637376656633329
        order: 2.3021358869347655
    OperationDestinationAddress:
      required:
        - data
        - type
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        type:
          type: string
          enum:
            - wallet_owner_platform
            - wallet_owner_bank
            - wallet_owner_blockchain
            - swift_bank
            - sepa_bank
            - exchange
            - blockchain
        data:
          type: array
          items:
            $ref: '#/components/schemas/AnyObject'
      example:
        data:
          - name: name
            type: number
            value: value
          - name: name
            type: number
            value: value
        type: wallet_owner_platform
    LimitCondition:
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        priority:
          type: number
          description: Highest the number highest priroty
        order:
          type: number
          description: order of condition in the group with same priority
          default: 0
        requirementType:
          type: string
          enum:
            - kyc
            - kyb
            - peps
            - periodical_limit
            - object_ref
            - transaction_limit
            - customer_state
        operation:
          type: string
          enum:
            - lessThan
            - lessEqual
            - equal
            - isA
            - greaterTnan
            - notEqual
            - isNotA
            - betweenInclusive
            - betweenUpper
            - betweenOpen
            - betweenLower
            - contains
        objectRef:
          $ref: '#/components/schemas/AnyObject'
        value:
          $ref: '#/components/schemas/AnyObject'
      example:
        priority: 1.4658129805029452
        operation: lessThan
        requirementType: kyc
        order: 5.962133916683182
    FeeSharing:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        source:
          $ref: '#/components/schemas/AssetBalance'
        destination:
          type: array
          items:
            $ref: '#/components/schemas/AssetBalance'
      example:
        destination:
          - null
          - null
  securitySchemes:
    default:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://test.com
          scopes: {}

````