API Documentation

BONKbot API

Integrate BONKbot's powerful trading capabilities into your applications with our comprehensive REST API

Quick Start

Authentication

All API requests require authentication using your API key:

curl -H "Authorization: Bearer YOUR_API_KEY"
Base URL

All API endpoints are relative to:

https://api.bonkbot.io/v1

API Endpoints

Trading
GET
/trades

Get all active trades

POST
/trades

Create a new trade

PUT
/trades/{id}

Update an existing trade

DELETE
/trades/{id}

Cancel a trade

Portfolio
GET
/portfolio

Get portfolio overview

GET
/portfolio/performance

Get performance metrics

Strategies
GET
/strategies

List all available strategies

POST
/strategies

Create a custom strategy

Code Examples

JavaScript/Node.js
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);
  }
}
Python
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)

Rate Limits

1000
Requests per hour
100
Trades per day
10
Requests per second

Need Help?

Our API documentation is constantly evolving. If you need assistance or have questions, reach out to our development team.

Contact Support