Health check — verifies the Bearer token is valid
GET
/api/v1/ping
const url = 'https://api.stocksmith.io/api/v1/ping';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.stocksmith.io/api/v1/ping \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Token is valid
Media type application/json
object
ping
required
Always ‘pong’
string
account_id
required
ID of the authenticated account
integer
Example
{ "ping": "pong"}Missing or invalid Bearer token
Media type application/json
object
error
required
Error message
string
Example generated
{ "error": "example"}