Goblin Swap
API Documentation
API access requires approval. Apply here.
Getting Started
Base URL: https://goblinswap.io/api/v1
All requests must include your API key in the header:
Authorization: Bearer YOUR_API_KEY
Rate limit: 100 requests per minute per API key.
Supported Currencies
GET /currencies
Get list of all supported cryptocurrencies.
Response
{
"currencies": ["btc", "xmr", "eth", "ltc", "dash", "zec", "trx", "usdterc20", "usdttrc20"]
}
Exchange Rate
GET /rate?from=btc&to=xmr&amount=0.5
Calculate exchange rate between two cryptocurrencies.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| from | string | required | Source currency code |
| to | string | required | Destination currency code |
| amount | number | required | Amount to exchange |
Response
{
"estimatedAmount": 109.3896343,
"amount": 109.3896343,
"rate": 109.3896343,
"fee": "$849.24"
}
Minimum Amount
GET /min-amount?from=btc&to=xmr
Get minimum exchange amount for a currency pair.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| from | string | required | Source currency code |
| to | string | required | Destination currency code |
Response
{
"minAmount": "0.001"
}
Create Exchange
POST /create
Create a new exchange order.
Request Body
{
"fromCurrency": "btc",
"toCurrency": "xmr",
"fromAmount": "0.5",
"address": "recipient_xmr_address"
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| fromCurrency | string | required | Source currency code |
| toCurrency | string | required | Destination currency code |
| fromAmount | number | required | Amount to send |
| address | string | required | Recipient address |
Response
{
"swapId": "ABC123",
"depositAddress": "btc_deposit_address",
"depositExtraId": "",
"fromCurrency": "btc",
"fromAmount": "0.5",
"toCurrency": "xmr",
"expectedAmount": "82.41",
"status": "waiting"
}
Get Swap Details
GET /swap/:swapCode
Get full details of an exchange order.
Response
{
"swapId": "ABC123",
"status": "waiting",
"depositAddress": "btc_deposit_address",
"depositExtraId": "",
"fromCurrency": "btc",
"fromAmount": "0.5",
"toCurrency": "xmr",
"expectedAmount": "82.41",
"recipientAddress": "xmr_recipient_address",
"createdAt": "2025-11-26T10:00:00.000Z",
"updatedAt": "2025-11-26T10:00:00.000Z"
}
Get Swap Status
GET /swap/:swapCode/status
Get current status of an exchange order.
Response
{
"swapId": "ABC123",
"status": "waiting"
}
Status Values
| Status | Description |
|---|---|
| waiting | Waiting for deposit |
| confirming | Confirming deposit transaction |
| exchanging | Exchanging currencies |
| sending | Sending to recipient |
| finished | Exchange completed |
| failed | Exchange failed |
| expired | Order expired |
USD Value
GET /usd-value?currency=btc&amount=0.5
Get USD value of a cryptocurrency amount.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| currency | string | required | Currency code |
| amount | number | required | Amount to convert |
Response
{
"usdValue": "45000.00"
}
Reserves
GET /reserves
Get current reserves for all supported currencies.
Response
{
"reserves": {
"btc": "2.13",
"eth": "8.41",
"xmr": "9827.55",
"ltc": "210.73",
"dash": "738.81",
"zec": "1851.88",
"trx": "6827.49",
"usdterc20": "134109.39",
"usdttrc20": "52988.11"
},
"lastUpdated": "2025-11-26T10:00:00.000Z"
}
Error Responses
All errors follow this format:
{
"message": "Error description"
}
HTTP Status Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Resource not found |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |