API Overview
The Ghost Exchange API allows you to integrate private XMR exchanges into your application programmatically.
Base URL
https://api.ghostexchange.io/v1Authentication
API requests require an API key passed in the header:
X-API-Key: your_api_key_hereTo obtain an API key, contact us through our support page.
Rate Limiting
- —60 requests per minute per API key
- —Rate limit headers are included in every response
Core Endpoints
GET /pairs
Returns all available exchange pairs.
{
"pairs": [
{ "from": "XMR", "to": "BTC", "min": "0.01", "max": null },
{ "from": "BTC", "to": "XMR", "min": "0.0001", "max": null }
]
}GET /rate
Get the current rate for a pair.
GET /rate?from=XMR&to=BTC&amount=1&type=floatResponse:
{
"from": "XMR",
"to": "BTC",
"rate": "0.00185",
"estimated_amount": "0.00185",
"type": "float"
}POST /exchange
Create a new exchange order.
{
"from": "XMR",
"to": "BTC",
"amount": "1",
"address": "bc1q...",
"rate_type": "float"
}Response:
{
"id": "order_abc123",
"deposit_address": "4Abc...",
"deposit_amount": "1.000000",
"estimated_receive": "0.00185000",
"expires_at": null,
"status": "awaiting_deposit"
}GET /exchange/:id
Check order status.
{
"id": "order_abc123",
"status": "complete",
"tx_hash": "abc123...",
"received_amount": "0.00184200"
}SDKs
Official SDKs coming soon for:
- —JavaScript/TypeScript
- —Python
- —Go
Webhook Notifications
You can configure a webhook URL when creating an order. We'll POST status updates to your endpoint as the order progresses.
{
"event": "order.complete",
"order_id": "order_abc123",
"tx_hash": "abc123..."
}