Skip to content

Guide

How do I set up automated trades?

An automated trade has three parts: a signal that says what to trade, a receiver that turns it into an order, and a broker with an API that accepts the order. Set them up in that order, test on paper, then check every fill in the broker's own history. The steps below work with any tool. The Nyria route follows them, and it is one way to do the receiver step.

The three parts

The signal
Where the idea to trade comes from. It is most often an alert on a TradingView chart, or a call posted in a Discord server or Telegram chat that you run.
The receiver
Software that is awake whenever the signal can fire. It reads the message, checks your rules and sends an order to the broker. You can write one or use a service.
The broker
An account at a broker that publishes an API and ideally offers a paper environment. Robinhood has no public API for stocks and options, so it cannot take part.

Setting it up, in order

  1. 1

    Write the rules, exit first

    Decide what opens a trade and what closes it before you automate either. A trade left open because nobody was watching is the usual way an automated setup goes wrong.

  2. 2

    Make the message say what an order needs

    The ticker, the side, and whether it opens or closes. For options add the expiry, the strike and call or put. Leave prices and sizes out unless your receiver reads them.

  3. 3

    Open an account at a broker with an API

    Charles Schwab, Tradier, tastytrade and Alpaca all publish one. Fund it with what the strategy will use, not the whole portfolio.

  4. 4

    Connect the receiver to the signal and the broker

    Point the signal's webhook at the receiver, then give the receiver access to the broker account. Keep the webhook URL private.

  5. 5

    Test on paper

    Run the whole chain against a paper account until entries and exits both behave.

  6. 6

    Check the fills

    Go live with a small allocation, then compare each order with the broker's own order history. An acknowledgement from the receiver proves it received the alert, not that the broker filled it.

The same steps with Nyria

Nyria is the receiver. A strategy holds the alert source and your rules. A bot runs that strategy on one broker account: Charles Schwab, Tradier, tastytrade, Alpaca, or Nyria Paper. Schwab, Tradier and tastytrade connect through the broker's own sign-in, and Alpaca with an API key and secret.

Entry, as plain text

long entry AAPL

Exit

exit AAPL long

Nyria reads any alert wording or JSON, with no template. An alert cannot set the size: the bot sets it from the budget per entry you choose, and stocks trade in whole shares. Nyria attaches no stop order to an entry, so exits come from exit alerts. The alert tester shows how a message will be read before anything trades.

Paper first, then the fills

Nyria Paper is a simulated broker built in and free on every plan, with up to 10 paper bots. Deploy the strategy there and let real alerts fire for a week or two. The strategy's Logs tab shows each alert and each order, so you can see that a message traded what you meant and that each exit closed its entry.

Paper fills pay the quoted spread and never slip, so a live account can fill at a worse price. After you deploy a bot on a live account, open the broker's own order history and match every order to its alert. If a row is missing there, the Logs tab holds the reason.

Questions

Do I need to write code?
Not for the Nyria route. You write the alert in your chart or post it in a chat you run, and Nyria reads it. Writing your own receiver against a broker's API is the route that needs code.
Which broker should the account be with?
Any broker with an API. Nyria connects to Charles Schwab, Tradier, tastytrade and Alpaca, and to Nyria Paper.
What does it cost?
Paper is free. Live trading from $15 a month.

Set up the first paper bot

Paper is free. Live trading from $15 a month.