Skip to content
This new developer portal is under construction. For complete documentation, please refer to the old developer portal.

Creating assets

Transaction Authorizer: Any account with sufficient Algo balance

Create assets using either the SDKs or goal. When using the SDKs supply all creation parameters. With goal, managing the various addresses associated with the asset must be done after executing an asset creation. See Modifying an Asset in the next section for more details on changing addresses for the asset.

1
"""
2
Send an asset create transaction creating a fungible ASA with 10 million units
3
4
Parameters for creating a new asset.
5
- sender: The address of the account that will send the transaction
6
- total: The total amount of the smallest divisible unit to create
7
- decimals: The amount of decimal places the asset should have, defaults to None
8
- default_frozen: Whether the asset is frozen by default in the creator address, defaults to None
9
- manager: The address that can change the manager, reserve, clawback, and freeze addresses, defaults to None
10
- reserve: The address that holds the uncirculated supply, defaults to None
11
- freeze: The address that can freeze the asset in any account, defaults to None
12
- clawback: The address that can clawback the asset from any account, defaults to None
13
- unit_name: The short ticker name for the asset, defaults to None
14
- asset_name: The full name of the asset, defaults to None
15
"""
16
txn_result = algorand_client.send.asset_create(
17
AssetCreateParams(
18
sender=account_a.address,
19
total=10_000_000,
20
decimals=6,
21
default_frozen=False, # optional
22
manager=account_a.address, # optional. Can be permanently disabled by setting to None
23
reserve=account_a.address, # optional. Can be permanently disabled by setting to None
24
freeze=account_a.address, # optional. Can be permanently disabled by setting to None
25
clawback=account_a.address, # optional. Can be permanently disabled by setting to None
26
unit_name="MYA",
27
asset_name="My Asset",
28
)
29
)
30
31
"""
32
Send an asset create transaction creating a 1 to 1 unique NFT
33
"""
34
txn_result = algorand_client.send.asset_create(
35
AssetCreateParams(
36
sender=account_a.address,
37
total=1,
38
asset_name="My NFT",
39
unit_name="MNFT",
40
decimals=0,
41
url="metadata URL",
42
metadata_hash=b"Hash of the metadata URL",
43
)
44
)

See also