Template List
This endpoint allows you to retrieve a list of rental bot templates that are available to users in the Bots Marketplace.
Query Params
Name
Type
Required
Description
//sample javascript code
const axios = require('axios');
const fetchBotTemplates = async () => {
try {
const response = await axios.get('https://api.stockhero.ai/api/templates', {
params: {
page: 1, // Specify the page number
per_page: 8, // Specify number of items per page
sort: 'apy', // Field to sort by
direction: 'desc' // Sorting direction: asc or desc
},
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN' // Replace YOUR_ACCESS_TOKEN with your actual token
}
});
console.log(response.data);
} catch (error) {
console.error(error.response.data);
}
};
fetchBotTemplates();Last updated