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

No crypto support #26

Closed
Gadersd opened this issue Mar 23, 2022 · 6 comments
Closed

No crypto support #26

Gadersd opened this issue Mar 23, 2022 · 6 comments

Comments

@Gadersd
Copy link
Contributor

Gadersd commented Mar 23, 2022

Alpaca recently added support for cryptocurrency trading, but apca seems to not be able to handle the new "crypto" asset class. When I attempted to request my positions I received the error: Conversion(Json(Error("unknown variant 'crypto', expected 'us_equity'"))).

@Gadersd
Copy link
Contributor Author

Gadersd commented Mar 23, 2022

The code that causes the error is
let positions = client.issue::<positions::Get>( &() ).await.unwrap();

@d-e-s-o
Copy link
Owner

d-e-s-o commented Mar 24, 2022

crypto isn't currently supported, and not exactly planned either (though I may play around with it at some point). That being said, we should most certainly be handling this a bit more gracefully.

@Gadersd
Copy link
Contributor Author

Gadersd commented Mar 24, 2022

Can you give an estimate as to when this may be resolved? As it stands apca is unusable for me since I have invested in cryptocurrencies with Alpaca. Otherwise, do you know of any rust Alpaca crates that do or plan on handling this?

@d-e-s-o
Copy link
Owner

d-e-s-o commented Mar 24, 2022

I have a bunch of changes piled up that I want to push out; there is a chance it may happen this weekend. No idea about other crates, though, sorry.

@d-e-s-o
Copy link
Owner

d-e-s-o commented Mar 25, 2022

Can you try with d80e1eb, please?

@Gadersd
Copy link
Contributor Author

Gadersd commented Mar 25, 2022

The positions request no longer throws an error. Thank you for the swift fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants