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

Fixed wrong API version in URLs and added APIVersion as client option. #320

Closed
wants to merge 1 commit into from

Conversation

cesschneider
Copy link

No description provided.

@gnvk
Copy link
Collaborator

gnvk commented Jan 14, 2025

I don't really understand what you're trying to achieve here. Could you please share the issue you're facing?

@cesschneider
Copy link
Author

I just suggested a parameter to configure API version as it's currently hardcoded in the URLs.

@gnvk
Copy link
Collaborator

gnvk commented Jan 23, 2025

My main problem with this is that there are multiple Alpaca endpoints with multiple api versions. For example the two endpoint groups you changed (crypto and crypto-perp) actually have different versions: v1beta3 and v1beta1, respectively. Setting a single ApiVersion in ClientOpts forces the users to create multiple accounts for each endpoint group, which feels like a workaround.

Moreover, I don't really see a use-case for changing the api version in the SDK. The SDK implements a client for one (typically the latest) api version for each endpoint, why would you want to change that (without changing the implementation, too)?

If you don't mind, for these reasons, I'm closing this PR.

@gnvk gnvk closed this Jan 23, 2025
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

Successfully merging this pull request may close these issues.

2 participants