typescript-sdk icon indicating copy to clipboard operation
typescript-sdk copied to clipboard

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

Open eduwass opened this issue 11 months ago • 0 comments
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."  
}  

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: https://github.com/alpacahq/typescript-sdk/issues/5

Thanks!

eduwass avatar Nov 29 '24 07:11 eduwass