API for resellers
Plug our services into your SMM panel. Standard request and response format — works with Perfect Panel, SmartPanel and any panel that supports v2 providers.
- API URL
https://atwitch.ru/api/v2- Method
- POST or GET
- Response
- JSON
- Currency
- USD · RUB/EUR in account
Quick start
- Key. Create it in your account → API. Currency and response language are set there too.
- Balance. Orders are paid from the account balance — top it up in advance.
- Request. Each request is
key+action+ method parameters. Send them as form data or JSON.
<?php
$ch = curl_init('https://atwitch.ru/api/v2');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => http_build_query([
'key' => 'YOUR_API_KEY',
'action' => 'add',
'service' => 1234,
'link' => 'https://www.twitch.tv/channel',
'quantity' => 100,
]),
]);
$order = json_decode(curl_exec($ch), true);
// ['status' => 'success', 'order' => 32]
Place an order action=add
Creates an order and charges your balance. The set of fields depends on the service type — pick the type below.
| Parameter | Description |
|---|---|
keyrequired |
Your API key |
actionrequired |
add |
servicerequired |
Service ID from the services list |
linkrequired |
Link to the channel, stream or video |
quantityrequired |
Quantity |
runsoptional |
Number of runs (drip-feed) |
intervaloptional |
Interval between runs, minutes |
curl -X POST https://atwitch.ru/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=1234 \
-d link=https://www.twitch.tv/channel \
-d quantity=100
{
"status": "success",
"order": 32
}
Order status action=status
Current state of one order: progress and the amount charged.
| Parameter | Description |
|---|---|
keyrequired |
Your API key |
actionrequired |
status |
orderrequired |
Order ID |
curl -X POST https://atwitch.ru/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d order=32
{
"order": 32,
"status": "In progress",
"start_count": 0,
"remains": 0,
"charge": 0.036,
"currency": "USD"
}
Multiple orders status action=status
Several orders in one request. The response is an object keyed by order ID.
| Parameter | Description |
|---|---|
keyrequired |
Your API key |
actionrequired |
status |
ordersrequired |
Order IDs, comma-separated or an array |
curl -X POST https://atwitch.ru/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d orders=12,13,2
{
"12": {
"order": 12,
"status": "Processing",
"start_count": 0,
"remains": 0,
"charge": 1.26,
"currency": "USD"
},
"13": {
"order": 13,
"status": "Completed",
"start_count": 0,
"remains": 0,
"charge": 0.63,
"currency": "USD"
},
"2": {
"error": "Order not found"
}
}
Services list action=services
All services available via API, priced per 1000 in your account currency. The list refreshes daily — cache it on your side.
| Parameter | Description |
|---|---|
keyrequired |
Your API key |
actionrequired |
services |
curl -X POST https://atwitch.ru/api/v2 \
-d key=YOUR_API_KEY \
-d action=services
[
{
"service": 1234,
"name": "Twitch Viewers — 1 hour",
"type": "Default",
"category": "Twitch > Viewers",
"desc": "Start: 0-15 min",
"rate": 0.264,
"min": 10,
"max": 5000,
"multiple": 0,
"dripfeed": false,
"refill": false
}
]
Balance action=balance
Account balance including bonus points.
| Parameter | Description |
|---|---|
keyrequired |
Your API key |
actionrequired |
balance |
curl -X POST https://atwitch.ru/api/v2 \
-d key=YOUR_API_KEY \
-d action=balance
{
"status": "success",
"balance": 100.84,
"currency": "USD"
}
Order statuses
- Pending Accepted, waiting to start
- In progress Starting
- Processing Running
- Completed Done
- Partial Partly done
- Canceled Canceled
Errors
On failure you get {"error": "…"} — the text is always English so a panel can parse it.
Parameter `key` is required | The key is missing |
API is disable for this User or User not found! Contact the Support | Wrong key or API is disabled for the account — contact support |
Parameter `action` is required | The action is missing |
This action method not allowed | Unknown action |
Parameter `service` is required | The service is missing |
Duplicate url, please try again later | This link already has recent orders — retry later |
Incorrect request parameter `order` or `orders` | order or orders is missing |
Order not found | The order is not among yours |
type: default
.png)
