Environment
Language
Pinescript
Alpaca SDK Version
NA
Other Environment Details
Running lambda function on AWS for webhook
Problem
Orders are not getting executing
*My tradingview alerts are getting triggered which are sent to webhook but the orders are not getting executed in Alpaca, I am able to manually place orders (and get filled) in Alpaca UI though. I am having issues with stocks and crypto. Below is the error from my cloudwatch log
Body parsed: {‘symbol’: ‘LTCUSD’, ‘qty’: 1, ‘side’: ‘buy’, ‘type’: ‘market’, ‘time_in_force’: ‘gtc’}
Alpaca response: 403
{
“buying_power”: “173.84”,
“code”: 40310000,
“cost_basis”: “536.97”,
“message”: “insufficient buying power”
}
Paper or Live Tradng?
live trading API.
Example Code
If you have code that reproduces the problem or will make your issue more clear, please include it here