---
id: "P:cAlgo.API.OptimizationCompletedEventArgs.JsonReport"
kind: "property"
type: "T:cAlgo.API.OptimizationCompletedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/JsonReport/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# OptimizationCompletedEventArgs.JsonReport

Member of [OptimizationCompletedEventArgs](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationCompletedEventArgs/index.md).

## JsonReport

Gets the full optimization result as JSON (the `.optres` content).

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public string JsonReport {get;}
```

Python:

```python
optimizationCompletedEventArgs.JsonReport: str
```

### Returns

`string` — 

Available since cAlgo.API 5.9.

### Examples

C#:

```csharp
protected override void OnStart()
{
    Optimization.Completed += OnOptimizationCompleted;
}

private void OnOptimizationCompleted(OptimizationCompletedEventArgs args)
{
    if (args.JsonReport != null)
        LocalStorage.SetString("LastOptimizationResult", args.JsonReport);
}
```

Python:

```python
def on_start(self):
    api.Optimization.Completed += self.on_optimization_completed

def on_optimization_completed(self, args):
    if args.JsonReport is not None:
        api.LocalStorage.SetString("LastOptimizationResult", args.JsonReport)
```

