Deploy and Mint a Fund via API
Step-by-step guide for creating and minting fund tokens using the ATK REST API
PREREQUISITES
- Platform URL –
https://your-platform.example.com - Running ATK instance – DALP services + Portal
- Account with PINCODE enabled –
/account/profile - Admin access – needed to grant system roles
- Fund prospectus finalized – share class, NAV currency, management fee, redemption rules from the fund issuance guide
- Compliance configuration – know the initial module pairs (KYC tiers, jurisdiction gates, redemption controls)
You'll need:
- Wallet address (Step 2)
managementFeeBps(basis points; 150 = 1.5% per year)- Fund
class(ABSOLUTE_RETURN,LONG_SHORT_EQUITY, etc.) andcategory(MULTI_STRATEGY,VENTURE_CAPITAL, etc.) - Optional ISIN (
uniqueIdentifier) if the fund is registered
Quick reference
| Step | What | Endpoint |
|---|---|---|
| 1 | Sign in | POST /api/auth/sign-in/email |
| 2 | Get user info | GET /api/user/me |
| 3 | Grant system roles | Set Up Roles guide |
| 4 | Create fund token | POST /api/token/create (type: "fund") |
| 5 | Grant token roles | POST /api/token/grant-role (Set Up Roles Step 4) |
| 6 | Unpause token | POST /api/token/{contract}/unpause |
| 7 | Mint fund units | POST /api/token/{contract}/mint |
| 8 | Verify balances & NAV claims | GET /api/token/{contract}/holders |
STEP-BY-STEP COMMANDS
Step 1: sign in
curl -v -X POST YOUR_PLATFORM_URL/api/auth/sign-in/email \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{
"email": "YOUR_EMAIL",
"password": "YOUR_PASSWORD"
}'Step 2: fetch wallet + org context
curl -s YOUR_PLATFORM_URL/api/user/me \
-b cookies.txt | jq '.'Copy the wallet—it must appear in every grant call and script.
Step 3: grant system roles
Fund deployments require the tokenManager system role. If you will register claim topics for NAV attestations or redemption controls, also grant claimPolicyManager or complianceManager.
Use Set Up Roles Step 2 for system roles (admin only).
Step 4: create the fund
curl -v -X POST YOUR_PLATFORM_URL/api/token/create \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"type": "fund",
"name": "Global Growth Fund Class A",
"symbol": "GGFA",
"decimals": 18,
"countryCode": "056",
"priceCurrency": "USD",
"basePrice": "100.00",
"class": "LONG_SHORT_EQUITY",
"category": "MULTI_STRATEGY",
"managementFeeBps": 150,
"uniqueIdentifier": "BE0003796134",
"initialModulePairs": [],
"walletVerification": {
"secretVerificationCode": "YOUR_PINCODE",
"verificationType": "PINCODE"
}
}'Key fields:
decimals: 18 enables fractional units (recommended per fund guide). Use 0 only if your prospectus forbids fractional subscriptions.priceCurrency/basePrice: Encodes initial NAV in the dashboard (e.g., USD 100.00).class: Value fromfundClasses(strategy style such asABSOLUTE_RETURN,LONG_SHORT_EQUITY,REGIONAL).category: Value fromfundCategories(e.g.,VENTURE_CAPITAL,EQUITY_HEDGE,MULTI_STRATEGY).managementFeeBps: Integer between 0 and 10,000 (0%–100%) perbasisPointsschema. 150 = 1.5% annual management fee with daily accrual, matching the user guide’s fee automation.uniqueIdentifier: Optional ISIN for regulated funds.initialModulePairs: Compliance modules you selected during onboarding (leave[]to adopt defaults and configure later).
Expected: 200 OK with id for the fund contract and metadata containing NAV claims.
Step 5: grant token roles
Same pattern as other assets—supply management for subscriptions/redemptions and emergency for pause control:
curl -v -X POST YOUR_PLATFORM_URL/api/token/grant-role \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"contract": "YOUR_FUND_CONTRACT",
"address": "YOUR_WALLET_ADDRESS",
"roles": ["supplyManagement", "emergency"],
"walletVerification": {
"secretVerificationCode": "YOUR_PINCODE",
"verificationType": "PINCODE"
}
}'Add governance if you plan to update valuation or redemption parameters via server functions.
Step 6: unpause
curl -v -X POST YOUR_PLATFORM_URL/api/token/YOUR_FUND_CONTRACT/unpause \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"contract": "YOUR_FUND_CONTRACT",
"walletVerification": {
"secretVerificationCode": "YOUR_PINCODE",
"verificationType": "PINCODE"
}
}'Step 7: mint fund units
curl -v -X POST YOUR_PLATFORM_URL/api/token/YOUR_FUND_CONTRACT/mint \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"contract": "YOUR_FUND_CONTRACT",
"recipients": ["RECIPIENT_WALLET"],
"amounts": ["100000000000000000000"],
"walletVerification": {
"secretVerificationCode": "YOUR_PINCODE",
"verificationType": "PINCODE"
}
}'With 18 decimals, "100000000000000000000" = 100 fund units (matching subscription allotments described in the user guide).
Step 8: verify holders + NAV claims
curl -s YOUR_PLATFORM_URL/api/token/YOUR_FUND_CONTRACT/holders?tokenAddress=YOUR_FUND_CONTRACT \
-b cookies.txt | jq '.'The response lists holder balances plus identity claims (NAV, management fee, optional ISIN), mirroring the dashboard view.
FULL SCRIPT
#!/bin/bash
EMAIL="YOUR_EMAIL"
PASSWORD="YOUR_PASSWORD"
PINCODE="YOUR_PINCODE"
RECIPIENT="RECIPIENT_WALLET"
BASE_URL="YOUR_PLATFORM_URL"
curl -s -X POST $BASE_URL/api/auth/sign-in/email \
-H "Content-Type: application/json" \
-c cookies.txt \
-d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\"}" > /dev/null
USER=$(curl -s $BASE_URL/api/user/me -b cookies.txt)
WALLET=$(echo $USER | jq -r '.wallet')
echo "Wallet: $WALLET"
echo "Create fund..."
CREATE=$(curl -s -X POST $BASE_URL/api/token/create \
-H "Content-Type: application/json" \
-b cookies.txt \
-d "{\"type\":\"fund\",\"name\":\"Global Growth Fund Class A\",\"symbol\":\"GGFA\",\"decimals\":18,\"countryCode\":\"056\",\"priceCurrency\":\"USD\",\"basePrice\":\"100.00\",\"class\":\"LONG_SHORT_EQUITY\",\"category\":\"MULTI_STRATEGY\",\"managementFeeBps\":150,\"uniqueIdentifier\":\"BE0003796134\",\"initialModulePairs\":[],\"walletVerification\":{\"secretVerificationCode\":\"$PINCODE\",\"verificationType\":\"PINCODE\"}}")
CONTRACT=$(echo $CREATE | jq -r '.id')
echo "Fund contract: $CONTRACT"
echo "Grant roles..."
curl -s -X POST $BASE_URL/api/token/grant-role \
-H "Content-Type: application/json" \
-b cookies.txt \
-d "{\"contract\":\"$CONTRACT\",\"address\":\"$WALLET\",\"roles\":[\"supplyManagement\",\"emergency\"],\"walletVerification\":{\"secretVerificationCode\":\"$PINCODE\",\"verificationType\":\"PINCODE\"}}" > /dev/null
echo "Unpause..."
curl -s -X POST $BASE_URL/api/token/$CONTRACT/unpause \
-H "Content-Type: application/json" \
-b cookies.txt \
-d "{\"contract\":\"$CONTRACT\",\"walletVerification\":{\"secretVerificationCode\":\"$PINCODE\",\"verificationType\":\"PINCODE\"}}" > /dev/null
echo "Mint 100 units..."
MINT=$(curl -s -X POST $BASE_URL/api/token/$CONTRACT/mint \
-H "Content-Type: application/json" \
-b cookies.txt \
-d "{\"contract\":\"$CONTRACT\",\"recipients\":[\"$RECIPIENT\"],\"amounts\":[\"100000000000000000000\"],\"walletVerification\":{\"secretVerificationCode\":\"$PINCODE\",\"verificationType\":\"PINCODE\"}}")
echo $MINT | jq '.'
echo "Holder snapshot..."
curl -s $BASE_URL/api/token/$CONTRACT/holders?tokenAddress=$CONTRACT -b cookies.txt | jq '.token.balances'Amount calculations
- With 18 decimals (default for funds), multiply by
10^18.- 1 unit →
1000000000000000000 - 10 units →
10000000000000000000 - 100 units →
100000000000000000000
- 1 unit →
- With 0 decimals (whole units only), the amount is the literal unit count.
Formula: on-chain amount = desired_units * 10^decimals.
Troubleshooting
- "tokenManager required" → Grant via Set Up Roles Step 2.
- "Basis points cannot exceed 10000" → Keep
managementFeeBpsbetween 0 and 10,000. - "Invalid enum value" for class/category → Use values from
fundClasses/fundCategories(e.g.,LONG_SHORT_EQUITY,VENTURE_CAPITAL). - "Token is paused" → Run Step 6 and ensure
emergencyrole is assigned. - "Permission denied" during mint → Confirm
supplyManagementrole. - "PINCODE_INVALID" → Reset or re-enter PINCODE.
- Need
jq? →brew install jq(macOS) orapt install jq(Debian/Ubuntu).