vip-loan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Binance Vip-loan Skill

Binance VIP借贷Skill

Vip-loan request on Binance using authenticated API endpoints. Requires API key and secret key for certain endpoints. Return the result in JSON format.
使用已认证的API端点在Binance上提交VIP借贷请求。部分端点需要API密钥和Secret密钥。返回JSON格式的结果。

Quick Reference

快速参考

EndpointDescriptionRequiredOptionalAuthentication
/sapi/v1/loan/vip/request/interestRate
(GET)
Get Borrow Interest Rate(USER_DATA)loanCoinrecvWindowYes
/sapi/v1/loan/vip/collateral/data
(GET)
Get Collateral Asset Data(USER_DATA)NonecollateralCoin, recvWindowYes
/sapi/v1/loan/vip/loanable/data
(GET)
Get Loanable Assets Data(USER_DATA)NoneloanCoin, vipLevel, recvWindowYes
/sapi/v1/loan/vip/interestRateHistory
(GET)
Get VIP Loan Interest Rate History (USER_DATA)coin, recvWindowstartTime, endTime, current, limitYes
/sapi/v1/loan/vip/borrow
(POST)
VIP Loan Borrow(TRADE)loanAccountId, loanCoin, loanAmount, collateralAccountId, collateralCoin, isFlexibleRateloanTerm, recvWindowYes
/sapi/v1/loan/vip/renew
(POST)
VIP Loan Renew(TRADE)orderId, loanTermrecvWindowYes
/sapi/v1/loan/vip/repay
(POST)
VIP Loan Repay(TRADE)orderId, amountrecvWindowYes
/sapi/v1/loan/vip/collateral/account
(GET)
Check VIP Loan Collateral Account (USER_DATA)NoneorderId, collateralAccountId, recvWindowYes
/sapi/v1/loan/vip/accruedInterest
(GET)
Get VIP Loan Accrued Interest (USER_DATA)NoneorderId, loanCoin, startTime, endTime, current, limit, recvWindowYes
/sapi/v1/loan/vip/ongoing/orders
(GET)
Get VIP Loan Ongoing Orders(USER_DATA)NoneorderId, collateralAccountId, loanCoin, collateralCoin, current, limit, recvWindowYes
/sapi/v1/loan/vip/request/data
(GET)
Query Application Status(USER_DATA)Nonecurrent, limit, recvWindowYes

端点描述必填参数可选参数认证要求
/sapi/v1/loan/vip/request/interestRate
(GET)
获取借贷利率(USER_DATA)loanCoinrecvWindow
/sapi/v1/loan/vip/collateral/data
(GET)
获取抵押资产数据(USER_DATA)collateralCoin, recvWindow
/sapi/v1/loan/vip/loanable/data
(GET)
获取可借贷资产数据(USER_DATA)loanCoin, vipLevel, recvWindow
/sapi/v1/loan/vip/interestRateHistory
(GET)
获取VIP借贷利率历史记录(USER_DATA)coin, recvWindowstartTime, endTime, current, limit
/sapi/v1/loan/vip/borrow
(POST)
VIP借贷申请(TRADE)loanAccountId, loanCoin, loanAmount, collateralAccountId, collateralCoin, isFlexibleRateloanTerm, recvWindow
/sapi/v1/loan/vip/renew
(POST)
VIP借贷续期(TRADE)orderId, loanTermrecvWindow
/sapi/v1/loan/vip/repay
(POST)
VIP借贷还款(TRADE)orderId, amountrecvWindow
/sapi/v1/loan/vip/collateral/account
(GET)
查看VIP借贷抵押账户(USER_DATA)orderId, collateralAccountId, recvWindow
/sapi/v1/loan/vip/accruedInterest
(GET)
获取VIP借贷应计利息(USER_DATA)orderId, loanCoin, startTime, endTime, current, limit, recvWindow
/sapi/v1/loan/vip/ongoing/orders
(GET)
获取VIP借贷进行中订单(USER_DATA)orderId, collateralAccountId, loanCoin, collateralCoin, current, limit, recvWindow
/sapi/v1/loan/vip/request/data
(GET)
查询申请状态(USER_DATA)current, limit, recvWindow

Parameters

参数

Common Parameters

