Create a Stock Class
Stock classes define the types of equity your company can issue, such as Common or Series A Preferred. You need at least one before you can issue stock.
In the app
Open the company and choose Stock classes (/app/companies/<issuerId>?view=stock-classes). Your wallet calls createStockClass. After the transaction confirms, the app saves the class details with POST /stock-class/register-onchain, using the same id it sent onchain, and marks the class as synced.
With the API
POST /stock-class/create creates the class onchain with the server key, then saves it in MongoDB under the same id. The server key needs OPERATOR or ADMIN on the cap table; see Server-signed routes.
These examples use $API and $ISSUER_ID from Create an Issuer.
curl -s -X POST "$API/stock-class/create" \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"issuerId": "$ISSUER_ID",
"data": {
"name": "Common Stock",
"class_type": "COMMON",
"default_id_prefix": "CS",
"initial_shares_authorized": "1000000",
"votes_per_share": "1",
"price_per_share": { "amount": "4.20", "currency": "USD" },
"seniority": "1",
"comments": []
}
}
JSONThe response is the saved class:
{
"stockClass": {
"_id": "<STOCK_CLASS_ID>",
"object_type": "STOCK_CLASS",
"name": "Common Stock",
"class_type": "COMMON",
"default_id_prefix": "CS",
"initial_shares_authorized": "1000000",
"votes_per_share": "1",
"price_per_share": { "amount": "4.20", "currency": "USD" },
"seniority": "1",
"comments": [],
"issuer": "<ISSUER_ID>",
"is_onchain_synced": false,
"tx_hash": null,
"createdAt": "2026-01-01T18:30:00.000Z",
"updatedAt": "2026-01-01T18:30:00.000Z",
"__v": 0
}
}Send human values. The contract stores price_per_share and initial_shares_authorized ×1e10, and the server does the scaling. See Scaling.
On this route, is_onchain_synced starts as false and turns true when the poller processes the class’s StockClassCreated event. The app’s register-onchain path saves it as true with the transaction hash.
export STOCK_CLASS_ID="<your stock class _id>"Fields
| Field | Required | Notes |
|---|---|---|
name | Yes | Display name, such as Common Stock or Series Seed Preferred. |
class_type | Yes | COMMON or PREFERRED. |
default_id_prefix | Yes | Short prefix for labeling issuances of this class, such as CS. |
initial_shares_authorized | Yes | Whole shares as a string. Keep it at or below the issuer’s authorized shares: the contract doesn’t check this when the class is created, but every issuance is capped by both limits. |
votes_per_share | Yes | "1" for one vote per share, "0" for non-voting. |
seniority | Yes | Repayment priority. Higher numbers are repaid first, and classes can share a number. |
price_per_share | Yes, for TAP | amount and currency. OCF makes it optional, but /stock-class/create reads price_per_share.amount. |