You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am trying to get a list of all asset classes to filter for different strategies. Current list asset returns:
Asset({` 'class': 'us_equity',
'easy_to_borrow': True,
'exchange': 'OTC',
'fractionable': False,
'id': 'fb514a1e-243c-4334-8b5d-da2b5735037b',
'marginable': False,
'name': 'Tier One Silver Inc Common Shares (Canada)',
'shortable': True,
'status': 'active',
'symbol': 'TSLVF',
'tradable': False})
In its current form, I can't use the class values as it is a python keyword in the following:
assdf = pd.DataFrame({
'asset_class':[asset.class for asset in active_assets if asset.tradable],
'symbol':[asset.symbol for asset in active_assets if asset.tradable],
'exchange': [asset.exchange for asset in active_assets if asset.tradable],
'shortable': [asset.shortable for asset in active_assets if asset.tradable],
'fractionable': [asset.fractionable for asset in active_assets if asset.tradable],
'marginable': [asset.marginable for asset in active_assets if asset.tradable]})
Describe the solution you'd like.
No response
Describe an alternate solution.
Maybe there's a workaround and I'd appreciate the advice
Anything else? (Additional Context)
No response
The text was updated successfully, but these errors were encountered:
@tallm0cha sorry about this one, due to the current design of the api these types are all just essentially fancy wrappers around the raw maps; this kind of thing is one of the main points we wanted to address in the new design of the sdk 😞
Does the workaround suggested above work for you ? Am I good to close out this issue?
Is there an existing issue for this?
Is your feature request related to a problem? Please describe.
I am trying to get a list of all asset classes to filter for different strategies. Current list asset returns:
Asset({` 'class': 'us_equity',
'easy_to_borrow': True,
'exchange': 'OTC',
'fractionable': False,
'id': 'fb514a1e-243c-4334-8b5d-da2b5735037b',
'marginable': False,
'name': 'Tier One Silver Inc Common Shares (Canada)',
'shortable': True,
'status': 'active',
'symbol': 'TSLVF',
'tradable': False})
In its current form, I can't use the class values as it is a python keyword in the following:
assdf = pd.DataFrame({
'asset_class':[asset.class for asset in active_assets if asset.tradable],
'symbol':[asset.symbol for asset in active_assets if asset.tradable],
'exchange': [asset.exchange for asset in active_assets if asset.tradable],
'shortable': [asset.shortable for asset in active_assets if asset.tradable],
'fractionable': [asset.fractionable for asset in active_assets if asset.tradable],
'marginable': [asset.marginable for asset in active_assets if asset.tradable]})
Describe the solution you'd like.
No response
Describe an alternate solution.
Maybe there's a workaround and I'd appreciate the advice
Anything else? (Additional Context)
No response
The text was updated successfully, but these errors were encountered: