---
id: "P:cAlgo.API.CustomSymbol.SwapLong"
kind: "property"
type: "T:cAlgo.API.CustomSymbol"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/SwapLong/"
---

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

# CustomSymbol.SwapLong

Member of [CustomSymbol](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbol/index.md).

## SwapLong

Gets / sets the SWAP charge for long positions of the symbol.

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
double SwapLong {get; set;}
```

Python:

```python
customSymbol.SwapLong: float
```

### Returns

`double` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips;
customSymbol.SwapLong = -6.5;
Print("Swap long: {0} pips", customSymbol.SwapLong);
```

Python:

```python
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.SwapCalculationType = SymbolSwapCalculationType.Pips
customSymbol.SwapLong = -6.5
api.Print(f"Swap long: {customSymbol.SwapLong} pips")
```