通用参数

  • loanCoin:
  • recvWindow: (e.g., 5000)
  • collateralCoin:
  • loanCoin:
  • vipLevel: default:user's vip level (e.g., 1)
  • coin:
  • startTime: (e.g., 1623319461670)
  • endTime: (e.g., 1641782889000)
  • current: Current querying page. Start from 1; default: 1; max: 1000 (e.g., 1)
  • limit: Default: 10; max: 100 (e.g., 10)
  • recvWindow: (e.g., 5000)
  • loanAccountId: (e.g., 1)
  • loanAmount: (e.g., 1.0)
  • collateralAccountId: Multiple split by
    ,
    (e.g., 1)
  • collateralCoin: Multiple split by
    ,
  • isFlexibleRate: Default: TRUE. TRUE : flexible rate; FALSE: fixed rate (e.g., true)
  • loanTerm: Mandatory for fixed rate. Optional for fixed interest rate. Eg: 30/60 days
  • orderId: (e.g., 1)
  • loanTerm: 30/60 days
  • amount: (e.g., 1.0)
  • orderId: (e.g., 1)
  • collateralAccountId: (e.g., 1)
  • loanCoin:
  • recvWindow: (示例:5000)
  • collateralCoin:
  • loanCoin:
  • vipLevel: 默认值:用户的VIP等级(示例:1)
  • coin:
  • startTime: (示例:1623319461670)
  • endTime: (示例:1641782889000)
  • current: 当前查询页码。从1开始;默认值:1;最大值:1000(示例:1)
  • limit: 默认值:10;最大值:100(示例:10)
  • recvWindow: (示例:5000)
  • loanAccountId: (示例:1)
  • loanAmount: (示例:1.0)
  • collateralAccountId: 多个用
    ,
    分隔(示例:1)
  • collateralCoin: 多个用
    ,
    分隔
  • isFlexibleRate: 默认值:TRUE。TRUE:浮动利率;FALSE:固定利率(示例:true)
  • loanTerm: 固定利率必填。固定利率可选。例如:30/60天
  • orderId: (示例:1)
  • loanTerm: 30/60天
  • amount: (示例:1.0)
  • orderId: (示例:1)
  • collateralAccountId: (示例:1)

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:
对于需要认证的端点,你需要提供Binance API凭证。 所需凭证:
  • apiKey: 你的Binance API密钥(用于请求头)
  • secretKey: 你的Binance API保密密钥(用于签名)
基础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...key

Never Disclose API Key and Secret

切勿泄露API密钥和保密密钥

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密钥和保密密钥文件的存储位置。
切勿将API密钥和保密密钥发送至主网和测试网以外的任何网站。

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密钥: 显示前5位+后4位字符:
    su1Qc...8akf
  • 保密密钥: 始终掩码,仅显示最后5位:
    ***...aws1
请求凭证时的示例回复: 账户:main API密钥:su1Qc...8akf 保密密钥:***...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密钥: your_mainnet_api_key
  • 保密密钥: your_mainnet_secret

TOOLS.md Structure

TOOLS.md结构

bash
undefined
bash
undefined

Binance 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
undefined

Agent Behavior

Agent行为

  1. Credentials requested: Mask secrets (show last 5 chars only)
  2. Listing accounts: Show names and environment, never keys
  3. Account selection: Ask if ambiguous, default to main
  4. When doing a transaction in mainnet, confirm with user before by asking to write "CONFIRM" to proceed
  5. New credentials: Prompt for name, environment, signing mode
  1. 请求凭证时:对保密密钥进行掩码处理(仅显示最后5位字符)
  2. 列出账户时:仅显示名称和环境,绝不显示密钥
  3. 账户选择:若存在歧义则询问用户,默认选择main账户
  4. 在主网执行交易时,先请求用户输入"CONFIRM"进行确认,然后再继续
  5. 添加新凭证:提示用户输入账户名称、环境和签名模式

Adding New Accounts

添加新账户

When user provides new credentials:
  • Ask for account name
  • Store in
    TOOLS.md
    with masked display confirmation
当用户提供新凭证时:
  • 询问账户名称
  • 存储在
    TOOLS.md
    中,并向用户展示掩码后的内容进行确认

Signing Requests

请求签名

For trading endpoints that require a signature:
  1. Build query string with all parameters, including the timestamp (Unix ms).
  2. Percent-encode the parameters using UTF-8 according to RFC 3986.
  3. Sign query string with secretKey using HMAC SHA256, RSA, or Ed25519 (depending on the account configuration).
  4. Append signature to query string.
  5. Include
    X-MBX-APIKEY
    header.
Otherwise, do not perform steps 3–5.
对于需要签名的交易端点:
  1. 构建包含所有参数(包括时间戳,单位为毫秒级Unix时间)的查询字符串。
  2. 根据RFC 3986标准,使用UTF-8对参数进行百分号编码。
  3. 使用secretKey通过HMAC SHA256、RSA或Ed25519(取决于账户配置)对查询字符串进行签名。
  4. 将签名追加到查询字符串中。
  5. 包含
    X-MBX-APIKEY
    请求头。
否则,无需执行步骤3-5。

User Agent Header

User Agent请求头

Include
User-Agent
header with the following string:
binance-vip-loan/1.0.0 (Skill)
See
references/authentication.md
for implementation details.
需包含
User-Agent
请求头,内容为:
binance-vip-loan/1.0.0 (Skill)
实现细节请参考
references/authentication.md