PrivateSwap API Documentation
Simple integration for any of your needs
Getting Started
PrivateSwap provides a REST API for cryptocurrency exchange operations. All requests must be sent over HTTPS and authenticated with an API key.
Authentication:
Send your API key in the request header:
X-API-Key: your_api_key
Endpoints
Get available coins with networks
GET /coins
Headers:
Content-Type: application/json
X-API-Key: your_api_key
Response:
[
{
"icon": "https://privateswap.com/coins/btc.svg",
"coin": "btc",
"network": "btc",
"address_regex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^[(bc1q)|(bc1p)][0-9A-Za-z]{37,62}$"
},
...
]
Get quote
POST /quote
Headers:
X-API-Key: your_api_key
Request body:
{
"send_coin": "btc",
"send_network": "btc",
"get_coin": "xmr",
"get_network": "xmr",
"send_amount": 0.1
}
Response:
{
"from": "BTC",
"to": "ETH",
"rate": "20.5",
"timestamp": "2024-01-15T10:30:00Z"
}
Create exchange
POST /exchange
Headers:
X-API-Key: your_api_key
Request body:
{
"send_coin": "btc",
"send_network": "btc",
"get_coin": "xmr",
"get_network": "xmr",
"send_amount": 0.1,
"get_address": "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H",
"refund_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}
Response:
{
"id": "dgGk18dZVw99",
"type": "float",
"status": "wait",
"send": {
"icon": "https://privateswap.com/coins/btc.svg",
"coin": "btc",
"network": "btc",
"address_regex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^[(bc1q)|(bc1p)][0-9A-Za-z]{37,62}$"
},
"get": {
"icon": "https://privateswap.com/coins/xmr.svg",
"coin": "xmr",
"network": "xmr",
"address_regex": "^[48][a-zA-Z|\\d]{94}([a-zA-Z|\\d]{11})?$"
},
"send_amount": 0.01,
"get_amount": 1.6942597,
"rate": 169.42597,
"send_address": "bc1qvfuqm0s46gqwl8w67a4t5q8cw3yhq5mvdzm9zn",
"get_address": "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H"
}
Get exchange details
GET /exchange-detail/:exchange_id
Headers:
X-API-Key: your_api_key
Response:
{
"id": "dgGk18dZVw99",
"type": "float",
"status": "wait",
"send": {
"icon": "https://privateswap.com/coins/btc.svg",
"coin": "btc",
"network": "btc",
"address_regex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^[(bc1q)|(bc1p)][0-9A-Za-z]{37,62}$"
},
"get": {
"icon": "https://privateswap.com/coins/xmr.svg",
"coin": "xmr",
"network": "xmr",
"address_regex": "^[48][a-zA-Z|\\d]{94}([a-zA-Z|\\d]{11})?$"
},
"send_amount": 0.01,
"get_amount": 1.6942597,
"rate": 169.42597,
"send_address": "bc1qvfuqm0s46gqwl8w67a4t5q8cw3yhq5mvdzm9zn",
"get_address": "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H"
}
If any questions regarding API integration occur - please feel free to contact out technical support via https://google.com