Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account model is missing fields returned by the API #288

Open
gcatlin opened this issue Jul 2, 2024 · 5 comments · May be fixed by #295
Open

Account model is missing fields returned by the API #288

gcatlin opened this issue Jul 2, 2024 · 5 comments · May be fixed by #295
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gcatlin
Copy link
Contributor

gcatlin commented Jul 2, 2024

https://docs.alpaca.markets/reference/getaccount-1

  • admin_configurations
  • user_configurations
  • options_approved_level
  • options_trading_level
  • options_buying_power
  • pending_transfer_in
  • balance_asof
  • intraday_adjustments
  • pending_reg_taf_fees
@gnvk gnvk added enhancement New feature or request good first issue Good for newcomers labels Jul 2, 2024
@ankitsridhar16
Copy link
Contributor

ankitsridhar16 commented Jul 2, 2024

@gcatlin I looked at the response body for the link you have shared, it is missing some of these fields mentioned in the previous comment

@gcatlin
Copy link
Contributor Author

gcatlin commented Jul 2, 2024

Are you using the Trading API or Broker API? Live or Paper?

With the Trading API in my Paper account, I see:

{
  "id": "8fe4b465-0ba4-4bbf-a871-8a91c0e47c23",
  "admin_configurations": {},
  "user_configurations": null,
  "account_number": "XXXXXXXXXXXX",
  "status": "ACTIVE",
  "crypto_status": "ACTIVE",
  "options_approved_level": 2,
  "options_trading_level": 2,
  "currency": "USD",
  "buying_power": "277308.2",
  "regt_buying_power": "133625.42",
  "daytrading_buying_power": "277308.2",
  "effective_buying_power": "277308.2",
  "non_marginable_buying_power": "63476.32",
  "options_buying_power": "69634.39",
  "bod_dtbp": "277308.36",
  "cash": "59758.51",
  "accrued_fees": "0",
  "pending_transfer_in": "0",
  "portfolio_value": "78687.61",
  "pattern_day_trader": true,
  "trading_blocked": false,
  "transfers_blocked": false,
  "account_blocked": false,
  "created_at": "2023-03-22T00:08:02.208193Z",
  "trade_suspended_by_user": false,
  "multiplier": "4",
  "shorting_enabled": true,
  "equity": "78687.61",
  "last_equity": "78373.617164829",
  "long_market_value": "18929.1",
  "short_market_value": "0",
  "position_market_value": "18929.1",
  "initial_margin": "11874.9",
  "maintenance_margin": "9053.22",
  "last_maintenance_margin": "10286.28",
  "sma": "72830.36",
  "daytrade_count": 1,
  "balance_asof": "2024-07-01",
  "crypto_tier": 1,
  "intraday_adjustments": "0",
  "pending_reg_taf_fees": "0.04"
}

Some of those fields are missing from the documentation.

@ankitsridhar16
Copy link
Contributor

Okay. I just looked at the documentation and some of the fields were missing. I can work on this.

@gcatlin
Copy link
Contributor Author

gcatlin commented Jul 3, 2024

@ankitsridhar16 admin_configurations and user_configurations may not be worth adding until they are documented, since admin_configurations is an object and user_configurations might also be an object.

@gnvk should those 2 fields be tagged with omitempty on the server?

Neither are documented in the OpenAPI specs (Trading API, BrokerAPI).

@ankitsridhar16 ankitsridhar16 linked a pull request Jul 3, 2024 that will close this issue
@ankitsridhar16
Copy link
Contributor

@gcatlin I have created a PR for this - #295 can you take a look and suggest changes/additions accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants