Direct Connection with TradersPost Using Webhook

Connect TrendSpider to TradersPost by sending the alert Webhooks and automate your TrendSpider strategies in stock brokers like TD Ameritrade, TradeStation, Robinhood, Alpaca, etc.

Please follow the following five stages as outlined below to get started:

Stage I: Connect to Broker

Connect your broker (Paper or Live) to the TradersPost by following the instructions provided in the documentation- Connect Your Broker.

Stage II: Generate Webhook URL

Create a Webhook by following the instructions provided below:

Step 1: Navigate to the Dashboard and click on the Webhook.

Generate Webhook URL TradersPost

Step 2: Click on the + New Webhook button from the top-right corner of the interface.

Click on the + New Webhook button

Step 3: Configure the following options:

1. Name (Mandatory): Give your webhook a name. Only visible to you.

2. Asset Class (Mandatory): Select the type of asset class that should be allowed on this webhook.

3. Allow Any Ticker: Check this option to allow any ticker for this webhook.

4. Tickers: You can also limit this webhook to only work with certain tickers. Enter multiple tickers separated by commas in the blank field.

5. Limit to TradingView: Check this option to limit this webhook so that only TradingView can trigger it.

6. Limit to TrendSpider: Check this option to limit this webhook so that only TrendSpider can trigger it.

7. Limit to IP Addresses: Limit this webhook so that only certain IP addresses can trigger it. Separate multiple IP addresses by commas.

Once configured, then click on the Save button and the Webhook will be created.

Configure the Webhook Settings

Step 4: Click on the Copy button from the top of the interface to copy the TradersPost Webhook URL. In the later stages, this Webhook URL shall be used to establish a connection with TrendSpider.

Copy Webhook URL

Stage III: Create a Strategy

You can create a strategy to define a group of signals that can be produced by an automated algorithm of TradersPost. You or other users can subscribe to your strategy and have the signals place trades directly in the broker. Please ensure to check the Testing to link your strategy with the webhooks that will produce signals for your strategy.

 Create a Strategy

While creating a strategy, you can configure the Subscription Defaults that will appear in the new strategy subscription while subscribing to this strategy in the later stage. In the Subscription Defaults section, you can configure the risk tolerance and position sizing.

Click on the Save button after creating the strategy.

Configure the Subscription Details

Stage IV: Connect to TrendSpider

While creating the Trading Bot in TrendSpider, you can configure the alert with a TradersPost webhook URL, as generated in the previous stage above and send it in the JSON format like the following:

{
    "ticker": "%alert_symbol%",
    "action": "buy",
    "price": "%last_price%"
}
Additional information can be added to this above Webhook Payload like the following:

{
    "ticker": "%alert_symbol%",
    "action": "buy",
    "price": "%last_price%",
    "alertName": "%alert_name%",
    "alertNote": "%alert_note%",
    "priceActionEvent": "%price_action_event%"
}
While setting up the Dynamic or Multi-Factor Alert, you can configure the “Your Note” field to have a body like this:

{"ticker": "%alert_symbol%", "action": "buy", "price": "%last_price%"}

Stage V: Subscribe to a Strategy

Subscribe to your strategy created in Stage III above to connect it to a broker.

Step 1: Click on the Strategies from the left sidebar

Subscribe to a Strategy

Step 2: Click on the Subscribe button of your strategy.

Click on the Subscribe button

Step 3: Select the Broker (Paper/Live) from the list.

Select the Broker

A modal window will appear that will request confirmation to configure your strategy subscription. Tick the checkbox and click on the Confirm button.

confirmation to configure your strategy subscription

Step 4: You can check the subscription details and click on the Enable button from the top-right corner of the interface to trigger the strategy.

You will also find the example order for the entry and exit for the selected symbol.

check the subscription details and click on the Enable



Now, whenever TrendSpider will send the alert to Alertatron via Webhook,  the defined group of signals will be produced by an automated algorithm of TradersPost and send it to the connected broker to execute the action defined in the Webhook Payload.

Related TradersPost Documentation

DOCUMENT REFERENCE
TrendSpider https://docs.traderspost.io/docs/trend-spider
Connect a Broker https://docs.traderspost.io/docs/connecting-your-broker#connect-a-broker
Create a Strategy Subscription https://docs.traderspost.io/docs/connecting-your-broker#create-a-strategy-subscription
TrendSpider Backtesting https://docs.traderspost.io/docs/backtesting#trendspider-backtesting
Jun 22, 2022

Contact Us

Not finding what you're looking for? Contact Us Directly