Insufficient buying power

hello guys im having trouble placing orders on tradingview using alpaca im risking 50$ in a trade and is telling me ( insufficient buying power contact broker) when i have 500$ buying power available it only lets me place trades where i can lose like 1 or 2 dollars any ideas how to fix this thank you

Do you have any open order in New state, that haven’t been filled yet? Or possibly is your API token that you use for your live account, configured in your application when it should be using your paper account? Or vice versa? Once account could have less than 50 dollars.