Install
openclaw skills install @agentpmt/oanda-forex-tradingOanda Forex Trading: Trade forex via OANDA. Real-time prices, historical candles, order management, positions. Supports demo and live accounts. Use when an agent needs oanda forex trading, oanda forex trading 2, forex trading automation, currency trading bot, fx trading api, oanda api integration, cancel order, order id through AgentPMT-hosted remote tool calls. Discovery terms: oanda forex trading, oanda forex trading 2, forex trading automation, currency trading bot, fx trading api.
openclaw skills install @agentpmt/oanda-forex-tradingLast updated: 2026-06-23.
If the current date is more than 7 days after the last updated date, reinstall this skill from skills.sh or ClawHub before relying on endpoints, schemas, setup steps, or examples.
OANDA Forex is a comprehensive foreign exchange trading interface that connects AI agents and automation workflows to OANDA's REST v20 API for real-time currency trading and market data access. It provides a simplified action-based abstraction over OANDA's trading platform, supporting both practice accounts for paper trading and live accounts for real money transactions. Market data capabilities include fetching real-time bid and ask prices with spread calculations for single or multiple currency pairs, as well as historical candlestick data across 21 granularities ranging from 5-second intervals to monthly bars with up to 5000 candles per request. Account management functions retrieve balance, margin, net asset value, unrealized and realized profit and loss, open trade counts, and pending order status. The trading engine supports market orders for immediate execution, limit orders for price-targeted entries, and stop orders for breakout or momentum strategies, all with optional take profit and stop loss levels attached at order creation. Position and order management includes viewing open positions and trades, modifying pending order parameters, canceling unfilled orders, and closing positions either by instrument or by individual trade ID. It is highly recommended that you perform extensive testing with demo accounts before placing any live orders.
Trade forex currencies and access real-time market data through the OANDA platform. This tool supports live and practice trading environments, covering market data retrieval, account management, order placement, and position/trade management. Credentials are provided automatically when connected.
Currency pairs use underscore-separated format: EUR_USD, GBP_JPY, USD_CAD, AUD_NZD, etc.
Get current bid/ask pricing for one or more currency pairs.
Required fields (at least one):
instrument (string) - Single currency pair, e.g. EUR_USDinstruments (array of strings) - Multiple currency pairs for batch pricingReturns bid, ask, spread, timestamp, and whether the instrument is currently tradeable.
Example:
{
"action": "get_price",
"instruments": ["EUR_USD", "GBP_USD", "USD_JPY"]
}
Get historical candlestick (OHLCV) data for a single instrument.
Required fields:
instrument (string) - Currency pair, e.g. EUR_USDgranularity (string) - Time interval per candle. Options: S5, S10, S15, S30 (seconds), M1, M2, M4, M5, M10, M15, M30 (minutes), H1, H2, H3, H4, H6, H8, H12 (hours), D (daily), W (weekly), M (monthly)Optional fields:
count (integer) - Number of candles to retrieve. Default: 100. Range: 1-5000.Returns open, high, low, close, volume, and timestamp for each candle.
Example:
{
"action": "get_candles",
"instrument": "EUR_USD",
"granularity": "H1",
"count": 50
}
Get account overview including balance, margin, and profit/loss information.
Required fields: None (credentials are provided automatically).
Returns balance, NAV, unrealized P&L, realized P&L, margin used, margin available, open trade count, open position count, and pending order count.
Example:
{
"action": "get_account_summary"
}
Get all currently open positions.
Required fields: None.
Returns a list of open positions with instrument, long/short units, average prices, and unrealized/realized P&L for each side.
Example:
{
"action": "get_positions"
}
Get all currently open trades with details.
Required fields: None.
Returns trade ID, instrument, units, entry price, unrealized/realized P&L, margin used, open time, and any attached take-profit or stop-loss order IDs.
Example:
{
"action": "get_trades"
}
Get all pending (unfilled) orders.
Required fields: None.
Returns order ID, type, instrument, units, price, time-in-force, and any attached take-profit or stop-loss conditions.
Example:
{
"action": "get_pending_orders"
}
Execute a trade immediately at the current market price.
Required fields:
instrument (string) - Currency pair, e.g. EUR_USDunits (integer) - Number of units. Positive = buy/long, negative = sell/short. Example: 10000 to buy, -5000 to sell.Optional fields:
take_profit_price (number) - Automatically attach a take-profit order at this pricestop_loss_price (number) - Automatically attach a stop-loss order at this pricestop_loss_distance (number) - Stop loss as a price distance instead of absolute price (cannot use both stop_loss_price and stop_loss_distance)Example - Buy with risk management:
{
"action": "place_market_order",
"instrument": "EUR_USD",
"units": 10000,
"take_profit_price": 1.0950,
"stop_loss_price": 1.0850
}
Example - Sell (short):
{
"action": "place_market_order",
"instrument": "GBP_USD",
"units": -5000
}
Place an order to execute when the price reaches a specified level or better. The order remains active until filled or cancelled.
Required fields:
instrument (string) - Currency pairunits (integer) - Positive = buy, negative = sellprice (number) - The limit price at which to executeOptional fields:
take_profit_price (number) - Take-profit price to attach on fillstop_loss_price (number) - Stop-loss price to attach on fillstop_loss_distance (number) - Stop-loss distance to attach on fillExample:
{
"action": "place_limit_order",
"instrument": "EUR_USD",
"units": 10000,
"price": 1.0800,
"take_profit_price": 1.0900,
"stop_loss_price": 1.0750
}
Place an order that triggers when the price reaches a specified level. Useful for breakout strategies. The order remains active until triggered or cancelled.
Required fields:
instrument (string) - Currency pairunits (integer) - Positive = buy, negative = sellprice (number) - The trigger priceOptional fields:
take_profit_price (number) - Take-profit price to attach on fillstop_loss_price (number) - Stop-loss price to attach on fillstop_loss_distance (number) - Stop-loss distance to attach on fillExample:
{
"action": "place_stop_order",
"instrument": "USD_JPY",
"units": 5000,
"price": 150.50,
"stop_loss_distance": 0.50
}
Modify the price, units, or trailing stop distance of an existing pending order. The tool automatically detects the order type and applies the appropriate modification.
Required fields:
order_id (string) - The order ID to modify (get from get_pending_orders)Optional fields (at least one required for limit/stop/market-if-touched orders):
price (number) - New price levelunits (integer) - New unit amountFor trailing stop loss orders:
trailing_stop_distance (number) - New trailing distance (required)For stop loss orders:
price (number) - New stop loss price, ORstop_loss_distance (number) - New stop loss distanceExample:
{
"action": "modify_order",
"order_id": "12345",
"price": 1.0825
}
Cancel a pending order.
Required fields:
order_id (string) - The order ID to cancel (get from get_pending_orders)Example:
{
"action": "cancel_order",
"order_id": "12345"
}
Close the entire position (both long and short sides) for a specific instrument.
Required fields:
instrument (string) - Currency pair to close, e.g. EUR_USDReturns details of closed long/short sides and total profit/loss.
Example:
{
"action": "close_position",
"instrument": "EUR_USD"
}
Close a specific individual trade by its ID.
Required fields:
trade_id (string) - The trade ID to close (get from get_trades)Returns the closing price, units closed, and realized profit/loss.
Example:
{
"action": "close_trade",
"trade_id": "67890"
}
Check prices then trade:
get_price to see current bid/ask for your target pairplace_market_order to enter at market, or place_limit_order to set a target entryMonitor and manage positions:
get_account_summary to check overall account healthget_positions to see all open positionsget_trades to see individual trade details and IDsclose_trade or close_position to exitManage pending orders:
get_pending_orders to list all unfilled ordersmodify_order to adjust price or sizecancel_order to remove an orderTechnical analysis:
get_candles with desired granularity and count to pull historical OHLCV datastop_loss_price (absolute price) or stop_loss_distance (relative distance), never bothOanda Forex Trading on AgentPMT.cancel_order, close_position, close_trade, get_account_summary, get_candles, get_pending_orders, get_positions, get_price, get_trades, modify_order, place_limit_order, place_market_order, place_stop_order.No categories or industry tags are published for this tool.
Complete generated action schema: ./schema.md.
Supported action count: 13.
x402 availability: not enabled for this product.
cancel_order (action slug: cancel-order): Cancel a pending (unfilled) order by its ID. Price: 2 credits. Parameters: order_id.close_position (action slug: close-position): Close the entire position (both long and short sides) for a specific instrument. Returns details of closed sides and total P&L. Price: 2 credits. Parameters: instrument.close_trade (action slug: close-trade): Close a specific individual trade by its ID. Returns closing price, units closed, and realized P&L. Price: 2 credits. Parameters: trade_id.get_account_summary (action slug: get-account-summary): Get account overview including balance, margin, NAV, unrealized/realized P&L, and open trade/position/order counts. Credentials provided automatically. Price: 2 credits. Parameters: none.get_candles (action slug: get-candles): Get historical candlestick (OHLCV) data for a single instrument across 21 granularities from 5-second to monthly bars. Price: 2 credits. Parameters: count, granularity, instrument.get_pending_orders (action slug: get-pending-orders): Get all pending (unfilled) orders with order ID, type, instrument, units, price, time-in-force, and attached conditions. Price: 2 credits. Parameters: none.get_positions (action slug: get-positions): Get all currently open positions with instrument, long/short units, average prices, and unrealized/realized P&L. Price: 2 credits. Parameters: none.get_price (action slug: get-price): Get current bid/ask pricing for one or more currency pairs. Returns bid, ask, spread, timestamp, and tradeability status. Price: 2 credits. Parameters: instrument, instruments.get_trades (action slug: get-trades): Get all currently open trades with trade ID, instrument, units, entry price, unrealized/realized P&L, margin used, and attached order IDs. Price: 2 credits. Parameters: none.modify_order (action slug: modify-order): Modify a pending order's price, units, or trailing stop distance. Automatically detects order type and applies appropriate modification. Price: 2 credits. Parameters: order_id, price, stop_loss_distance, trailing_stop_distance, units.place_limit_order (action slug: place-limit-order): Place an order to execute when price reaches a specified level or better. Remains active until filled or cancelled (GTC). Price: 2 credits. Parameters: instrument, price, stop_loss_distance, stop_loss_price, take_profit_price, units.place_market_order (action slug: place-market-order): Execute a trade immediately at the current market price. Positive units = buy/long, negative units = sell/short. Price: 2 credits. Parameters: instrument, stop_loss_distance, stop_loss_price, take_profit_price, units.place_stop_order (action slug: place-stop-order): Place an order that triggers when price reaches a specified level. Useful for breakout strategies. Remains active until triggered or cancelled (GTC). Price: 2 credits. Parameters: instrument, price, stop_loss_distance, stop_loss_price, take_profit_price, units.Use the compact schema above for ordinary calls. Before a new production integration, or whenever parameters, enum values, nested objects, outputs, or examples are unclear, fetch live details first.
agentpmt-tool-search-and-execution with action: "get_schema", and tool_id: "oanda-forex-trading-2".agentpmt-tool-search-and-execution with action: "get_instructions" and tool_id: "oanda-forex-trading-2", or call this product with action: "get_instructions" when the product tool is already selected.MCP schema lookup through the main AgentPMT MCP server:
{
"method": "tools/call",
"params": {
"name": "AgentPMT-Tool-Search-and-Execution",
"arguments": {
"action": "get_schema",
"tool_id": "oanda-forex-trading-2"
}
}
}
For live examples, keep the same MCP tool and use these arguments:
{
"action": "get_instructions",
"tool_id": "oanda-forex-trading-2"
}
Authenticated AgentPMT REST schema lookup body:
{
"name": "agentpmt-tool-search-and-execution",
"parameters": {
"action": "get_schema",
"tool_id": "oanda-forex-trading-2"
}
}
Authenticated AgentPMT REST live examples body:
{
"name": "agentpmt-tool-search-and-execution",
"parameters": {
"action": "get_instructions",
"tool_id": "oanda-forex-trading-2"
}
}
Product slug: oanda-forex-trading-2
Marketplace page: https://www.agentpmt.com/marketplace/oanda-forex-trading-2
../agentpmt-account-mcp-rest-api-setup to connect the main MCP server or REST API for an Agent Group where this tool is enabled.../what-is-agentpmt for marketplace, Agent Group, workflow, MCP, REST, and payment concepts.If those setup skills are not installed beside this product skill, use the downloads below.
Core AgentPMT setup skills:
openclaw skills install what-is-agentpmtnpx skills add AgentPMT/agent-skills --skill what-is-agentpmtopenclaw skills install agentpmt-account-mcp-rest-api-setupnpx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setupskills.sh install script:
npx skills add AgentPMT/agent-skills --skill what-is-agentpmt
npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup
MCP call shape after the main AgentPMT MCP server is connected:
{
"method": "tools/call",
"params": {
"name": "Oanda-Forex-Trading",
"arguments": {
"action": "cancel_order",
"order_id": "example order id"
}
}
}
Use the exact tool name returned by tools/list; the name above is the expected readable form.
Authenticated AgentPMT REST call body:
{
"name": "oanda-forex-trading-2",
"parameters": {
"action": "cancel_order",
"order_id": "example order id"
}
}
Use the setup skill for the account connection details before making REST calls.
passed or success-style boolean, use it as the workflow gate.get_schema or get_instructions before retrying.cancel_order fails, preserve the request parameters and retry only after fixing schema, auth, or payment errors.what-is-agentpmt, page: https://clawhub.ai/agentpmt/what-is-agentpmt; skills.sh: npx skills add AgentPMT/agent-skills --skill what-is-agentpmt)agentpmt-account-mcp-rest-api-setup, page: https://clawhub.ai/agentpmt/agentpmt-account-mcp-rest-api-setup; skills.sh: npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup)