APIs & Payloads
This section documents the available API endpoints for executing trades, managing positions, and automating actions with the RenkoGurus VPS Bot. These endpoints are optimized for speed, reliability, and compatibility with TradingView webhooks or manual triggers.
๐ API Endpoints Summary
/place-order
POST
Places a new order with optional bracket, stop loss, take profit, and trailing offset.
/flatten-all
POST
Closes all open positions and cancels all working orders for the given symbol.
/close-all-positions
POST
Closes all open positions for a particular Symbol
/reverse-order
POST
Reverses the current position by placing an opposite market order.
โ
/place-order
/place-order
Method: POST
Description: Places a new order for the given account and symbol with full support for bracket orders and custom trade windows.
๐ง Payload Example
๐ Field Descriptions
accountName
Tradovate account identifier
Example: "PRACTICEAPR812677831"
โ Yes
action
Direction of the trade
"Buy"
, "Sell"
โ Yes
orderType
Type of order to be placed
"Market"
, "Limit"
, "Bracket"
โ Yes
symbol
Ticker symbol for the instrument
Example: "MNQ"
, "ES"
โ Yes
qty
Number of contracts
Any positive integer
โ Yes
limitPrice
Price for limit entry (used for limit/bracket orders)
Numeric
โ No
stopPrice
Stop loss distance or trigger price
Numeric
โ No
takeProfit
Take profit distance or trigger price
Numeric
โ No
trailingOffset
Trailing stop distance (if using trailing stop)
Numeric
โ No
closeExistingOrders
Whether to cancel existing open orders before placing new one
"true"
, "false"
โ No
tradeTimeRanges
Time windows to allow trade execution
["09:30-16:00"]
, etc.
โ No
avoidTradeTimeRanges
Time windows to block trade execution
["12:00-13:00"]
, etc.
โ No
๐งน /flatten-all
/flatten-all
Method: POST
Description: Closes all open positions and cancels all working orders for the specified symbol and account.
๐ง Payload Example
๐ Field Descriptions
accountName
Tradovate account identifier
"PRACTICEMAR1711838981"
โ Yes
symbol
Ticker symbol to flatten
"MNQ"
, "ES"
โ Yes
โ๏ธ /close-all-positions
/close-all-positions
Method: POST
Description: Closes all open positions for the specified symbol
๐ง Payload Example
๐ Field Descriptions
accountName
Tradovate account identifier
"PRACTICEMAR1711838981"
โ Yes
symbol
Ticker symbol to close positions on
"MNQ"
, "ES"
โ Yes
๐ /reverse-order
/reverse-order
Method: POST
Description: Reverses the current position for the given symbol by immediately closing the position and entering an opposite market order of equal size.
๐ง Payload Example
๐ Field Descriptions
accountName
Tradovate account identifier
"PRACTICEMAR1711838981"
โ Yes
symbol
Ticker symbol to reverse order on
"MNQ"
, "ES"
โ Yes
Last updated