alpha
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBinance Alpha Skill
Binance Alpha Skill
Alpha request on Binance using authenticated API endpoints. Requires API key and secret key for certain endpoints. Return the result in JSON format.
通过经过身份验证的API端点在Binance上发起Alpha请求,部分端点需要提供API key和secret key,返回结果为JSON格式。
Quick Reference
快速参考
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
| Ticker (24hr Price Statistics) | symbol | None | No |
| Aggregated Trades | symbol | fromId, startTime, endTime, limit | No |
| Get Exchange Info | None | None | No |
| Klines (Candlestick Data) | symbol, interval | limit, startTime, endTime | No |
| Token List | None | None | No |
| 端点 | 描述 | 必填参数 | 选填参数 | 身份验证 |
|---|---|---|---|---|
| 行情(24小时价格统计) | symbol | 无 | 否 |
| 聚合交易记录 | symbol | fromId, startTime, endTime, limit | 否 |
| 获取交易所信息 | 无 | 无 | 否 |
| K线(蜡烛图数据) | symbol, interval | limit, startTime, endTime | 否 |
| 代币列表 | 无 | 无 | 否 |
Parameters
参数
Common Parameters
通用参数
- symbol: e.g., "ALPHA_175USDT" – use token ID from Token List
- fromId: starting trade ID to fetch from (e.g., 1)
- startTime: start timestamp (milliseconds) (e.g., 1623319461670)
- endTime: end timestamp (milliseconds) (e.g., 1641782889000)
- limit: number of results to return (default 500, max 1000) (e.g., 500)
- interval: e.g., "1h" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
- symbol: 例如 "ALPHA_175USDT" – 使用代币列表中的token ID
- fromId: 要获取的起始交易ID(例如1)
- startTime: 起始时间戳(毫秒)(例如 1623319461670)
- endTime: 结束时间戳(毫秒)(例如 1641782889000)
- limit: 返回结果数量(默认500,最大1000)(例如500)
- interval: 例如 "1h" – 支持的时间间隔:1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
Authentication
身份验证
For endpoints that require authentication, you will need to provide Binance API credentials.
Required credentials:
- apiKey: Your Binance API key (for header)
- secretKey: Your Binance API secret (for signing)
Base URLs:
- Mainnet: https://www.binance.com
对于需要身份验证的端点,你需要提供Binance API凭证。
所需凭证:
- apiKey: 你的Binance API key(放在请求头中)
- secretKey: 你的Binance API secret(用于签名)
基础URL:
Security
安全
Share Credentials
凭证提交
Users can provide Binance API credentials by sending a file where the content is in the following format:
bash
abc123...xyz
secret123...key用户可以通过发送文件的形式提供Binance API凭证,文件内容格式如下:
bash
abc123...xyz
secret123...keyNever Disclose API Key and Secret
切勿泄露API Key和Secret
Never disclose the location of the API key and secret file.
Never send the API key and secret to any website other than Mainnet and Testnet.
切勿泄露API key和secret文件的存储位置。
除了主网和测试网之外,切勿将API key和secret发送给任何其他网站。
Never Display Full Secrets
切勿完整展示密钥
When showing credentials to users:
- API Key: Show first 5 + last 4 characters:
su1Qc...8akf - Secret Key: Always mask, show only last 5:
***...aws1
Example response when asked for credentials:
Account: main
API Key: su1Qc...8akf
Secret: ***...aws1
向用户展示凭证时:
- API Key: 仅展示前5位 + 后4位:
su1Qc...8akf - Secret Key: 始终脱敏,仅展示最后5位:
***...aws1
查询凭证时的响应示例:
账户: main
API Key: su1Qc...8akf
Secret: ***...aws1
Listing Accounts
账户列表展示
When listing accounts, show names and environment only — never keys:
Binance Accounts:
- main (Mainnet)
- futures-keys (Mainnet)
列出账户时,仅展示名称和环境,绝不展示密钥:
Binance账户:
- main(主网)
- futures-keys(主网)
Transactions in Mainnet
主网交易
When performing transactions in mainnet, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.
在主网执行交易时,务必先与用户确认,要求用户输入"CONFIRM"后再继续操作。
Binance Accounts
Binance账户
main
main
- API Key: your_mainnet_api_key
- Secret: your_mainnet_secret
- API Key: 你的主网API key
- Secret: 你的主网secret
TOOLS.md Structure
TOOLS.md结构
bash
undefinedbash
undefinedBinance Accounts
Binance Accounts
main
main
- API Key: abc123...xyz
- Secret: secret123...key
- Description: Primary trading account
- API Key: abc123...xyz
- Secret: secret123...key
- Description: Primary trading account
futures-keys
futures-keys
- API Key: futures789...def
- Secret: futuressecret...uvw
- Description: Futures trading account
undefined- API Key: futures789...def
- Secret: futuressecret...uvw
- Description: Futures trading account
undefinedAgent Behavior
Agent行为规范
- Credentials requested: Mask secrets (show last 5 chars only)
- Listing accounts: Show names and environment, never keys
- Account selection: Ask if ambiguous, default to main
- When doing a transaction in mainnet, confirm with user before by asking to write "CONFIRM" to proceed
- New credentials: Prompt for name, environment, signing mode
- 被请求提供凭证时:对密钥脱敏(仅展示最后5位)
- 列出账户时:展示名称和环境,绝不展示密钥
- 账户选择:存在歧义时询问用户,默认选择main账户
- 在主网执行交易前,要求用户输入"CONFIRM"确认后再继续
- 新增凭证时:提示用户提供名称、环境、签名模式
Adding New Accounts
新增账户
When user provides new credentials:
- Ask for account name
- Store in with masked display confirmation
TOOLS.md
当用户提供新凭证时:
- 询问账户名称
- 存储到中,并向用户确认脱敏后的展示内容
TOOLS.md
Signing Requests
请求签名
For trading endpoints that require a signature:
- Build query string with all parameters, including the timestamp (Unix ms).
- Percent-encode the parameters using UTF-8 according to RFC 3986.
- Sign query string with secretKey using HMAC SHA256, RSA, or Ed25519 (depending on the account configuration).
- Append signature to query string.
- Include header.
X-MBX-APIKEY
Otherwise, do not perform steps 3–5.
对于需要签名的交易端点:
- 构建包含所有参数的查询字符串,包括时间戳(Unix毫秒级)。
- 按照RFC 3986规范使用UTF-8对参数进行百分号编码。
- 使用secretKey对查询字符串进行签名,支持HMAC SHA256、RSA或Ed25519(取决于账户配置)。
- 将签名追加到查询字符串中。
- 添加请求头。
X-MBX-APIKEY
不需要签名的请求无需执行3-5步。
User Agent Header
User-Agent请求头
Include header with the following string:
User-Agentbinance-alpha/1.0.0 (Skill)See for implementation details.
references/authentication.md请求中需携带头,值为:
User-Agentbinance-alpha/1.0.0 (Skill)实现细节请参考
references/authentication.md