DevelopmentCreate Stock Class

Create a Stock Class

Stock classes define the types of equity your company can issue (e.g., Common, Preferred Series A). You must create at least one stock class before issuing stock to stakeholders.

The primary /app flow submits createStockClass from the connected ADMIN wallet and, after confirmation, saves OCF metadata through POST /stock-class/register-onchain. The server-signed API alternative below requires a configured operator key.

Send a POST request

Using Postman or curl, send a POST request to http://localhost:8293/stock-class/create

{
    "issuerId": "<YOUR_ISSUER_ID>",
    "data": {
        "name": "Series A Common",
        "class_type": "COMMON",
        "default_id_prefix": "CS-A",
        "initial_shares_authorized": "1000000",
        "votes_per_share": "1",
        "price_per_share": {
            "currency": "USD",
            "amount": "4.20"
        },
        "seniority": "1",
        "comments": []
    }
}

Replace <YOUR_ISSUER_ID> with the _id from your issuer creation response.

Check the response

The response includes your new stock class:

{
    "stockClass": {
        "_id": "<GENERATED_STOCK_CLASS_ID>",
        "object_type": "STOCK_CLASS",
        "name": "Series A Common",
        "class_type": "COMMON",
        "default_id_prefix": "CS-A",
        "initial_shares_authorized": "1000000",
        "votes_per_share": "1",
        "price_per_share": {
            "currency": "USD",
            "amount": "4.20"
        },
        "seniority": "1",
        "comments": [],
        "issuer": "<YOUR_ISSUER_ID>",
        "is_onchain_synced": false
    }
}

On the server-signed /create path, is_onchain_synced starts as false and the event poller updates it after processing the confirmed event. The wallet-first /register-onchain path records the already-confirmed write as synced immediately.

Required fields

FieldDescription
nameDisplay name (Series A Common, Series Seed Preferred, etc.).
class_typeCOMMON or PREFERRED.
default_id_prefixShort prefix used to label issuances of this class (CS-A, PA).
initial_shares_authorizedAuthorized shares for this class — must be ≤ the issuer’s initial_shares_authorized.
votes_per_shareVoting weight per share. "1" is one-vote-per-share; "0" for non-voting.
price_per_share.amountHuman price per share. The contract stores it scaled by 1e10 (10,000,000,000) — see the scaling note.
seniorityLiquidation rank as a string integer. Lower numbers liquidate first; common stock typically uses "1".

Stock class types

The class_type field accepts these values per the OCF standard:

  • COMMON — Standard common stock
  • PREFERRED — Preferred stock (typically with liquidation preferences)

What’s next?