Integrate BONKbot's powerful trading capabilities into your applications with our comprehensive REST API
All API requests require authentication using your API key:
All API endpoints are relative to:
/tradesGet all active trades
/tradesCreate a new trade
/trades/{id}Update an existing trade
/trades/{id}Cancel a trade
/portfolioGet portfolio overview
/portfolio/performanceGet performance metrics
/strategiesList all available strategies
/strategiesCreate a custom strategy
const axios = require('axios');
const api = axios.create({
baseURL: 'https://api.bonkbot.io/v1',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
// Get all trades
async function getTrades() {
try {
const response = await api.get('/trades');
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
}
// Create a new trade
async function createTrade(tradeData) {
try {
const response = await api.post('/trades', tradeData);
console.log('Trade created:', response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
}import requests
class BonkBotAPI:
def __init__(self, api_key):
self.base_url = 'https://api.bonkbot.io/v1'
self.headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
def get_trades(self):
response = requests.get(f'{self.base_url}/trades', headers=self.headers)
return response.json()
def create_trade(self, trade_data):
response = requests.post(f'{self.base_url}/trades',
json=trade_data, headers=self.headers)
return response.json()
# Usage
api = BonkBotAPI('YOUR_API_KEY')
trades = api.get_trades()
print(trades)Our API documentation is constantly evolving. If you need assistance or have questions, reach out to our development team.
Contact Support