Skip to main content
POST
/
v2
/
tokenized_assets
/
create_account
Python (SDK)
from compass_api_sdk import CompassAPI, models


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

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

    # Handle response
    print(res)
{
  "transaction": {
    "chainId": "0x1",
    "data": "0x1688f0b9000000000000000000000000...",
    "from": "0xc98949522db2eE403d6c75E91DDEe875a824bB10",
    "gas": "0x55730",
    "maxFeePerGas": "0x3b9aca00",
    "maxPriorityFeePerGas": "0x5f5e100",
    "nonce": "0x2a",
    "to": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
    "value": "0x0"
  },
  "tokenized_assets_account_address": "0xaB5801a7D398351b8bE11C439e05C5B3259aeC9B"
}

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.

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Request to create a compass tokenized assets account.

chain
enum<string>
default:ethereum
required
Available options:
ethereum
sender
string
default:0x18b42407AbC163f595410Ffe773BB98Db40B48F7
required

The address of the transaction sender.

Example:

"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"

owner
string
default:0x18b42407AbC163f595410Ffe773BB98Db40B48F7
required

The address that will own and control the compass tokenized assets account

estimate_gas
boolean
default:true

Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.

Response

Successful Response

Response containing unsigned transaction to create compass tokenized assets account.

transaction
UnsignedTransaction · object
required

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
string
required

Predicted address of the compass tokenized assets account that will be deployed

Example:

"0xaB5801a7D398351b8bE11C439e05C5B3259aeC9B"