Binance - Binance captcha

-
CapMonster Cloud uses built-in proxies by default — their cost is already included in the service. You only need to specify your own proxies in cases where the website does not accept the token or access to the built-in services is restricted.
-
If you are using a proxy with IP authorization, make sure to whitelist the address 65.21.190.34.
-
Use only to log in with your account.
Request parameters
IMPORTANT: some parameter values are dynamic — they change with each render of the page using Binance.
Extract them immediately before creating the task to avoid errors during solving.
See examples of parameter extraction in the section How to get websiteKey and validateId.
type<string>requiredBinanceTask
websiteURL<string>requiredThe address of the main page where the captcha is solved.
websiteKey<string>requiredA unique parameter for your website's section. The value of the parameter bizId, bizType, or bizCode. It can be taken from the traffic (see the description below).
Format example: login
validateId<string>requiredA dynamic key. The value of the parameter validateId, securityId, or securityCheckResponseValidateId. It can be taken from the traffic (see the description below).
Format example: cb0bfefa598b4c3887661fde54ecd57b
userAgent<string>optionalBrowser User-Agent. Use the current value supported by CapMonster Cloud: userAgentPlaceholder
You can get the latest value at: https://capmonster.cloud/api/useragent/actual.
proxyType<string>optionalhttp - regular http/https proxy;
https - try this option only if "http" doesn't work (required for some custom proxies);
socks4 - socks4 proxy;
socks5 - socks5 proxy.
proxyAddress<string>optionalIPv4/IPv6 proxy IP address. Not allowed:
- using transparent proxies (where you can see the client's IP);
- using proxies on local machines.
proxyPort<integer>optionalProxy port.
proxyLogin<string>optionalProxy-server login.
proxyPassword<string>optionalProxy-server password.
Create task method
- BinanceTask (without proxy)
- BinanceTask (with proxy)
https://api.capmonster.cloud/createTask
Request example
{
"clientKey": "API_KEY",
"task": {
"type": "BinanceTask",
"websiteURL": "https://yourwebsite.com/page-with-binance",
"websiteKey": "your-website-key",
"validateId": "your-validate-id",
"userAgent": "userAgentPlaceholder"
}
}
Response example
{
"errorId":0,
"taskId":407533072
}
https://api.capmonster.cloud/createTask
Request example
{
"clientKey": "API_KEY",
"task": {
"type": "BinanceTask",
"websiteURL": "https://yourwebsite.com/page-with-binance",
"websiteKey": "your-website-key",
"validateId": "your-validate-id",
"userAgent": "userAgentPlaceholder",
"proxyType": "your-proxy-type",
"proxyAddress": "your-proxy-address",
"proxyPort": 1234,
"proxyLogin": "your-proxy-login",
"proxyPassword": "your-proxy-password",
"userAgent": "userAgentPlaceholder"
}
}
Response example
{
"errorId":0,
"taskId":407533072
}
Get task result method
Use the method getTaskResult to obtain the Binance solution.
https://api.capmonster.cloud/getTaskResult
Request example
{
"clientKey":"API_KEY",
"taskId": 407533072
}
Response example
{
"errorId": 0,
"status": "ready",
"solution": {
"token": "captcha#09ba4905a79f44f2a99e44f234439644-ioVA7neog7eRHCDAsC0MixpZvt5kc99maS943qIsquNP9D77",
"userAgent": "userAgentPlaceholder"
}
}
How to get websiteKey and validateId
Enable Developer Tools, go to the Network tab, activate the CAPTCHA, and look at the requests. Some of them will contain the required parameter values. For example, the parameters:
bizCode: "CMC_register", securityId: "09295759baca4d4fbeae80d9ffeaefd8"

or
bizId: "CMC_register", securityCheckResponseValidateId: "09295759baca4d4fbeae80d9ffeaefd8"

or
bizType: "login", validateId: "ff965ea6216b46f3825fa827ecaf297f"

or
bizId: "login", securityCheckResponseValidateId: "ff965ea6216b46f3825fa827ecaf297f"
The necessary parameters to solve the captcha can be obtained by executing JavaScript:
let originalBCaptcha = window.BCaptcha;
let BCaptchaData;
Object.defineProperty(window, 'BCaptcha', {
get: function() {
return function(args) {
const BCaptcha = new originalBCaptcha(args);
let BCaptchaShow = BCaptcha.__proto__.show;
BCaptcha.__proto__.show = function(args) {
BCaptchaData = args;
return 1;
};
return BCaptcha;
};
}
});
Then, you can retrieve the parameters, for example, like this BCaptchaData.securityCheckResponseValidateId.
Use the SDK library
- JavaScript / TypeScript
- Python
- C#
Show code (for browser)
// https://github.com/CapMonsterCloud/capmonster-nodejs-captcha-solver
import {
CapMonsterCloudClientFactory,
ClientOptions,
BinanceRequest
} from "@zennolab_com/capmonstercloud-client";
document.addEventListener("DOMContentLoaded", async () => {
const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key
const client = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: API_KEY })
);
// Basic example without proxy
// CapMonster Cloud automatically uses its own proxies
let binanceRequest = new BinanceRequest({
websiteURL: "https://yourwebsite.com/page-with-binance-captcha",
websiteKey: "your-website-key",
validateId: "your-validate-id",
});
// Example using your proxy
// Uncomment this block if you want to use your own proxy
/*
const proxy = {
proxyType: "http",
proxyAddress: "123.45.67.89",
proxyPort: 8080,
proxyLogin: "username",
proxyPassword: "password",
};
binanceRequest = new BinanceRequest({
websiteURL: "https://yourwebsite.com/page-with-binance-captcha",
websiteKey: "your-website-key",
validateId: "your-validate-id",
proxy,
});
*/
// You can check your balance if necessary
const balance = await client.getBalance();
console.log("Balance:", balance);
const result = await client.Solve(binanceRequest);
console.log("Solution:", result.solution);
});
Show code (Node.js)
// https://github.com/CapMonsterCloud/capmonster-nodejs-captcha-solver
const {
CapMonsterCloudClientFactory,
ClientOptions,
BinanceRequest,
} = require("@zennolab_com/capmonstercloud-client");
const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key
async function solveBinanceCaptcha() {
const client = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: API_KEY }),
);
// Basic example without proxy
// CapMonster Cloud automatically uses its own proxies
let binanceRequest = new BinanceRequest({
websiteURL: "https://yourwebsite.com/page-with-binance-captcha",
websiteKey: "your-website-key",
validateId: "your-validate-id",
});
// Example using your proxy
// Uncomment this block if you want to use your own proxy
/*
const proxy = {
proxyType: "http",
proxyAddress: "123.45.67.89",
proxyPort: 8080,
proxyLogin: "username",
proxyPassword: "password",
};
binanceRequest = new BinanceRequest({
websiteURL: "https://yourwebsite.com/page-with-binance-captcha",
websiteKey: "your-website-key",
validateId: "your-validate-id",
proxy,
});
*/
// You can check your balance if necessary
const balance = await client.getBalance();
console.log("Balance:", balance);
const result = await client.Solve(binanceRequest);
console.log("Solution:", result.solution);
}
solveBinanceCaptcha().catch(console.error);
Show code
# https://github.com/CapMonsterCloud/capmonster-python-captcha-solver
import asyncio
from capmonstercloudclient import CapMonsterClient, ClientOptions
from capmonstercloudclient.requests import BinanceTaskRequest
# Import ProxyInfo if you plan to use your own proxy
from capmonstercloudclient.requests.proxy_info import ProxyInfo
API_KEY = "YOUR_API_KEY" # Specify your CapMonster Cloud API key
async def solve_binance_captcha():
client = CapMonsterClient(
options=ClientOptions(api_key=API_KEY)
)
# Basic example without proxy
# CapMonster Cloud automatically uses its own proxies
binance_request = BinanceTaskRequest(
websiteUrl="https://yourwebsite.com/page-with-binance-captcha",
websiteKey="your-website-key",
validateId="your-validate-id",
)
# Example using your proxy
# Uncomment this block if you want to use your own proxy
"""
proxy = ProxyInfo(
proxyType="http",
proxyAddress="123.45.67.89",
proxyPort=8080,
proxyLogin="username",
proxyPassword="password",
)
binance_request = BinanceTaskRequest(
websiteUrl="https://yourwebsite.com/page-with-binance-captcha",
websiteKey="your-website-key",
validateId="your-validate-id",
proxy=proxy,
)
"""
# You can check your balance if necessary
balance = await client.get_balance()
print("Balance:", balance)
result = await client.solve_captcha(binance_request)
print("Solution:", result)
asyncio.run(solve_binance_captcha())
Show code
// https://github.com/CapMonsterCloud/capmonster-dotnet-captcha-solver
using System;
using System.Threading.Tasks;
using Zennolab.CapMonsterCloud;
using Zennolab.CapMonsterCloud.Requests;
class Program
{
static async Task Main(string[] args)
{
// Specify your CapMonster Cloud API key
var clientOptions = new ClientOptions
{
ClientKey = "YOUR_API_KEY"
};
var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions);
// Basic example without proxy
// CapMonster Cloud automatically uses its own proxies
var binanceRequest = new BinanceTaskRequest
{
WebsiteUrl = "https://yourwebsite.com/page-with-binance-captcha",
WebsiteKey = "your-website-key",
ValidateId = "your-validate-id",
UserAgent = "userAgentPlaceholder"
};
// Example using your proxy
// Uncomment this block if you want to use your own proxy
/*
binanceRequest = new BinanceTaskRequest
{
WebsiteUrl = "https://yourwebsite.com/page-with-binance-captcha",
WebsiteKey = "your-website-key",
ValidateId = "your-validate-id",
UserAgent = "userAgentPlaceholder",
Proxy = new ProxyContainer(
"123.45.67.89",
8080,
ProxyType.Http,
"username",
"password"
)
};
*/
// You can check your balance if necessary
var balance = await cmCloudClient.GetBalanceAsync();
Console.WriteLine("Balance: " + balance);
var binanceResult = await cmCloudClient.SolveAsync(binanceRequest);
Console.WriteLine("Solution: " + binanceResult.Solution.Value);
}
}
