# ftm.getHeads()

**Description:**\
Retrieves the IDs of all epoch events with no descendants.

**Parameters**

| **Name** | **Type**  | **Description**                                                                                                                                           |
| -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ctx`    | `context` | Execution context.                                                                                                                                        |
| `epoch`  | `integer` | <p>The epoch of the block.<br>- <code>-2</code>: Returns heads for the latest epoch.<br>- <code>-1</code>: Returns heads for the latest sealed epoch.</p> |

**Returns**

| **Type** | **Description**                              |
| -------- | -------------------------------------------- |
| `ids`    | IDs of all epoch events with no descendants. |
