Forex Swap Cost (Live)
workflow.run_forex_swap_cost_liveTotal swap/rollover cost (or credit) for holding a forex position overnight, converted to a given account currency via a live FX rate (same TrueFX/frankfurter.app source as the other forex _live tools). swapPerLotPerNight is still always a manual input: swap rates are broker-set, with no free live feed available for them. Precious-metal pairs (XAU, XAG, XPT, XPD) are refused with an error, because their pip and lot size differ by broker. Edge cases: same input rules as workflow.run_forex_swap_cost (nights a whole number, swap any sign); when no rate is found for the account currency, available is false and no figure is returned. Not covered: the triple swap on Wednesday and swap rates that change during the hold. Use when user asks "how much will holding this position overnight cost me in my account currency?" and it differs from the pair's own quote currency. Returns everything workflow.run_forex_swap_cost does, plus accountCurrency, totalSwapAccount, fxRate, fxSource, available (false + error if no rate could be found). If available is false, do not use any result field (computed figures and any verdict are null or empty), so read available first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pair": "<pair>",
"units": "<units>",
"swapPerLotPerNight": "<swapPerLotPerNight>",
"nights": "<nights>",
"accountCurrency": "<accountCurrency>"
},
"name": "workflow.run_forex_swap_cost_live"
}
}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 | |
| accountCurrency | Yes | 3-letter account currency code, e.g. "GBP" | |
| swapPerLotPerNight | Yes | Swap rate per standard lot per night, in the pair's quote currency. Negative = cost, positive = credit. |