Complete reference for Meme Bull's REST API. Build powerful trading applications with our comprehensive endpoints.
The Meme Bull API provides programmatic access to trading functionality, market data, and account management. All API endpoints are RESTful and return JSON responses.
https://api.memebull.com/v1
import axios from 'axios';
const api = axios.create({
baseURL: 'https://api.memebull.com/v1',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
// Get account balance
async function getBalance() {
try {
const response = await api.get('/account/balance');
console.log(response.data);
} catch (error) {
console.error(error.response?.data || error.message);
}
}
All API requests require authentication using your API key. API keys can be generated from your account dashboard.
# HTTP Header Example
Authorization: Bearer sk_live_1234567890abcdef
X-API-Key: sk_live_1234567890abcdef
| Parameter | Type | Description |
|---|---|---|
| name Required | string | Descriptive name for the API key |
| permissions Optional | array | Array of permissions (read, trade, withdraw) |
| expires_at Optional | timestamp | Expiration date for the key |
Get real-time market data including prices, volumes, and 24-hour statistics for all trading pairs.
| Parameter | Type | Description |
|---|---|---|
| symbol Optional | string | Trading pair symbol (e.g., BTC/USDT). If omitted, returns all tickers |
| exchange Optional | string | Specific exchange to fetch data from |
# Get BTC/USDT ticker
GET https://api.memebull.com/v1/market/tickers?symbol=BTC/USDT
# Response Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1640995200
{
"success": true,
"data": {
"symbol": "BTC/USDT",
"price": 42000.50,
"high_24h": 42500.00,
"low_24h": 41500.00,
"volume_24h": 1250.45,
"change_24h": 2.5,
"last_updated": "2024-01-05T10:30:00Z",
"exchange": "binance"
},
"timestamp": 1641393000
}
Place a new trading order. Supports market, limit, stop-loss, and take-profit order types.
| Parameter | Type | Description |
|---|---|---|
| symbol Required | string | Trading pair symbol (e.g., BTC/USDT) |
| side Required | string | Order side: "buy" or "sell" |
| type Required | string | Order type: "market", "limit", "stop", "take_profit" |
| quantity Required | number | Order quantity in base currency |
| price Optional | number | Limit price (required for limit orders) |
| stop_price Optional | number | Stop price for stop-loss/take-profit orders |
POST https://api.memebull.com/v1/trading/order
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"symbol": "BTC/USDT",
"side": "buy",
"type": "limit",
"quantity": 0.1,
"price": 41000,
"time_in_force": "GTC"
}
{
"success": true,
"data": {
"order_id": "ORD_1234567890",
"symbol": "BTC/USDT",
"side": "buy",
"type": "limit",
"quantity": 0.1,
"price": 41000,
"status": "open",
"filled_quantity": 0.0,
"created_at": "2024-01-05T10:30:00Z",
"updated_at": "2024-01-05T10:30:00Z"
},
"timestamp": 1641393000
}
Official JavaScript/TypeScript SDK for interacting with the Meme Bull API. Provides a clean, promise-based interface.
# Using npm
npm install @memebull/sdk
# Using yarn
yarn add @memebull/sdk
import MemeBull from '@memebull/sdk';
const client = new MemeBull({
apiKey: 'YOUR_API_KEY',
environment: 'production' // or 'sandbox'
});
// Get account balance
async function getAccountInfo() {
try {
const balance = await client.account.getBalance();
console.log('Account balance:', balance);
// Place an order
const order = await client.trading.placeOrder({
symbol: 'BTC/USDT',
side: 'buy',
type: 'market',
quantity: 0.01
});
console.log('Order placed:', order);
} catch (error) {
console.error('Error:', error);
}
}
Start building with our API today. Generate your API key and begin trading programmatically in minutes.