The addresses API provides functionality for managing cryptocurrency addresses, service wallets, and grey lists for various blockchain networks.
Interactive Testing
On this page you can test the API in real time! Enter your API key in the field below and click the "Test" buttons to send requests to the server https://cp-merch-dev.wsdemo.online/api
.
If you encounter CORS errors:
The addresses API allows you to:
Different endpoints require different levels of authentication:
Creates a new address for a certain network and coin (optional). If coin is not provided then address will be generated for all coins of provided network.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
network | string | Да | Network slug (e.g., bitcoin, ethereum, tron) |
coin | string | Нет | Coin slug (optional, if not provided - generates for all network coins) |
mode | string | Нет | Address mode: single, common, cross |
type | string | Нет | Address type: user, hot, cold, collector |
Address successfully created
Invalid request parameters
Returns specified address with balance information.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
address | string | Да | The cryptocurrency address to retrieve |
Address information retrieved
Invalid address format
Address not found
Returns the balance of the withdrawal (hot) wallet for specified network.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
network | string | Да | Network slug (e.g., bitcoin, ethereum, tron) |
Hot wallet balance retrieved
Invalid network
Returns the balance of the service (token collector) wallet for specified network.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
network | string | Да | Network slug (e.g., bitcoin, ethereum, tron) |
Service wallet balance retrieved
Invalid network
Returns the balance of the cold wallet for specified network.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
network | string | Да | Network slug (e.g., bitcoin, ethereum, tron) |
coin | string | Нет | Optional coin parameter to filter by specific coin |
Cold wallet balance retrieved
Invalid network or coin
Register a service wallet for a certain network. For cold wallet need provide only an address. For rest wallets may provide an address and private key, otherwise the wallet will be created and address and private key will be returned.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
network | string | Да | Network slug |
type | string | Да | Wallet type: hot, cold, tokens_collector |
address | string | Нет | Wallet address (required for cold wallets) |
privateKey | string | Нет | Private key (optional, will be generated if not provided) |
Service wallet registered successfully
Invalid parameters
Returns the list of grey-listed addresses for security monitoring.
Grey list retrieved
Register a grey address for a certain network for security monitoring.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
network | string | Да | Network slug |
address | string | Да | Address to add to grey list |
reason | string | Нет | Reason for grey listing |
Grey address registered
Invalid parameters
Delete the grey address for a certain network.
Параметр | Тип | Обязательный | Описание |
---|---|---|---|
network | string | Да | Network slug |
address | string | Да | Address to remove from grey list |
Grey address deleted
Invalid parameters
Address not found in grey list
curl -X POST "https://cp-merch-dev.wsdemo.online/api/v1/addresses" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "ethereum",
"coin": "eth"
}'
Response:
{
"id": "addr_abc123def456",
"address": "0x742d35Cc6634C0532925a3b8D4C9db96590c6C87",
"network": "ethereum",
"coin": "eth",
"type": "user",
"mode": "single",
"createdAt": "2025-01-15T10:30:00Z"
}
curl -X GET "https://cp-merch-dev.wsdemo.online/api/v1/addresses/0x742d35Cc6634C0532925a3b8D4C9db96590c6C87" \
-H "X-Api-Key: YOUR_API_KEY"
Response:
{
"address": "0x742d35Cc6634C0532925a3b8D4C9db96590c6C87",
"network": "ethereum",
"balances": [
{
"coin": "eth",
"balance": "1.234567890123456789",
"balanceUSD": 2468.90
},
{
"coin": "usdt",
"balance": "1000.000000",
"balanceUSD": 1000.00
}
],
"totalBalanceUSD": 3468.90
}
curl -X GET "https://cp-merch-dev.wsdemo.online/api/v1/addresses/hot-wallet/ethereum" \
-H "X-Api-Key: YOUR_API_KEY"
Response:
{
"network": "ethereum",
"walletType": "hot",
"balances": [
{
"coin": "eth",
"balance": "10.567890123456789",
"balanceUSD": 21135.78
},
{
"coin": "usdt",
"balance": "50000.000000",
"balanceUSD": 50000.00
}
],
"totalBalanceUSD": 71135.78
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
// Create address
payload := map[string]string{
"network": "ethereum",
"coin": "eth",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://cp-merch-dev.wsdemo.online/api/v1/addresses", bytes.NewBuffer(jsonData))
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Printf("Response: %s\n", body)
}
// Create new address
const createAddress = async () => {
const response = await fetch('https://cp-merch-dev.wsdemo.online/api/v1/addresses', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
network: 'ethereum',
coin: 'eth'
})
});
const address = await response.json();
console.log('Created address:', address);
// Get address information
const addressResponse = await fetch(`https://cp-merch-dev.wsdemo.online/api/v1/addresses/${address.address}`, {
headers: {
'X-Api-Key': 'YOUR_API_KEY'
}
});
const addressInfo = await addressResponse.json();
console.log('Address info:', addressInfo);
};
createAddress();
import requests
import json
# API configuration
API_BASE = 'https://cp-merch-dev.wsdemo.online/api/v1'
headers = {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
# Create new address
payload = {
'network': 'ethereum',
'coin': 'eth'
}
response = requests.post(f'{API_BASE}/addresses',
headers=headers,
json=payload)
if response.status_code == 201:
address = response.json()
print(f"Created address: {address['address']}")
# Get address information
addr_response = requests.get(f"{API_BASE}/addresses/{address['address']}",
headers=headers)
if addr_response.status_code == 200:
address_info = addr_response.json()
print(f"Address balances: {address_info['balances']}")
else:
print(f"Error: {response.status_code}")
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://cp-merch-dev.wsdemo.online/api/v1';
// Create new address
$payload = json_encode([
'network' => 'ethereum',
'coin' => 'eth'
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $baseUrl . '/addresses');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-Api-Key: ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 201) {
$address = json_decode($response, true);
echo "Created address: " . $address['address'] . "\n";
} else {
echo "Error: " . $httpCode . "\n";
}
?>