-
Couldn't load subscription status.
- Fork 146
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe.
Currently there is no way to check if the provided credentials/configuration/connection is correct to connect to the alpaca api. It would be nice to have a function/implementation to return the http status code and/or similar.
Describe the solution you'd like.
Maybe something similar to:
const alpaca = new Alpaca({
keyId: process.env.ALPACA_API_KEY,
secretKey: process.env.ALPACA_API_SECRET,
})
if(alpaca.validateConnection()){
console.log("alpaca connection is valid.")
} else {
throw new Error("alpaca connection is invalid.")
}
// Or:
if(alpaca.apiHttpStatusCode === '401'){
}
Describe an alternate solution.
No response
Anything else? (Additional Context)
No response
Metadata
Metadata
Assignees
Labels
No labels