BitMix API Documentation

Our REST API allows developers to programmatically create and manage Bitcoin mixing transactions.

RESTful API

Simple HTTP endpoints with JSON responses

Secure

HMAC authentication for all requests

Fast

Low latency, high availability infrastructure

Documented

Complete with code examples

Quick Start

1

Get API Credentials

Contact support to receive your API key and secret

API Key: bmx_xxxxxxxxxxxxxxxx
2

Make Your First Request

Create a new mixing order via API

POST https://bitmix.cfd/api/v1/order
3

Process Transactions

Monitor status and handle callbacks

GET https://bitmix.cfd/api/v1/order/{id}

API Endpoints

POST /api/v1/order Create New Order

Parameters

Parameter Type Required Description
addresses Array Yes Array of output addresses with percentages
fee Float No Custom fee percentage (0.5-5)
bitcode String No Your Bitcode for coin reuse prevention
callback_url String No URL for status callbacks

Example Request

{
  "addresses": [
    {
      "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
      "percentage": 50
    },
    {
      "address": "1CounterpartyXXXXXXXXXXXXXXXUWLpVr",
      "percentage": 50
    }
  ],
  "fee": 1.5,
  "bitcode": "ABC123",
  "callback_url": "https://your-app.com/callback"
}

Response

{
  "success": true,
  "order_id": "ord_123456789",
  "deposit_address": "3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
  "min_amount": 0.001,
  "max_amount": 7.343,
  "expires_at": "2024-01-15T23:59:59Z",
  "guarantee_url": "https://bitmix.cfd/letter/ord_123456789"
}
GET /api/v1/order/{id} Get Order Status

Response

{
  "order_id": "ord_123456789",
  "status": "completed",
  "amount_received": 1.5,
  "amount_sent": 1.485,
  "fee_amount": 0.015,
  "transactions": [
    {
      "txid": "abc123...",
      "amount": 0.75,
      "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
      "timestamp": "2024-01-15T12:30:00Z"
    }
  ],
  "created_at": "2024-01-15T12:00:00Z",
  "completed_at": "2024-01-15T12:35:00Z"
}
GET /api/v1/reserve Get Reserve Status

Response

{
  "total_reserve": 2059.93,
  "available": 1850.25,
  "currency": "BTC",
  "updated_at": "2024-01-15T12:00:00Z"
}

Authentication

All API requests require HMAC authentication:

1. Create Signature

signature = HMAC-SHA256(api_secret, request_data + timestamp)

2. Include Headers

X-API-Key: your_api_key
X-API-Signature: generated_signature
X-API-Timestamp: 1641234567

3. Example Implementation (Python)

import hmac
import hashlib
import time
import requests

api_key = "your_api_key"
api_secret = "your_api_secret"
timestamp = str(int(time.time()))

# Create signature
message = request_data + timestamp
signature = hmac.new(
    api_secret.encode(),
    message.encode(),
    hashlib.sha256
).hexdigest()

# Make request
headers = {
    "X-API-Key": api_key,
    "X-API-Signature": signature,
    "X-API-Timestamp": timestamp
}

response = requests.post(url, json=data, headers=headers)

Webhook Callbacks

We can send real-time updates to your server:

Status Updates

{
  "event": "order.status_changed",
  "order_id": "ord_123456789",
  "status": "processing",
  "timestamp": "2024-01-15T12:15:00Z"
}

Transaction Updates

{
  "event": "order.transaction_sent",
  "order_id": "ord_123456789",
  "txid": "abc123...",
  "amount": 0.75,
  "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
  "timestamp": "2024-01-15T12:30:00Z"
}

Client Libraries

Python

pip install bitmix-python
View Docs

JavaScript/Node.js

npm install bitmix-js
View Docs

Go

go get github.com/bitmix/go-bitmix
View Docs

PHP

composer require bitmix/php-sdk
View Docs

Need Help?

Contact our developer support for API assistance

Contact Developer Support