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

Market Data Endpoint: /v1beta1/ - Not Working as Expected #10

Open
eduwass opened this issue Nov 29, 2024 · 0 comments · May be fixed by #11
Open

Market Data Endpoint: /v1beta1/ - Not Working as Expected #10

eduwass opened this issue Nov 29, 2024 · 0 comments · May be fixed by #11

Comments

@eduwass
Copy link

eduwass commented Nov 29, 2024

You have some market data endpoints that point to /v1beta1/, for example:

export const getStocksSnapshots =
(context: ClientContext) => (params: GetStocksSnapshotsOptions) =>
context.request<StockSnapshots>({
baseURL: baseURLs.marketData,
path: "/v1beta1/stocks/snapshots",
method: "GET",
params,
});

Also I think that setting the baseURL manually is needed in client init for the domain to be correct, eg:

import { createClient } from '@alpacahq/typescript-sdk'
this.client = createClient({
  key,
  secret,
  paper: true,
  baseURL: 'https://data.alpaca.markets'
})

See:

const baseURL = options.baseURL || (paper ? baseURLs.paper : baseURLs.live);

This is not mentioned anywhere I believe.

In my tests, this produces the following error:

{  
  "message": "endpoint not found."  
}  

000338@2x

When we change it to /v2/, it works, as shown here:
000339@2x

Is this a mistake, or am I missing something?

This issue might be related too: #5

Thanks!

@eduwass eduwass changed the title /v1beta1/ endpoint Market Data Endpoint: /v1beta1/ - Not Working as Expected Dec 9, 2024
@plugged plugged linked a pull request Jan 15, 2025 that will close this issue
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 a pull request may close this issue.

1 participant