Custom Coded Trading Strategies Bots
Custom Code covers strategies you write in Python, JavaScript or another language. Send its alerts as webhooks and TradersPost places the orders.
By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.
- Free 7-day trial
- Set-up in 3 minutes
- Paper account for testing

Alert webhookReceived
{
"ticker": "AAPL",
"action": "buy"
}
-
Market Buy
Sent
AAPL · 10 shares · Alpaca Live
-
Market Buy
Sent
AAPL · 10 shares · Tradier Paper
Ask your agent how our Custom Code integration is right for you.
See Custom Code become an order
1. Signal source
Custom Code Webhook (fixed for this page)
Your code · POST
- Method
- POST
- URL
- webhooks.traderspost.io/trading/webhook/…
Request body
{ "ticker": "AAPL", "action": "buy" }
Signal received
Custom Code webhook · buy AAPLAccepted
Strategy settingsBuilds the order
- Symbol
- AAPL From signal
- Action
- Buy From signal
- Quantity
- 10 shares From strategy
- Order type
- Market From strategy
3 orders from one signal
| Account | Order | Status |
|---|---|---|
| Alpaca account 1 | Buy 10 AAPL | Sent |
| Alpaca account 2 | Buy 10 AAPL | Sent |
| Tradier account | Buy 10 AAPL | Sent |
A webhook call from your own code for AAPL reaches TradersPost and becomes a market buy for 10 shares on 2 Alpaca accounts and 1 Tradier account.
Your code · POST
- Method
- POST
- URL
- webhooks.traderspost.io/trading/webhook/…
Request body
{ "ticker": "AAPL 270115C200", "action": "buy" }
Signal received
Custom Code webhook · buy AAPL 270115C200Accepted
Strategy settingsBuilds the order
- Symbol
- AAPL 270115C200 becomes AAPL 270115C00200000 From signal
- Action
- Buy From signal
- Quantity
- 1 contract From strategy
- Order type
- Market From strategy
3 orders from one signal
| Account | Order | Status |
|---|---|---|
| tastytrade account 1 | Buy 1 AAPL 270115C00200000 | Sent |
| tastytrade account 2 | Buy 1 AAPL 270115C00200000 | Sent |
| Tradier account | Buy 1 AAPL270115C00200000 | Sent |
A webhook call from your own code for AAPL 270115C200 reaches TradersPost, which sends it to tastytrade as AAPL 270115C00200000, and becomes a market buy for 1 contract on 2 tastytrade accounts and 1 Tradier account.
Your code · POST
- Method
- POST
- URL
- webhooks.traderspost.io/trading/webhook/…
Request body
{ "ticker": "ESH2027", "action": "buy", "price": "6000.25" }
Signal received
Custom Code webhook · buy ESH2027Accepted
Strategy settingsBuilds the order
- Symbol
- ESH2027 From signal
- Action
- Buy From signal
- Price
- 6000.25 on the alert From signal
- Quantity
- 1 contract From strategy
- Order type
- Market From strategy
3 orders from one signal
| Account | Order | Status |
|---|---|---|
| Tradovate account 1 | Buy 1 ESH2027 | Sent |
| Tradovate account 2 | Buy 1 ESH2027 | Sent |
| TradeStation account | Buy 1 ESH27 | Sent |
A webhook call from your own code for ESH2027 reaches TradersPost and becomes a market buy for 1 contract on 2 Tradovate accounts and 1 TradeStation account. The alert also carries a price, because Tradovate sends no quotes.
Your code · POST
- Method
- POST
- URL
- webhooks.traderspost.io/trading/webhook/…
Request body
{ "ticker": "ESH2027", "action": "buy", "price": "6000.25" }
Signal received
Custom Code webhook · buy ESH2027Accepted
Strategy settingsBuilds the order
- Symbol
- ESH2027 From signal
- Action
- Buy From signal
- Price
- 6000.25 on the alert From signal
- Quantity
- 1 contract From strategy
- Order type
- Market From strategy
5 orders from one signal
| Account | Order | Status |
|---|---|---|
| Lucid Trading account 1 | Buy 1 ESH2027 | Sent |
| Lucid Trading account 2 | Buy 1 ESH2027 | Sent |
| Lucid Trading account 3 | Buy 1 ESH2027 | Sent |
+ 2 more accounts, same order
A webhook call from your own code for ESH2027 reaches TradersPost and becomes a market buy for 1 contract on 5 of your Lucid Trading accounts through Tradovate. The alert also carries a price, because Tradovate sends no quotes.
Your code · POST
- Method
- POST
- URL
- webhooks.traderspost.io/trading/webhook/…
Request body
{ "ticker": "BTC-USD", "action": "buy" }
Signal received
Custom Code webhook · buy BTC-USDAccepted
Strategy settingsBuilds the order
- Symbol
- BTC-USD becomes BTCUSD From signal
- Action
- Buy From signal
- Quantity
- 0.01 BTC From strategy
- Order type
- Market From strategy
3 orders from one signal
| Account | Order | Status |
|---|---|---|
| Kraken account 1 | Buy 0.01 BTCUSD | Sent |
| Kraken account 2 | Buy 0.01 BTCUSD | Sent |
| Coinbase account | Buy 0.01 BTC-USD | Sent |
A webhook call from your own code for BTC-USD reaches TradersPost, which sends it to Kraken as BTCUSD, and becomes a market buy for 0.01 BTC on 2 Kraken accounts and 1 Coinbase account.
Connect Custom Code alerts in three steps
Every signal that fires becomes a real order in your broker account.
In Custom Code
Send a webhook from your code
In Custom Code
Use the webhook URL and JSON body
~ $ curl -X POST \
https://webhooks.traderspost.io/trading/webhook/…
-H "Content-Type: application/json" \
-d '
{
"ticker": "MNQ1!",
"action": "buy",
"quantityType": "fixed_quantity",
"quantity": 1
}
'
200 OK{"success": true}
In TradersPost
Connect your broker to the strategy
-
Send a webhook from your code
POST a JSON signal to your webhook URL from any language.
-
Use the webhook URL and JSON body
Test it with curl first. A 200 response means TradersPost received it.
-
Connect your broker to the strategy
Link your Tradovate account. Every Custom Code signal now places an order.
Send Custom Code alerts to any of these brokers
The alert is the same for every connection. Each connection page lists the asset classes and order types that broker accepts.
-
Tradovate Futures
-
TradeStation Stocks · Stock Options · Index Options · Futures
-
Alpaca Stocks · Crypto · Stock Options
-
Interactive Brokers Beta Stocks
-
ProjectX Futures
-
NinjaTrader Futures
-
Robinhood Stocks
-
tastytrade Stocks · Futures · Crypto · Stock Options · Index Options
-
Webull Stocks
-
E*TRADE Stocks · Stock Options · Index Options
-
Tradier Stocks · Stock Options · Index Options
-
Coinbase Crypto
-
Kraken Crypto
-
Binance Crypto
-
Bybit Crypto
-
Public.com Beta Stocks · Stock Options · Index Options · Crypto
-
Crypto.com Beta Crypto
-
Clear Street Beta Stocks · Stock Options
-
Moomoo Beta Stocks · Stock Options · Index Options
-
TradersPost Paper Stocks · Stock Options · Index Options · Futures · Crypto
Set up Custom Code
- Documentation Custom code signal docs Send signals from your own script or service with an HTTP request.
- Documentation Custom code examples Request examples for posting a signal from code.
- Documentation Create a strategy Get the webhook URL every source posts to.
- Documentation Webhook JSON reference Every field a signal can send.
- Overview Automated trading bots How an alert becomes a broker order, and what usually breaks it.
- Overview Connections Every broker and prop firm a signal can reach, with what each one accepts.
- Overview All signal sources Charting platforms, indicators, your own code, automation tools and AI agents.
Ready to send Custom Code alerts to your broker?
Free 7-day trial
Set-up in 3 minutes
Paper account for testing
By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.