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

http
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
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
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.

python
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())
javascript
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.

StatusMeaning
200OK — request succeeded
400Bad request — invalid parameters
401Unauthorized — missing or invalid API key
402Insufficient balance for the requested action
404Resource not found
429Too many requests — rate limited
500Internal server error
json · 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.

json · response
{
  "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 window
  • X-RateLimit-Remaining — requests left in the current window
  • X-RateLimit-Reset — unix time when the window resets

Account

GET/v1/account
Returns the authenticated account profile and KYC status.
json · response
{
  "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

GET/v1/balance
Returns the available USDT balance and totals across the account.
json · response
{
  "currency": "USDT",
  "available": "2480.75",
  "in_contracts": "2600.00",
  "total_rewards": "1820.00"
}

Deposit address

GET/v1/deposit-address
Returns your dedicated on-chain USDT deposit address for the chosen network.

Query parameters

NameTypeDescription
network requiredstringOne of bsc or polygon.
json · response
{
  "network": "bsc",
  "token": "USDT",
  "address": "0x9f3c...A21b",
  "min_deposit": "10.00"
}

Mining contracts

GET/v1/contracts
Lists all available mining contracts with price, hash power and daily reward.
json · response
{
  "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

POST/v1/contracts/activate
Activates a mining contract using your available balance.

Body parameters

NameTypeDescription
contract_id requiredstringID of the contract, e.g. ultra.
cURL
curl -X POST https://api.miningtx.com/v1/contracts/activate \
  -H "Authorization: Bearer mtx_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "contract_id": "ultra" }'
json · response
{
  "id": "ct_71fa...",
  "contract": "Ultra Miner",
  "status": "active",
  "daily_reward": "130.00",
  "activated_at": "2026-06-22T10:20:00Z"
}

Rewards

GET/v1/rewards
Returns daily mining rewards credited to the account. Rewards are paid Monday–Friday.

Query parameters

NameTypeDescription
limit optionalintegerNumber of entries to return (default 30, max 100).
json · response
{
  "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.

GET/v1/staking/plans
Returns the available staking terms and their return rates. ROI scales with the lock period.
json · response
{
  "min_amount": "100.00",
  "max_amount": "50000.00",
  "plans": [
    { "days": 30,  "roi_percent": "60" },
    { "days": 180, "roi_percent": "420" },
    { "days": 365, "roi_percent": "1000" }
  ]
}
POST/v1/staking/stakes
Opens a new stake. The amount is deducted from your balance and locked until the end of the term.

Body parameters

NameTypeDescription
amount requiredstringAmount of USDT to stake (between min_amount and max_amount).
days requiredintegerLock period in days (30–365). ROI is interpolated for in-between values.
json · response
{
  "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"
}
GET/v1/staking/stakes
Lists your stakes with their status and expected payout.

Query parameters

NameTypeDescription
status optionalstringFilter by active or completed.
json · response
{
  "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

POST/v1/withdrawals
Requests a USDT withdrawal to an on-chain address.

Body parameters

NameTypeDescription
amount requiredstringAmount of USDT to withdraw.
network requiredstringbsc or polygon.
address requiredstringDestination wallet address.
json · response
{
  "id": "wd_4a9c...",
  "amount": "500.00",
  "network": "bsc",
  "status": "pending",
  "requested_at": "2026-06-22T11:02:00Z"
}

Transactions

GET/v1/transactions
Returns a unified, paginated history of deposits, withdrawals, contract activations and rewards.

Query parameters

NameTypeDescription
type optionalstringFilter by deposit, withdrawal, reward or contract.
limit optionalintegerEntries per page (default 30, max 100).
cursor optionalstringPagination cursor from a previous response.
json · 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

GET/v1/partners
Returns your referral code, partners and accumulated partner rewards.
json · response
{
  "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

EventFires when
deposit.confirmedA USDT deposit reaches the required confirmations
kyc.verifiedKYC is approved (and the $10 bonus is credited)
contract.activatedA mining contract goes active
reward.creditedA daily mining reward is paid to the balance
withdrawal.processedA withdrawal is sent on-chain
json · webhook payload
{
  "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.

© 2026 MiningTX API · v1
Need a key or help? Talk to support