getSpendingStats
JSON methods
Token tasks
- reCAPTCHA v2
- reCAPTCHA v2 Enterprise
- reCAPTCHA v3
- Cloudflare Turnstile
- GeeTest v3 / v4
- FunCaptcha (Arkose Labs)
- Amazon AWS WAF
- MTCaptcha
- Friendly Captcha
- Lemin Cropped Captcha
- DataDome
- KeyCaptcha
- Capy Puzzle
- Cloudflare Challenge page
- Cutcaptcha
- CyberSiARA
- atbCAPTCHA
- Tencent Captcha
- Prosopo Procaptcha
- CaptchaFox
- Altcha
- NetEase Yidun
- Yandex SmartCaptcha
- VK Captcha
- Binance Captcha
- Custom task (Imperva, Temu and others)
getSpendingStats
Returns your spending for one UTC day, hour by hour: number of tasks and money spent. Failed and refunded tasks are not counted.
POSThttps://unlock-api.com/getSpendingStats
date is any Unix time inside the day you want. Without it, today (UTC) is used.
Request parameters
clientKeyStringRequired
Your API key, 32 characters, from the account page.
dateIntegerOptional
Unix time inside the day to report. Default: today in UTC.
Request
POST /getSpendingStats
{
"clientKey": "YOUR_API_KEY",
"date": 1791590400
}Response
Success
{
"errorId": 0,
"data": [
{
"dateFrom": 1791590400,
"dateTill": 1791593999,
"volume": 120,
"money": 0.066
},
{
"dateFrom": 1791594000,
"dateTill": 1791597599,
"volume": 0,
"money": 0
}
]
}Response fields
errorIdInteger
0 when the request worked, 1 when it did not.
dataArray
24 rows, one per hour: dateFrom, dateTill, volume (tasks) and money (US dollars).
Code samples
curl -s https://unlock-api.com/getSpendingStats \
-H "Content-Type: application/json" \
-d '{"clientKey":"YOUR_API_KEY","date":1791590400}'import requests
r = requests.post("https://unlock-api.com/getSpendingStats", json={
"clientKey": "YOUR_API_KEY",
"date": 1791590400
}).json()
print(r)const r = await fetch("https://unlock-api.com/getSpendingStats", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"clientKey": "YOUR_API_KEY",
"date": 1791590400
}),
}).then((res) => res.json());
console.log(r);Errors this method can return
The key is wrong. Copy it again from the account page. (in.php and res.php: ERROR_WRONG_USER_KEY)