RenkoGurus
  • Getting Started
    • What is TradingView?
    • How to setup RenkoGurus Indicators
    • How to get updates
    • How to setup alerts in TradingView
  • Indicators
    • RenkoGurus-Consolidation & Breakout Filter
      • Signals
      • Settings
      • Alerts
    • RenkoGurus-SmartTrend
      • Signals
      • Settings
      • Alerts
    • RenkoGurus-SmartChannel
      • Signals
      • Settings
      • Alerts
    • RenkoGurus-SmartMoney
      • Signals
      • Settings
      • Alerts
    • RenkoGurus-PowerMeter
      • Signals
      • Settings
      • Alerts
  • RenkoGurus-PropBot-User-Guide
    • Onboarding
    • Non VPS Prop Bot
      • Tradovate/NinjaTrader Prop Bot
        • APIs & Payloads
      • TopstepX PropBot
        • APIs & Payloads
    • VPS Prop Bot
      • RenkoGurus VPS Dashoard
        • Bot Status Panel
        • Customer Info Panel
        • Actions Panel
        • Trade Command Panel
        • Window Settings Panel
        • Trading Hours Settings (GMT) Panel
        • Alerts Configuration Panel
      • RenkoGurus VPS Metrics Dashboard
Powered by GitBook
On this page
  • APIs
  • Payloads
  1. RenkoGurus-PropBot-User-Guide
  2. Non VPS Prop Bot
  3. Tradovate/NinjaTrader Prop Bot

APIs & Payloads

APIs

The following API endpoints allow users to interact with the trading bot to place orders, liquidate positions, and set market trends. Each endpoint is designed to facilitate seamless execution of trading actions, ensuring speed, accuracy, and validation checks where necessary.

The trend-related endpoints allow for setting market trends in DynamoDB, ensuring trades align with predefined strategies. The order placement endpoints allow traders to execute trades efficiently, including a version with trend validation.

Below is a table summarizing the key API endpoints and their functionality:

Endpoint

Method

Usage

/ts/place-order

POST

Places an order to Tradovate without trend validation.

/ts/liquidate-position

POST

Liquidates all open positions in Tradovate for a particular instrument

/ts/set-trend

POST

Sets the market trend (BULL or BEAR) along with an optional trend duration in AWS DynamoDB, This can be used in combination with the place-order-trend endpoint

/ts/place-order-trend

POST

Places an order with trend validation to ensure alignment with the defined market trend.

Each of these endpoints is designed to streamline trading actions, allowing for automation while maintaining control over execution logic. Let me know if you need additional details or modifications!

Payloads

Place Order (/ts/place-order)

Payload Example:

{
  "accountSpecs": ["PRACTICEFEB310430043"],
  "action": "Buy",
  "orderType": "Limit",
  "symbol": "MNQ1!",
  "orderQty": 3,
  "limitPrice": 22222,
  "stopPrice": 15,
  "takeProfit": 15,
  "trailingOffset": 2.0,
  "tradeTimeRanges": [""],
  "avoidTradeTimeRanges": [""]
}

Field Descriptions:

Field

Description

Possible Values

Required

accountSpecs

List of account identifiers for placing the order.

Example: ["PRACTICEFEB310430043"] Multiple accounts can also be provided as shown below ["YOURAccount1","YOURAccount2","YOURAccount3"]

✅ Yes

action

The type of order action to perform.

"Buy", "Sell"

✅ Yes

orderType

The type of order being placed.

"Market", "Limit", "Protect", "Bracket"

✅ Yes

symbol

The ticker symbol of the asset being traded.

Example: "MNQ1!", "ES!" If setting alerts from Trading view, then this should be "{{ticker}}"

✅ Yes

orderQty

The quantity of contracts/shares to trade.

Any positive integer

✅ Yes

limitPrice

The price at which the limit order should be placed.

Numeric value (Required for limit orders)

❌ No (Only for Limit Orders)

stopPrice

The price at which the stop order should be triggered.

Eg: 10

❌ No

takeProfit

The price at which the trade should take profit.

Eg: 10

❌ No

trailingOffset

The distance from the price for a trailing stop.

Eg: 5.0

❌ No

tradeTimeRanges

Specifies time ranges where trading is allowed.

Example: ["09:30-16:00"]

avoidTradeTimeRanges

Specifies time ranges where trading is not allowed.

Example: ["12:00-13:00"]

Liquidate Open Positions (/ts/liquidate-position)

Payload Example:

{
  "symbol": "MNQZ4",
  "accountSpecs": ["PRACTICEDEC209166971"]
}

Field Descriptions:

Field

Description

Possible Values

Required

symbol

The ticker symbol of the asset to liquidate.

Example: "MNQZ4", "ES!"

✅ Yes

accountSpecs

List of account identifiers for liquidation.

Example: ["PRACTICEDEC20XXXX"] Multiple accounts can also be provided as shown below ["YOURAccount1","YOURAccount2","YOURAccount3"

✅ Yes

Set Market Trend (/ts/set-trend)

Payload Example:

{
  "trend": "BULL",
  "trend_duration": "24Brick",
  "trend_ticker": "NQ1!"
}

Field Descriptions:

Field

Description

Possible Values

Required

trend

Defines the market trend direction.

"BULL", "BEAR"

✅ Yes

trend_duration

The duration for which the trend should be valid.

Example: "24Brick", "30Min"

❌ No

trend_ticker

The ticker symbol associated with the trend.

Example: "NQ1!", "ES!"

✅ Yes

. Place Order with Trend Validation (/ts/place-order-trend)

Payload Example:

{
  "accountSpecs": ["PRACTICEFEB310430043"],
  "action": "Buy",
  "orderType": "Bracket",
  "symbol": "NQ1!",
  "orderQty": 1,
  "trailingOffset": 5.0,
  "limitPrice": 10,
  "stopPrice": 10,
  "closeOnTrendReversal": "True",
  "tradeTimeRanges": [""],
  "avoidTradeTimeRanges": [""]
}

Field Descriptions:

Field

Description

Possible Values

Required

List of account identifiers for placing the order.

Example: ["PRACTICEFEB310430043"] Multiple accounts can also be provided as shown below ["YOURAccount1","YOURAccount2","YOURAccount3"]

✅ Yes

action

The type of order action to perform.

"Buy", "Sell"

✅ Yes

orderType

The type of order being placed.

"Market", "Limit", "Stop", "Bracket"

✅ Yes

symbol

The ticker symbol of the asset being traded.

Example: "NQ1!", "ES!"

✅ Yes

orderQty

The quantity of contracts/shares to trade.

Any positive integer

✅ Yes

limitPrice

The price at which the limit order should be placed.

Numeric value (Required for limit orders)

❌ No (Only for Limit Orders)

stopPrice

The price at which the stop order should be triggered.

Numeric value

❌ No

trailingOffset

The distance from the price for a trailing stop.

Numeric value

❌ No

closeOnTrendReversal

Whether to close the trade if the trend reverses.

"True", "False"

❌ No

tradeTimeRanges

Specifies time ranges where trading is allowed.

Example: ["09:30-16:00"]

❌ No

avoidTradeTimeRanges

Specifies time ranges where trading is not allowed.

Example: ["12:00-13:00"]

❌ No

PreviousTradovate/NinjaTrader Prop BotNextTopstepX PropBot

Last updated 3 months ago

accountSpecs