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

# List Max

Find the maximum numeric value in a list. Accepts an array of numbers or numeric strings and returns the largest value along with its index. Useful for finding highest prices, largest balances, top values, etc.

Built-in action Built In

Find the maximum numeric value in a list. Accepts an array of numbers or numeric strings and returns the largest value along with its index. Useful for finding highest prices, largest balances, top values, etc.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `list-max` |
| Category | Built In |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `utility`, `transformer`, `list`, `max`, `maximum`, `aggregate`, `math` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `values` | `array` | Yes | Array of numbers or numeric strings to find the maximum of. Supports workflow variables like &#123;&#123;node.result.prices&#125;&#125;. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `result` | `string` | Yes | The maximum value as a string. |
| `index` | `number` | Yes | Zero-based index of the maximum value in the original array. |

## Examples

**Workflow node**

```json
{
  "type": "list-max",
  "payload": {
    "values": [
      10,
      5,
      20,
      3,
      15
    ]
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/list-max/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "values": [
      10,
      5,
      20,
      3,
      15
    ]
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.