跳转到主要内容
获取令牌时遇到问题吗
联系支持

Binance - Binance captcha

注意!
  • 此任务将通过我们的代理服务器执行。
  • 仅可使用您的账户登录。

请求参数

type<string>required

BinanceTask


websiteURL<string>required

解决 CAPTCHA 的主页面地址。


websiteKey<string>required

您网站部分的唯一参数。参数 bizIdbizTypebizCode 的值。可以从流量中获取(请参见下面的描述)。


validateId<string>required

动态密钥。参数 validateIdsecurityIdsecurityCheckResponseValidateId 的值。可以从流量中获取(请参见下面的描述)。


userAgent<string>optional

浏览器的 User-Agent。您可以提供自己的 User-Agent,或指定来自 Windows 操作系统的最新 User-Agent。: userAgentPlaceholder


proxyType<string>optional

http - 普通的 http/https 代理;
https - 仅在 "http" 不起作用时尝试(某些自定义代理服务器要求);
socks4 - socks4 代理;
socks5 - socks5 代理。


proxyAddress<string>optional

代理 IP 地址 IPv4/IPv6。不允许:

  • 使用主机名;
  • 使用透明代理(其中客户端 IP 可见);
  • 使用来自本地网络的代理。


proxyPort<integer>optional

代理端口。


proxyLogin<string>optional

代理登录。


proxyPassword<string>optional

代理密码。

如何获取 websiteKeyvalidateId

启用开发者工具,进入 "Network"(网络)标签,激活 CAPTCHA,然后查看请求。有些请求会包含所需的参数值。 例如,参数:

bizCode: "CMC_register", securityId: "09295759baca4d4fbeae80d9ffeaefd8"

或者

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

或者

bizType: "login", validateId: "ff965ea6216b46f3825fa827ecaf297f"

或者

bizId: "login", securityCheckResponseValidateId: "ff965ea6216b46f3825fa827ecaf297f"

要解决验证码所需的参数可以通过执行 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;
}
}
});

然后,您可以像这样检索参数,例如 BCaptchaData.securityCheckResponseValidateId.

创建任务方法

POST
https://api.capmonster.cloud/createTask

要求

{
"clientKey": "API_KEY",
"task":
{
"type": "BinanceTask",
"websiteURL": "https://example.com",
"websiteKey": "login",
"validateId": "cb0bfefa598b4c3887661fde54ecd57b",
"userAgent": "userAgentPlaceholder"
}
}

回应

{
"errorId":0,
"taskId":407533072
}

获取任务结果方法

使用方法 getTaskResult 获取币安解决方案。

POST
https://api.capmonster.cloud/getTaskResult

要求

{
"clientKey":"API_KEY",
"taskId": 407533072
}

回应

{
"errorId":0,
"status":"ready",
"solution":
{
"token":"captcha#09ba4905a79f44f2a99e44f234439644-ioVA7neog7eRHCDAsC0MixpZvt5kc99maS943qIsquNP9D77",
"userAgent":"userAgentPlaceholder"
}
}

使用 SDK 库

// https://github.com/ZennoLab/capmonstercloud-client-js

import { CapMonsterCloudClientFactory, ClientOptions, BinanceRequest /*BinanceRequest*/ } from '@zennolab_com/capmonstercloud-client';

document.addEventListener('DOMContentLoaded', async () => {
const cmcClient = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: '<your capmonster.cloud API key>' }));
console.log(await cmcClient.getBalance());

const binanceRequest = new BinanceRequest({
websiteURL: 'https://example.com',
websiteKey: 'websiteKey',
validateId: 'validateId',
});

// const binanceRequest = new BinanceRequest({
// websiteURL: 'https://example.com',
// websiteKey: 'websiteKey',
// validateId: 'validateId',
// proxyType: 'http',
// proxyAddress: '8.8.8.8',
// proxyPort: 8080,
// proxyLogin: 'proxyLoginHere',
// proxyPassword: 'proxyPasswordHere',
// });

console.log(await cmcClient.Solve(binanceRequest));
});