list_positions
List all positions an OANDA account has ever held, one per instrument, including closed positions with lifetime profit/loss. Provides detailed long and short side information.
Instructions
List every position the account has ever held, one per instrument.
Includes flat positions kept for their lifetime P/L; use
list_open_positions for current exposure only. Returns
{"positions": [...], "lastTransactionID": "..."} where each
position has instrument, lifetime realized pl,
unrealizedPL, marginUsed, financing (all decimal strings
in the account's home currency), and a long and short side.
Each side has units (decimal string; positive on the long side,
negative on the short side, "0" when flat), averagePrice
(only while open), tradeIDs (the open trades composing the side),
pl, and unrealizedPL.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_positions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of positions to return. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||