Trouble Automating Trades via Tradovate API Triggered by TradingView Alerts

Hello everyone,

I am working on a project to automate my trades and could use some help. The goal is to execute trades on Tradovate based on alerts generated by a strategy I’ve created on TradingView.

My Current Workflow:

  1. A condition in my TradingView strategy is met, triggering an alert.
  2. This alert sends a webhook to my local Node.js server.
  3. The server then processes the alert and sends a trade order to Tradovate via their API.

My Current Status:
I have set up the Node.js server, configured it to listen for webhooks from TradingView, and written the code to send orders to Tradovate. I’ve managed to authenticate with Tradovate’s API, and I have a token and account ID stored. I am accessing my key/token via client credentials and have not set up OAuth. I cannot find information on accessing the token’s scope to check its permissions.

My Issue:
This is the error I get when I try to execute a trade using the API: ‘Trade executed: { failureReason: ‘UnknownReason’, failureText: ‘Access is denied’ }’ . I’ve checked the following:

  • The server’s IP is not blocked by a firewall.
  • No rate or connection limits are being hit.
  • API and account credentials are correct.
  • API permissions are set accordingly.
  • The webhooks are being received and handled correctly.
  • The endpoints and alert/order syntax is in accordance with the POST placeOrder guidance in the API docs.
  • The token is not expired and is refreshed.
  • The account linked with the token is active.

I’m unsure how to proceed and would appreciate any help or suggestions. Is there something I’m missing? Could it be an issue with the token’s scope or some other permission-related setting? Please let me know if posting more of my logs or some of the server code will help find remedies for this.

Thank you in advance for your assistance!

any luck?>
im trying as well