Paper buying power

The buying_power and daytrading_buying_power do not seem to be updating in the Paper account using the REST calls. It varies slightly after buying a stock, but doesn’t seem to go down correctly as more stock is purchased. It’s not zero - but does not decrement correctly.
This has worked in the past… just recently started not working.

buyingPower = AlpacaAccountGET(“/v2/account”, “buying_power”)

Function AlpacaAccountGET(endpoint As String, element As String) As String
Dim req As MSXML2.ServerXMLHTTP60
Dim key_header_name, secret_header_name, liveURL, paperURL As String
Dim Json As Object
On Error GoTo e

Set req = New MSXML2.ServerXMLHTTP60

key_header_name = "APCA-API-KEY-ID"
secret_header_name = "APCA-API-SECRET-KEY"

    paperURL = ""

req.Open "GET", paperURL & endpoint, False

req.SetRequestHeader key_header_name, key_id
req.SetRequestHeader secret_header_name, Secret_key


Set Json = JsonConverter.ParseJson(req.ResponseText)
arrayLen = Json.Count

If arrayLen > 0 Then
    AlpacaAccountGET = Json(element)
    AlpacaAccountGET = req.ResponseText
End If


Let us know what language you’re writing your code in. Please include the version number you’re running, if possible.

Alpaca SDK Version
If you’re using an SDK library to interface with the Alpaca API, please include the version number you have installed in your environment.

Other Environment Details
If there’s anything else you’d like to invlude about the environment you’re running your code in - operating System, cloud provider, etc. - list it here.


Describe the provlem you’re running into here.

Paper or Live Tradng?
Let us know if you’re using the paper trading simulator or the live trading API.

Example Code
If you have code that reproduces the problem or will make your issue more clear, please include it here