> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Stock Split

> Execute a stock split or reverse split on a token

Executes a stock split by adjusting all holder balances according to the provided ratio. A `numerator` of 2 and `denominator` of 1 is a 2-for-1 forward split. A `numerator` of 1 and `denominator` of 2 is a 1-for-2 reverse split.

The `numerator` and `denominator` must both be positive integers and cannot be equal.

## Path Parameters

<ParamField path="tokenAddress" type="string" required>
  Address of the stock token contract.
</ParamField>

## Request Body

<ParamField body="numerator" type="integer" required>
  Split ratio numerator. Must be a positive integer.
</ParamField>

<ParamField body="denominator" type="integer" required>
  Split ratio denominator. Must be a positive integer and different from `numerator`.
</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="success" type="boolean">Calldata was built successfully.</ResponseField>

    <ResponseField name="txData" type="object">
      The unsigned transaction. `to` is the token contract, `data` is the encoded `stockSplit` call, and `value` is always `"0"`.
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  Nothing is submitted on your behalf. Sign `txData` with a wallet holding the required role on the token and broadcast it yourself.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.trusset.org/stocks/api/tokenization/0x1234.../stock-split" \
    -H "Content-Type: application/json" \
    -H "X-API-Key: trusset_abc123xy_secret..." \
    -d '{
      "numerator": 2,
      "denominator": 1
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
    `https://api.trusset.org/stocks/api/tokenization/${tokenAddress}/stock-split`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': 'trusset_abc123xy_secret...'
      },
      body: JSON.stringify({
        numerator: 2,
        denominator: 1
      })
    }
  );
  const { data } = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "success": true,
      "txData": {
        "to": "0x1234567890abcdef1234567890abcdef12345678",
        "data": "0xa9b0c1d2...",
        "value": "0"
      }
    },
    "metadata": {
      "requestId": "550e8400-e29b-41d4-a716-446655440000",
      "timestamp": "2025-06-15T12:00:00.000Z",
      "instanceId": "inst_abc123"
    }
  }
  ```

  ```json Error - Invalid Ratio theme={null}
  {
    "success": false,
    "error": {
      "code": "INVALID_RATIO",
      "message": "Invalid split ratio"
    },
    "metadata": {
      "requestId": "550e8400-e29b-41d4-a716-446655440000",
      "timestamp": "2025-06-15T12:00:00.000Z",
      "instanceId": "inst_abc123"
    }
  }
  ```
</ResponseExample>
