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

# Create account

> Create a Tokenized Assets Account for a wallet address.

Before trading tokenized assets, the owner must create a Tokenized Assets
Account. Each wallet address has one Tokenized Assets Account per chain.

Returns an unsigned transaction to create the account. The `sender` signs
and broadcasts this transaction.

**If owner pays gas:** Set `sender` to the owner's address.

**If someone else pays gas:** Set `sender` to the wallet that will sign and
broadcast the transaction on behalf of the owner.



## OpenAPI

````yaml /v2/combined_spec.json post /v2/tokenized_assets/create_account
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v2/tokenized_assets/create_account:
    post:
      tags:
        - Tokenized Assets
      summary: Create account
      description: >-
        Create a Tokenized Assets Account for a wallet address.


        Before trading tokenized assets, the owner must create a Tokenized
        Assets

        Account. Each wallet address has one Tokenized Assets Account per chain.


        Returns an unsigned transaction to create the account. The `sender`
        signs

        and broadcasts this transaction.


        **If owner pays gas:** Set `sender` to the owner's address.


        **If someone else pays gas:** Set `sender` to the wallet that will sign
        and

        broadcast the transaction on behalf of the owner.
      operationId: v2_tokenized_assets_create_account
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenizedAssetsAccountRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenizedAssetsAccountResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.tokenized_assets.tokenized_assets_create_account(sender="0x18b42407AbC163f595410Ffe773BB98Db40B48F7", owner="0x18b42407AbC163f595410Ffe773BB98Db40B48F7", estimate_gas=True)

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.tokenizedAssets.tokenizedAssetsCreateAccount({
                sender: "0x18b42407AbC163f595410Ffe773BB98Db40B48F7",
                owner: "0x18b42407AbC163f595410Ffe773BB98Db40B48F7",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    CreateTokenizedAssetsAccountRequest:
      properties:
        sender:
          type: string
          title: Sender
          description: The address of the transaction sender.
          examples:
            - '0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B'
          default: '0x18b42407AbC163f595410Ffe773BB98Db40B48F7'
        owner:
          type: string
          title: Owner
          description: >-
            The address that will own and control the compass Tokenized Assets
            Account
          default: '0x18b42407AbC163f595410Ffe773BB98Db40B48F7'
          examples:
            - '0x18b42407AbC163f595410Ffe773BB98Db40B48F7'
        estimate_gas:
          type: boolean
          title: Estimate Gas
          description: >-
            Determines whether to estimate gas costs for transactions, also
            verifying that the transaction can be successfully executed.
          default: true
        chain:
          $ref: '#/components/schemas/Chain'
          description: >-
            Network to create the Tokenized Assets Account on (defaults to
            Ethereum). The account address is deterministic and identical across
            networks; RWA yield assets also trade on Base.
          default: ethereum
      type: object
      required:
        - sender
        - owner
      title: CreateTokenizedAssetsAccountRequest
      description: Request to create a compass Tokenized Assets Account.
      default:
        sender: '0x18b42407AbC163f595410Ffe773BB98Db40B48F7'
        owner: '0x18b42407AbC163f595410Ffe773BB98Db40B48F7'
    CreateTokenizedAssetsAccountResponse:
      properties:
        transaction:
          anyOf:
            - $ref: '#/components/schemas/UnsignedTransaction'
            - type: 'null'
          description: Transaction to create compass Tokenized Assets Account
          example:
            chainId: '0x1'
            data: 0x1688f0b9000000000000000000000000...
            from: '0xc98949522db2eE403d6c75E91DDEe875a824bB10'
            gas: '0x55730'
            maxFeePerGas: '0x3b9aca00'
            maxPriorityFeePerGas: '0x5f5e100'
            nonce: '0x2a'
            to: '0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2'
            value: '0x0'
        tokenized_assets_account_address:
          type: string
          title: Tokenized Assets Account Address
          description: >-
            Predicted address of the compass Tokenized Assets Account that will
            be deployed
          example: '0xaB5801a7D398351b8bE11C439e05C5B3259aeC9B'
      type: object
      required:
        - transaction
        - tokenized_assets_account_address
      title: CreateTokenizedAssetsAccountResponse
      description: >-
        Response containing unsigned transaction to create compass Tokenized
        Assets Account.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Chain:
      type: string
      enum:
        - base
        - ethereum
        - arbitrum
        - hyperevm
        - tempo
        - bsc
      title: Chain
      description: The chain to use.
    UnsignedTransaction:
      properties:
        chainId:
          type: string
          title: Chainid
          description: The chain id of the transaction
        data:
          type: string
          title: Data
          description: The data of the transaction
        from:
          type: string
          title: From
          description: The sender of the transaction
        gas:
          anyOf:
            - type: string
            - type: 'null'
          title: Gas
          description: The gas of the transaction
        to:
          type: string
          title: To
          description: The recipient of the transaction
        value:
          type: string
          title: Value
          description: The value of the transaction
        nonce:
          type: string
          title: Nonce
          description: The nonce of the address
        maxFeePerGas:
          type: string
          title: Maxfeepergas
          description: The max fee per gas of the transaction
        maxPriorityFeePerGas:
          type: string
          title: Maxpriorityfeepergas
          description: The max priority fee per gas of the transaction
      type: object
      required:
        - chainId
        - data
        - from
        - gas
        - to
        - value
        - nonce
        - maxFeePerGas
        - maxPriorityFeePerGas
      title: UnsignedTransaction
      example:
        chainId: '0x2105'
        data: >-
          0x1688f0b900000000000000000000000029fcb43b46531bca003ddc8fcb67ffe91900c762000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000675f4a3d
        from: '0x4A83b4413CF41C3244027e1590E35a0F48403F0c'
        gas: '0x7a120'
        maxFeePerGas: '0x59682f00'
        maxPriorityFeePerGas: '0x3b9aca00'
        nonce: '0x5'
        to: '0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67'
        value: '0x0'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````