typescript-sdk
typescript-sdk copied to clipboard
Market Data Endpoint: /v1beta1/ - Not Working as Expected
trafficstars
You have some market data endpoints that point to /v1beta1/, for example:
https://github.com/alpacahq/typescript-sdk/blob/ea0deb6e2f00b7c13deb826160b9a002a134739c/api/marketData.ts#L472-L479
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: https://github.com/alpacahq/typescript-sdk/blob/ea0deb6e2f00b7c13deb826160b9a002a134739c/factory/createClient.ts#L57 This is not mentioned anywhere I believe.
In my tests, this produces the following error:
{
"message": "endpoint not found."
}
When we change it to /v2/, it works, as shown here:
Is this a mistake, or am I missing something?
This issue might be related too: https://github.com/alpacahq/typescript-sdk/issues/5
Thanks!