Access live BasicSwap DEX orderbook data through our REST API.
X-API-Key headercurl -H "X-API-Key: bsw_live_your_key_here" \
https://api.basicswap.bid/v1/orderbook
All API requests require authentication via an API key. Include your key in the X-API-Key header:
X-API-Key: bsw_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Tier | Limit | Price |
|---|---|---|
| Free | 5 requests/minute | $0 |
| Paid (usage-based) | Unlimited | $0.001 per request after free tier |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 5
X-RateLimit-Remaining: 4
X-RateLimit-Reset: 2025-01-31T12:35:00Z
Get data freshness status. Useful for checking if the orderbook data is current.
{
"status": "fresh",
"lastSyncAt": "2025-01-31T12:34:56Z",
"ageSeconds": 12,
"offerCount": 47
}
Get the full orderbook snapshot with all active offers.
{
"data": [
{
"offerId": "abc123...",
"coinFrom": "Bitcoin",
"coinTo": "Monero",
"amountFrom": "0.5",
"amountTo": "85.5",
"rate": "171.0",
"minSwap": "0.01",
"createdAt": 1706700000000,
"expiresAt": 1706786400000
}
],
"meta": {
"lastSyncAt": "2025-01-31T12:34:56Z",
"offerCount": 47,
"dataAgeSeconds": 12
}
}
Get offers for a specific trading pair.
| Name | Type | Description |
|---|---|---|
pair |
string | Trading pair in format coin1-coin2 using full coin names (e.g., bitcoin-monero) |
GET /v1/orderbook/bitcoin-monero
Available coins: Bitcoin, Monero, Litecoin, Particl, Particl Blind, Particl Anon, Bitcoin Cash. Use the /v1/pairs endpoint to get the current list.
Get all available trading pairs with statistics.
{
"data": [
{
"pair": "BITCOIN-MONERO",
"coinFrom": "BITCOIN",
"coinTo": "MONERO",
"offerCount": 12,
"avgRate": 171.5,
"minRate": 168.0,
"maxRate": 175.0,
"totalVolume": 2.5
}
],
"meta": { ... }
}
Get aggregate orderbook statistics.
{
"data": {
"totalOffers": 47,
"totalPairs": 8,
"totalVolume": 15.5,
"uniqueCoins": ["Bitcoin", "Monero", "Litecoin", "Particl", "Bitcoin Cash"],
"coinCount": 5
},
"meta": { ... }
}
Errors are returned with appropriate HTTP status codes:
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Missing or invalid API key |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
{
"error": "Rate limit exceeded",
"limit": "5 requests per minute",
"retryAfter": 45,
"resetAt": "2025-01-31T12:35:00Z",
"upgradeHint": "Upgrade to a paid plan for higher limits"
}
For questions or issues, please visit BasicSwap GitHub.