Forex Swap Cost
workflow.run_forex_swap_costTotal swap/rollover cost (or credit) for holding a forex position overnight, in the pair's own quote currency: no live FX rate needed. Swap rates are broker-set with no free live feed available, so swapPerLotPerNight is always a manual input (quoted per standard lot, matching how commission is quoted in workflow.run_forex_breakeven), not fetched. Negative = cost (you pay), positive = credit (you receive). The live variant is workflow.run_forex_swap_cost_live, which applies when the account currency differs from the pair's quote currency. Use when user asks "how much will holding this position overnight cost me?". Returns: lots, totalSwapQuote, base, quote.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | Currency pair in BASE/QUOTE format, e.g. "EUR/USD" | |
| units | Yes | Position size in base-currency units | |
| nights | Yes | Number of nights the position is held | |
| swapPerLotPerNight | Yes | Swap rate per standard lot (100,000 units) per night, in the pair's quote currency. Negative = cost, positive = credit. Broker-set: get this from the user's broker platform, there is no live source for it. |