Limit Orders via TradingView - Tickerly - Alpaca rejected with error

I am running an automated trading strategy on TradingView that sends alerts to Tickerly, which then executes orders through the Alpaca API. Market orders execute successfully through the same pipeline:

TradingViewStrategy - Tickerly Webhook - Alpaca

However, limit orders consistently fail with the following error:

“To place a limit order for(symbol) on Alpaca, you need to specify a limit price.” This occurs across multiple symbols including equities and crypto

TradingView strategy generates the following JSON payload:

{

“ticker”: “AAVEUSD”,

“action”: “buy”,

“prev_position”: “flat”,

“quantity”: 10,

“type”: “limit”,

“price”: 85.42,

“pointer”: “v2……….Masked)” ( I removed the pointer for sharing purposes)

}

The limit price is calculated in Pine Script and formatted according to Alpaca price rules

; Price greater than and equal to 1 - 2 decimals and Price less than 1 - 4 decimals

My question is what am I missing here? what is the correct JSON structure required by Alpaca when submitting limit orders through a third-party webhook service like Tickerly?

For Alpaca limit orders, time_in_force must be gtc or ioc. Does Tickerly require me to include time_in_force in the alert payload(and if so, what key name does it expect: tif, time_in_force, etc.)? Also, should the limit value be provided as price or Limit_price for Alpaca routing?

@ImmortalOrigin I’m not familiar with Tickerly, but I assume the format they require is simply the JSON format Alpaca requires to place an order? If that is the case, then you will need to name the parameters like this:

{
“type”: “limit”,
“time_in_force”: “gtc”,
“symbol”: “AAVE/USD”,
“qty”: “10”,
“side”: “buy”,
“limit_price”: “85.42”
}

Also, notice you need to include a forward slash ( /) when specifying a crypto pair. In this case, it specifies you want to buy AAVE using USD from cash in your account.

Thank you for your insight and I will update in a few days, and a solution will be posted just in case some-one now or in the future faced the same issue.

Just got an email from Tickerly Tech Team, explaining to me that “Tickerly cannot send Limit orders to Alpaca" PERIOD!” I wasted weeks trying to do this and paying subscription now to Tickerly. Any idea of other exchange that is capable of doing this. I needed this format (TradingView - ??? - Alpaca). Exchange to be capable of trading equities and cryptos using Tradingview Algo.

Correct me if I am wrong but couldn’t you just do it like:

TradingView → your webhook endpoint → Alpaca directly, cutting Tickerly out entirely for limit orders. You would probably need to setup a small server that receives the TradingView signal/alert.

The learning is a lot for me and when you have a 10 hour day job, you want as little risks to take on because any system you put together will also required testing to make sure system is robust to handle all kind of situations. This means months of testing, which added more to the issue of automating the trading. Thank you for your input.

Yes there are all kinds of things that needs to be taken into consideration, a couple of nights a go i thought i was all setup to run my algo for a night and I woke up to something like -$20 it was just opening and closing positions and i was getting slowly rinsed from fees the issue was related to lot tracking something which I thought I had fixed it’s alot of trial as a solo dev.

Alpaca Limit Orders Through TradingView / Tickerly

Kraken limit orders are working correctly through the same TradingView/Tickerly setup, but Alpaca stock limit orders are failing.

The error remains no matter what and I am out of ideas

“To place a limit order for [symbol] on Alpaca, you need to specify a limit price.”

Examples:

  • Kraken orders for FLOWUSD are being placed successfully.
  • Alpaca orders for symbols like FLOW/USD fail with the limit-price error.

Because Kraken limit orders work, it seems the issue may be specific to Alpaca or to the way Alpaca expects the limit price field to be presented.

Can you please confirm:

  1. Are Alpaca limit orders currently supported through Tickerly?
  2. If yes, what is the exact JSON format required for Alpaca limit orders?
  3. Does Alpaca require a specific field name or value type for the limit price?
  4. Are there any differences between Kraken limit order formatting and Alpaca limit order formatting in Tickerly?

For testing, I have used TradingView strategy alerts with:

  • Order fills only
  • JSON alert messages including:
    • ticker
    • action
    • prev_position
    • quantity
    • type = “limit”
    • price
    • time_in_force
    • pointer

Example test format:
{
“ticker”:“FLOW/USD”,
“action”:“buy”,
“prev_position”:“flat”,
“quantity”:“3515”,
“type”:“limit”,
“price”:“{{strategy.order.price}}”,
“time_in_force”:“gtc”,
“pointer”:“[my pointer]”
}

I would appreciate confirmation of the correct Alpaca limit-order format or any Alpaca-specific limitations.

Thank you