Trade Single Leg Tradier

Places a single-leg trade (stock or option) through Tradier brokerage. This function executes REAL trades with real money.

Prerequisites

  • Active Tradier brokerage account
  • Tradier API connection configured in MarketXLS
  • Sufficient buying power/margin

Parameters

Parameter Required Description
TradeType Yes 'equity' for stocks, 'option' for options
Symbol Yes Stock ticker symbol
Quantity Yes Number of shares or contracts
OrderSide Yes Order direction (see below)
OrderType Yes market, limit, stop, stop_limit
Duration No day, gtc, pre, post
SymbolOption No OCC symbol (options only)
Price No Limit price
TriggerPrice No Stop trigger price

Order Sides

For Stocks For Options
buy buy_to_open
sell buy_to_close
- sell_to_open
- sell_to_close

WARNING

This function places REAL trades. Always verify parameters before executing.

Examples

Stock trades
=TradeSingleLegTradier("equity", "AAPL", 100, "buy", "market")
Buy 100 AAPL at market
=TradeSingleLegTradier("equity", "MSFT", 50, "sell", "limit", "day", , 380)
Sell 50 MSFT limit $380
Option trades
=TradeSingleLegTradier("option", "AAPL", 5, "buy_to_open", "limit", "day", "AAPL240119C00180000", 5.50)
=TradeSingleLegTradier("option", "SPY", 10, "sell_to_close", "market", , "SPY240119P00475000")
Stop orders
=TradeSingleLegTradier("equity", "TSLA", 25, "sell", "stop", "gtc", , , 200)
Stop loss at $200

When to Use

  • Placing stock buy/sell orders through Tradier
  • Executing single-leg option trades
  • Setting limit or stop orders
  • Automating trade execution from Excel

When NOT to Use

Scenario Use Instead
Multi-leg option strategies TradeMultiLegTradier()
ThinkOrSwim broker TradeSingleLegThinkOrSwim()
Orion broker TradeSingleLegOrion()
Just need quotes Last(), Option_Last_Price()

Common Issues & FAQ

Q: Why is my order rejected? A: Common reasons:

  • Insufficient buying power
  • Invalid option symbol format
  • Market closed (check Duration parameter)
  • Price too far from market (limit orders)

Q: How do I get the option symbol? A: Use OptionSymbol() function to generate OCC format symbols.

Q: What happens if market is closed? A: Use duration='gtc' for good-til-cancelled, or 'pre'/'post' for extended hours.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Trade Single Leg Tradier and Other Financial Formulas
How does MarketXLS work?