alpacahq / alpaca-trade-api-csharp

C# SDK for Alpaca Trade API https://docs.alpaca.markets/
Apache License 2.0
243 stars 77 forks source link

Feature request: Include day trading buying power and/or correct account buying Power #124

Closed ooples closed 4 years ago

ooples commented 5 years ago

According to the details on the alpaca documentation found below:

https://docs.alpaca.markets/user-protections/#day-trade-margin-call-dtmc-protection-at-alpaca

If a user is marked for dmtc protection, the user's true buying power is the day trading buying power and so the value that you receive using the api isn't the accurate buying power so if you try to buy stocks using the max buying power you have, you will receive an error stating you have insufficient day trading buying power.

I would like to either have the day trading buying power variable for each user account accessible by the api or correct the existing buying power that is accessible to reflect the actual buying power each user has

OlegRa commented 5 years ago

@ooples You can check new properties of IAccount interface in 3.2.4 or 3.3.0-beta packages available on NuGet.

ooples commented 5 years ago

I'm already checking that now actually lol. I'm loving the quick turnaround on bug fixes. I really appreciate it!

ooples commented 5 years ago

I have seen one issue but I'm not sure if the problem lies on your end or the data you are pulling from the socket api.

According to this link: https://docs.alpaca.markets/user-protections/#day-trade-margin-call-dtmc-protection-at-alpaca

Users only receive day trading buying power when marked as a pattern day trader. If the user is designated a pattern day trader, the account.multiplier is equal to 4.

On my end I have the account multiplier of 4 but the bool for isPatternDayTrader is showing up as false which is obviously incorrect. I place multiple orders per day so it should be marked as true.

OlegRa commented 5 years ago

@ttt733 Trevor, could you please check this problem on your side?

OlegRa commented 4 years ago

I close it for now after 2 weeks of inactivity. If problem still exist in latest version of SDK feel free to re-open this issue.