MiningTX API
A simple REST API to read balances, manage mining contracts, track rewards, request withdrawals and monitor partner earnings — the same data that powers your dashboard.
Base URL
https://api.miningtx.com/v1
All requests are made over HTTPS. Responses are JSON. All monetary amounts are USDT and returned as strings to preserve precision.
Quickstart
Make your first authenticated call in under a minute. Grab a key from your dashboard, then fetch your balance:
curl https://api.miningtx.com/v1/balance \
-H "Authorization: Bearer mtx_live_3f9a...e21c"
A successful response returns 200 OK with a JSON body. From here you can list contracts, activate one, and start reading rewards.
Authentication
Authenticate every request with your secret API key in the Authorization header as a Bearer token. To request a key, message us on WhatsApp (+44 111 11111111) and our team will issue one for your account.
curl https://api.miningtx.com/v1/account \
-H "Authorization: Bearer mtx_live_3f9a...e21c"
Keep your secret key private. Never expose it in front-end code or public repositories. Requests without a valid key return 401 Unauthorized.
Libraries
Call the API from any language. Here are ready-to-run snippets for Python and JavaScript.
import requests
API_KEY = "mtx_live_3f9a...e21c"
r = requests.get(
"https://api.miningtx.com/v1/balance",
headers={"Authorization": f"Bearer {API_KEY}"},
)
print(r.json())
const res = await fetch("https://api.miningtx.com/v1/balance", {
headers: { Authorization: `Bearer ${process.env.MTX_KEY}` },
});
const data = await res.json();
console.log(data);
Errors
MiningTX uses conventional HTTP status codes. Errors include a machine-readable code and a human message.
| Status | Meaning |
|---|---|
200 | OK — request succeeded |
400 | Bad request — invalid parameters |
401 | Unauthorized — missing or invalid API key |
402 | Insufficient balance for the requested action |
404 | Resource not found |
429 | Too many requests — rate limited |
500 | Internal server error |
{
"error": {
"code": "insufficient_balance",
"message": "Your balance is too low to activate this contract."
}
}
Pagination
List endpoints accept limit and cursor query parameters. Responses include a next_cursor when more results are available — pass it back to fetch the next page.
{
"data": [ /* ... */ ],
"has_more": true,
"next_cursor": "cur_9f2a..."
}
Rate limits
Each API key is limited to 120 requests per minute. The current state is returned in response headers:
X-RateLimit-Limit— requests allowed per windowX-RateLimit-Remaining— requests left in the current windowX-RateLimit-Reset— unix time when the window resets
Account
{
"id": "usr_8Kd2...",
"username": "satoshi",
"email": "sat@example.com",
"kyc_status": "verified",
"kyc_bonus_credited": true,
"created_at": "2026-06-22T10:14:00Z"
}
When kyc_status becomes verified, the $10 USDT welcome bonus is credited automatically and kyc_bonus_credited flips to true.
Balance
{
"currency": "USDT",
"available": "2480.75",
"in_contracts": "2600.00",
"total_rewards": "1820.00"
}
Deposit address
Query parameters
| Name | Type | Description |
|---|---|---|
network required | string | One of bsc or polygon. |
{
"network": "bsc",
"token": "USDT",
"address": "0x9f3c...A21b",
"min_deposit": "10.00"
}
Mining contracts
{
"contracts": [
{ "id": "starter", "name": "Starter Miner", "price": "200.00", "hash_ths": "2.8", "daily_reward": "6.67" },
{ "id": "ultra", "name": "Ultra Miner", "price": "2600.00", "hash_ths": "36.4", "daily_reward": "130.00" },
{ "id": "quantum", "name": "Quantum Miner", "price": "7000.00", "hash_ths": "98", "daily_reward": "437.50" }
]
}
Activate a contract
Body parameters
| Name | Type | Description |
|---|---|---|
contract_id required | string | ID of the contract, e.g. ultra. |
curl -X POST https://api.miningtx.com/v1/contracts/activate \
-H "Authorization: Bearer mtx_live_..." \
-H "Content-Type: application/json" \
-d '{ "contract_id": "ultra" }'
{
"id": "ct_71fa...",
"contract": "Ultra Miner",
"status": "active",
"daily_reward": "130.00",
"activated_at": "2026-06-22T10:20:00Z"
}
Rewards
Query parameters
| Name | Type | Description |
|---|---|---|
limit optional | integer | Number of entries to return (default 30, max 100). |
{
"rewards": [
{ "date": "2026-06-20", "contract": "Ultra Miner", "amount": "130.00" },
{ "date": "2026-06-19", "contract": "Ultra Miner", "amount": "130.00" }
]
}
Staking
Lock USDT for a fixed term to earn a higher, predefined return. The payout is credited automatically to your balance when the stake matures.
{
"min_amount": "100.00",
"max_amount": "50000.00",
"plans": [
{ "days": 30, "roi_percent": "60" },
{ "days": 180, "roi_percent": "420" },
{ "days": 365, "roi_percent": "1000" }
]
}
Body parameters
| Name | Type | Description |
|---|---|---|
amount required | string | Amount of USDT to stake (between min_amount and max_amount). |
days required | integer | Lock period in days (30–365). ROI is interpolated for in-between values. |
{
"id": "stk_7b21...",
"amount": "1000.00",
"days": 180,
"roi_percent": "420",
"payout": "5200.00",
"status": "active",
"start_time": "2026-06-22T11:02:00Z",
"end_time": "2026-12-19T11:02:00Z"
}
Query parameters
| Name | Type | Description |
|---|---|---|
status optional | string | Filter by active or completed. |
{
"stakes": [
{
"id": "stk_7b21...",
"amount": "1000.00",
"days": 180,
"payout": "5200.00",
"status": "active",
"end_time": "2026-12-19T11:02:00Z"
}
]
}
The payout is credited automatically when the stake reaches its end_time — no claim call needed.
Withdrawals
Body parameters
| Name | Type | Description |
|---|---|---|
amount required | string | Amount of USDT to withdraw. |
network required | string | bsc or polygon. |
address required | string | Destination wallet address. |
{
"id": "wd_4a9c...",
"amount": "500.00",
"network": "bsc",
"status": "pending",
"requested_at": "2026-06-22T11:02:00Z"
}
Transactions
Query parameters
| Name | Type | Description |
|---|---|---|
type optional | string | Filter by deposit, withdrawal, reward or contract. |
limit optional | integer | Entries per page (default 30, max 100). |
cursor optional | string | Pagination cursor from a previous response. |
{
"data": [
{ "id": "tx_1a...", "type": "reward", "amount": "130.00", "date": "2026-06-20" },
{ "id": "tx_2b...", "type": "deposit", "amount": "2600.00", "date": "2026-06-12" }
],
"has_more": false,
"next_cursor": null
}
Partner rewards
{
"referral_code": "SATOSHI16",
"partner_rate": "0.16",
"partners": 42,
"partner_rewards": "3120.00"
}
Partners earn you a 16% partner reward (partner_rate: 0.16) based on their activity, credited straight to your balance.
Webhooks
Subscribe to events to get notified the moment something happens — instead of polling. Add an endpoint URL in Settings → Webhooks and MiningTX will POST a JSON payload to it.
Event types
| Event | Fires when |
|---|---|
deposit.confirmed | A USDT deposit reaches the required confirmations |
kyc.verified | KYC is approved (and the $10 bonus is credited) |
contract.activated | A mining contract goes active |
reward.credited | A daily mining reward is paid to the balance |
withdrawal.processed | A withdrawal is sent on-chain |
{
"event": "reward.credited",
"created_at": "2026-06-22T06:00:00Z",
"data": {
"amount": "130.00",
"contract": "Ultra Miner"
}
}
Every webhook is signed with an X-MiningTX-Signature header. Verify it against your webhook secret before trusting the payload.