question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: trading_client.get_all_assets() doesn't deliver 'maintenance_margin_requirement' attribute

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I do:

assets = trading_client.get_all_assets(GetAssetsRequest(asset_class=AssetClass.US_EQUITY,status= AssetStatus.ACTIVE))                              
assets[1]

I see this:

{   'asset_class': <AssetClass.US_EQUITY: 'us_equity'>,
    'easy_to_borrow': False,
    'exchange': <AssetExchange.BATS: 'BATS'>,
    'fractionable': False,
    'id': UUID('ff4089ed-12a6-4fa4-b6e2-3f5271741cd7'),
    'marginable': True,
    'name': 'Donoghue Forlines Yield Enhanced Real Asset ETF',
    'shortable': False,
    'status': <AssetStatus.ACTIVE: 'active'>,
    'symbol': 'DFRA',
    'tradable': True}

But in API Docs it is written that Asset object contains also ‘maintenance_margin_requirement’.

Expected Behavior

No response

SDK Version I encountered this issue in

alpaca-py version: 0.6.0

Steps To Reproduce

assets = trading_client.get_all_assets(GetAssetsRequest(asset_class=AssetClass.US_EQUITY,status= AssetStatus.ACTIVE))                              
assets[1]

Filled out the Steps to Reproduce section?

  • I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
haxddscommented, Oct 20, 2022

It’s been released!

0reactions
alexanucommented, Oct 20, 2022

Thank you. The clock() thing and assets work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maintenance Margin: Definition and Comparison to Margin ...
Maintenance margin, currently at 25% of the total value of the securities, is the minimum amount of equity that must be in a...
Read more >
Maintenance Margin Requirement Basics [Episode 370]
Click here to Subscribe - https://www.youtube.com/OptionAlpha?sub_confirmation=1Are you familiar with stock trading and the stock market but ...
Read more >
How You Manage Work Requirements in a Maintenance ...
In the For Each Asset region, you can define the work requirement details and related attributes. Field. Description. Name. Name of the work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found