# Table of Contents - [Integrate Binance Login with your web application | Binance Open Platform](#integrate-binance-login-with-your-web-application-binance-open-platform) - [Get Discount Buy product list | Binance Open Platform](#get-discount-buy-product-list-binance-open-platform) - [在文档中搜索 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [Contact us | Binance Open Platform](#contact-us-binance-open-platform) - [Get Discount Buy product list | Binance Open Platform](#get-discount-buy-product-list-binance-open-platform) - [Subscribe Discount Buy products | Binance Open Platform](#subscribe-discount-buy-products-binance-open-platform) - [Check Discount Buy accounts | Binance Open Platform](#check-discount-buy-accounts-binance-open-platform) - [Get Discount Buy positions | Binance Open Platform](#get-discount-buy-positions-binance-open-platform) - [Subscribe Discount Buy products | Binance Open Platform](#subscribe-discount-buy-products-binance-open-platform) - [Get Dual Investment product list | Binance Open Platform](#get-dual-investment-product-list-binance-open-platform) - [Get Dual Investment product list | Binance Open Platform](#get-dual-investment-product-list-binance-open-platform) - [Subscribe Dual Investment products | Binance Open Platform](#subscribe-dual-investment-products-binance-open-platform) - [Change Auto-Compound status | Binance Open Platform](#change-auto-compound-status-binance-open-platform) - [Check Dual Investment accounts | Binance Open Platform](#check-dual-investment-accounts-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [Get Dual Investment positions | Binance Open Platform](#get-dual-investment-positions-binance-open-platform) - [快速开始 | Binance Open Platform](#-binance-open-platform) - [Subscribe Dual Investment products | Binance Open Platform](#subscribe-dual-investment-products-binance-open-platform) - [Contact us | Binance Open Platform](#contact-us-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [Query Current Algo Open Orders (USER_DATA) | Binance Open Platform](#query-current-algo-open-orders-user-data-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [基本信息 | Binance Open Platform](#-binance-open-platform) - [token列表 | Binance Open Platform](#token-binance-open-platform) - [Volume Participation(VP) New Order (TRADE) | Binance Open Platform](#volume-participation-vp-new-order-trade-binance-open-platform) - [Cancel Algo Order | Binance Open Platform](#cancel-algo-order-binance-open-platform) - [Time Weighted Average Price (Twap) New Order(TRADE) | Binance Open Platform](#time-weighted-average-price-twap-new-order-trade-binance-open-platform) - [Query Sub Orders (USER_DATA) | Binance Open Platform](#query-sub-orders-user-data-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [Binance Account Bound Token | Binance Open Platform](#binance-account-bound-token-binance-open-platform) - [Time Weighted Average Price (Twap) New Order(TRADE) | Binance Open Platform](#time-weighted-average-price-twap-new-order-trade-binance-open-platform) - [Query Historical Algo Orders (USER_DATA) | Binance Open Platform](#query-historical-algo-orders-user-data-binance-open-platform) - [基本信息 | Binance Open Platform](#-binance-open-platform) - [完整深度 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [基本信息 | Binance Open Platform](#-binance-open-platform) - [Binance Account Bound Token | Binance Open Platform](#binance-account-bound-token-binance-open-platform) - [Volume Participation(VP) New Order (TRADE) | Binance Open Platform](#volume-participation-vp-new-order-trade-binance-open-platform) - [交易对信息 | Binance Open Platform](#-binance-open-platform) - [聚合交易查询 | Binance Open Platform](#-binance-open-platform) - [24hr价格变动情况 | Binance Open Platform](#24hr-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [错误代码 | Binance Open Platform](#-binance-open-platform) - [K线 | Binance Open Platform](#k-binance-open-platform) - [APIs Spec | Binance Open Platform](#apis-spec-binance-open-platform) - [Time Weighted Average Price(Twap) New Order (TRADE) | Binance Open Platform](#time-weighted-average-price-twap-new-order-trade-binance-open-platform) - [Change Log | Binance Open Platform](#change-log-binance-open-platform) - [token列表 | Binance Open Platform](#token-binance-open-platform) - [快速开始 | Binance Open Platform](#-binance-open-platform) - [Websocket行情推送 | Binance Open Platform](#websocket-binance-open-platform) - [Buy any token (Swap) | Binance Open Platform](#buy-any-token-swap-binance-open-platform) - [错误代码 | Binance Open Platform](#-binance-open-platform) - [Cancel Algo Order(TRADE) | Binance Open Platform](#cancel-algo-order-trade-binance-open-platform) - [Query Current Algo Open Orders(USER_DATA) | Binance Open Platform](#query-current-algo-open-orders-user-data-binance-open-platform) - [Query Sub Orders(USER_DATA) | Binance Open Platform](#query-sub-orders-user-data-binance-open-platform) - [Query Historical Algo Orders(USER_DATA) | Binance Open Platform](#query-historical-algo-orders-user-data-binance-open-platform) - [Get supported trading pairs | Binance Open Platform](#get-supported-trading-pairs-binance-open-platform) - [Typical flow | Binance Open Platform](#typical-flow-binance-open-platform) - [Convert feature | Binance Open Platform](#convert-feature-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [基本信息 | Binance Open Platform](#-binance-open-platform) - [Send primary mode | Binance Open Platform](#send-primary-mode-binance-open-platform) - [Send primary mode | Binance Open Platform](#send-primary-mode-binance-open-platform) - [Webhook | Binance Open Platform](#webhook-binance-open-platform) - [Overview | Binance Open Platform](#overview-binance-open-platform) - [Change Log | Binance Open Platform](#change-log-binance-open-platform) - [Change Log | Binance Open Platform](#change-log-binance-open-platform) - [Common API request headers | Binance Open Platform](#common-api-request-headers-binance-open-platform) - [Create a Sub Account | Binance Open Platform](#create-a-sub-account-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [Create a Sub Account | Binance Open Platform](#create-a-sub-account-binance-open-platform) - [Change Log | Binance Open Platform](#change-log-binance-open-platform) - [Webhook | Binance Open Platform](#webhook-binance-open-platform) - [Change Sub Account Api Permission | Binance Open Platform](#change-sub-account-api-permission-binance-open-platform) - [Delete IP Restriction for Sub Account Api Key | Binance Open Platform](#delete-ip-restriction-for-sub-account-api-key-binance-open-platform) - [Delete Sub Account Api Key | Binance Open Platform](#delete-sub-account-api-key-binance-open-platform) - [Enable Futures for Sub Account | Binance Open Platform](#enable-futures-for-sub-account-binance-open-platform) - [Enable Or Disable BNB Burn for Sub Account SPOT and MARGIN | Binance Open Platform](#enable-or-disable-bnb-burn-for-sub-account-spot-and-margin-binance-open-platform) - [Delete Sub Account | Binance Open Platform](#delete-sub-account-binance-open-platform) - [Get BNB Burn Status for Sub Account | Binance Open Platform](#get-bnb-burn-status-for-sub-account-binance-open-platform) - [Update IP Restriction for Sub-Account API key (For Master Account) | Binance Open Platform](#update-ip-restriction-for-sub-account-api-key-for-master-account-binance-open-platform) - [Query Sub Account Api Key | Binance Open Platform](#query-sub-account-api-key-binance-open-platform) - [Enable Universal Transfer Permission For Sub Account Api Key | Binance Open Platform](#enable-universal-transfer-permission-for-sub-account-api-key-binance-open-platform) - [Query Sub Account | Binance Open Platform](#query-sub-account-binance-open-platform) - [Futures Transfer for Link Sub-account | Binance Open Platform](#futures-transfer-for-link-sub-account-binance-open-platform) - [Sub Account Transfer(spot) | Binance Open Platform](#sub-account-transfer-spot-binance-open-platform) - [Sub Account Transfer(spot) | Binance Open Platform](#sub-account-transfer-spot-binance-open-platform) - [Get Sub Account Deposit History V2 | Binance Open Platform](#get-sub-account-deposit-history-v2-binance-open-platform) - [Query Sub Account Margin Asset info | Binance Open Platform](#query-sub-account-margin-asset-info-binance-open-platform) - [Query Sub Account Transfer History(Futures) | Binance Open Platform](#query-sub-account-transfer-history-futures-binance-open-platform) - [Create Api Key for Sub Account | Binance Open Platform](#create-api-key-for-sub-account-binance-open-platform) - [Change Sub Account Commission | Binance Open Platform](#change-sub-account-commission-binance-open-platform) - [Enable Or Disable BNB Burn for Sub Account Margin Interest | Binance Open Platform](#enable-or-disable-bnb-burn-for-sub-account-margin-interest-binance-open-platform) - [Sub Account Transfer(Futures) | Binance Open Platform](#sub-account-transfer-futures-binance-open-platform) - [Query Sub Account Transfer History(Spot) | Binance Open Platform](#query-sub-account-transfer-history-spot-binance-open-platform) - [Query Universal Transfer History | Binance Open Platform](#query-universal-transfer-history-binance-open-platform) - [Get IP Restriction for Sub Account Api Key | Binance Open Platform](#get-ip-restriction-for-sub-account-api-key-binance-open-platform) - [Change Sub Account Commission | Binance Open Platform](#change-sub-account-commission-binance-open-platform) - [Universal Transfer | Binance Open Platform](#universal-transfer-binance-open-platform) - [Link Account Information | Binance Open Platform](#link-account-information-binance-open-platform) - [Overall Workflow | Binance Open Platform](#overall-workflow-binance-open-platform) - [Change Sub Account USDT-Ⓜ Futures Commission | Binance Open Platform](#change-sub-account-usdt-futures-commission-binance-open-platform) - [Query Sub Account Spot Asset info | Binance Open Platform](#query-sub-account-spot-asset-info-binance-open-platform) - [Query Futures Commission Rebate Record | Binance Open Platform](#query-futures-commission-rebate-record-binance-open-platform) - [Get Sub Account Deposit History | Binance Open Platform](#get-sub-account-deposit-history-binance-open-platform) - [Query Sub Account Futures Asset info | Binance Open Platform](#query-sub-account-futures-asset-info-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [Query Sub Account COIN-Ⓜ Futures Commission | Binance Open Platform](#query-sub-account-coin-futures-commission-binance-open-platform) - [Query Spot Commission Rebate Recent Record | Binance Open Platform](#query-spot-commission-rebate-recent-record-binance-open-platform) - [Query Sub Account USDT-Ⓜ Futures Commission | Binance Open Platform](#query-sub-account-usdt-futures-commission-binance-open-platform) - [Change Sub Account COIN-Ⓜ Futures Commission | Binance Open Platform](#change-sub-account-coin-futures-commission-binance-open-platform) - [KYC Sharing | Binance Open Platform](#kyc-sharing-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [Query KYC Sharing Status | Binance Open Platform](#query-kyc-sharing-status-binance-open-platform) - [Overall Workflow | Binance Open Platform](#overall-workflow-binance-open-platform) - [Error Code | Binance Open Platform](#error-code-binance-open-platform) - [Unlink KYC Data | Binance Open Platform](#unlink-kyc-data-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [Query Kyc Status | Binance Open Platform](#query-kyc-status-binance-open-platform) - [RFI Records Query | Binance Open Platform](#rfi-records-query-binance-open-platform) - [Query Kyc Status | Binance Open Platform](#query-kyc-status-binance-open-platform) - [Query Client If New User | Binance Open Platform](#query-client-if-new-user-binance-open-platform) - [Customize Id For Client (For Client) | Binance Open Platform](#customize-id-for-client-for-client-binance-open-platform) - [Reject KYC Record | Binance Open Platform](#reject-kyc-record-binance-open-platform) - [KYC Sharing | Binance Open Platform](#kyc-sharing-binance-open-platform) - [Webhook Notifications | Binance Open Platform](#webhook-notifications-binance-open-platform) - [Request Specifications | Binance Open Platform](#request-specifications-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [Get Client Email Customized Id | Binance Open Platform](#get-client-email-customized-id-binance-open-platform) - [Get Income History | Binance Open Platform](#get-income-history-binance-open-platform) - [Get Rebate Data Overview | Binance Open Platform](#get-rebate-data-overview-binance-open-platform) - [Get Rebate Volume | Binance Open Platform](#get-rebate-volume-binance-open-platform) - [Customize Id For Client(For Client)(PAPI) | Binance Open Platform](#customize-id-for-client-for-client-papi-binance-open-platform) - [FAQ | Binance Open Platform](#faq-binance-open-platform) - [Get Trader Detail | Binance Open Platform](#get-trader-detail-binance-open-platform) - [Get Trader Number | Binance Open Platform](#get-trader-number-binance-open-platform) - [Link Multiple Accounts | Binance Open Platform](#link-multiple-accounts-binance-open-platform) - [Create API key for User | Binance Open Platform](#create-api-key-for-user-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [Get User Status | Binance Open Platform](#get-user-status-binance-open-platform) - [OAuth 2.0 Scopes (Permissions) for Binance APIs | Binance Open Platform](#oauth-2-0-scopes-permissions-for-binance-apis-binance-open-platform) - [OAuth 2.0 APIs for Binance APIs | Binance Open Platform](#oauth-2-0-apis-for-binance-apis-binance-open-platform) - [Query KYC Status by brokerSubAccountId | Binance Open Platform](#query-kyc-status-by-brokersubaccountid-binance-open-platform) - [Query Linked Accounts | Binance Open Platform](#query-linked-accounts-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [Get User’s Customize Id | Binance Open Platform](#get-user-s-customize-id-binance-open-platform) - [Query Rebate Recent Record (For Client) | Binance Open Platform](#query-rebate-recent-record-for-client-binance-open-platform) - [Query Client If New User | Binance Open Platform](#query-client-if-new-user-binance-open-platform) - [Query Rebate Recent Record (For Partner) | Binance Open Platform](#query-rebate-recent-record-for-partner-binance-open-platform) - [Query Client If New User | Binance Open Platform](#query-client-if-new-user-binance-open-platform) - [RFI Record Submission | Binance Open Platform](#rfi-record-submission-binance-open-platform) - [RFI Records Query | Binance Open Platform](#rfi-records-query-binance-open-platform) - [OAuth 2.0 Scopes (Permissions) for Binance APIs | Binance Open Platform](#oauth-2-0-scopes-permissions-for-binance-apis-binance-open-platform) - [Customize Id For Client (For Partner) | Binance Open Platform](#customize-id-for-client-for-partner-binance-open-platform) - [Get User Trade Volume | Binance Open Platform](#get-user-trade-volume-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [Get User’s Customize Id | Binance Open Platform](#get-user-s-customize-id-binance-open-platform) - [RFI Submission Status | Binance Open Platform](#rfi-submission-status-binance-open-platform) - [Create Order (Deprecated) | Binance Open Platform](#create-order-deprecated-binance-open-platform) - [Create Order | Binance Open Platform](#create-order-binance-open-platform) - [Query KYC Status by entityCustomerId | Binance Open Platform](#query-kyc-status-by-entitycustomerid-binance-open-platform) - [Get Client Email Customized Id | Binance Open Platform](#get-client-email-customized-id-binance-open-platform) - [Customize Id For Client (For Client) | Binance Open Platform](#customize-id-for-client-for-client-binance-open-platform) - [Get User‘s Customize Id (PAPI) | Binance Open Platform](#get-user-s-customize-id-papi-binance-open-platform) - [Customize Id For Client(For Partner) | Binance Open Platform](#customize-id-for-client-for-partner-binance-open-platform) - [Query Client If New User(PAPI) | Binance Open Platform](#query-client-if-new-user-papi-binance-open-platform) - [Query Client If New User | Binance Open Platform](#query-client-if-new-user-binance-open-platform) - [Binance Pay API: Release Note V1.0.1 | Binance Open Platform](#binance-pay-api-release-note-v1-0-1-binance-open-platform) - [Query Order | Binance Open Platform](#query-order-binance-open-platform) - [Binance Pay API: Changelog | Binance Open Platform](#binance-pay-api-changelog-binance-open-platform) - [Quick Start | Binance Open Platform](#quick-start-binance-open-platform) - [API Specification Common Rules | Binance Open Platform](#api-specification-common-rules-binance-open-platform) - [Query Collection Result | Binance Open Platform](#query-collection-result-binance-open-platform) - [Binance Pay API: Changelog | Binance Open Platform](#binance-pay-api-changelog-binance-open-platform) - [Binance Web3 Wallet | Binance Open Platform](#binance-web3-wallet-binance-open-platform) - [Merchant API References | Binance Pay | Binance Open Platform](#merchant-api-references-binance-pay-binance-open-platform) - [Collection Notification | Binance Open Platform](#collection-notification-binance-open-platform) - [Webhook Common Rules | Binance Open Platform](#webhook-common-rules-binance-open-platform) - [FAQ | Binance Open Platform](#faq-binance-open-platform) - [OAuth API : Create Collection | Binance Open Platform](#oauth-api-create-collection-binance-open-platform) - [How To Enroll Mini Program KYB | Binance Open Platform](#how-to-enroll-mini-program-kyb-binance-open-platform) - [Webhook query certificate | Binance Open Platform](#webhook-query-certificate-binance-open-platform) - [OAuth API : Query Supported Currency | Binance Open Platform](#oauth-api-query-supported-currency-binance-open-platform) - [Binance Pay API: Authentication | Binance Open Platform](#binance-pay-api-authentication-binance-open-platform) - [Avail Provider | Binance Open Platform](#avail-provider-binance-open-platform) - [How To Enroll Mini Program KYB | Binance Open Platform](#how-to-enroll-mini-program-kyb-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [Wallet Balance Query V2 | Binance Open Platform](#wallet-balance-query-v2-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [Wallet Balance Query | Binance Open Platform](#wallet-balance-query-binance-open-platform) - [公告 | Binance Open Platform](#-binance-open-platform) - [Integrate Binance Pay with your App | Binance Open Platform](#integrate-binance-pay-with-your-app-binance-open-platform) - [Introduction | Binance Open Platform](#introduction-binance-open-platform) - [Contact us | Binance Open Platform](#contact-us-binance-open-platform) - [快速开始 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [Contact us | Binance Open Platform](#contact-us-binance-open-platform) - [Contact us | Binance Open Platform](#contact-us-binance-open-platform) - [Change Log | Binance Open Platform](#change-log-binance-open-platform) - [Get Flexible Loan LTV Adjustment History (USER_DATA) | Binance Open Platform](#get-flexible-loan-ltv-adjustment-history-user-data-binance-open-platform) - [New Future Account Transfer | Binance Open Platform](#new-future-account-transfer-binance-open-platform) - [Execute Quote | Binance Open Platform](#execute-quote-binance-open-platform) - [Query Quote | Binance Open Platform](#query-quote-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [Get C2C Trade History | Binance Open Platform](#get-c2c-trade-history-binance-open-platform) - [Change Log | Binance Open Platform](#change-log-binance-open-platform) - [Direct Debit/Pre Authorization Create Contract | Binance Open Platform](#direct-debit-pre-authorization-create-contract-binance-open-platform) - [List All Convert Pairs | Binance Open Platform](#list-all-convert-pairs-binance-open-platform) - [Direct Debit/Pre Authorization Payment | Binance Open Platform](#direct-debit-pre-authorization-payment-binance-open-platform) - [Direct Debit Payment Notification | Binance Open Platform](#direct-debit-payment-notification-binance-open-platform) - [Webhook | Binance Open Platform](#webhook-binance-open-platform) - [Check Server Time | Binance Open Platform](#check-server-time-binance-open-platform) - [Delist Schedule | Binance Open Platform](#delist-schedule-binance-open-platform) - [Get Funding Info | Binance Open Platform](#get-funding-info-binance-open-platform) - [Get C2C Trade History | Binance Open Platform](#get-c2c-trade-history-binance-open-platform) - [Binance Web3 Wallet | Binance Open Platform](#binance-web3-wallet-binance-open-platform) - [Query Balance Report | Binance Open Platform](#query-balance-report-binance-open-platform) - [Query Transfer Result | Binance Open Platform](#query-transfer-result-binance-open-platform) - [Binance Pay: Refund Order Notification | Binance Open Platform](#binance-pay-refund-order-notification-binance-open-platform) - [Batch Payout Notification | Binance Open Platform](#batch-payout-notification-binance-open-platform) - [Payout Non-binance user Notification | Binance Open Platform](#payout-non-binance-user-notification-binance-open-platform) - [Direct Debit/Pre Authorization Notification | Binance Open Platform](#direct-debit-pre-authorization-notification-binance-open-platform) - [枚举定义 | Binance Open Platform](#-binance-open-platform) - [Webhook | Binance Open Platform](#webhook-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [Contact us | Binance Open Platform](#contact-us-binance-open-platform) - [Flexible Loan Borrow (TRADE) | Binance Open Platform](#flexible-loan-borrow-trade-binance-open-platform) - [Test Connectivity | Binance Open Platform](#test-connectivity-binance-open-platform) - [24hr Ticker Price Change Statistics | Binance Open Platform](#24hr-ticker-price-change-statistics-binance-open-platform) - [Compressed Aggregate Trades List | Binance Open Platform](#compressed-aggregate-trades-list-binance-open-platform) - [Continuous Contract Kline Candlestick Data | Binance Open Platform](#continuous-contract-kline-candlestick-data-binance-open-platform) - [Get Funding Rate History Of Perpetual Futures | Binance Open Platform](#get-funding-rate-history-of-perpetual-futures-binance-open-platform) - [Open Interest | Binance Open Platform](#open-interest-binance-open-platform) - [模拟交易使用条款 | Binance Open Platform](#-binance-open-platform) - [Download Report | Binance Open Platform](#download-report-binance-open-platform) - [Payout Validate Receiver | Binance Open Platform](#payout-validate-receiver-binance-open-platform) - [Payout Query | Binance Open Platform](#payout-query-binance-open-platform) - [Binance Pay: Order Notification | Binance Open Platform](#binance-pay-order-notification-binance-open-platform) - [Binance Pay: Balance Report Notification | Binance Open Platform](#binance-pay-balance-report-notification-binance-open-platform) - [产品使用条款 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [Contact us | Binance Open Platform](#contact-us-binance-open-platform) - [Get Flexible Loan Collateral Assets Data (USER_DATA) | Binance Open Platform](#get-flexible-loan-collateral-assets-data-user-data-binance-open-platform) - [基本信息 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [快速开始 | Binance Open Platform](#-binance-open-platform) - [Futures Account Balance | Binance Open Platform](#futures-account-balance-binance-open-platform) - [Get Flexible Loan Borrow History (USER_DATA) | Binance Open Platform](#get-flexible-loan-borrow-history-user-data-binance-open-platform) - [Get Flexible Loan Liquidation History (USER_DATA) | Binance Open Platform](#get-flexible-loan-liquidation-history-user-data-binance-open-platform) - [List all convert pairs | Binance Open Platform](#list-all-convert-pairs-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [概览 | Binance Open Platform](#-binance-open-platform) - [Get Crypto Loans Income History (USER_DATA) | Binance Open Platform](#get-crypto-loans-income-history-user-data-binance-open-platform) - [Get Loan Borrow History (USER_DATA) | Binance Open Platform](#get-loan-borrow-history-user-data-binance-open-platform) - [Connect | Binance Open Platform](#connect-binance-open-platform) - [Connect | Binance Open Platform](#connect-binance-open-platform) - [Exchange Information | Binance Open Platform](#exchange-information-binance-open-platform) - [Index Price And Mark Price | Binance Open Platform](#index-price-and-mark-price-binance-open-platform) - [Index Price Kline Candlestick Data | Binance Open Platform](#index-price-kline-candlestick-data-binance-open-platform) - [Kline Candlestick Data | Binance Open Platform](#kline-candlestick-data-binance-open-platform) - [Long Short Ratio | Binance Open Platform](#long-short-ratio-binance-open-platform) - [Mark Price Kline Candlestick Data | Binance Open Platform](#mark-price-kline-candlestick-data-binance-open-platform) - [Old Trades Lookup | Binance Open Platform](#old-trades-lookup-binance-open-platform) - [Order Book | Binance Open Platform](#order-book-binance-open-platform) - [Open Interest Statistics | Binance Open Platform](#open-interest-statistics-binance-open-platform) - [Recent Trades List | Binance Open Platform](#recent-trades-list-binance-open-platform) - [Premium Index Kline Data | Binance Open Platform](#premium-index-kline-data-binance-open-platform) - [Symbol Order Book Ticker | Binance Open Platform](#symbol-order-book-ticker-binance-open-platform) - [Top Trader Long Short Account Ratio | Binance Open Platform](#top-trader-long-short-account-ratio-binance-open-platform) - [Flexible Loan Repay (TRADE) | Binance Open Platform](#flexible-loan-repay-trade-binance-open-platform) - [Check Collateral Repay Rate (TRADE) | Binance Open Platform](#check-collateral-repay-rate-trade-binance-open-platform) - [Get Flexible Loan Repayment History (USER_DATA) | Binance Open Platform](#get-flexible-loan-repayment-history-user-data-binance-open-platform) - [Get Futures Lead Trader Status | Binance Open Platform](#get-futures-lead-trader-status-binance-open-platform) - [快速开始 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [更新日志 | Binance Open Platform](#-binance-open-platform) - [Get Loan LTV Adjustment History (USER_DATA) | Binance Open Platform](#get-loan-ltv-adjustment-history-user-data-binance-open-platform) - [Get Loan Repayment History (USER_DATA) | Binance Open Platform](#get-loan-repayment-history-user-data-binance-open-platform) - [Test Connectivity | Binance Open Platform](#test-connectivity-binance-open-platform) - [Connect | Binance Open Platform](#connect-binance-open-platform) - [New Future Account Transfer | Binance Open Platform](#new-future-account-transfer-binance-open-platform) - [Accept Quote | Binance Open Platform](#accept-quote-binance-open-platform) - [Order Status | Binance Open Platform](#order-status-binance-open-platform) - [List all convert pairs | Binance Open Platform](#list-all-convert-pairs-binance-open-platform) - [Send quote request | Binance Open Platform](#send-quote-request-binance-open-platform) - [Connect | Binance Open Platform](#connect-binance-open-platform) - [Test Connectivity | Binance Open Platform](#test-connectivity-binance-open-platform) - [Order Book | Binance Open Platform](#order-book-binance-open-platform) - [New Order | Binance Open Platform](#new-order-binance-open-platform) - [Futures Account Balance V2 | Binance Open Platform](#futures-account-balance-v2-binance-open-platform) - [快速开始 | Binance Open Platform](#-binance-open-platform) - [New Order | Binance Open Platform](#new-order-binance-open-platform) - [Get BNB Burn Status | Binance Open Platform](#get-bnb-burn-status-binance-open-platform) - [Get Current Multi Assets Mode | Binance Open Platform](#get-current-multi-assets-mode-binance-open-platform) - [Get Current Position Mode | Binance Open Platform](#get-current-position-mode-binance-open-platform) - [Get Download Id For Futures Order History | Binance Open Platform](#get-download-id-for-futures-order-history-binance-open-platform) - [Get Download Id For Futures Trade History | Binance Open Platform](#get-download-id-for-futures-trade-history-binance-open-platform) - [Get Download Id For Futures Transaction History | Binance Open Platform](#get-download-id-for-futures-transaction-history-binance-open-platform) - [Live Subscribing Unsubscribing To Streams | Binance Open Platform](#live-subscribing-unsubscribing-to-streams-binance-open-platform) - [Mark Price Stream | Binance Open Platform](#mark-price-stream-binance-open-platform) - [Mark Price Stream For All Market | Binance Open Platform](#mark-price-stream-for-all-market-binance-open-platform) - [List all convert pairs | Binance Open Platform](#list-all-convert-pairs-binance-open-platform) - [Keepalive User Data Stream | Binance Open Platform](#keepalive-user-data-stream-binance-open-platform) - [Get Future Account Transaction History List | Binance Open Platform](#get-future-account-transaction-history-list-binance-open-platform) - [Aggregate Trade Streams | Binance Open Platform](#aggregate-trade-streams-binance-open-platform) - [Toggle BNB Burn On Futures Trade | Binance Open Platform](#toggle-bnb-burn-on-futures-trade-binance-open-platform) - [Query Symbol Configuration | Binance Open Platform](#query-symbol-configuration-binance-open-platform) - [User Commission Rate | Binance Open Platform](#user-commission-rate-binance-open-platform) - [Delist Schedule | Binance Open Platform](#delist-schedule-binance-open-platform) - [Continuous Contract Kline Candlestick Streams | Binance Open Platform](#continuous-contract-kline-candlestick-streams-binance-open-platform) - [Important WebSocket Change Notice | Binance Open Platform](#important-websocket-change-notice-binance-open-platform) - [Kline Candlestick Streams | Binance Open Platform](#kline-candlestick-streams-binance-open-platform) - [Classic Portfolio Margin Account Information | Binance Open Platform](#classic-portfolio-margin-account-information-binance-open-platform) - [Connect | Binance Open Platform](#connect-binance-open-platform) - [Check Server Time | Binance Open Platform](#check-server-time-binance-open-platform) - [Composite Index Symbol Information | Binance Open Platform](#composite-index-symbol-information-binance-open-platform) - [Continuous Contract Kline Candlestick Data | Binance Open Platform](#continuous-contract-kline-candlestick-data-binance-open-platform) - [Query Delivery Price | Binance Open Platform](#query-delivery-price-binance-open-platform) - [Get Funding Rate History | Binance Open Platform](#get-funding-rate-history-binance-open-platform) - [Get Funding Info | Binance Open Platform](#get-funding-info-binance-open-platform) - [Index Price Kline Candlestick Data | Binance Open Platform](#index-price-kline-candlestick-data-binance-open-platform) - [Kline Candlestick Data | Binance Open Platform](#kline-candlestick-data-binance-open-platform) - [Long Short Ratio | Binance Open Platform](#long-short-ratio-binance-open-platform) - [Mark Price | Binance Open Platform](#mark-price-binance-open-platform) - [Mark Price Kline Candlestick Data | Binance Open Platform](#mark-price-kline-candlestick-data-binance-open-platform) - [Multi Assets Mode Asset Index | Binance Open Platform](#multi-assets-mode-asset-index-binance-open-platform) - [Old Trades Lookup | Binance Open Platform](#old-trades-lookup-binance-open-platform) - [Open Interest | Binance Open Platform](#open-interest-binance-open-platform) - [Open Interest Statistics | Binance Open Platform](#open-interest-statistics-binance-open-platform) - [Order Book | Binance Open Platform](#order-book-binance-open-platform) - [RPI Order Book | Binance Open Platform](#rpi-order-book-binance-open-platform) - [Premium Index Kline Data | Binance Open Platform](#premium-index-kline-data-binance-open-platform) - [Recent Trades List | Binance Open Platform](#recent-trades-list-binance-open-platform) - [Symbol Order Book Ticker | Binance Open Platform](#symbol-order-book-ticker-binance-open-platform) - [Symbol Price Ticker(Deprecated) | Binance Open Platform](#symbol-price-ticker-deprecated-binance-open-platform) - [Symbol Price Ticker V2 | Binance Open Platform](#symbol-price-ticker-v2-binance-open-platform) - [Taker Buysell Volume | Binance Open Platform](#taker-buysell-volume-binance-open-platform) - [Top Trader Long Short Account Ratio | Binance Open Platform](#top-trader-long-short-account-ratio-binance-open-platform) - [Top Trader Long Short Position Ratio | Binance Open Platform](#top-trader-long-short-position-ratio-binance-open-platform) - [Notional And Leverage Brackets | Binance Open Platform](#notional-and-leverage-brackets-binance-open-platform) - [Test Connectivity | Binance Open Platform](#test-connectivity-binance-open-platform) - [Sign TradFi-Perps agreement | Binance Open Platform](#sign-tradfi-perps-agreement-binance-open-platform) - [Futures Account Balance V3 | Binance Open Platform](#futures-account-balance-v3-binance-open-platform) - [Get Futures Transaction History Download Link By Id | Binance Open Platform](#get-futures-transaction-history-download-link-by-id-binance-open-platform) - [Get Futures Trade Download Link By Id | Binance Open Platform](#get-futures-trade-download-link-by-id-binance-open-platform) - [Get Income History | Binance Open Platform](#get-income-history-binance-open-platform) - [Query Order Rate Limit | Binance Open Platform](#query-order-rate-limit-binance-open-platform) - [Futures Account Balance | Binance Open Platform](#futures-account-balance-binance-open-platform) - [Get Futures Order History Download Link By Id | Binance Open Platform](#get-futures-order-history-download-link-by-id-binance-open-platform) - [Query ADL risk rating | Binance Open Platform](#query-adl-risk-rating-binance-open-platform) - [Basis | Binance Open Platform](#basis-binance-open-platform) - [24hr Ticker Price Change Statistics | Binance Open Platform](#24hr-ticker-price-change-statistics-binance-open-platform) - [Futures Trading Quantitative Rules Indicators | Binance Open Platform](#futures-trading-quantitative-rules-indicators-binance-open-platform) - [Compressed Aggregate Trades List | Binance Open Platform](#compressed-aggregate-trades-list-binance-open-platform) - [Query Index Price Constituents | Binance Open Platform](#query-index-price-constituents-binance-open-platform) - [Query Trading Schedule | Binance Open Platform](#query-trading-schedule-binance-open-platform) - [Symbol Order Book Ticker | Binance Open Platform](#symbol-order-book-ticker-binance-open-platform) - [Query Insurance Fund Balance Snapshot | Binance Open Platform](#query-insurance-fund-balance-snapshot-binance-open-platform) - [Query Account Trade List | Binance Open Platform](#query-account-trade-list-binance-open-platform) - [Symbol Price Ticker | Binance Open Platform](#symbol-price-ticker-binance-open-platform) - [Auto Cancel All Open Orders | Binance Open Platform](#auto-cancel-all-open-orders-binance-open-platform) - [Cancel Algo Order | Binance Open Platform](#cancel-algo-order-binance-open-platform) - [Query All Orders | Binance Open Platform](#query-all-orders-binance-open-platform) - [Cancel All Algo Open Orders | Binance Open Platform](#cancel-all-algo-open-orders-binance-open-platform) - [Cancel All Open Orders | Binance Open Platform](#cancel-all-open-orders-binance-open-platform) - [Cancel Order | Binance Open Platform](#cancel-order-binance-open-platform) - [Change Initial Leverage | Binance Open Platform](#change-initial-leverage-binance-open-platform) - [Change Margin Type | Binance Open Platform](#change-margin-type-binance-open-platform) - [Change Multi Assets Mode | Binance Open Platform](#change-multi-assets-mode-binance-open-platform) - [Change Position Mode | Binance Open Platform](#change-position-mode-binance-open-platform) - [Current All Algo Open Orders | Binance Open Platform](#current-all-algo-open-orders-binance-open-platform) - [Query Current All Open Orders | Binance Open Platform](#query-current-all-open-orders-binance-open-platform) - [Get Position Margin Change History | Binance Open Platform](#get-position-margin-change-history-binance-open-platform) - [Modify Isolated Position Margin | Binance Open Platform](#modify-isolated-position-margin-binance-open-platform) - [Modify Multiple Orders | Binance Open Platform](#modify-multiple-orders-binance-open-platform) - [Modify Order | Binance Open Platform](#modify-order-binance-open-platform) - [Position Adl Quantile Estimation | Binance Open Platform](#position-adl-quantile-estimation-binance-open-platform) - [Query Algo Order | Binance Open Platform](#query-algo-order-binance-open-platform) - [Query All Algo Orders | Binance Open Platform](#query-all-algo-orders-binance-open-platform) - [Query Current Open Order | Binance Open Platform](#query-current-open-order-binance-open-platform) - [Query Order | Binance Open Platform](#query-order-binance-open-platform) - [Cancel Order | Binance Open Platform](#cancel-order-binance-open-platform) - [Query Order | Binance Open Platform](#query-order-binance-open-platform) - [Account Information V2 | Binance Open Platform](#account-information-v2-binance-open-platform) - [Cancel Multiple Orders | Binance Open Platform](#cancel-multiple-orders-binance-open-platform) - [Exchange Information | Binance Open Platform](#exchange-information-binance-open-platform) - [New Algo Order | Binance Open Platform](#new-algo-order-binance-open-platform) - [Get Order Modify History | Binance Open Platform](#get-order-modify-history-binance-open-platform) - [Place Multiple Orders | Binance Open Platform](#place-multiple-orders-binance-open-platform) - [Test New Order | Binance Open Platform](#test-new-order-binance-open-platform) - [Position Information V2 | Binance Open Platform](#position-information-v2-binance-open-platform) - [Query Users Force Orders | Binance Open Platform](#query-users-force-orders-binance-open-platform) - [Position Information V3 | Binance Open Platform](#position-information-v3-binance-open-platform) - [New Algo Order | Binance Open Platform](#new-algo-order-binance-open-platform) - [Modify Order | Binance Open Platform](#modify-order-binance-open-platform) - [Position Information V2 | Binance Open Platform](#position-information-v2-binance-open-platform) - [Cancel Algo Order | Binance Open Platform](#cancel-algo-order-binance-open-platform) - [Self Trade Prevention | Binance Open Platform](#self-trade-prevention-binance-open-platform) - [Position Information | Binance Open Platform](#position-information-binance-open-platform) - [Account Information | Binance Open Platform](#account-information-binance-open-platform) - [Classic Portfolio Margin Account Information | Binance Open Platform](#classic-portfolio-margin-account-information-binance-open-platform) - [Connect | Binance Open Platform](#connect-binance-open-platform) - [Close User Data Stream | Binance Open Platform](#close-user-data-stream-binance-open-platform) - [Event Conditional Order Trigger Reject | Binance Open Platform](#event-conditional-order-trigger-reject-binance-open-platform) - [Futures Account Balance V2 | Binance Open Platform](#futures-account-balance-v2-binance-open-platform) - [Liquidation Order Streams | Binance Open Platform](#liquidation-order-streams-binance-open-platform) - [Multi Assets Mode Asset Index | Binance Open Platform](#multi-assets-mode-asset-index-binance-open-platform) - [Partial Book Depth Streams | Binance Open Platform](#partial-book-depth-streams-binance-open-platform) - [Order Book | Binance Open Platform](#order-book-binance-open-platform) - [New Order | Binance Open Platform](#new-order-binance-open-platform) - [通用枚举定义 | Binance Open Platform](#-binance-open-platform) - [基本信息 | Binance Open Platform](#-binance-open-platform) - [New Order | Binance Open Platform](#new-order-binance-open-platform) - [Event Balance And Position Update | Binance Open Platform](#event-balance-and-position-update-binance-open-platform) - [Event Order Update | Binance Open Platform](#event-order-update-binance-open-platform) - [Event Trade Lite | Binance Open Platform](#event-trade-lite-binance-open-platform) - [Keepalive User Data Stream(Websocket API) | Binance Open Platform](#keepalive-user-data-stream-websocket-api-binance-open-platform) - [Start User Data Stream(Websocket API) | Binance Open Platform](#start-user-data-stream-websocket-api-binance-open-platform) - [All Market Liquidation Order Streams | Binance Open Platform](#all-market-liquidation-order-streams-binance-open-platform) - [All Market Mini Tickers Stream | Binance Open Platform](#all-market-mini-tickers-stream-binance-open-platform) - [All Book Tickers Stream | Binance Open Platform](#all-book-tickers-stream-binance-open-platform) - [All Market Tickers Streams | Binance Open Platform](#all-market-tickers-streams-binance-open-platform) - [Composite Index Symbol Information Streams | Binance Open Platform](#composite-index-symbol-information-streams-binance-open-platform) - [Diff Book Depth Streams | Binance Open Platform](#diff-book-depth-streams-binance-open-platform) - [Contract Info Stream | Binance Open Platform](#contract-info-stream-binance-open-platform) - [Individual Symbol Book Ticker Streams | Binance Open Platform](#individual-symbol-book-ticker-streams-binance-open-platform) - [Individual Symbol Mini Ticker Stream | Binance Open Platform](#individual-symbol-mini-ticker-stream-binance-open-platform) - [RPI Diff Book Depth Streams | Binance Open Platform](#rpi-diff-book-depth-streams-binance-open-platform) - [Individual Symbol Ticker Streams | Binance Open Platform](#individual-symbol-ticker-streams-binance-open-platform) - [Close User Data Stream(Websocket API) | Binance Open Platform](#close-user-data-stream-websocket-api-binance-open-platform) - [Event Account Configuration Update Previous Leverage Update | Binance Open Platform](#event-account-configuration-update-previous-leverage-update-binance-open-platform) - [Event Algo Order Update | Binance Open Platform](#event-algo-order-update-binance-open-platform) - [Event Grid Update | Binance Open Platform](#event-grid-update-binance-open-platform) - [Event Margin Call | Binance Open Platform](#event-margin-call-binance-open-platform) - [Event Strategy Update | Binance Open Platform](#event-strategy-update-binance-open-platform) - [Event User Data Stream Expired | Binance Open Platform](#event-user-data-stream-expired-binance-open-platform) - [Keepalive User Data Stream | Binance Open Platform](#keepalive-user-data-stream-binance-open-platform) - [How To Manage A Local Order Book Correctly | Binance Open Platform](#how-to-manage-a-local-order-book-correctly-binance-open-platform) - [WebSocket API基本信息 | Binance Open Platform](#websocket-api-binance-open-platform) - [Start User Data Stream | Binance Open Platform](#start-user-data-stream-binance-open-platform) - [Trading Session Stream | Binance Open Platform](#trading-session-stream-binance-open-platform) - [Self Trade Prevention | Binance Open Platform](#self-trade-prevention-binance-open-platform) - [Connect | Binance Open Platform](#connect-binance-open-platform) - [错误代码 | Binance Open Platform](#-binance-open-platform) --- # Integrate Binance Login with your web application | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN#__docusaurus_skipToContent_fallback) 本页总览 Using OAuth to Access Binance API ================================= Binance APIs utilize the [OAuth 2.0](https://tools.ietf.org/html/rfc6749)  protocol for authentication and authorization. Binance supports common OAuth 2.0 scenarios such as those for web server, single page (browser based), mobile and native applications. This document will guide you through how your application communicates with Binance's OAuth 2.0 server to secure a user's consent for performing an API request on his behalf. To begin, your application must identify the necessary permissions, or `scopes`. Visit the [Binance Developer Center](https://developers.binance.com/en) , sign up for a Binance entity account, and from there, navigate to your console to create an OAuth application and get your own client ID and client secret. For now, Binance Login (Oauth2.0), is exclusively offered to close ecosystem partners. Please reach to our business team for further information. Depending on your specific application type, you can select one of the two different authorization flows listed here: 1. For web applications, please refer to the ‘Authorization Code Flow’ section; 2. For browser-based applications as well as mobile and native applications, please refer to the ‘PCKE Flow’ section. 1\. Authorization Code Flow[​](https://developers.binance.com/docs/zh-CN/#1-authorization-code-flow "1. Authorization Code Flow的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- ### Step 1. Redirect users to request Binance access and set authorization parameters.[​](https://developers.binance.com/docs/zh-CN/#step-1-redirect-users-to-request-binance-access-and-set-authorization-parameters "Step 1. Redirect users to request Binance access and set authorization parameters.的直接链接") GET https://accounts.binance.com/en/oauth/authorize? response_type=code& client_id=YOUR_CLIENT_ID& redirect_uri=YOUR_REDIRECT_URI& state=CSRF_TOKEN& scope=SCOPES > ⚠️ The carriage returns of the above example are only for readability and should be removed in real world, as well as the following examples When redirecting a user to Binance to authorize access to your application, your first step is to create the authorization request. | Parameters | Description | | --- | --- | | `response_type` | **Required** Value `code` | | `client_id` | **Required** The client ID of your application. | | `redirect_uri` | **required** The URL in your web application where users will be redirected after authorization. This value needs to be URL encoded. | | `state` | **Optional** The CSRF token to protect against CSRF (cross-site request forgery) attacks. | | `scope` | **required** List of scopes enum your application requests access to, with comma (`,`) seperated. | Here is an Example of an authorization URL: GET https://accounts.binance.com/en/oauth/authorize? response_type=code& client_id=a28f296f2cbe6c64b4d5dec24735d39b1b6fffcf& redirect_uri=https%3A%2F%2Fdomain.com%2Foauth%2Fcallback& state=377f36a4557ab5935b36& scope=user:openId,create:apikey ### Step 2. Binance prompts user for consent[​](https://developers.binance.com/docs/zh-CN/#step-2-binance-prompts-user-for-consent "Step 2. Binance prompts user for consent的直接链接") In this step, the user decides whether to grant your application the requested access. At this stage, Binance displays a consent window that shows the name of your application and the Binance API services that it is requesting permission to access with the user's authorization credentials. The user can then consent or refuse to grant access to your application. Your application doesn't need to do anything at this stage as it waits for Binance's OAuth 2.0 server to redirect back. ### Step 3. Binance redirects back to your application[​](https://developers.binance.com/docs/zh-CN/#step-3-binance-redirects-back-to-your-application "Step 3. Binance redirects back to your application的直接链接") If the user approves your application, Binance's OAuth server will redirect back to your `redirect_uri` with a temporary authorization `code` parameter. If you specified a `state` parameter in step 1, the parameter will be included as well. If you generate a random string or encode the hash of a cookie or another value that captures the client's `state`, you can validate the response to additionally ensure that the request and response originated in the same browser, providing protection against attacks such as cross-site request forgery. Example of the redirection: GET https://domain.com/oauth/callback? code=cf6941ae8918b6a008f1377f36a4557ab5935b36& state=377f36a4557ab5935b36 > `state` is the same as the one in step 1 ### Step 4. Exchange authorization code for refresh and access tokens[​](https://developers.binance.com/docs/zh-CN/#step-4-exchange-authorization-code-for-refresh-and-access-tokens "Step 4. Exchange authorization code for refresh and access tokens的直接链接") After your application receives the authorization `code`, it can exchange the authorization `code` for an access token, which can be done by make a POST call: POST https://accounts.binance.com/oauth/token?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=authorization_code&code=STEP3_CODE&redirect_uri=YOUR_REDIRECT_URI | Parameter | Description | | --- | --- | | `grant_type` | **required** Value `authorization_code` | | `code` | **required** Step3 return code | | `client_id` | **required** The client ID of your application. | | `client_secret` | **required** The client secret of your application. | | `redirect_uri` | **required** The URL in your web application where users will be redirected after authorization. This value needs to be URL encoded. | Example POST call: curl https://accounts.binance.com/oauth/token \ -X POST -d 'client_id=je-client&client_secret=je-client-secret&grant_type=authorization_code&code=95OfIm&redirect_uri=https%3A%2F%2Fdomain.com%2Foauth%2Fcallback' After a successful request, a valid `access_token` will be returned in the response and it will be invalid if it exceeds the `expires_in` time in the response, which is in seconds. Here is an example response: { "access_token": "83f2bf51-a2c4-4c2e-b7c4-46cef6a8dba5", "refresh_token": "fb5587ee-d9cf-4cb5-a586-4aed72cc9bea", "scope": "read", "token_type": "bearer", "expires_in": 30714} ### Step 5. Exchange refresh token for access tokens[​](https://developers.binance.com/docs/zh-CN/#step-5-exchange-refresh-token-for-access-tokens "Step 5. Exchange refresh token for access tokens的直接链接") If your access token is expired, you can use `refresh_token` to get a new access token, which can be done by make a POST call: POST https://accounts.binance.com/oauth/token?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=refresh_token&refresh_token=STEP4_REFRESH_TOKEN | Parameter | Description | | --- | --- | | `grant_type` | **required** Value `refresh_token` | | `refresh_token` | **required** Step4 refresh token | | `client_id` | **required** The client ID of your application. | | `client_secret` | **required** The client secret of your application. | | Example POST call: | | curl https://accounts.binance.com/oauth/token \ -X POST -d 'client_id=je-client&client_secret=je-client-secret&grant_type=refresh_token&refresh_token=95OfIm After a successful request, a valid `access_token` will be returned in the response and it will be invalid if it exceeds the `expires_in` time in the response, which is in seconds. Here is an example response: { "access_token": "83f2bf51-a2c4-4c2e-b7c4-46cef6a8dba5", "refresh_token": "fb5587ee-d9cf-4cb5-a586-4aed72cc9bea", "scope": "read", "token_type": "bearer", "expires_in": 30714} ### Step 6. Calling Binance APIs[​](https://developers.binance.com/docs/zh-CN/#step-6-calling-binance-apis "Step 6. Calling Binance APIs的直接链接") After you have a valid `access_token`, you can make your first API call: curl 'https://www.binanceapis.com/oauth-api/v1/user-info' \--header 'Authorization: Bearer {access_token}' **Response:** { "code": "000000", "message": null, "data": { "userId": "e10e20b7f20947e7bd206b15ce3dae90", "email": "xx@xx.com" }, "success": true} 2\. PKCE Flow[​](https://developers.binance.com/docs/zh-CN/#2-pkce-flow "2. PKCE Flow的直接链接") --------------------------------------------------------------------------------------------- The PKCE extension prevents an attack where the authorization code is intercepted and exchanged for an access token by a malicious client, by providing the authorization server with a way to verify the same client instance that exchanges the authorization code is the same one that initiated the flow. For more details, refer to [https://tools.ietf.org/html/rfc7636](https://tools.ietf.org/html/rfc7636) ### Step 1. Redirect users to request Binance access and set authorization parameters.[​](https://developers.binance.com/docs/zh-CN/#step-1-redirect-users-to-request-binance-access-and-set-authorization-parameters-1 "Step 1. Redirect users to request Binance access and set authorization parameters.的直接链接") GET https://accounts.binance.com/en/oauth/authorize? response_type=code& client_id=YOUR_CLIENT_ID& redirect_uri=YOUR_REDIRECT_URI& state=CSRF_TOKEN& scope=SCOPES& code_challenge=CODE_CHALLENGE& code_challenge_method=S256 > ⚠️ The carriage returns of the above example are only for readability and should be removed in real world, as well as the following examples When redirecting a user to Binance to authorize access to your application, your first step is to create the authorization request. You need create and store a new PKCE code\_verifier, also will be used in STEP4 Here is an Example of javascript generate code\_verifier // Generate a secure random string using the browser crypto functionsfunction generateRandomString() { var array = new Uint32Array(28); window.crypto.getRandomValues(array); return Array.from(array, (dec) => ("0" + dec.toString(16)).substr(-2)).join( "" );} | Parameters | Description | | --- | --- | | `response_type` | **Required** Value `code` | | `client_id` | **Required** The client ID of your application. | | `redirect_uri` | **required** The URL in your web application where users will be redirected after authorization. This value needs to be URL encoded. | | `state` | **Optional** The CSRF token to protect against CSRF (cross-site request forgery) attacks. | | `scope` | **required** List of scopes enum your application requests access to, with comma (`,`) seperated. | | `code_challenge` | **required** Hash and base64-urlencode of code\_verifier | Here is an Example of javascript generate code\_challenge // Calculate the SHA256 hash of the input text.function sha256(code_verifier) { const encoder = new TextEncoder(); const data = encoder.encode(code_verifier); return window.crypto.subtle.digest("SHA-256", data);}// Base64-urlencodes the input stringfunction base64urlencode(hashed) { return btoa(String.fromCharCode.apply(null, new Uint8Array(hashed))) .replace(/\+/g, "-") .replace(/\//g, "_") .replace(/=+$/, "");}// Return the base64-urlencoded sha256 hash for the PKCE challengeasync function generateCodeChallenge(code_verifier) { hashed = await sha256(code_verifier); return base64urlencode(hashed);} Here is an Example of an authorization URL: GET https://accounts.binance.com/en/oauth/authorize? response_type=code& client_id=a28f296f2cbe6c64b4d5dec24735d39b1b6fffcf& redirect_uri=https%3A%2F%2Fdomain.com%2Foauth%2Fcallback& state=377f36a4557ab5935b36& scope=user:openId,create:apikey& code_challenge=ARU184muFVaDi3LObH5YTZSxqA5ZdYPLspCl7wFwV0U code_challenge_method=S256 ### Step 2. Binance prompts user for consent[​](https://developers.binance.com/docs/zh-CN/#step-2-binance-prompts-user-for-consent-1 "Step 2. Binance prompts user for consent的直接链接") In this step, the user decides whether to grant your application the requested access. At this stage, Binance displays a consent window that shows the name of your application and the Binance API services that it is requesting permission to access with the user's authorization credentials. The user can then consent or refuse to grant access to your application. Your application doesn't need to do anything at this stage as it waits for Binance's OAuth 2.0 server to redirect back. ### Step 3. Binance redirects back to your application[​](https://developers.binance.com/docs/zh-CN/#step-3-binance-redirects-back-to-your-application-1 "Step 3. Binance redirects back to your application的直接链接") If the user approves your application, Binance's OAuth server will redirect back to your `redirect_uri` with a temporary authorization `code` parameter. If you specified a `state` parameter in step 1, the parameter will be included as well. If you generate a random string or encode the hash of a cookie or another value that captures the client's `state`, you can validate the response to additionally ensure that the request and response originated in the same browser, providing protection against attacks such as cross-site request forgery. Example of the redirection: GET https://domain.com/oauth/callback? code=cf6941ae8918b6a008f1377f36a4557ab5935b36& state=377f36a4557ab5935b36 > `state` is the same as the one in step 1 ### Step 4. Exchange authorization code for refresh and access tokens[​](https://developers.binance.com/docs/zh-CN/#step-4-exchange-authorization-code-for-refresh-and-access-tokens-1 "Step 4. Exchange authorization code for refresh and access tokens的直接链接") After your application receives the authorization `code`, it can exchange the authorization `code` for an access token, which can be done by make a POST call: POST https://accounts.binance.com/oauth/token?client_id=YOUR_CLIENT_ID&code_verifier=STEP1_CODE_VERIFIER&grant_type=authorization_code&code=STEP3_CODE&redirect_uri=YOUR_REDIRECT_URI | Parameter | Description | | --- | --- | | `grant_type` | **required** Value `authorization_code` | | `code` | **required** Step3 return code | | `client_id` | **required** The client ID of your application. | | `code_verifier` | **required** The random secret code created and stored in STEP1 | | `redirect_uri` | **required** The URL in your web application where users will be redirected after authorization. This value needs to be URL encoded. | Example POST call: curl https://accounts.binance.com/oauth/token \ -X POST -d 'client_id=je-client&code_verifier=65a4ecce1fe857067bec7a6887529531831ebe38e32da95fe0f322a2&grant_type=authorization_code&code=95OfIm&redirect_uri=https%3A%2F%2Fdomain.com%2Foauth%2Fcallback' After a successful request, a valid `access_token` will be returned in the response and it will be invalid if it exceeds the `expires_in` time in the response, which is in seconds. Here is an example response: { "access_token": "83f2bf51-a2c4-4c2e-b7c4-46cef6a8dba5", "refresh_token": "fb5587ee-d9cf-4cb5-a586-4aed72cc9bea", "scope": "read", "token_type": "bearer", "expires_in": 30714} ### Step 5. Exchange refresh token for access tokens[​](https://developers.binance.com/docs/zh-CN/#step-5-exchange-refresh-token-for-access-tokens-1 "Step 5. Exchange refresh token for access tokens的直接链接") If your access token is expired, you can use `refresh_token` to get a new access token, which can be done by make a POST call: POST https://accounts.binance.com/oauth/token?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=refresh_token&refresh_token=STEP4_REFRESH_TOKEN | Parameter | Description | | --- | --- | | `grant_type` | **required** Value `refresh_token` | | `refresh_token` | **required** Step4 refresh token | | `client_id` | **required** The client ID of your application. | | `client_secret` | **required** The client secret of your application. | | Example POST call: | | curl https://accounts.binance.com/oauth/token \ -X POST -d 'client_id=je-client&client_secret=je-client-secret&grant_type=refresh_token&refresh_token=95OfIm After a successful request, a valid `access_token` will be returned in the response and it will be invalid if it exceeds the `expires_in` time in the response, which is in seconds. Here is an example response: { "access_token": "83f2bf51-a2c4-4c2e-b7c4-46cef6a8dba5", "refresh_token": "fb5587ee-d9cf-4cb5-a586-4aed72cc9bea", "scope": "read", "token_type": "bearer", "expires_in": 30714} ### Step 6. Calling Binance APIs[​](https://developers.binance.com/docs/zh-CN/#step-6-calling-binance-apis-1 "Step 6. Calling Binance APIs的直接链接") After you have a valid `access_token`, you can make your first API call: curl 'https://www.binanceapis.com/oauth-api/v1/user-info' \--header 'Authorization: Bearer {access_token}' **Response:** { "code": "000000", "message": null, "data": { "userId": "e10e20b7f20947e7bd206b15ce3dae90", "email": "xx@xx.com" }, "success": true} * [1\. Authorization Code Flow](https://developers.binance.com/docs/zh-CN/#1-authorization-code-flow) * [Step 1. Redirect users to request Binance access and set authorization parameters.](https://developers.binance.com/docs/zh-CN/#step-1-redirect-users-to-request-binance-access-and-set-authorization-parameters) * [Step 2. Binance prompts user for consent](https://developers.binance.com/docs/zh-CN/#step-2-binance-prompts-user-for-consent) * [Step 3. Binance redirects back to your application](https://developers.binance.com/docs/zh-CN/#step-3-binance-redirects-back-to-your-application) * [Step 4. Exchange authorization code for refresh and access tokens](https://developers.binance.com/docs/zh-CN/#step-4-exchange-authorization-code-for-refresh-and-access-tokens) * [Step 5. Exchange refresh token for access tokens](https://developers.binance.com/docs/zh-CN/#step-5-exchange-refresh-token-for-access-tokens) * [Step 6. Calling Binance APIs](https://developers.binance.com/docs/zh-CN/#step-6-calling-binance-apis) * [2\. PKCE Flow](https://developers.binance.com/docs/zh-CN/#2-pkce-flow) * [Step 1. Redirect users to request Binance access and set authorization parameters.](https://developers.binance.com/docs/zh-CN/#step-1-redirect-users-to-request-binance-access-and-set-authorization-parameters-1) * [Step 2. Binance prompts user for consent](https://developers.binance.com/docs/zh-CN/#step-2-binance-prompts-user-for-consent-1) * [Step 3. Binance redirects back to your application](https://developers.binance.com/docs/zh-CN/#step-3-binance-redirects-back-to-your-application-1) * [Step 4. Exchange authorization code for refresh and access tokens](https://developers.binance.com/docs/zh-CN/#step-4-exchange-authorization-code-for-refresh-and-access-tokens-1) * [Step 5. Exchange refresh token for access tokens](https://developers.binance.com/docs/zh-CN/#step-5-exchange-refresh-token-for-access-tokens-1) * [Step 6. Calling Binance APIs](https://developers.binance.com/docs/zh-CN/#step-6-calling-binance-apis-1) --- # Get Discount Buy product list | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#__docusaurus_skipToContent_fallback) 本页总览 获得折价买币产品列表(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- 获得折价买币产品列表 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/accumulator/product/list` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | targetAsset | STRING | NO | 目标币种,仅支持非稳定币 | | investAsset | STRING | NO | 申购的币种,仅支持稳定币 | | pageSize | LONG | YES | 最小: 10, 最大:100 | | pageIndex | NUMBER | YES | 默认:1 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | DATETIME | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "list": [ { "id": "741590", "investAsset": "USDT", "targetAsset": "BTC", "strikePrice": "114111", "knockoutPrice":"118000", "duration": 4, "settleDate": 1709020800000, "purchaseDecimal": 2, "purchaseEndTime": 1708934400000, "canPurchase": true, //true, false "knockOutApr": "0.3", "orderId": 8257205859, "minAmount": "0.01", "maxAmount": "100000", "createTimestamp": 1708560084000 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 在文档中搜索 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/search#__docusaurus_skipToContent_fallback) 在文档中搜索 ====== 当前全站 [](https://www.algolia.com/) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2026-03-23[​](https://developers.binance.com/docs/zh-CN/advanced_earn#2026-03-23 "2026-03-23的直接链接") ---------------------------------------------------------------------------------------------------- * 双币投资 * `GET /sapi/v1/dci/product/positions` - 在响应中新增 `subscriptionTime` 字段。 * * * 2025-12-26[​](https://developers.binance.com/docs/zh-CN/advanced_earn#2025-12-26 "2025-12-26的直接链接") ---------------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/advanced_earn#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/advanced_earn#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2025-12-02[​](https://developers.binance.com/docs/zh-CN/advanced_earn#2025-12-02 "2025-12-02的直接链接") ---------------------------------------------------------------------------------------------------- * 新增折价买币接口 * * * 2024-02-23[​](https://developers.binance.com/docs/zh-CN/advanced_earn#2024-02-23 "2024-02-23的直接链接") ---------------------------------------------------------------------------------------------------- * 新增双币投资接口: * `GET /sapi/v1/dci/product/list`: 获得双币产品列表 * `POST /sapi/v1/dci/product/subscribe`: 申购双币产品 * `GET /sapi/v1/dci/product/positions`: 获得双币产品持仓状态 * `GET /sapi/v1/dci/product/accounts`: 查询双币产品账户 * `POST /sapi/v1/dci/product/auto_compound/edit-status`: 改变自动复投状态 * [2026-03-23](https://developers.binance.com/docs/zh-CN/advanced_earn#2026-03-23) * [2025-12-26](https://developers.binance.com/docs/zh-CN/advanced_earn#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/advanced_earn#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/advanced_earn#rest-api) * [2025-12-02](https://developers.binance.com/docs/zh-CN/advanced_earn#2025-12-02) * [2024-02-23](https://developers.binance.com/docs/zh-CN/advanced_earn#2024-02-23) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2026-03-23[​](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2026-03-23 "2026-03-23的直接链接") --------------------------------------------------------------------------------------------------------------- * 双币投资 * `GET /sapi/v1/dci/product/positions` - 在响应中新增 `subscriptionTime` 字段。 * * * 2025-12-26[​](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2025-12-26 "2025-12-26的直接链接") --------------------------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2025-12-02[​](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2025-12-02 "2025-12-02的直接链接") --------------------------------------------------------------------------------------------------------------- * 新增折价买币接口 * * * 2024-02-23[​](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2024-02-23 "2024-02-23的直接链接") --------------------------------------------------------------------------------------------------------------- * 新增双币投资接口: * `GET /sapi/v1/dci/product/list`: 获得双币产品列表 * `POST /sapi/v1/dci/product/subscribe`: 申购双币产品 * `GET /sapi/v1/dci/product/positions`: 获得双币产品持仓状态 * `GET /sapi/v1/dci/product/accounts`: 查询双币产品账户 * `POST /sapi/v1/dci/product/auto_compound/edit-status`: 改变自动复投状态 * [2026-03-23](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2026-03-23) * [2025-12-26](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#rest-api) * [2025-12-02](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2025-12-02) * [2024-02-23](https://developers.binance.com/docs/zh-CN/advanced_earn/change-log#2024-02-23) --- # Contact us | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/contact-us#__docusaurus_skipToContent_fallback) 联系我们 ==== * [币安API电报群](https://t.me/Binance_api_Chinese) * 咨询关于API或者Websockets性能方面的问题. * 咨询文档中没有提及的API问题. * [币安开发者社区](https://dev.binance.vision/) * 咨询关于API/Websockets代码实现,或者任何API/Websockets的问题. * [币安客服](https://www.binance.com/cn/support-center) * 咨询关于账户,钱包,2FA等. --- # Get Discount Buy product list | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#__docusaurus_skipToContent_fallback) 本页总览 获得折价买币产品列表(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获得折价买币产品列表 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/accumulator/product/list` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | targetAsset | STRING | NO | 目标币种,仅支持非稳定币 | | investAsset | STRING | NO | 申购的币种,仅支持稳定币 | | pageSize | LONG | YES | 最小: 10, 最大:100 | | pageIndex | NUMBER | YES | 默认:1 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | DATETIME | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "list": [ { "id": "741590", "investAsset": "USDT", "targetAsset": "BTC", "strikePrice": "114111", "knockoutPrice":"118000", "duration": 4, "settleDate": 1709020800000, "purchaseDecimal": 2, "purchaseEndTime": 1708934400000, "canPurchase": true, //true, false "knockOutApr": "0.3", "orderId": 8257205859, "minAmount": "0.01", "maxAmount": "100000", "createTimestamp": 1708560084000 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/market-data/Get-Discount-Buy-product-list#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Subscribe Discount Buy products | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#__docusaurus_skipToContent_fallback) 本页总览 申购折价买币产品(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- 申购折价买币产品 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/accumulator/product/subscribe` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | projectId | LONG | YES | 从 `/sapi/v1/accumulator/product/list` 获得id | | orderId | STRING | YES | 从 `/sapi/v1/accumulator/product/list` 获得orderId | | depositAmount | BigDecimal | YES | 申购金额 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 失败消息: * Products are not available. 代表APR变小或者订单不可用。 * Failed. 代表系统或者网络错误。 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- { "positionId": 10208824, "investAsset": "BTC", "targetAsset": "USDT", "depositAmount": "100.12", "duration": 4, "strikePrice": "114111", "knockOutPrice":"118000" "settleDate": 1709020800000, "purchaseStatus": "PURCHASE_SUCCESS",//申购中,申购成功,已结算,申购失败,退款中,退款成功,结算中 "knockOutApr": "0.3", "orderId": 8259117597} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Check Discount Buy accounts | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#__docusaurus_skipToContent_fallback) 本页总览 查询折价买币产品账户(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询折价买币产品账户 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/accumulator/product/sum-holding` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | DATETIME | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "totalAmountInBTC": "0.01067982", //BTC总值 "totalAmountInUSDT": "77.13289230" //USDT等价于BTC的总值} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Check-Discount-Buy-accounts#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Discount Buy positions | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#__docusaurus_skipToContent_fallback) 本页总览 获得折价买币产品持仓状态(USER\_DATA) ======================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 获得双币产品持仓状态(批量接口) HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v1/accumulator/product/position/list` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | status | ENUM | NO | `PENDING`:产品申购中,将稍后给出结果;`PURCHASE_SUCCESS`:申购成功;`SETTLED`: 产品已经结算;`PURCHASE_FAIL`:申购失败;`REFUNDING`:退款中;`REFUND_SUCCESS`:退款成功,资金返回现货账户; `SETTLING`:产品正在结算中,如果不填写该字段,则返回所有持仓信息。 | | pageSize | LONG | YES | 最小: 10, 最大:100 | | pageIndex | INT | YES | 默认:1 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | DATETIME | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "list": [ { "id": "10160533", //持仓id "investAsset": "USDT", "targetAsset": "BTC", "depositAmount": "100.12", "strikePrice": "114111", "knockoutPrice":"118000", "duration": 4, "settleDate": 1708416000000, "purchaseStatus": "PURCHASE_SUCCESS", "knockoutApr": "0.3", "orderId": 7973677530 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Get-Discount-Buy-positions#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Subscribe Discount Buy products | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#__docusaurus_skipToContent_fallback) 本页总览 申购折价买币产品(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 申购折价买币产品 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/accumulator/product/subscribe` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | projectId | LONG | YES | 从 `/sapi/v1/accumulator/product/list` 获得id | | orderId | STRING | YES | 从 `/sapi/v1/accumulator/product/list` 获得orderId | | depositAmount | BigDecimal | YES | 申购金额 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 失败消息: * Products are not available. 代表APR变小或者订单不可用。 * Failed. 代表系统或者网络错误。 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "positionId": 10208824, "investAsset": "BTC", "targetAsset": "USDT", "depositAmount": "100.12", "duration": 4, "strikePrice": "114111", "knockOutPrice":"118000" "settleDate": 1709020800000, "purchaseStatus": "PURCHASE_SUCCESS",//申购中,申购成功,已结算,申购失败,退款中,退款成功,结算中 "knockOutApr": "0.3", "orderId": 8259117597} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/discount-buy/trade/Subscribe-Discount-Buy-products#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Dual Investment product list | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#__docusaurus_skipToContent_fallback) 本页总览 获得双币产品列表(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- 获得双币产品列表 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v1/dci/product/list` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | optionType | STRING | YES | 输入CALL 或者 PUT | | exercisedCoin | STRING | YES | 行权币种,例如:如果您认购高卖产品(看涨期权),您应该输入:`optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; 如果您认购低买产品(看跌期权),您应该输入: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT | | investCoin | STRING | YES | 申购币种,例如:如果您认购高卖产品(看涨期权),您应该输入:`optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; 如果您认购低买产品(看跌期权),您应该输入: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT | | pageSize | LONG | NO | 默认: 10, 最大:100 | | pageIndex | INT | NO | 默认:1 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "list": [ { "id": "741590", "investCoin": "USDT", "exercisedCoin": "BNB", "strikePrice": "380", "duration": 4, "settleDate": 1709020800000, "purchaseDecimal": 8, "purchaseEndTime": 1708934400000, "canPurchase": true, //true, false "apr": "0.6076", "orderId": 8257205859, "minAmount": "0.1", "maxAmount": "25265.7", "createTimestamp": 1708560084000, "optionType": "PUT", "isAutoCompoundEnable": true, //true, false "autoCompoundPlanList": [ "STANDARD", "ADVANCE" ] } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Dual Investment product list | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#__docusaurus_skipToContent_fallback) 本页总览 获得双币产品列表(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获得双币产品列表 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/dci/product/list` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | optionType | STRING | YES | 输入CALL 或者 PUT | | exercisedCoin | STRING | YES | 行权币种,例如:如果您认购高卖产品(看涨期权),您应该输入:`optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; 如果您认购低买产品(看跌期权),您应该输入: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT | | investCoin | STRING | YES | 申购币种,例如:如果您认购高卖产品(看涨期权),您应该输入:`optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; 如果您认购低买产品(看跌期权),您应该输入: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT | | pageSize | LONG | NO | 默认: 10, 最大:100 | | pageIndex | INT | NO | 默认:1 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "list": [ { "id": "741590", "investCoin": "USDT", "exercisedCoin": "BNB", "strikePrice": "380", "duration": 4, "settleDate": 1709020800000, "purchaseDecimal": 8, "purchaseEndTime": 1708934400000, "canPurchase": true, //true, false "apr": "0.6076", "orderId": 8257205859, "minAmount": "0.1", "maxAmount": "25265.7", "createTimestamp": 1708560084000, "optionType": "PUT", "isAutoCompoundEnable": true, //true, false "autoCompoundPlanList": [ "STANDARD", "ADVANCE" ] } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/market-data/Get-Dual-Investment-product-list#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Subscribe Dual Investment products | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#__docusaurus_skipToContent_fallback) 本页总览 申购双币产品(USER\_DATA) ================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- 申购双币产品 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------ POST `/sapi/v1/dci/product/subscribe` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | id | STRING | YES | 从 `/sapi/v1/dci/product/list` 获得id | | orderId | STRING | YES | 从 `/sapi/v1/dci/product/list` 获得orderId | | depositAmount | DECIMAL | YES | 申购金额 | | autoCompoundPlan | ENUM | YES | 输入参数:`NONE`, `STANDARD`, `ADVANCED`, NONE=关闭自动复投计划,STANDARD= 基础计划,ADVANCED= 进阶计划 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 失败消息: * Products are not available. 代表APR变小或者订单不可用。 * Failed. 代表系统或者网络错误。 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- { "positionId": 10208824, "investCoin": "BNB", "exercisedCoin": "USDT", "subscriptionAmount": "0.002", "duration": 4, "autoCompoundPlan": "STANDARD", //基础计划, 进阶计划;autoCompoundPlan为None时此字段不显示 "strikePrice": "380", "settleDate": 1709020800000, "purchaseStatus": "PURCHASE_SUCCESS", "apr": "0.7397", "orderId": 8259117597, "purchaseTime": 1708677583874, "optionType": "CALL"} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Change Auto-Compound status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#__docusaurus_skipToContent_fallback) 本页总览 改变自动复投状态(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 改变自动复投状态 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/dci/product/auto_compound/edit-status` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- **500(UID)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | positionId | STRING | YES | 从 `/sapi/v1/dci/product/positions`获得持仓id | | AutoCompoundPlan | STRING | YES | `NONE`:关闭自动复投计划;`STANDARD`:基础计划;`ADVANCED`:进阶计划 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 注意: * 15:31 ~ 16:00 UTC+8 此功能关闭 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "positionId":"123456789" "autoCompoundPlan":"ADVANCED", //NONE,STANDARD,ADVANCED} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Change-Auto-Compound-status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Check Dual Investment accounts | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#__docusaurus_skipToContent_fallback) 本页总览 查询双币产品账户(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询双币产品账户 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/dci/product/accounts` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "totalAmountInBTC": "0.01067982", //BTC总值 "totalAmountInUSDT": "77.13289230" //USDT等价于BTC的总值} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Check-Dual-Investment-accounts#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/Introduction#__docusaurus_skipToContent_fallback) 进阶赚币下的创新产品旨在驾驭各种市场状况,助力您轻松获利。 --- # Get Dual Investment positions | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#__docusaurus_skipToContent_fallback) 本页总览 获得双币产品持仓状态(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获得双币产品持仓状态(批量接口) HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v1/dci/product/positions` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | status | ENUM | NO | `PENDING`:产品申购中,将稍后给出结果;`PURCHASE_SUCCESS`:申购成功;`SETTLED`: 产品已经结算;`PURCHASE_FAIL`:申购失败;`REFUNDING`:退款中;`REFUND_SUCCESS`:退款成功,资金返回现货账户; `SETTLING`:产品正在结算中,如果不填写该字段,则返回所有持仓信息。 | | pageSize | LONG | NO | 默认: 10, 最大:100 | | pageIndex | INT | NO | 默认:1 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "list": [ { "id": "10160533", //positionId "investCoin": "USDT", "exercisedCoin": "BNB", "subscriptionAmount": "0.5", "strikePrice": "330", "duration": 4, "settleDate": 1708416000000, "purchaseStatus": "PURCHASE_SUCCESS", "apr": "0.0365", "orderId": 7973677530, "purchaseEndTime": 1708329600000, //申购中, 申购成功, 已结算, 申购失败, 退款中, 退款成功, 结算中 "optionType": "PUT", "autoCompoundPlan": "STANDARD", //关闭计划, 基础计划, 进阶计划 "subscriptionTime": 1708243200000 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Get-Dual-Investment-positions#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 快速开始 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#__docusaurus_skipToContent_fallback) 本页总览 快速开始 ==== API Key 权限设置[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE "API Key 权限设置的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ * 新创建的API的默认权限是 `只读`。 * 如果需要通过API提款, 需要在UI修改权限, 选中 `允许提现`。 账户[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#%E8%B4%A6%E6%88%B7 "账户的直接链接") -------------------------------------------------------------------------------------------------------- ### 现货账户[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7 "现货账户的直接链接") 新注册的币安账号都会有一个现货(`SPOT`)账号。 ### 杠杆账户[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7 "杠杆账户的直接链接") 为了开设杠杆(`MARGIN`)账户, 可以参考[Binance杠杆交易账户设置指南](https://www.binance.vision/zh/tutorials/binance-margin-trading-guide) API 代码库[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93 "API 代码库的直接链接") ------------------------------------------------------------------------------------------------------------------------------- ### Connectors[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#connectors "Connectors的直接链接") 以下有一些轻量级的代码库,使不同语言的用户能够直接调用现货的 Binance 公共 API: * Python [https://github.com/binance/binance-connector-python](https://github.com/binance/binance-connector-python) * JavaScript [https://github.com/binance/binance-connector-js](https://github.com/binance/binance-connector-js) * Ruby [https://github.com/binance/binance-connector-ruby](https://github.com/binance/binance-connector-ruby) * DotNET C# [https://github.com/binance/binance-connector-dotnet](https://github.com/binance/binance-connector-dotnet) * Java [https://github.com/binance/binance-connector-java](https://github.com/binance/binance-connector-java) * Rust [https://github.com/binance/binance-spot-connector-rust](https://github.com/binance/binance-spot-connector-rust) * PHP [https://github.com/binance/binance-connector-php](https://github.com/binance/binance-connector-php) * Go [https://github.com/binance/binance-connector-go](https://github.com/binance/binance-connector-go) ### Postman Collections[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#postman-collections "Postman Collections的直接链接") Postman 集合现已推出。推荐给寻求快速和轻松地开始使用 API 的新用户。 [https://github.com/binance/binance-api-postman](https://github.com/binance/binance-api-postman) ### Swagger[​](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#swagger "Swagger的直接链接") 以下有提供包含 RESTful API 的 OpenAPI 规范的 YAML 文件,以及可供参考的 Swagger UI 页面。 [https://github.com/binance/binance-api-swagger](https://github.com/binance/binance-api-swagger) * [API Key 权限设置](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE) * [账户](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#%E8%B4%A6%E6%88%B7) * [现货账户](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7) * [杠杆账户](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7) * [API 代码库](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93) * [Connectors](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#connectors) * [Postman Collections](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#postman-collections) * [Swagger](https://developers.binance.com/docs/zh-CN/advanced_earn/quick-start#swagger) --- # Subscribe Dual Investment products | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#__docusaurus_skipToContent_fallback) 本页总览 申购双币产品(USER\_DATA) ================== 接口描述[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 申购双币产品 HTTP请求[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/dci/product/subscribe` 请求权重[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | id | STRING | YES | 从 `/sapi/v1/dci/product/list` 获得id | | orderId | STRING | YES | 从 `/sapi/v1/dci/product/list` 获得orderId | | depositAmount | DECIMAL | YES | 申购金额 | | autoCompoundPlan | ENUM | YES | 输入参数:`NONE`, `STANDARD`, `ADVANCED`, NONE=关闭自动复投计划,STANDARD= 基础计划,ADVANCED= 进阶计划 | | recvWindow | LONG | NO | 该值不能大于 60000 | | timestamp | LONG | YES | | 失败消息: * Products are not available. 代表APR变小或者订单不可用。 * Failed. 代表系统或者网络错误。 响应示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "positionId": 10208824, "investCoin": "BNB", "exercisedCoin": "USDT", "subscriptionAmount": "0.002", "duration": 4, "autoCompoundPlan": "STANDARD", //基础计划, 进阶计划;autoCompoundPlan为None时此字段不显示 "strikePrice": "380", "settleDate": 1709020800000, "purchaseStatus": "PURCHASE_SUCCESS", "apr": "0.7397", "orderId": 8259117597, "purchaseTime": 1708677583874, "optionType": "CALL"} * [接口描述](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/advanced_earn/dual-investment/trade/Subscribe-Dual-Investment-products#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Contact us | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/contact-us#__docusaurus_skipToContent_fallback) 联系我们 ==== * [币安API电报群](https://t.me/Binance_api_Chinese) * 咨询关于API或者Websockets性能方面的问题. * 咨询文档中没有提及的API问题. * [币安开发者社区](https://dev.binance.vision/) * 咨询关于API/Websockets代码实现,或者任何API/Websockets的问题. * [币安客服](https://www.binance.com/cn/support-center) * 咨询关于账户,钱包,2FA等. --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/change-log#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/algo/change-log#2025-12-26 "2025-12-26的直接链接") ------------------------------------------------------------------------------------------------------ ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/algo/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/algo/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/algo/change-log#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/algo/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2023-04-18[​](https://developers.binance.com/docs/zh-CN/algo/change-log#2023-04-18 "2023-04-18的直接链接") ------------------------------------------------------------------------------------------------------ * 新增现货策略交易接口: * `POST /sapi/v1/algo/spot/newOrderTwap` 以支持现货策略下单 * `DELETE /sapi/v1/algo/spot/order` 以支持现货策略委托撤单 * `GET /sapi/v1/algo/spot/openOrders` 以支持查询现货策略当前委托 * `GET /sapi/v1/algo/spot/historicalOrders` 以支持查询现货策略历史订单 * `GET /sapi/v1/algo/spot/subOrders` 以支持查询现货策略子订单 * * * 2022-04-27[​](https://developers.binance.com/docs/zh-CN/algo/change-log#2022-04-27 "2022-04-27的直接链接") ------------------------------------------------------------------------------------------------------ * 新增合约策略交易接口: * `POST /sapi/v1/algo/futures/newOrderTwap` 以支持合约 Twap 策略下单 FAQ: [时间加权平均价格策略(Twap) 介绍](https://www.binance.com/cn/support/faq/093927599fd54fd48857237f6ebec0b0) * * * 2022-04-13[​](https://developers.binance.com/docs/zh-CN/algo/change-log#2022-04-13 "2022-04-13的直接链接") ------------------------------------------------------------------------------------------------------ * 新增合约策略交易接口: * `POST /sapi/v1/algo/futures/newOrderVp` 以支持合约 vp 策略下单 * `DELETE /sapi/v1/algo/futures/order` 以支持合约策略委托撤单 * `GET /sapi/v1/algo/futures/openOrders` 以支持查询合约策略当前委托 * `GET /sapi/v1/algo/futures/historicalOrders` 以支持查询合约策略历史订单 * `GET /sapi/v1/algo/futures/subOrders` 以支持查询合约策略子订单 FAQ: [成交量份额参与算法(VP) 介绍](https://www.binance.com/cn/support/faq/b0b94dcc8eb64c2585763b8747b60702) * [2025-12-26](https://developers.binance.com/docs/zh-CN/algo/change-log#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/algo/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/algo/change-log#rest-api) * [2023-04-18](https://developers.binance.com/docs/zh-CN/algo/change-log#2023-04-18) * [2022-04-27](https://developers.binance.com/docs/zh-CN/algo/change-log#2022-04-27) * [2022-04-13](https://developers.binance.com/docs/zh-CN/algo/change-log#2022-04-13) --- # Query Current Algo Open Orders (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询当前策略订单挂单(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- 查询当前策略订单挂单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v1/algo/futures/openOrders` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 您的 API Key 需要开通 `允许合约交易` 权限 > * 请使用Base URL: [https://api.binance.com](https://api.binance.com/) > 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "orders": [ { "algoId": 14517, //策略订单ID "symbol": "ETHUSDT", //交易对 "side": "SELL", //买卖方向 "positionSide": "SHORT", //持仓模式 "totalQty": "5.000", //总共下单数量 "executedQty": "0.000", //执行数量 "executedAmt": "0.00000000", //执行价值 "avgPrice": "0.00", //平均价格 "clientAlgoId": "d7096549481642f8a0bb69e9e2e31f2e", //用户自定义策略订单ID "bookTime": 1649756817004, //用户下单时间 "endTime": 0, //结束时间 "algoStatus": "WORKING", //策略订单状态 "algoType": "VP", //策略订单类型 "urgency": "LOW" //执行速率 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Current-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/algo#2025-12-26 "2025-12-26的直接链接") ------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/algo#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/algo/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/algo#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/algo/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2023-04-18[​](https://developers.binance.com/docs/zh-CN/algo#2023-04-18 "2023-04-18的直接链接") ------------------------------------------------------------------------------------------- * 新增现货策略交易接口: * `POST /sapi/v1/algo/spot/newOrderTwap` 以支持现货策略下单 * `DELETE /sapi/v1/algo/spot/order` 以支持现货策略委托撤单 * `GET /sapi/v1/algo/spot/openOrders` 以支持查询现货策略当前委托 * `GET /sapi/v1/algo/spot/historicalOrders` 以支持查询现货策略历史订单 * `GET /sapi/v1/algo/spot/subOrders` 以支持查询现货策略子订单 * * * 2022-04-27[​](https://developers.binance.com/docs/zh-CN/algo#2022-04-27 "2022-04-27的直接链接") ------------------------------------------------------------------------------------------- * 新增合约策略交易接口: * `POST /sapi/v1/algo/futures/newOrderTwap` 以支持合约 Twap 策略下单 FAQ: [时间加权平均价格策略(Twap) 介绍](https://www.binance.com/cn/support/faq/093927599fd54fd48857237f6ebec0b0) * * * 2022-04-13[​](https://developers.binance.com/docs/zh-CN/algo#2022-04-13 "2022-04-13的直接链接") ------------------------------------------------------------------------------------------- * 新增合约策略交易接口: * `POST /sapi/v1/algo/futures/newOrderVp` 以支持合约 vp 策略下单 * `DELETE /sapi/v1/algo/futures/order` 以支持合约策略委托撤单 * `GET /sapi/v1/algo/futures/openOrders` 以支持查询合约策略当前委托 * `GET /sapi/v1/algo/futures/historicalOrders` 以支持查询合约策略历史订单 * `GET /sapi/v1/algo/futures/subOrders` 以支持查询合约策略子订单 FAQ: [成交量份额参与算法(VP) 介绍](https://www.binance.com/cn/support/faq/b0b94dcc8eb64c2585763b8747b60702) * [2025-12-26](https://developers.binance.com/docs/zh-CN/algo#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/algo#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/algo#rest-api) * [2023-04-18](https://developers.binance.com/docs/zh-CN/algo#2023-04-18) * [2022-04-27](https://developers.binance.com/docs/zh-CN/algo#2022-04-27) * [2022-04-13](https://developers.binance.com/docs/zh-CN/algo#2022-04-13) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/change-log#__docusaurus_skipToContent_fallback) 本页总览 修改日志 ==== 最新更新: 2026-04-01 2026-04-01[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#2026-04-01 "2026-04-01的直接链接") ------------------------------------------------------------------------------------------------------- ### 市场数据[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE "市场数据的直接链接") * 完整深度 * * * 2026-03-24[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#2026-03-24 "2026-03-24的直接链接") ------------------------------------------------------------------------------------------------------- ### Websocket市场数据[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#websocket%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE "Websocket市场数据的直接链接") * @bookTicker * !bookTicker * @miniTicker * !miniTicker@arr * @ticker * !ticker@arr * @trade * @depth@ * @kline\_ * @fulldepth@ * 已订阅信息流 * 实时订阅/取消数据流 返回 * * * 2026-02-24[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#2026-02-24 "2026-02-24的直接链接") ------------------------------------------------------------------------------------------------------- ### Websocket市场数据[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#websocket%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1 "Websocket市场数据的直接链接") * 板块初始化 * * * 2025-07-22[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#2025-07-22 "2025-07-22的直接链接") ------------------------------------------------------------------------------------------------------- ### 市场数据[​](https://developers.binance.com/docs/zh-CN/alpha/change-log#%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1 "市场数据的直接链接") * 24hr价格变动情况 * 聚合交易查询 * 交易对信息 * K线 * Token列表 * * * * [2026-04-01](https://developers.binance.com/docs/zh-CN/alpha/change-log#2026-04-01) * [市场数据](https://developers.binance.com/docs/zh-CN/alpha/change-log#%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE) * [2026-03-24](https://developers.binance.com/docs/zh-CN/alpha/change-log#2026-03-24) * [Websocket市场数据](https://developers.binance.com/docs/zh-CN/alpha/change-log#websocket%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE) * [2026-02-24](https://developers.binance.com/docs/zh-CN/alpha/change-log#2026-02-24) * [Websocket市场数据](https://developers.binance.com/docs/zh-CN/alpha/change-log#websocket%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1) * [2025-07-22](https://developers.binance.com/docs/zh-CN/alpha/change-log#2025-07-22) * [市场数据](https://developers.binance.com/docs/zh-CN/alpha/change-log#%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1) --- # 基本信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/general-info#__docusaurus_skipToContent_fallback) 本页总览 通用信息 ==== 这是关于币安Alpha交易的文档。所有接口均使用HTTP GET请求,返回JSON格式的数据。因为是公共接口,所以无需身份验证。 重要提示[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/general-info#%E9%87%8D%E8%A6%81%E6%8F%90%E7%A4%BA "重要提示的直接链接") ----------------------------------------------------------------------------------------------------------------------------------- 对于需要symbol参数的接口(例如,交易量、历史交易或K线数据),请先调用Token列表接口以获取可用代币列表。在响应中,根据代币符号名称(例如 "ZKJ" 或 "QUQ")确定对应的ALPHA代币ID。然后,按格式ALPHA\_构造symbol参数(例如,ALPHA\_173USDT表示代币ID为173,计价资产为USDT的代币)。 * [重要提示](https://developers.binance.com/docs/zh-CN/alpha/market-data/general-info#%E9%87%8D%E8%A6%81%E6%8F%90%E7%A4%BA) --- # token列表 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#__docusaurus_skipToContent_fallback) 本页总览 Token列表 ======= 描述[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E6%8F%8F%E8%BF%B0 "描述的直接链接") --------------------------------------------------------------------------------------------------------- 获取所有可用ALPHA代币的列表,包括它们的ID和符号。用于在其它接口构造symbol参数时查找代币ID。 HTTP Request[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#http-request "HTTP Request的直接链接") ----------------------------------------------------------------------------------------------------------------------- GET `/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list` 完整URL[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%AE%8C%E6%95%B4url "完整URL的直接链接") ------------------------------------------------------------------------------------------------------------------ [https://www.binance.com/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list](https://www.binance.com/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list) 参数[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%8F%82%E6%95%B0 "参数的直接链接") --------------------------------------------------------------------------------------------------------- 无 响应结构[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84 "响应结构的直接链接") ------------------------------------------------------------------------------------------------------------------------------- * `code`:字符串(例如,000000表示成功) * `message`: 空,通常用于返回信息提示。 * `messageDetail`: 空,通常用于更详细信息或错误描述。 * `success`: 布尔值,表示此次API调用是否成功(true)。 * `data`:对象数组,每个对象代表一个代币,包含字段: * `alphaId`:整数(ALPHA代币ID,例如ALPHA\_175) * `symbol`:字符串(代币符号,例如“USDT”) * `name`:字符串(代币全名,例如“USDT”) * `chainId`: 字符串 (链ID) * `contractAddress`: 字符串 (合约地址) * 其他字段:可能包括小数位、网络信息等。 响应示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "", "messageDetail": "", "success": true, "data": [ { "tokenId": "3F350C8B3621770A673159B7A19BC034", "chainId": "56", "chainIconUrl": "https://bin.bnbstatic.com/image/admin_mgs_image_upload/20250228/d0216ce4-a3e9-4bda-8937-4a6aa943ccf2.png", "chainName": "BSC", "contractAddress": "0xcf640fdf9b3d9e45cbd69fda91d7e22579c14444", "name": "gorilla", "symbol": "gorilla", "iconUrl": "https://bin.bnbstatic.com/images/web3-data/public/token/logos/248b5406f88a4ee28913a29107875339.png", "price": "0.00080595003978242023", "percentChange24h": "-7.42", "volume24h": "14847.711222633409558029675", "marketCap": "805950.03978242", "fdv": "805950.03978242", "liquidity": "263192.72813121626034", "totalSupply": "1000000000", "circulatingSupply": "1000000000", "holders": "7120", "decimals": 18, "listingCex": false, "hotTag": false, "cexCoinName": "", "canTransfer": false, "denomination": 1, "offline": false, "tradeDecimal": 8, "alphaId": "ALPHA_175", "offsell": false, "priceHigh24h": "0.00088873864475645879", "priceLow24h": "0.0008020805165487083", "count24h": "166", "onlineTge": false, "onlineAirdrop": false, "score": 1, "cexOffDisplay": false, "stockState": false, "listingTime": 1746686700000, "mulPoint": 1, "bnExclusiveState": false } ]} 使用示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B "使用示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------- 先调用此接口以映射代币符号到ALPHA代币ID。 * [描述](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E6%8F%8F%E8%BF%B0) * [HTTP Request](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#http-request) * [完整URL](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%AE%8C%E6%95%B4url) * [参数](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%8F%82%E6%95%B0) * [响应结构](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84) * [响应示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) * [使用示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B) --- # Volume Participation(VP) New Order (TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/future-algo#__docusaurus_skipToContent_fallback) 本页总览 成交量份额参与算法(VP)下单(TRADE) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------- 发送VP下单 仅支持U本位合约 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/future-algo#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------- POST `/sapi/v1/algo/futures/newOrderVp` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- **3000** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 eg. BTCUSDT | | side | ENUM | YES | 买卖方向 ( BUY or SELL ) | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT | | quantity | DECIMAL | YES | 下单数量, 以合约币种(base asset)个数下单; 名义价值 (`quantity` \* `标记价格(base asset)`) 需要大于 10,000 USDT,且不超过 1,000,000 USDT | | urgency | ENUM | YES | 代表当前执行的相对速率; ENUM: LOW(慢), MEDIUM(中等), HIGH(快) | | clientAlgoId | STRING | NO | 必须传入32位,如果未发送,则自动生成 | | reduceOnly | BOOLEAN | NO | true, false; 非双开模式下默认false;双开模式下不接受此参数; 开仓不接受此参数 | | limitPrice | DECIMAL | NO | 限价单价格; 若未发送,则以市场价下单 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 其他信息: > * 最大所有策略订单挂单数量: 10。 > * 杠杆倍数和持仓模式与您的合约账户设置相同,您可以通过合约交易页面设置或者通过fapi设置。 > * 收到 `"success": true` 不代表您的订单一定会被执行。请通过查询订单接口(`GET sapi/v1/algo/futures/openOrders` 或者 `GET sapi/v1/algo/futures/historicalOrders`)以获取订单状态。 例如: 如果您的合约账户余额不足,或者开仓使用了`reduce only`参数,或者您下单选择的持仓模式与您设置的不符,这些情况您都会收到响应 `"success": true`,但订单状态会显示为 `expired`,代表订单过期。 > * 您的 API Key 需要开通 `允许合约交易` 权限 > * 请使用Base URL: [https://api.binance.com](https://api.binance.com/) > 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------- { "clientAlgoId": "00358ce6a268403398bd34eaa36dffe7", //用户自定义策略订单ID "success": true, "code": 0, "msg": "OK"} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/future-algo#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/future-algo#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel Algo Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#__docusaurus_skipToContent_fallback) 本页总览 取消策略订单 (TRADE) ============== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- 撤销订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------- DELETE `/sapi/v1/algo/futures/order` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoId | LONG | YES | eg. 14511 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 您的 API Key 需要开通 `允许合约交易` 权限 > * 请使用Base URL: [https://api.binance.com](https://api.binance.com/) > 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- { "algoId": 14511, //策略订单ID "success": true, "code": 0, "msg": "OK"} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/future-algo/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Time Weighted Average Price (Twap) New Order(TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#__docusaurus_skipToContent_fallback) 本页总览 时间加权平均价格策略(Twap)下单(TRADE) ========================= 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- 通过算法服务进行时间加权平均价格策略(TWAP)下单交易 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/algo/spot/newOrderTwap` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- **3000** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 eg. BTCUSDT | | side | ENUM | YES | 买卖方向 ( BUY or SELL ) | | quantity | DECIMAL | YES | 下单数量, 以Base资产个数下单; 每单支持最大的金额会是200,000, 2,000,000或者10,000,000 USD等额的,取决于币对。请降低您的下单金额,如果您的下单金额超过了上限。 | | duration | LONG | YES | 请以秒为单位发送\[300,86400\];少于 5 分钟 => 默认为 5 分钟;大于 24h => 默认为 24h | | clientAlgoId | STRING | NO | 必须传入32位,如果未发送,则自动生成 | | limitPrice | DECIMAL | NO | 限价单价格; 若未发送,则以市场价下单 | | timestamp | LONG | YES | | > * 最大所有策略订单挂单数量: 20。 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- { "clientAlgoId": "65ce1630101a480b85915d7e11fd5078", //用户自定义策略订单ID "success": true, "code": 0, "msg": "OK"} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Time-Weighted-Average-Price-New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Sub Orders (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询执行子订单(USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- 获取指定 algoId 的相应子订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/algo/futures/subOrders` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoId | LONG | YES | | | page | INT | NO | 默认1 | | pageSize | INT | NO | 最小 1, 最大 100; 默认 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 您的 API Key 需要开通 `允许合约交易` 权限 > * 请使用Base URL: [https://api.binance.com](https://api.binance.com/) > 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "executedQty": "1.000", "executedAmt": "3229.44000000", "subOrders": [ { "algoId": 13723, //策略订单ID "orderId": 8389765519993908929, //子订单ID "orderStatus": "FILLED", //子订单状态 "executedQty": "1.000", //执行数量 "executedAmt": "3229.44000000", //执行价值 "feeAmt": "-1.61471999", //手续费 "feeAsset": "USDT", //手续费币种 "bookTime": 1649319001964, //下单时间 "avgPrice": "3229.44", //平均价格 "side": "SELL", //买卖方向 "symbol": "ETHUSDT", //交易对 "subId": 1, //子订单执行顺序ID "timeInForce": "IMMEDIATE_OR_CANCEL", //有效方式 "origQty": "1.000" //原始委托数量 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Sub-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/introduction#__docusaurus_skipToContent_fallback) Alpha API 提供适合您阿尔法交易需求的REST接口。 --- # Binance Account Bound Token | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/babt#__docusaurus_skipToContent_fallback) 本页总览 Background[​](https://developers.binance.com/docs/zh-CN/babt#background "Background的直接链接") ------------------------------------------------------------------------------------------- Soulbound Token (SBT) is a new concept proposed by Vitalik Buterin recently(Soul Bound idea and the recent paper about decentralized society). It will be a keystone for Web3 to go to the next level, "Decentralized Society" (DeSoc). SBTs are most like NFTs we see today, but they have two key different properties. 1. Non-transferable - When someone gets an SBT, He/She cannot transfer this SBT to another address. 2. Revocable - SBTs can be revoked by issuers. Suppose Binance issues Binance Account Bound(BAB) tokens which are credentials of Binance KYC users. So here are the potential scenarios to use these tokens: 1. A new protocol only airdrops to addresses with BAB tokens since business cooperation. 2. A NFT only allows minting from addresses with BAB tokens to avoid bots. 3. A DAO only allows voting from addresses with BAB tokens, and each such address will have a cap of voting power to ensure governance fairness. 4. A DAO uses Quadratic Voting, and only allows addresses with BAB tokens. Purpose[​](https://developers.binance.com/docs/zh-CN/babt#purpose "Purpose的直接链接") ---------------------------------------------------------------------------------- SBTs are still in the stage of concept. We have two purposes for this pilot project. 1. Accumulate the influence in the cutting-edge technology field of the chain world. 2. Introduce some new elements to promote the ecological prosperity of BSC. Goal[​](https://developers.binance.com/docs/zh-CN/babt#goal "Goal的直接链接") ------------------------------------------------------------------------- We will give a practice about SBT by issuing BAB tokens. Users can mint, revoke and check BAB tokens on the Binance platform. Disclaimer[​](https://developers.binance.com/docs/zh-CN/babt#disclaimer "Disclaimer的直接链接") ------------------------------------------------------------------------------------------- BAB Token is a non-fungible token issued by Binance characterized as a soulbound token. Getting a BAB Token is optional for Binance users and Binance's role is limited to issuing (upon request) the BAB Token for users who have completed identity verification procedures for their Binance account, which may vary depending on the user's country of residence. Third-party projects such as decentralized protocols, decentralized autonomous organizations, or decentralized applications have sole authority and discretion to decide whether or not to integrate BAB Tokens into their ecosystem, the purposes for which they will use it and whether BAB Tokens are suitable for their product or ecosystem, without any involvement of Binance. Binance is not making any representation to third-party projects about the holders of the BAB Tokens. Use of BAB Tokens by third-party projects in any way should not be construed as a recommendation, vetting, or endorsement of such third-party projects by Binance, BNB Chain, or any other affiliated entity. * [Background](https://developers.binance.com/docs/zh-CN/babt#background) * [Purpose](https://developers.binance.com/docs/zh-CN/babt#purpose) * [Goal](https://developers.binance.com/docs/zh-CN/babt#goal) * [Disclaimer](https://developers.binance.com/docs/zh-CN/babt#disclaimer) --- # Time Weighted Average Price (Twap) New Order(TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/spot-algo#__docusaurus_skipToContent_fallback) 本页总览 时间加权平均价格策略(Twap)下单(TRADE) ========================= 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------- 通过算法服务进行时间加权平均价格策略(TWAP)下单交易 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------- POST `/sapi/v1/algo/spot/newOrderTwap` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") -------------------------------------------------------------------------------------------------------------------------------- **3000** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 eg. BTCUSDT | | side | ENUM | YES | 买卖方向 ( BUY or SELL ) | | quantity | DECIMAL | YES | 下单数量, 以Base资产个数下单; 每单支持最大的金额会是200,000, 2,000,000或者10,000,000 USD等额的,取决于币对。请降低您的下单金额,如果您的下单金额超过了上限。 | | duration | LONG | YES | 请以秒为单位发送\[300,86400\];少于 5 分钟 => 默认为 5 分钟;大于 24h => 默认为 24h | | clientAlgoId | STRING | NO | 必须传入32位,如果未发送,则自动生成 | | limitPrice | DECIMAL | NO | 限价单价格; 若未发送,则以市场价下单 | | timestamp | LONG | YES | | > * 最大所有策略订单挂单数量: 20。 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------- { "clientAlgoId": "65ce1630101a480b85915d7e11fd5078", //用户自定义策略订单ID "success": true, "code": 0, "msg": "OK"} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/spot-algo#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/spot-algo#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Historical Algo Orders (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询历史策略订单(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- 查询历史策略订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/algo/futures/historicalOrders` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 eg. BTCUSDT | | side | ENUM | NO | BUY 或者 SELL | | startTime | LONG | NO | 毫秒级时间戳 eg.1641522717552 | | endTime | LONG | NO | 毫秒级时间戳 eg.1641522526562 | | page | INT | NO | 默认 1 | | pageSize | INT | NO | 最小 1, 最大 100; 默认 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 您的 API Key 需要开通 `允许合约交易` 权限 > * 请使用Base URL: [https://api.binance.com](https://api.binance.com/) > 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "orders": [ { "algoId": 14518, //策略订单ID "symbol": "BNBUSDT", //交易对 "side": "BUY", //买卖方向 "positionSide": "BOTH", //持仓模式 "totalQty": "100.00", //总共下单数量 "executedQty": "0.00", //执行数量 "executedAmt": "0.00000000", //执行价值 "avgPrice": "0.000", //平均价格 "clientAlgoId": "acacab56b3c44bef9f6a8f8ebd2a8408", //用户自定义策略订单ID "bookTime": 1649757019503, //用户下单时间 "endTime": 1649757088101, //结束时间 "algoStatus": "CANCELLED", //策略订单状态 "algoType": "VP", //策略订单类型 "urgency": "LOW" //执行速率 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/future-algo/Query-Historical-Algo-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 基本信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#__docusaurus_skipToContent_fallback) 本页总览 基本信息 ==== API 基本信息[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#api-%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "API 基本信息的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- * 接口可能需要用户的 API Key,如何创建API-KEY请参考[这里](https://www.binance.com/cn/support/articles/360002502072) * 本篇列出接口的 base URL 有: * **[https://api.binance.com](https://api.binance.com/) ** * **[https://api-gcp.binance.com](https://api-gcp.binance.com/) ** * **[https://api1.binance.com](https://api1.binance.com/) ** * **[https://api2.binance.com](https://api2.binance.com/) ** * **[https://api3.binance.com](https://api3.binance.com/) ** * **[https://api4.binance.com](https://api4.binance.com/) ** * 上述列表的最后4个接口 (`api1`\-`api4`) 可能会提供更好的性能,但其稳定性略为逊色。因此,请务必使用最适合您现有配置的那款。 * 所有接口的响应都是 JSON 格式。 * 响应中如有数组,数组元素以时间**升序**排列,越早的数据越提前。 * 所有时间、时间戳均为UNIX时间,单位为**毫秒**。 ### HTTP 返回代码[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#http-%E8%BF%94%E5%9B%9E%E4%BB%A3%E7%A0%81 "HTTP 返回代码的直接链接") * HTTP `4XX` 错误码用于指示错误的请求内容、行为、格式。问题在于请求者。 * HTTP `403` 错误码表示违反WAF限制(Web应用程序防火墙)。 * HTTP `409` 错误码表示重新下单(cancelReplace)的请求部分成功。(比如取消订单失败,但是下单成功了) * HTTP `429` 错误码表示警告访问频次超限,即将被封IP。 * HTTP `418` 表示收到429后继续访问,于是被封了。 * HTTP `5XX` 错误码用于指示Binance服务侧的问题。 ### 接口错误代码[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E6%8E%A5%E5%8F%A3%E9%94%99%E8%AF%AF%E4%BB%A3%E7%A0%81 "接口错误代码的直接链接") * 使用接口 `/api/v3`, 以及 `/sapi/v1/margin`时, 每个接口都有可能抛出异常; > API 与 SAPI 的错误代码返回形式如下: { "code": -1121, "msg": "Invalid symbol."} * 具体的错误码及其解释在 [错误代码](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#cf68bca02a) . ### 接口的基本信息[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E6%8E%A5%E5%8F%A3%E7%9A%84%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "接口的基本信息的直接链接") * `GET` 方法的接口, 参数必须在 `query string`中发送。 * `POST`, `PUT`, 和 `DELETE` 方法的接口,参数可以在内容形式为`application/x-www-form-urlencoded`的 `query string` 中发送,也可以在 `request body` 中发送。 如果你喜欢,也可以混合这两种方式发送参数。 * 对参数的顺序不做要求。 * 但如果同一个参数名在query string和request body中都有,query string中的会被优先采用。 * * * 访问限制[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "访问限制的直接链接") ------------------------------------------------------------------------------------------------------------------------------- ### 访问限制基本信息[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "访问限制基本信息的直接链接") * 以下 是`intervalLetter` 作为头部值: * SECOND => S * MINUTE => M * HOUR => H * DAY => D * 在 `/api/v3/exchangeInfo` `rateLimits` 数组中包含与交易的有关RAW\_REQUESTS,REQUEST\_WEIGHT和ORDERS速率限制相关的对象。这些在 `限制种类 (rateLimitType)` 下的 `枚举定义` 部分中进一步定义。 * 违反任何一个速率限制时(访问频次限制或下单速率限制),将返回429。 ### IP 访问限制[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#ip-%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "IP 访问限制的直接链接") * 每个请求将包含一个`X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)`的头,其中包含当前IP所有请求的已使用权重。 * 每一个接口均有一个相应的权重(weight),有的接口根据参数不同可能拥有不同的权重。越消耗资源的接口权重就会越大。 * 收到429时,您有责任停止发送请求,不得滥用API。 * **收到429后仍然继续违反访问限制,会被封禁IP,并收到418错误码** * 频繁违反限制,封禁时间会逐渐延长,**从最短2分钟到最长3天**。 * `Retry-After`的头会与带有418或429的响应发送,并且会给出**以秒为单位**的等待时长(如果是429)以防止禁令,或者如果是418,直到禁令结束。 * **访问限制是基于IP的,而不是API Key** ###下单频率限制 * 每个成功的下单回报将包含一个`X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)`的头,其中包含当前账户已用的下单限制数量。 * 当下单数超过限制时,会收到带有429但不含`Retry-After`头的响应。请检查 `GET api/v3/exchangeInfo` 的下单频率限制 (rateLimitType = ORDERS) 并等待封禁时间结束。 * 被拒绝或不成功的下单并不保证回报中包含以上头内容。 * **下单频率限制是基于每个账户计数的。** * 用户可以通过接口 `GET api/v3/rateLimit/order` 来查询当前的下单量. ### WEB SOCKET 连接限制[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#web-socket-%E8%BF%9E%E6%8E%A5%E9%99%90%E5%88%B6 "WEB SOCKET 连接限制的直接链接") * Websocket服务器每秒最多接受5个消息。消息包括: * PING帧 * PONG帧 * JSON格式的消息, 比如订阅, 断开订阅. * 如果用户发送的消息超过限制,连接会被断开连接。反复被断开连接的IP有可能被服务器屏蔽。 * 单个连接最多可以订阅 **1024** 个Streams。 * 每IP地址、每5分钟最多可以发送300次连接请求。 ### /api/ 与 /sapi/ 接口限频说明[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#api-%E4%B8%8E-sapi-%E6%8E%A5%E5%8F%A3%E9%99%90%E9%A2%91%E8%AF%B4%E6%98%8E "/api/ 与 /sapi/ 接口限频说明的直接链接") `/api/*`接口和 `/sapi/*`接口采用两套不同的访问限频规则, 两者互相独立。 * `/api/*`的接口相关: * 按IP和按UID(account)两种模式分别统计, 两者互相独立。 * 以 `/api/*`开头的接口按IP限频,**且所有接口共用每分钟6,000限制**。 * 每个请求将包含一个 `X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)`的头,包含当前IP所有请求的已使用权重。 * 每个成功的下单回报将包含一个`X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)`的头,其中包含当前账户已用的下单限制数量。 * `/sapi/*`的接口相关: * 按IP和按UID(account)两种模式分别统计, 两者互相独立。 * 以`/sapi/*`开头的接口采用**单接口限频模式**。按IP统计的权重单接口权重总额为每分钟12000;按照UID统计的单接口权重总额是每分钟180000。 * 每个接口会标明是按照IP或者按照UID统计, 以及相应请求一次的权重值。 * 按照IP统计的接口, 请求返回头里面会包含`X-SAPI-USED-IP-WEIGHT-1M=`或`X-SAPI-USED-IP-WEIGHT-1S=`, 包含当前IP所有请求已使用权重。 * 按照UID统计的接口, 请求返回头里面会包含`X-SAPI-USED-UID-WEIGHT-1M=`或`X-SAPI-USED-UID-WEIGHT-1S=`, 包含当前账户所有已用的UID权重。 * * * 数据来源[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E6%95%B0%E6%8D%AE%E6%9D%A5%E6%BA%90 "数据来源的直接链接") ------------------------------------------------------------------------------------------------------------------------------- * 因为API系统是异步的, 所以返回的数据有延时很正常, 也在预期之中。 * 在每个接口中,都列出了其数据的来源,可以用于理解数据的时效性。 系统一共有3个数据来源,按照更新速度的先后排序。排在前面的数据最新,在后面就有可能存在延迟。 * **撮合引擎** - 表示数据来源于撮合引擎 * **缓存** - 表示数据来源于内部或者外部的缓存 * **数据库** - 表示数据直接来源于数据库 请求鉴权类型[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E8%AF%B7%E6%B1%82%E9%89%B4%E6%9D%83%E7%B1%BB%E5%9E%8B "请求鉴权类型的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- * 每个接口都有一个鉴权类型,指示所需的 API 密钥权限,显示在接口名称旁边(例如,[下新订单 (TRADE)](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#place-new-order-trade) )。 * 如果未指定,则鉴权类型为 `NONE`。 * 除了为 `NONE` 外,所有具有鉴权类型的接口均视为 `SIGNED` 请求(即包含 `signature`),[listenKey 管理](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#user-data-stream-requests) 除外。 * 具有鉴权类型的接口需要提供有效的 API 密钥并验证通过。 * API 密钥可在您的 Binance 账户的 [API 管理](https://www.binance.com/en/support/faq/360002502072) 页面创建。 * **API 密钥和密钥对均为敏感信息,切勿与他人分享。** 如果发现账户有异常活动,请立即撤销所有密钥并联系 Binance 支持。 * API 密钥可配置为仅允许访问某些鉴权接口。 * 例如,您可以拥有具有 `TRADE` 权限的 API 密钥用于交易, 同时使用具有 `USER_DATA` 权限的另一个 API 密钥来监控订单状态。 * 默认情况下,API 密钥无法进行 `TRADE`,您需要先在 API 管理中启用交易权限。 | 鉴权类型 | 描述 | | --- | --- | | NONE | 不需要鉴权的接口 | | TRADE | 需要有效的 API-Key 和签名 | | MARGIN | 需要有效的 API-Key 和签名 | | USER\_DATA | 需要有效的 API-Key 和签名 | | USER\_STREAM | 需要有效的 API-Key | | MARKET\_DATA | 需要有效的 API-Key | ### 需要签名的接口[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E9%9C%80%E8%A6%81%E7%AD%BE%E5%90%8D%E7%9A%84%E6%8E%A5%E5%8F%A3 "需要签名的接口的直接链接") * 调用`SIGNED` 接口时,除了接口本身所需的参数外,还需要在 `query string` 或 `request body` 中传递 `signature`, 即签名参数。 #### 签名是否是大小写敏感的[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E7%AD%BE%E5%90%8D%E6%98%AF%E5%90%A6%E6%98%AF%E5%A4%A7%E5%B0%8F%E5%86%99%E6%95%8F%E6%84%9F%E7%9A%84 "签名是否是大小写敏感的的直接链接") * **HMAC:** 使用 HMAC 生成的签名**不区分大小写**。这意味着无论字母大小写如何,签名字符串都可以被验证。 * **RSA:** 使用 RSA 生成的签名是**大小写敏感的**。 * **Ed25519:** 使用 Ed25519 生成的签名也是**大小写敏感的**。 请参阅[已签名请求示例 (HMAC)](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#hmac-keys) 、[已签名请求示例 (RSA)](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#rsa-keys) 和[已签名请求示例 (Ed25519)](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#ed25519-keys) ,了解如何根据您使用的 API 密钥类型计算签名。 ### 时间同步安全[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#%E6%97%B6%E9%97%B4%E5%90%8C%E6%AD%A5%E5%AE%89%E5%85%A8 "时间同步安全的直接链接") * `SIGNED` 请求还需要一个 `timestamp` 参数,该参数应为当前时间戳,单位为毫秒或微秒。(参见 [通用 API 信息](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#general-api-information) ) * 另一个可选参数 `recvWindow`,用以指定请求的有效期,只能以毫秒为单位。 * `recvWindow` 扩展为三位小数(例如 6000.346),以便可以指定微秒。 * 如果未发送 `recvWindow`,则 **默认值为 5000 毫秒**。 * `recvWindow` 的最大值为 60000 毫秒。 * 请求处理逻辑如下: serverTime = getCurrentTime()if (timestamp < (serverTime + 1 second) && (serverTime - timestamp) <= recvWindow) { // 开始处理请求 serverTime = getCurrentTime() if (serverTime - timestamp) <= recvWindow { // 将请求转发到撮合引擎 } else { // 拒绝请求 } // 结束处理请求} else { // 拒绝请求} **关于交易时效性** 互联网状况并不100%可靠,不可完全依赖,因此你的程序本地到币安服务器的时延会有抖动. 这是我们设置`recvWindow`的目的所在,如果你从事高频交易,对交易时效性有较高的要求,可以灵活设置`recvWindow`以达到你的要求。 **不推荐使用5秒以上的recvWindow。最大值不能超过60秒!** ### POST /api/v3/order 的签名示例[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B "POST /api/v3/order 的签名示例的直接链接") #### HMAC Keys[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#hmac-keys "HMAC Keys的直接链接") 不使用分隔符,把查询字符串与 `HTTP body` 连接在一起将生成请求的签名 payload。任何非 ASCII 字符在签名前都必须进行百分比编码(percent-encoded)。 以下示例分步演示如何使用 `echo`、`openssl` 和 `curl` 从 Linux 命令行发送有效的签名 payload。其中一个例子中的交易对名称完全由 ASCII 字符组成,另一个例子中的交易对名称则包含非 ASCII 字符。 API 密钥和密钥示例: | Key | Value | | --- | --- | | `apiKey` | vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A | | `secretKey` | NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j | **警告:请勿与任何人分享您的 API 密钥和秘钥。** 此处提供的示例密钥仅用于示范说明目的。 交易对名称完全由 ASCII 字符组成的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | LTCBTC | | `side` | BUY | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.1 | | `recvWindow` | 5000 | | `timestamp` | 1499827319559 | 交易对名称包含非 ASCII 字符的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | 123456 | | `side` | BUY | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.1 | | `recvWindow` | 5000 | | `timestamp` | 1499827319559 | **第一步: 构建签名 payload。** 1. 将参数格式化为 `参数=取值` 对并用 `&` 分隔每个参数对。 2. 对字符串进行百分比编码(percent-encoded)。 对于第一组示例参数(仅限 ASCII 字符), `parameter=value` 字符串将如下所示: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 对于第二组示例参数(包含一些 Unicode 字符),`parameter=value` 字符串将如下所示: symbol=123456&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 **第二步: 计算签名。** 1. 使用 API 密钥中的 `secretKey` 作为 HMAC-SHA-256 算法的签名密钥。 2. 对步骤 1 中构建的签名 payload 进行签名。 3. 将 HMAC-SHA-256 的输出编码为十六进制字符串。 请注意,`secretKey` 和 payload 是**大小写敏感的**,而生成的签名值是不区分大小写的。 **示例命令** 对于第一组示例参数(仅限 ASCII 字符): $ echo -n "symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71 对于第二组示例参数(包含一些 Unicode 字符): $ echo -n "symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"e1353ec6b14d888f1164ae9af8228a3dbd508bc82eb867db8ab6046442f33ef3 **第三步: 为请求添加签名** 通过在查询字符串中添加 `signature` 参数来完成请求。 对于第一组示例参数(仅限 ASCII 字符): curl -s -v -H "X-MBX-APIKEY: $apiKey" -X POST "https://api.binance.com/api/v3/order?symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71" 对于第二组示例参数(包含一些 Unicode 字符): curl -s -v -H "X-MBX-APIKEY: $apiKey" -X POST "https://api.binance.com/api/v3/order?symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=e1353ec6b14d888f1164ae9af8228a3dbd508bc82eb867db8ab6046442f33ef3" 以下是一个执行上述所有步骤的 Bash 脚本示例: apiKey="vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A"secretKey="NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"payload="symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559"# 对请求进行签名signature=$(echo -n "$payload" | openssl dgst -sha256 -hmac "$secretKey")signature=${signature#*= } # Keep only the part after the "= "# 发送请求curl -H "X-MBX-APIKEY: $apiKey" -X POST "https://api.binance.com/api/v3/order?$payload&signature=$signature" #### RSA Keys[​](https://developers.binance.com/docs/zh-CN/advanced_earn/general-info#rsa-keys "RSA Keys的直接链接") 不使用分隔符,把查询字符串与 `HTTP body` 连接在一起将生成请求的签名 payload。任何非 ASCII 字符在签名前都必须进行百分比编码(percent-encoded)。 要获取 API 密钥,您需要将 RSA 公钥上传到您的帐户中,系统将为您提供相应的 API 密钥。 仅支持 `PKCS#8` 密钥。 在以下示例中,其中一个例子中的交易对名称完全由 ASCII 字符组成,另一个例子中的交易对名称则包含非 ASCII 字符。 这些示例假设私钥存储在文件 `./test-prv-key.pem` 中。 | Key | Value | | --- | --- | | `apiKey` | CAvIjXy3F44yW6Pou5k8Dy1swsYDWJZLeoK2r8G4cFDnE9nosRppc2eKc1T8TRTQ | 交易对名称完全由 ASCII 字符组成的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | BTCUSDT | | `side` | SELL | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.2 | | `timestamp` | 1668481559918 | | `recvWindow` | 5000 | 交易对名称包含非 ASCII 字符的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | 123456 | | `side` | SELL | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.2 | | `timestamp` | 1668481559918 | | `recvWindow` | 5000 | **第一步: 构建签名 payload。** 1. 将参数格式化为 `参数=取值` 对并用 `&` 分隔每个参数对。 2. 对字符串进行百分比编码(percent-encoded)。 对于第一组示例参数(仅限 ASCII 字符), `parameter=value` 字符串将如下所示: symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 对于第二组示例参数(包含一些 Unicode 字符),`parameter=value` 字符串将如下所示: symbol=123456=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 **第二步: 计算签名。** 1. 使用 RSASSA-PKCS1-v1\_5 算法和 SHA-256 哈希函数对步骤 1 中构建的签名 payload 进行签名。 2. 将输出结果编码为 base64 格式。 请注意,payload 和生成的`签名值`是**大小写敏感的**。 对于第一组示例参数(仅限 ASCII 字符): $ echo -n 'symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000' | openssl dgst -sha256 -sign ./test-prv-key.pem | openssl enc -base64 -A | tr -d '\n'HZ8HOjiJ1s/igS9JA+n7+7Ti/ihtkRF5BIWcPIEluJP6tlbFM/Bf44LfZka/iemtahZAZzcO9TnI5uaXh3++lrqtNonCwp6/245UFWkiW1elpgtVAmJPbogcAv6rSlokztAfWk296ZJXzRDYAtzGH0gq7CgSJKfH+XxaCmR0WcvlKjNQnp12/eKXJYO4tDap8UCBLuyxDnR7oJKLHQHJLP0r0EAVOOSIbrFang/1WOq+Jaq4Efc4XpnTgnwlBbWTmhWDR1pvS9iVEzcSYLHT/fNnMRxFc7u+j3qI//5yuGuu14KR0MuQKKCSpViieD+fIti46sxPTsjSemoUKp0oXA== 对于第二组示例参数(包含一些 Unicode 字符): $ echo -n 'symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000' | openssl dgst -sha256 -sign ./test-prv-key.pem | openssl enc -base64 -A | tr -d '\n'qJtv66wyp/1mZE+mIFAAMUoTe8xkmLN7/eAZjuC9x1ocxovItHLl/sNK7Wq8QjgiHqGn0bb8P7yVvGBEd1gFe71NQ8aM0M+JNIMz5UFxfeA53rXjFlvsyH1Sig+OuO9Nz5nhCaJ6bEfj2iuv7w27pB3L8MVqmoCi6D9C/QMiLxtPaR70CxtnvoOlIgPmpv2bQy029A31NEK19ieVLkoyp1EUkXRaX3v0mohx8yMnUG1dhX9nUg3Oy8TYZ03DQy7kHDGkMKisNX7rt/GuGx1HIgjFclDGLsbAFIodvSLjm9FbseasMELoxlAJDlwRnW8zo5sQmL0Fz7ao935QBynrng== 3. 对 base64 格式的字符串进行百分比编码(percent-encoded)。 对于第一组示例参数(仅限 ASCII 字符): HZ8HOjiJ1s%2FigS9JA%2Bn7%2B7Ti%2FihtkRF5BIWcPIEluJP6tlbFM%2FBf44LfZka%2FiemtahZAZzcO9TnI5uaXh3%2B%2BlrqtNonCwp6%2F245UFWkiW1elpgtVAmJPbogcAv6rSlokztAfWk296ZJXzRDYAtzGH0gq7CgSJKfH%2BXxaCmR0WcvlKjNQnp12%2FeKXJYO4tDap8UCBLuyxDnR7oJKLHQHJLP0r0EAVOOSIbrFang%2F1WOq%2BJaq4Efc4XpnTgnwlBbWTmhWDR1pvS9iVEzcSYLHT%2FfNnMRxFc7u%2Bj3qI%2F%2F5yuGuu14KR0MuQKKCSpViieD%2BfIti46sxPTsjSemoUKp0oXA%3D%3D 对于第二组示例参数(包含一些 Unicode 字符): qJtv66wyp%2F1mZE%2BmIFAAMUoTe8xkmLN7%2FeAZjuC9x1ocxovItHLl%2FsNK7Wq8QjgiHqGn0bb8P7yVvGBEd1gFe71NQ8aM0M%2BJNIMz5UFxfeA53rXjFlvsyH1Sig%2BOuO9Nz5nhCaJ6bEfj2iuv7w27pB3L8MVqmoCi6D9C%2FQMiLxtPaR70CxtnvoOlIgPmpv2bQy029A31NEK19ieVLkoyp1EUkXRaX3v0mohx8yMnUG1dhX9nUg3Oy8TYZ03DQy7kHDGkMKisNX7rt%2FGuGx1HIgjFclDGLsbAFIodvSLjm9FbseasMELoxlAJDlwRnW8zo5sQmL0Fz7ao935QBynrng%3D%3D **第三步: 为请求添加签名** 通过在查询字符串中添加 `signature` 参数来完成请求。 对于第一组示例参数(仅限 ASCII 字符): curl -H "X-MBX-APIKEY: CAvIjXy3F44yW6Pou5k8Dy1swsYDWJZLeoK2r8G4cFDnE9nosRppc2eKc1T8TRTQ" -X POST 'https://api.binance.com/api/v3/order?symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000&signature=HZ8HOjiJ1s%2FigS9JA%2Bn7%2B7Ti%2FihtkRF5BIWcPIEluJP6tlbFM%2FBf44LfZka%2FiemtahZAZzcO9TnI5uaXh3%2B%2BlrqtNonCwp6%2F245UFWkiW1elpgtVAmJPbogcAv6rSlokztAfWk296ZJXzRDYAtzGH0gq7CgSJKfH%2BXxaCmR0WcvlKjNQnp12%2FeKXJYO4tDap8UCBLuyxDnR7oJKLHQHJLP0r0EAVOOSIbrFang%2F1WOq%2BJaq4Efc4XpnTgnwlBbWTmhWDR1pvS9iVEzcSYLHT%2FfNnMRxFc7u%2Bj3qI%2F%2F5yuGuu14KR0MuQKKCSpViieD%2BfIti46sxPTsjSemoUKp0oXA%3D%3D' 对于第二组示例参数(包含一些 Unicode 字符): curl -H "X-MBX-APIKEY: CAvIjXy3F44yW6Pou5k8Dy1swsYDWJZLeoK2r8G4cFDnE9nosRppc2eKc1T8TRTQ" -X POST 'https://api.binance.com/api/v3/order?symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000&signature=qJtv66wyp%2F1mZE%2BmIFAAMUoTe8xkmLN7%2FeAZjuC9x1ocxovItHLl%2FsNK7Wq8QjgiHqGn0bb8P7yVvGBEd1gFe71NQ8aM0M%2BJNIMz5UFxfeA53rXjFlvsyH1Sig%2BOuO9Nz5nhCaJ6bEfj2iuv7w27pB3L8MVqmoCi6D9C%2FQMiLxtPaR70CxtnvoOlIgPmpv2bQy029A31NEK19ieVLkoyp1EUkXRaX3v0mohx8yMnUG1dhX9nUg3Oy8TYZ03DQy7kHDGkMKisNX7rt%2FGuGx1HIgjFclDGLsbAFIodvSLjm9FbseasMELoxlAJDlwRnW8zo5sQmL0Fz7ao935QBynrng%3D%3D' 以下是一个执行上述所有步骤的 Bash 脚本示例: function rawurlencode { local string="${1}" local strlen=${#string} local encoded="" local pos c o for (( pos=0 ; pos@bookTicker * !bookTicker * @miniTicker * !miniTicker@arr * @ticker * !ticker@arr * @trade * @depth@ * @kline\_ * @fulldepth@ * 已订阅信息流 * 实时订阅/取消数据流 返回 * * * 2026-02-24[​](https://developers.binance.com/docs/zh-CN/alpha#2026-02-24 "2026-02-24的直接链接") -------------------------------------------------------------------------------------------- ### Websocket市场数据[​](https://developers.binance.com/docs/zh-CN/alpha#websocket%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1 "Websocket市场数据的直接链接") * 板块初始化 * * * 2025-07-22[​](https://developers.binance.com/docs/zh-CN/alpha#2025-07-22 "2025-07-22的直接链接") -------------------------------------------------------------------------------------------- ### 市场数据[​](https://developers.binance.com/docs/zh-CN/alpha#%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1 "市场数据的直接链接") * 24hr价格变动情况 * 聚合交易查询 * 交易对信息 * K线 * Token列表 * * * * [2026-04-01](https://developers.binance.com/docs/zh-CN/alpha#2026-04-01) * [市场数据](https://developers.binance.com/docs/zh-CN/alpha#%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE) * [2026-03-24](https://developers.binance.com/docs/zh-CN/alpha#2026-03-24) * [Websocket市场数据](https://developers.binance.com/docs/zh-CN/alpha#websocket%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE) * [2026-02-24](https://developers.binance.com/docs/zh-CN/alpha#2026-02-24) * [Websocket市场数据](https://developers.binance.com/docs/zh-CN/alpha#websocket%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1) * [2025-07-22](https://developers.binance.com/docs/zh-CN/alpha#2025-07-22) * [市场数据](https://developers.binance.com/docs/zh-CN/alpha#%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE-1) --- # 基本信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data#__docusaurus_skipToContent_fallback) 本页总览 通用信息 ==== 这是关于币安Alpha交易的文档。所有接口均使用HTTP GET请求,返回JSON格式的数据。因为是公共接口,所以无需身份验证。 重要提示[​](https://developers.binance.com/docs/zh-CN/alpha/market-data#%E9%87%8D%E8%A6%81%E6%8F%90%E7%A4%BA "重要提示的直接链接") ---------------------------------------------------------------------------------------------------------------------- 对于需要symbol参数的接口(例如,交易量、历史交易或K线数据),请先调用Token列表接口以获取可用代币列表。在响应中,根据代币符号名称(例如 "ZKJ" 或 "QUQ")确定对应的ALPHA代币ID。然后,按格式ALPHA\_构造symbol参数(例如,ALPHA\_173USDT表示代币ID为173,计价资产为USDT的代币)。 * [重要提示](https://developers.binance.com/docs/zh-CN/alpha/market-data#%E9%87%8D%E8%A6%81%E6%8F%90%E7%A4%BA) --- # Binance Account Bound Token | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/babt/introduction#__docusaurus_skipToContent_fallback) 本页总览 Background[​](https://developers.binance.com/docs/zh-CN/babt/introduction#background "Background的直接链接") -------------------------------------------------------------------------------------------------------- Soulbound Token (SBT) is a new concept proposed by Vitalik Buterin recently(Soul Bound idea and the recent paper about decentralized society). It will be a keystone for Web3 to go to the next level, "Decentralized Society" (DeSoc). SBTs are most like NFTs we see today, but they have two key different properties. 1. Non-transferable - When someone gets an SBT, He/She cannot transfer this SBT to another address. 2. Revocable - SBTs can be revoked by issuers. Suppose Binance issues Binance Account Bound(BAB) tokens which are credentials of Binance KYC users. So here are the potential scenarios to use these tokens: 1. A new protocol only airdrops to addresses with BAB tokens since business cooperation. 2. A NFT only allows minting from addresses with BAB tokens to avoid bots. 3. A DAO only allows voting from addresses with BAB tokens, and each such address will have a cap of voting power to ensure governance fairness. 4. A DAO uses Quadratic Voting, and only allows addresses with BAB tokens. Purpose[​](https://developers.binance.com/docs/zh-CN/babt/introduction#purpose "Purpose的直接链接") ----------------------------------------------------------------------------------------------- SBTs are still in the stage of concept. We have two purposes for this pilot project. 1. Accumulate the influence in the cutting-edge technology field of the chain world. 2. Introduce some new elements to promote the ecological prosperity of BSC. Goal[​](https://developers.binance.com/docs/zh-CN/babt/introduction#goal "Goal的直接链接") -------------------------------------------------------------------------------------- We will give a practice about SBT by issuing BAB tokens. Users can mint, revoke and check BAB tokens on the Binance platform. Disclaimer[​](https://developers.binance.com/docs/zh-CN/babt/introduction#disclaimer "Disclaimer的直接链接") -------------------------------------------------------------------------------------------------------- BAB Token is a non-fungible token issued by Binance characterized as a soulbound token. Getting a BAB Token is optional for Binance users and Binance's role is limited to issuing (upon request) the BAB Token for users who have completed identity verification procedures for their Binance account, which may vary depending on the user's country of residence. Third-party projects such as decentralized protocols, decentralized autonomous organizations, or decentralized applications have sole authority and discretion to decide whether or not to integrate BAB Tokens into their ecosystem, the purposes for which they will use it and whether BAB Tokens are suitable for their product or ecosystem, without any involvement of Binance. Binance is not making any representation to third-party projects about the holders of the BAB Tokens. Use of BAB Tokens by third-party projects in any way should not be construed as a recommendation, vetting, or endorsement of such third-party projects by Binance, BNB Chain, or any other affiliated entity. * [Background](https://developers.binance.com/docs/zh-CN/babt/introduction#background) * [Purpose](https://developers.binance.com/docs/zh-CN/babt/introduction#purpose) * [Goal](https://developers.binance.com/docs/zh-CN/babt/introduction#goal) * [Disclaimer](https://developers.binance.com/docs/zh-CN/babt/introduction#disclaimer) --- # Volume Participation(VP) New Order (TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#__docusaurus_skipToContent_fallback) 本页总览 成交量份额参与算法(VP)下单(TRADE) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- 发送VP下单 仅支持U本位合约 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ POST `/sapi/v1/algo/futures/newOrderVp` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- **3000** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 eg. BTCUSDT | | side | ENUM | YES | 买卖方向 ( BUY or SELL ) | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT | | quantity | DECIMAL | YES | 下单数量, 以合约币种(base asset)个数下单; 名义价值 (`quantity` \* `标记价格(base asset)`) 需要大于 10,000 USDT,且不超过 1,000,000 USDT | | urgency | ENUM | YES | 代表当前执行的相对速率; ENUM: LOW(慢), MEDIUM(中等), HIGH(快) | | clientAlgoId | STRING | NO | 必须传入32位,如果未发送,则自动生成 | | reduceOnly | BOOLEAN | NO | true, false; 非双开模式下默认false;双开模式下不接受此参数; 开仓不接受此参数 | | limitPrice | DECIMAL | NO | 限价单价格; 若未发送,则以市场价下单 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 其他信息: > * 最大所有策略订单挂单数量: 10。 > * 杠杆倍数和持仓模式与您的合约账户设置相同,您可以通过合约交易页面设置或者通过fapi设置。 > * 收到 `"success": true` 不代表您的订单一定会被执行。请通过查询订单接口(`GET sapi/v1/algo/futures/openOrders` 或者 `GET sapi/v1/algo/futures/historicalOrders`)以获取订单状态。 例如: 如果您的合约账户余额不足,或者开仓使用了`reduce only`参数,或者您下单选择的持仓模式与您设置的不符,这些情况您都会收到响应 `"success": true`,但订单状态会显示为 `expired`,代表订单过期。 > * 您的 API Key 需要开通 `允许合约交易` 权限 > * 请使用Base URL: [https://api.binance.com](https://api.binance.com/) > 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- { "clientAlgoId": "00358ce6a268403398bd34eaa36dffe7", //用户自定义策略订单ID "success": true, "code": 0, "msg": "OK"} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/future-algo/Volume-Participation-New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 交易对信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#__docusaurus_skipToContent_fallback) 本页总览 交易对信息 ===== 描述[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E6%8F%8F%E8%BF%B0 "描述的直接链接") --------------------------------------------------------------------------------------------------------------------------- 获取通用的交易所信息,如支持的交易对、限速信息及服务器时间。 HTTP Request[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#http-request "HTTP Request的直接�链接") ------------------------------------------------------------------------------------------------------------------------------------------ GET `/bapi/defi/v1/public/alpha-trade/get-exchange-info` 完整URL[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%AE%8C%E6%95%B4url "完整URL的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ [https://www.binance.com/bapi/defi/v1/public/alpha-trade/get-exchange-info](https://www.binance.com/bapi/defi/v1/public/alpha-trade/get-exchange-info) 参数[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%8F%82%E6%95%B0 "参数的直接链接") --------------------------------------------------------------------------------------------------------------------------- 无 响应结构[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84 "响应结构的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- * `code`: 字符串,API响应码,此处“000000”表示成功。 * `message`: 空,通常用于返回信息提示。 * `messageDetail`: 空,通常用于更详细信息或错误描述。 * `success`: 布尔值,表示此次API调用是否成功(true)。 * `data`: 对象,包含交易及资产相关信息: * `timezone`: 字符串,表示交易数据的时区,如“UTC”。 * `assets`: 对象数组,每个对象包含字段: * `asset`: 字符串,资产符号,如“USDT”。 * `symbols`: 对象数组,每个对象代表一个交易对,包含字段: * `symbol`: 字符串,交易对名称,如“ALPHA\_105USDT”。 * `status`: 字符串,交易对状态,如“TRADING”。 * `baseAsset`: 字符串,基础资产,如“ALPHA\_105”。 * `quoteAsset`: 字符串,计价资产,如“USDT”。 * `pricePrecision`: 整数,价格小数位数。 * `quantityPrecision`: 整数,数量小数位数。 * `baseAssetPrecision`: 整数,基础资产精度。 * `quotePrecision`: 整数,计价资产精度。 * `filters`: 对象数组,每个对象代表交易规则或限制,通常包含字段: * `filterType`: 字符串,过滤器类型(例如“PRICE\_FILTER”、“LOT\_SIZE”、“MIN\_NOTIONAL”)。 * `minPrice`: 字符串,最小价格 * `maxPrice`: 字符串,最高价格 * `tickSize`: 字符串,价格步长 * `stepSize`: 字符串,数量步长 * `maxQty`: 字符串,最大数量 * `minQty`: 字符串,最小数量 * `limit`: 整数,最大订单数限制 * `minNotional`: 字符串,最小名义金额 * `maxNotional`: 字符串,最大名义金额 * `multiplierDown`: 字符串,下限倍数 * `multiplierUp`: 字符串,上限倍数 * `bidMultiplierUp`: 字符串,买单价格上限倍数 * `askMultiplierUp`: 字符串,卖单价格上限倍数 * `bidMultiplierDown`: 字符串,买单价格下限倍数 * `askMultiplierDown`: 字符串,卖单价格下限倍数 * `orderTypes`: 字符串数组,列出该交易对支持的订单类型,如\["LIMIT"\]。 响应示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "", "messageDetail": "", "success": true, "data": { "timezone": "UTC", "assets": [ { "asset": "USDT" } ], "symbols": [ { "symbol": "ALPHA_105USDT", "status": "TRADING", "baseAsset": "ALPHA_105", "quoteAsset": "USDT", "pricePrecision": 8, "quantityPrecision": 8, "baseAssetPrecision": 8, "quotePrecision": 8, "filters": [ { "filterType": "PRICE_FILTER", "minPrice": "0.00000001", "maxPrice": "1000", "tickSize": "0.00000001" }, { "filterType": "LOT_SIZE", "stepSize": "0.01000000", "maxQty": "277778", "minQty": "0.01000000" }, { "filterType": "MAX_NUM_ORDERS", "limit": 200 }, { "filterType": "MIN_NOTIONAL", "minNotional": "0.1" }, { "filterType": "MAX_NOTIONAL", "maxNotional": "1000000" }, { "filterType": "NOTIONAL", "minNotional": "0.1", "maxNotional": "1000000" }, { "filterType": "PERCENT_PRICE", "multiplierDown": "0.20000", "multiplierUp": "5" }, { "filterType": "PERCENT_PRICE_BY_SIDE", "bidMultiplierUp": "5", "askMultiplierUp": "5", "bidMultiplierDown": "0.20000", "askMultiplierDown": "0.20000" } ], "orderTypes": ["LIMIT"] } ], "orderTypes": "" }} * [描述](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E6%8F%8F%E8%BF%B0) * [HTTP Request](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#http-request) * [完整URL](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%AE%8C%E6%95%B4url) * [参数](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%8F%82%E6%95%B0) * [响应结构](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84) * [响应示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/get-exchange-info#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 聚合交易查询 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#__docusaurus_skipToContent_fallback) 本页总览 聚合交易查询 ====== 描述[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E6%8F%8F%E8%BF%B0 "描述的直接链接") --------------------------------------------------------------------------------------------------------------------------- 获取指定交易对的压缩聚合历史成交数据,适用于查询近期成交记录。 HTTP Request[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#http-request "HTTP Request�的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ GET `/bapi/defi/v1/public/alpha-trade/agg-trades` 完整URL示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%AE%8C%E6%95%B4url%E7%A4%BA%E4%BE%8B "完整URL示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- [https://www.binance.com/bapi/defi/v1/public/alpha-trade/agg-trades?symbol=ALPHA\_118USDC](https://www.binance.com/bapi/defi/v1/public/alpha-trade/agg-trades?symbol=ALPHA_118USDC) 参数[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%8F%82%E6%95%B0 "参数的直接链接") --------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必填 | 描述 | | --- | --- | --- | --- | | symbol | STRING | 是 | 例如 "ALPHA\_118USDC",需使用Token列表中的代币ID | | fromId | LONG | 否 | 起始成交ID | | startTime | LONG | 否 | 起始时间戳(毫秒) | | endTime | LONG | 否 | 结束时间戳(毫秒) | | limit | INT | 否 | 返回结果数量(默认500,最大1000) | 响应结构[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84 "响应结构的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- 对象数组,每个对象代表一条聚合成交: * `a`: 整数,聚合成交ID * `p`: 字符串,价格 * `q`: 字符串,数量 * `f`: 整数,首笔成交ID * `l`: 整数,末笔成交ID * `T`: 整数,时间戳 * `m`: 布尔值(买方是否是做市商),该字段已废弃,可忽略 响应示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "", "messageDetail": "", "data": [ { "a": 58470, "p": "1.00", "q": "1.00", "f": 58470, "l": 58665, "T": 1752568680000, "m": true } ]} * [描述](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E6%8F%8F%E8%BF%B0) * [HTTP Request](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#http-request) * [完整URL示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%AE%8C%E6%95%B4url%E7%A4%BA%E4%BE%8B) * [参数](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%8F%82%E6%95%B0) * [响应结构](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84) * [响应示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/aggregated-trades#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 24hr价格变动情况 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#__docusaurus_skipToContent_fallback) 本页总览 24hr价格变动情况 ========== 描述[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E6%8F%8F%E8%BF%B0 "描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- 获取某交易对24小时滚动窗口的价格变动统计信息,包括成交量和价格变化。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- GET `/bapi/defi/v1/public/alpha-trade/ticker` 完整URL示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%AE%8C%E6%95%B4url%E7%A4%BA%E4%BE%8B "完整URL示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- [https://www.binance.com/bapi/defi/v1/public/alpha-trade/ticker?symbol=ALPHA\_175USDT](https://www.binance.com/bapi/defi/v1/public/alpha-trade/ticker?symbol=ALPHA_175USDT) 参数[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%8F%82%E6%95%B0 "参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必填 | 描述 | | --- | --- | --- | --- | | symbol | STRING | 是 | 例如 "ALPHA\_175USDT",需使用Token列表中的代币ID | 响应结构[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84 "响应结构的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- * `code`: 字符串,响应状态码;"000000"表示成功。 * `message`: 字符串,可选信息或错误详情,此处无。 * `messageDetail`: 字符串,附加消息详情,此处无。 * `success`: 布尔值,表示请求是否成功,此处为true。 * `data`: 对象,包含交易对的行情信息,字段包括: * `symbol`: 字符串,交易对符号,如 "ALPHA\_175USDT" * `priceChange`: 字符串,期间绝对价格变动,如 "-0.00025072" * `priceChangePercent`: 字符串,期间价格变动百分比,如 "-12.742"(%) * `weightedAvgPrice`: 字符串,期间加权平均价格,如 "0.00174014" * `lastPrice`: 字符串,最新成交价,如 "0.00171695" * `lastQty`: 字符串,最后一笔成交量,如 "11587.95000000" * `openPrice`: 字符串,期间开盘价,如 "0.00196767" * `highPrice`: 字符串,期间最高价,如 "0.00197493" * `lowPrice`: 字符串,期间最低价,如 "0.00166000" * `volume`: 字符串,期间基础资产成交量,如 "4664046.98000000" * `quoteVolume`: 字符串,期间计价资产成交量,如 "8116.07360317" * `openTime`: 整数(毫秒时间戳),期间开始时间,如 1752568680000 * `closeTime`: 整数(毫秒时间戳),期间结束时间,如 1752654774140 * `firstId`: 整数,期间第一笔成交ID,如 58470 * `lastId`: 整数,期间最后一笔成交ID,如 58665 * `count`: 整数,期间成交总数,如 258 响应示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "", "messageDetail": "", "data": { "symbol": "ALPHA_175USDT", "priceChange": "-0.00007172", "priceChangePercent": "-8.841", "weightedAvgPrice": "0.00079608", "lastPrice": "0.00073954", "lastQty": "12600.43000000", "openPrice": "0.00081126", "highPrice": "0.00081126", "lowPrice": "0.00073954", "volume": "1204754.30000000", "quoteVolume": "959.07729927", "openTime": 1768808100000, "closeTime": 1768893244772, "firstId": 93742, "lastId": 93768, "count": 38 }, "success": true} * [描述](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#http%E8%AF%B7%E6%B1%82) * [完整URL示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%AE%8C%E6%95%B4url%E7%A4%BA%E4%BE%8B) * [参数](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%8F%82%E6%95%B0) * [响应结构](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84) * [响应示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/24hr-ticker-price-change#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/Introduction#__docusaurus_skipToContent_fallback) 通过API访问Binance算法订单策略,以自动化和优化订单执行。使用机构级智能算法订单策略执行大额或流动性不足的订单。如果您对Binance算法有任何疑问,请联系[trading@binance.com](mailto:trading@binance.com) 。 [Binance算法订单常见问题](https://www.binance.com/zh-CN/support/faq/detail/91d7e7d0633846adb0ef9020037cc391) 什么是算法订单?[加密货币交易的TWAP和POV策略](https://www.binance.com/zh-CN/blog/otc/%E4%BB%80%E4%B9%88%E6%98%AF%E7%AE%97%E6%B3%95%E8%AE%A2%E5%8D%95%E7%AE%97%E6%B3%95%E4%BA%A4%E6%98%93twap%E5%92%8Cpov%E7%AD%96%E7%95%A5%E8%AF%A6%E8%A7%A3-572102887905225345?hl=zh-CN) --- # 错误代码 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#__docusaurus_skipToContent_fallback) 本页总览 错误代码 ==== > 错误JSON格式: { "code":-1121, "msg":"Invalid symbol."} 错误由两部分组成:错误代码和消息。 代码是通用的,但是消息可能会有所不同。 10xx -常规服务器或网络问题[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#10xx--%E5%B8%B8%E8%A7%84%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%88%96%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98 "10xx -常规服务器或网络问题的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-1000 UNKNOWN[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1000-unknown "-1000 UNKNOWN的直接链接") * 处理请求时发生未知错误。 * 处理请求时发生未知错误。\[%s\] ### \-1001 DISCONNECTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1001-disconnected "-1001 DISCONNECTED的直接链接") * 内部错误; 无法处理您的请求。 请再试一次. ### \-1002 UNAUTHORIZED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1002-unauthorized "-1002 UNAUTHORIZED的直接链接") * 您无权执行此请求。 ### \-1003 TOO\_MANY\_REQUESTS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1003-too_many_requests "-1003 TOO_MANY_REQUESTS的直接链接") * 排队的请求过多。 * 请求权重过多; 当前限制是 %s 每 %s 的请求权重。 请使用 Websocket Streams 进行实时更新,以避免轮询API。 * 请求权重过多; IP被禁止,直到%s。 请使用 Websocket Streams 进行实时更新,以免被禁。 ### \-1004 SERVER\_BUSY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1004-server_busy "-1004 SERVER_BUSY的直接链接") * 服务器正忙,请稍候再试。 ### \-1006 UNEXPECTED\_RESP[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1006-unexpected_resp "-1006 UNEXPECTED_RESP的直接链接") * 从消息总线收到意外的响应。 执行状态未知。 ### \-1007 TIMEOUT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1007-timeout "-1007 TIMEOUT的直接链接") * 等待后端服务器响应超时。 发送状态未知; 执行状态未知。 ### \-1008 SERVER\_BUSY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1008-server_busy "-1008 SERVER_BUSY的直接链接") * 现货交易服务器当前因其他请求而过载。 请在几分钟后重试。 ### \-1014 UNKNOWN\_ORDER\_COMPOSITION[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1014-unknown_order_composition "-1014 UNKNOWN_ORDER_COMPOSITION的直接链接") * 不支持的订单组合。 ### \-1015 TOO\_MANY\_ORDERS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1015-too_many_orders "-1015 TOO_MANY_ORDERS的直接链接") * 新订单太多。 * 新订单太多; 当前限制为每%s %s个订单。 ### \-1016 SERVICE\_SHUTTING\_DOWN[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1016-service_shutting_down "-1016 SERVICE_SHUTTING_DOWN的直接链接") * 该服务不可用。 ### \-1020 UNSUPPORTED\_OPERATION[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1020-unsupported_operation "-1020 UNSUPPORTED_OPERATION的直接链接") * 不支持此操作。 ### \-1021 INVALID\_TIMESTAMP[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1021-invalid_timestamp "-1021 INVALID_TIMESTAMP的直接链接") * 此请求的时间戳在recvWindow之外。 * 此请求的时间戳比服务器时间提前1000毫秒。 ### \-1022 INVALID\_SIGNATURE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1022-invalid_signature "-1022 INVALID_SIGNATURE的直接链接") * 此请求的签名无效。 ### \-1099 Not found, authenticated, or authorized[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1099-not-found-authenticated-or-authorized "-1099 Not found, authenticated, or authorized的直接链接") * 替换错误代码-1999 11xx - 2xxx Request issues[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#11xx---2xxx-request-issues "11xx - 2xxx Request issues的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-1100 ILLEGAL\_CHARS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1100-illegal_chars "-1100 ILLEGAL_CHARS的直接链接") * 在参数中发现非法字符。 * 在参数中发现非法字符。`%s` * 在参数`%s`中发现非法字符; 合法范围是`%s`。 ### \-1101 TOO\_MANY\_PARAMETERS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1101-too_many_parameters "-1101 TOO_MANY_PARAMETERS的直接链接") * 为此端点发送的参数太多。 * 参数太多; 预期为`%s`并收到了`%s`。 * 检测到的参数值重复。 ### \-1102 MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1102-mandatory_param_empty_or_malformed "-1102 MANDATORY_PARAM_EMPTY_OR_MALFORMED的直接链接") * 未发送强制性参数,该参数为空/空或格式错误。 * 强制参数`%s`未发送,为空/空或格式错误。 * 必须发送参数`%s`或`%s`,但两者均为空! ### \-1103 UNKNOWN\_PARAM[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1103-unknown_param "-1103 UNKNOWN_PARAM的直接链接") * 发送了未知参数。 ### \-1104 UNREAD\_PARAMETERS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1104-unread_parameters "-1104 UNREAD_PARAMETERS的直接链接") * 并非所有发送的参数都被读取。 * 并非所有发送的参数都被读取; 读取了`%s`参数,但被发送了`%s`。 ### \-1105 PARAM\_EMPTY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1105-param_empty "-1105 PARAM_EMPTY的直接链接") * 参数为空。 * 参数`%s`为空。 ### \-1106 PARAM\_NOT\_REQUIRED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1106-param_not_required "-1106 PARAM_NOT_REQUIRED的直接链接") * 不需要时已发送参数。 * 不需要时发送参数`%s`。 ### \-1111 BAD\_PRECISION[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1111-bad_precision "-1111 BAD_PRECISION的直接链接") * 精度超过为此资产定义的最大值。 ### \-1112 NO\_DEPTH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1112-no_depth "-1112 NO_DEPTH的直接链接") * 交易对没有挂单。 ### \-1114 TIF\_NOT\_REQUIRED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1114-tif_not_required "-1114 TIF_NOT_REQUIRED的直接链接") * 不需要时发送了TimeInForce参数。 ### \-1115 INVALID\_TIF[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1115-invalid_tif "-1115 INVALID_TIF的直接链接") * 无效 timeInForce. ### \-1116 INVALID\_ORDER\_TYPE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1116-invalid_order_type "-1116 INVALID_ORDER_TYPE的直接链接") * 无效订单类型。 ### \-1117 INVALID\_SIDE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1117-invalid_side "-1117 INVALID_SIDE的直接链接") * 无效买卖方向。 ### \-1118 EMPTY\_NEW\_CL\_ORD\_ID[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1118-empty_new_cl_ord_id "-1118 EMPTY_NEW_CL_ORD_ID的直接链接") * 新的客户订单ID为空。 ### \-1119 EMPTY\_ORG\_CL\_ORD\_ID[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1119-empty_org_cl_ord_id "-1119 EMPTY_ORG_CL_ORD_ID的直接链接") * 客户自定义的订单ID为空。 ### \-1120 BAD\_INTERVAL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1120-bad_interval "-1120 BAD_INTERVAL的直接链接") * 无效时间间隔。 ### \-1121 BAD\_SYMBOL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1121-bad_symbol "-1121 BAD_SYMBOL的直接链接") * 无效的交易对。 ### \-1125 INVALID\_LISTEN\_KEY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1125-invalid_listen_key "-1125 INVALID_LISTEN_KEY的直接链接") * 该listenKey不存在。 ### \-1127 MORE\_THAN\_XX\_HOURS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1127-more_than_xx_hours "-1127 MORE_THAN_XX_HOURS的直接链接") * 查询间隔太大。 * 从开始时间到结束时间之间超过%s小时。 ### \-1128 OPTIONAL\_PARAMS\_BAD\_COMBO[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1128-optional_params_bad_combo "-1128 OPTIONAL_PARAMS_BAD_COMBO的直接链接") * 可选参数组合无效。 ### \-1130 INVALID\_PARAMETER[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1130-invalid_parameter "-1130 INVALID_PARAMETER的直接链接") * 发送的参数为无效数据。 * 发送参数`%s`的数据无效。 ### \-1131 BAD\_RECV\_WINDOW[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1131-bad_recv_window "-1131 BAD_RECV_WINDOW的直接链接") * `recvWindow` 必须小于 60000 ### \-1134 BAD\_STRATEGY\_TYPE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1134-bad_strategy_type "-1134 BAD_STRATEGY_TYPE的直接链接") * `strategyType` 必须小于 1000000 #### \-1145 INVALID\_CANCEL\_RESTRICTIONS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1145-invalid_cancel_restrictions "-1145 INVALID_CANCEL_RESTRICTIONS的直接链接") * `cancelRestrictions` 必须是 `ONLY_NEW` 或者 `ONLY_PARTIALLY_FILLED`。 #### \-1151 重复的交易对[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1151-%E9%87%8D%E5%A4%8D%E7%9A%84%E4%BA%A4%E6%98%93%E5%AF%B9 "-1151 重复的��交易对的直接链接") * Symbol is present multiple times in the list. ### \-2010 NEW\_ORDER\_REJECTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2010-new_order_rejected "-2010 NEW_ORDER_REJECTED的直接链接") * 新订单被拒绝 ### \-2011 CANCEL\_REJECTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2011-cancel_rejected "-2011 CANCEL_REJECTED的直接链接") * 取消订单被拒绝 ### \-2013 NO\_SUCH\_ORDER[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2013-no_such_order "-2013 NO_SUCH_ORDER的直接链接") * 订单不存在。 ### \-2014 BAD\_API\_KEY\_FMT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2014-bad_api_key_fmt "-2014 BAD_API_KEY_FMT的直接链接") * API-key 格式无效。 ### \-2015 REJECTED\_MBX\_KEY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2015-rejected_mbx_key "-2015 REJECTED_MBX_KEY的直接链接") * 无效的API密钥,IP或操作权限。 ### \-2016 NO\_TRADING\_WINDOW[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2016-no_trading_window "-2016 NO_TRADING_WINDOW的直接链接") * 找不到该交易对的交易窗口。 尝试改为24小时自动报价。 #### \-2026 ORDER\_ARCHIVED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2026-order_archived "-2026 ORDER_ARCHIVED的直接链接") * 订单已被存档因为此订单被取消或过期,无交易数量而最后的更新已超过 90 天前。 3xxx-5xxx SAPI 具体问题[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#3xxx-5xxx-sapi-%E5%85%B7%E4%BD%93%E9%97%AE%E9%A2%98 "3xxx-5xxx SAPI 具体问题的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-3000 INNER\_FAILURE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3000-inner_failure "-3000 INNER_FAILURE的直接链接") * 内部服务器错误。 ### \-3001 NEED\_ENABLE\_2FA[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3001-need_enable_2fa "-3001 NEED_ENABLE_2FA的直接链接") * 请先启用2FA。 ### \-3002 ASSET\_DEFICIENCY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3002-asset_deficiency "-3002 ASSET_DEFICIENCY的直接链接") * 此资产不存在。 ### \-3003 NO\_OPENED\_MARGIN\_ACCOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3003-no_opened_margin_account "-3003 NO_OPENED_MARGIN_ACCOUNT的直接链接") * 杠杆账户不存在。 ### \-3004 TRADE\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3004-trade_not_allowed "-3004 TRADE_NOT_ALLOWED的直接链接") * 禁止交易。 ### \-3005 TRANSFER\_OUT\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3005-transfer_out_not_allowed "-3005 TRANSFER_OUT_NOT_ALLOWED的直接链接") * 不允许转账。 ### \-3006 EXCEED\_MAX\_BORROWABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3006-exceed_max_borrowable "-3006 EXCEED_MAX_BORROWABLE的直接链接") * 您的已借金额已超过最高可借金额。 ### \-3007 HAS\_PENDING\_TRANSACTION[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3007-has_pending_transaction "-3007 HAS_PENDING_TRANSACTION的直接链接") * 您有待处理的交易,请稍后再试。 ### \-3008 BORROW\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3008-borrow_not_allowed "-3008 BORROW_NOT_ALLOWED的直接链接") * 不允许借款。 ### \-3009 ASSET\_NOT\_MORTGAGEABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3009-asset_not_mortgageable "-3009 ASSET_NOT_MORTGAGEABLE的直接链接") * 此资产目前不允许转入杠杆账户。 ### \-3010 REPAY\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3010-repay_not_allowed "-3010 REPAY_NOT_ALLOWED的直接链接") * 不允许还款。 ### \-3011 BAD\_DATE\_RANGE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3011-bad_date_range "-3011 BAD_DATE_RANGE的直接链接") * 您输入的日期无效。 ### \-3012 ASSET\_ADMIN\_BAN\_BORROW[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3012-asset_admin_ban_borrow "-3012 ASSET_ADMIN_BAN_BORROW的直接链接") * 此资产禁止借款。 ### \-3013 LT\_MIN\_BORROWABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3013-lt_min_borrowable "-3013 LT_MIN_BORROWABLE的直接链接") * 借入金额少于最低借入金额。 ### \-3014 ACCOUNT\_BAN\_BORROW[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3014-account_ban_borrow "-3014 ACCOUNT_BAN_BORROW的直接链接") * 此帐户禁止借款。 ### \-3015 REPAY\_EXCEED\_LIABILITY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3015-repay_exceed_liability "-3015 REPAY_EXCEED_LIABILITY的直接链接") * 还款额超过借款额。 ### \-3016 LT\_MIN\_REPAY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3016-lt_min_repay "-3016 LT_MIN_REPAY的直接链接") * 还款额少于最低还款额。 ### \-3017 ASSET\_ADMIN\_BAN\_MORTGAGE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3017-asset_admin_ban_mortgage "-3017 ASSET_ADMIN_BAN_MORTGAGE的直接链接") * 此资产目前不允许转入保证金账户。 ### \-3018 ACCOUNT\_BAN\_MORTGAGE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3018-account_ban_mortgage "-3018 ACCOUNT_BAN_MORTGAGE的直接链接") * 此帐户已禁止转入。 ### \-3019 ACCOUNT\_BAN\_ROLLOUT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3019-account_ban_rollout "-3019 ACCOUNT_BAN_ROLLOUT的直接链接") * 此帐户禁止转出。 ### \-3020 EXCEED\_MAX\_ROLLOUT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3020-exceed_max_rollout "-3020 EXCEED_MAX_ROLLOUT的直接链接") * 转出金额超过上限。 ### \-3021 PAIR\_ADMIN\_BAN\_TRADE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3021-pair_admin_ban_trade "-3021 PAIR_ADMIN_BAN_TRADE的直接链接") * 杠杆账户无法交易此交易对。 ### \-3022 ACCOUNT\_BAN\_TRADE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3022-account_ban_trade "-3022 ACCOUNT_BAN_TRADE的直接链接") * 账号被禁止交易。 ### \-3023 WARNING\_MARGIN\_LEVEL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3023-warning_margin_level "-3023 WARNING_MARGIN_LEVEL的直接链接") * 无法在当前杠杆倍数下转出资金或者下单 ### \-3024 FEW\_LIABILITY\_LEFT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3024-few_liability_left "-3024 FEW_LIABILITY_LEFT的直接链接") * 付款之后未付款的债务太小 ### \-3025 INVALID\_EFFECTIVE\_TIME[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3025-invalid_effective_time "-3025 INVALID_EFFECTIVE_TIME的直接链接") * 输入时间有误。 ### \-3026 VALIDATION\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3026-validation_failed "-3026 VALIDATION_FAILED的直接链接") * 输入参数有误。 ### \-3027 NOT\_VALID\_MARGIN\_ASSET[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3027-not_valid_margin_asset "-3027 NOT_VALID_MARGIN_ASSET的直接链接") * 无效的杠杆资产。 ### \-3028 NOT\_VALID\_MARGIN\_PAIR[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3028-not_valid_margin_pair "-3028 NOT_VALID_MARGIN_PAIR的直接链接") * 无效的杠杆交易对。 ### \-3029 TRANSFER\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3029-transfer_failed "-3029 TRANSFER_FAILED的直接链接") * 转账失败。 ### \-3036 ACCOUNT\_BAN\_REPAY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3036-account_ban_repay "-3036 ACCOUNT_BAN_REPAY的直接链接") * 此账号无法还款。 ### \-3037 PNL\_CLEARING[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3037-pnl_clearing "-3037 PNL_CLEARING的直接链接") * `PNL`正在清帐,请稍等。 ### \-3038 LISTEN\_KEY\_NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3038-listen_key_not_found "-3038 LISTEN_KEY_NOT_FOUND的直接链接") * 找不到`Listen key` ### \-3041 BALANCE\_NOT\_CLEARED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3041-balance_not_cleared "-3041 BALANCE_NOT_CLEARED的直接链接") * 余额不足 ### \-3042 PRICE\_INDEX\_NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3042-price_index_not_found "-3042 PRICE_INDEX_NOT_FOUND的直接链接") * 该杠杆交易对无可用价格指数。 ### \-3043 TRANSFER\_IN\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3043-transfer_in_not_allowed "-3043 TRANSFER_IN_NOT_ALLOWED的直接链接") * 不允许转入。 ### \-3044 SYSTEM\_BUSY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3044-system_busy "-3044 SYSTEM_BUSY的直接链接") * 系统繁忙。 ### \-3045 SYSTEM[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3045-system "-3045 SYSTEM的直�接链接") * 系统目前没有足够可借的资产。 ### \-3999 NOT\_WHITELIST\_USER[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3999-not_whitelist_user "-3999 NOT_WHITELIST_USER的直接链接") * 此功能只面向邀请的用户。 ### \-4001 CAPITAL\_INVALID[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4001-capital_invalid "-4001 CAPITAL_INVALID的直接链接") * 非法操作 ### \-4002 CAPITAL\_IG[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4002-capital_ig "-4002 CAPITAL_IG的直接链接") * 非法获取 ### \-4003 CAPITAL\_IEV[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4003-capital_iev "-4003 CAPITAL_IEV的直接链接") * 非法邮箱验证 ### \-4004 CAPITAL\_UA[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4004-capital_ua "-4004 CAPITAL_UA的直接链接") * 未登录或者认证。 ### \-4005 CAPAITAL\_TOO\_MANY\_REQUEST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4005-capaital_too_many_request "-4005 CAPAITAL_TOO_MANY_REQUEST的直接链接") * 请求太频繁。 ### \-4006 CAPITAL\_ONLY\_SUPPORT\_PRIMARY\_ACCOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4006-capital_only_support_primary_account "-4006 CAPITAL_ONLY_SUPPORT_PRIMARY_ACCOUNT的直接链接") * 只支持主账号。 ### \-4007 CAPITAL\_ADDRESS\_VERIFICATION\_NOT\_PASS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4007-capital_address_verification_not_pass "-4007 CAPITAL_ADDRESS_VERIFICATION_NOT_PASS的直接链接") * 地址的没有通过校验。 ### \-4008 CAPITAL\_ADDRESS\_TAG\_VERIFICATION\_NOT\_PASS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4008-capital_address_tag_verification_not_pass "-4008 CAPITAL_ADDRESS_TAG_VERIFICATION_NOT_PASS的直接链接") * 地址的标记信息(`tag`)没有通过校验。 ### \-4010 CAPITAL\_WHITELIST\_EMAIL\_CONFIRM[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4010-capital_whitelist_email_confirm "-4010 CAPITAL_WHITELIST_EMAIL_CONFIRM的直接链接") * 确认电子邮件已经列入白名单。 ### \-4011 CAPITAL\_WHITELIST\_EMAIL\_EXPIRED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4011-capital_whitelist_email_expired "-4011 CAPITAL_WHITELIST_EMAIL_EXPIRED的直接链接") * 列入白名单的电子邮件无效。 ### \-4012 CAPITAL\_WHITELIST\_CLOSE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4012-capital_whitelist_close "-4012 CAPITAL_WHITELIST_CLOSE的直接链接") * 白名单未打开。 ### \-4013 CAPITAL\_WITHDRAW\_2FA\_VERIFY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4013-capital_withdraw_2fa_verify "-4013 CAPITAL_WITHDRAW_2FA_VERIFY的直接链接") * 2FA未打开。 ### \-4014 CAPITAL\_WITHDRAW\_LOGIN\_DELAY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4014-capital_withdraw_login_delay "-4014 CAPITAL_WITHDRAW_LOGIN_DELAY的直接链接") * 在登录后的2分钟之内不允许提款。 ### \-4015 CAPITAL\_WITHDRAW\_RESTRICTED\_MINUTE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4015-capital_withdraw_restricted_minute "-4015 CAPITAL_WITHDRAW_RESTRICTED_MINUTE的直接链接") * 暂停提款 ### \-4016 CAPITAL\_WITHDRAW\_RESTRICTED\_PASSWORD[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4016-capital_withdraw_restricted_password "-4016 CAPITAL_WITHDRAW_RESTRICTED_PASSWORD的直接链接") * 在密码修改后的24小时之内不允许提款。 ### \-4017 CAPITAL\_WITHDRAW\_RESTRICTED\_UNBIND\_2FA[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4017-capital_withdraw_restricted_unbind_2fa "-4017 CAPITAL_WITHDRAW_RESTRICTED_UNBIND_2FA的直接链接") * 在2FA发行后的24小时之内不允许提款。 ### \-4018 CAPITAL\_WITHDRAW\_ASSET\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4018-capital_withdraw_asset_not_exist "-4018 CAPITAL_WITHDRAW_ASSET_NOT_EXIST的直接链接") * 此资产不存在。 ### \-4019 CAPITAL\_WITHDRAW\_ASSET\_PROHIBIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4019-capital_withdraw_asset_prohibit "-4019 CAPITAL_WITHDRAW_ASSET_PROHIBIT的直接链接") * 此资产不允许提款。 ### \-4021 CAPITAL\_WITHDRAW\_AMOUNT\_MULTIPLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4021-capital_withdraw_amount_multiple "-4021 CAPITAL_WITHDRAW_AMOUNT_MULTIPLE的直接链接") * 资产的提款数量必须是%s的%s倍。 ### \-4022 CAPITAL\_WITHDRAW\_MIN\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4022-capital_withdraw_min_amount "-4022 CAPITAL_WITHDRAW_MIN_AMOUNT的直接链接") * 不须少于最低的提款数量%s。 ### \-4023 CAPITAL\_WITHDRAW\_MAX\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4023-capital_withdraw_max_amount "-4023 CAPITAL_WITHDRAW_MAX_AMOUNT的直接链接") * 在24小时之内,不须超过最高的提款数量。 ### \-4024 CAPITAL\_WITHDRAW\_USER\_NO\_ASSET[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4024-capital_withdraw_user_no_asset "-4024 CAPITAL_WITHDRAW_USER_NO_ASSET的直接链接") * 当前用户没有此资产。 ### \-4025 CAPITAL\_WITHDRAW\_USER\_ASSET\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4025-capital_withdraw_user_asset_less_than_zero "-4025 CAPITAL_WITHDRAW_USER_ASSET_LESS_THAN_ZERO的直接链接") * 持有资产的数量小于零。 ### \-4026 CAPITAL\_WITHDRAW\_USER\_ASSET\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4026-capital_withdraw_user_asset_not_enough "-4026 CAPITAL_WITHDRAW_USER_ASSET_NOT_ENOUGH的直接链接") * 此资产余额不足。 ### \-4027 CAPITAL\_WITHDRAW\_GET\_TRAN\_ID\_FAILURE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4027-capital_withdraw_get_tran_id_failure "-4027 CAPITAL_WITHDRAW_GET_TRAN_ID_FAILURE的直接链接") * 无法获取tranId。 ### \-4028 CAPITAL\_WITHDRAW\_MORE\_THAN\_FEE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4028-capital_withdraw_more_than_fee "-4028 CAPITAL_WITHDRAW_MORE_THAN_FEE的直接链接") * 提款金额必须多于佣金额。 ### \-4029 CAPITAL\_WITHDRAW\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4029-capital_withdraw_not_exist "-4029 CAPITAL_WITHDRAW_NOT_EXIST的直接链接") * 此提款记录不存在。 ### \-4030 CAPITAL\_WITHDRAW\_CONFIRM\_SUCCESS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4030-capital_withdraw_confirm_success "-4030 CAPITAL_WITHDRAW_CONFIRM_SUCCESS的直接链接") * 提款资产成功。 ### \-4031 CAPITAL\_WITHDRAW\_CANCEL\_FAILURE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4031-capital_withdraw_cancel_failure "-4031 CAPITAL_WITHDRAW_CANCEL_FAILURE的直接链接") * 取消提款失败。 ### \-4032 CAPITAL\_WITHDRAW\_CHECKSUM\_VERIFY\_FAILURE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4032-capital_withdraw_checksum_verify_failure "-4032 CAPITAL_WITHDRAW_CHECKSUM_VERIFY_FAILURE的直接链接") * 验证提款失败。 ### \-4033 CAPITAL\_WITHDRAW\_ILLEGAL\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4033-capital_withdraw_illegal_address "-4033 CAPITAL_WITHDRAW_ILLEGAL_ADDRESS的直接链接") * 提款地址不合法。 ### \-4034 CAPITAL\_WITHDRAW\_ADDRESS\_CHEAT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4034-capital_withdraw_address_cheat "-4034 CAPITAL_WITHDRAW_ADDRESS_CHEAT的直接链接") * 当前地址有异常。 ### \-4035 CAPITAL\_WITHDRAW\_NOT\_WHITE\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4035-capital_withdraw_not_white_address "-4035 CAPITAL_WITHDRAW_NOT_WHITE_ADDRESS的直接链接") * 此地址不在白名单上。请加入然后重试。 ### \-4036 CAPITAL\_WITHDRAW\_NEW\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4036-capital_withdraw_new_address "-4036 CAPITAL_WITHDRAW_NEW_ADDRESS的直接链接") * 新地址在{0}小时后才可以提款。 ### \-4037 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_FAIL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4037-capital_withdraw_resend_email_fail "-4037 CAPITAL_WITHDRAW_RESEND_EMAIL_FAIL的直接链接") * 重新发送邮件失败。 ### \-4038 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_TIME\_OUT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4038-capital_withdraw_resend_email_time_out "-4038 CAPITAL_WITHDRAW_RESEND_EMAIL_TIME_OUT的直接链接") * 请5分钟后重试。 ### \-4039 CAPITAL\_USER\_EMPTY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4039-capital_user_empty "-4039 CAPITAL_USER_EMPTY的直接链接") * 用户不存在。 ### \-4041 CAPITAL\_MINUTE\_TOO\_SMALL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4041-capital_minute_too_small "-4041 CAPITAL_MINUTE_TOO_SMALL的直接链接") * 请一分钟后重试。 ### \-4042 CAPITAL\_CHARGE\_NOT\_RESET[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4042-capital_charge_not_reset "-4042 CAPITAL_CHARGE_NOT_RESET的直接链接") * 资产无法重新获取存款地址。 ### \-4043 CAPITAL\_ADDRESS\_TOO\_MUCH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4043-capital_address_too_much "-4043 CAPITAL_ADDRESS_TOO_MUCH的直接链接") * 在24小时之内充值超过100多个地址。 ### \-4044 CAPITAL\_BLACKLIST\_COUNTRY\_GET\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4044-capital_blacklist_country_get_address "-4044 CAPITAL_BLACKLIST_COUNTRY_GET_ADDRESS的直接链接") * 此国家在黑名单上。 ### \-4045 CAPITAL\_GET\_ASSET\_ERROR[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4045-capital_get_asset_error "-4045 CAPITAL_GET_ASSET_ERROR的直接链接") * 获得资产失败。 ### \-4046 CAPITAL\_AGREEMENT\_NOT\_CONFIRMED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4046-capital_agreement_not_confirmed "-4046 CAPITAL_AGREEMENT_NOT_CONFIRMED的直接链接") * 协议未确认。 ### \-4047 CAPITAL\_DATE\_INTERVAL\_LIMIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4047-capital_date_interval_limit "-4047 CAPITAL_DATE_INTERVAL_LIMIT的直接链接") * 时间间隔必须在0-90天之内 ### \-4060 CAPITAL\_WITHDRAW\_USER\_ASSET\_LOCK\_DEPOSIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4060-capital_withdraw_user_asset_lock_deposit "-4060 CAPITAL_WITHDRAW_USER_ASSET_LOCK_DEPOSIT的直接链接") * 体现仍在区块确认中,暂时锁定部分资产 ### \-5001 ASSET\_DRIBBLET\_CONVERT\_SWITCH\_OFF[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5001-asset_dribblet_convert_switch_off "-5001 ASSET_DRIBBLET_CONVERT_SWITCH_OFF的直接链接") * 不允许转移到微型资产。 ### \-5002 ASSET\_ASSET\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5002-asset_asset_not_enough "-5002 ASSET_ASSET_NOT_ENOUGH的直接链接") * 此余额不足。 ### \-5003 ASSET\_USER\_HAVE\_NO\_ASSET[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5003-asset_user_have_no_asset "-5003 ASSET_USER_HAVE_NO_ASSET的直接链接") * 此资产不存在。 ### \-5004 USER\_OUT\_OF\_TRANSFER\_FLOAT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5004-user_out_of_transfer_float "-5004 USER_OUT_OF_TRANSFER_FLOAT的直接链接") * 剩余余额已超过0.001BTC,请重新选择。 * %s的剩余余额已超过0.001BTC,请重新选择。 ### \-5005 USER\_ASSET\_AMOUNT\_IS\_TOO\_LOW[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5005-user_asset_amount_is_too_low "-5005 USER_ASSET_AMOUNT_IS_TOO_LOW的直接链接") * BTC的剩余余额太低,请重新选择。 * %s的剩余余额太低,请重新选择。 ### \-5006 USER\_CAN\_NOT\_REQUEST\_IN\_24\_HOURS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5006-user_can_not_request_in_24_hours "-5006 USER_CAN_NOT_REQUEST_IN_24_HOURS的直接链接") * 24小时内只能转账一次。 ### \-5007 AMOUNT\_OVER\_ZERO[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5007-amount_over_zero "-5007 AMOUNT_OVER_ZERO的直接链接") * 数量必须大于零。 ### \-5008 ASSET\_WITHDRAW\_WITHDRAWING\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5008-asset_withdraw_withdrawing_not_enough "-5008 ASSET_WITHDRAW_WITHDRAWING_NOT_ENOUGH的直接链接") * 可退回资产的金额不足。 ### \-5009 PRODUCT\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5009-product_not_exist "-5009 PRODUCT_NOT_EXIST的直接链接") * 产品不存在。 ### \-5010 TRANSFER\_FAIL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5010-transfer_fail "-5010 TRANSFER_FAIL的直接链接") * 资产转移失败。 ### \-5011 FUTURE\_ACCT\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5011-future_acct_not_exist "-5011 FUTURE_ACCT_NOT_EXIST的直接链接") * 合约帐户不存在。 ### \-5012 TRANSFER\_PENDING[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5012-transfer_pending "-5012 TRANSFER_PENDING的直接链接") * 资产转移正在进行中。 ### \-5021 PARENT\_SUB\_HAVE\_NO\_RELATION[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5021-parent_sub_have_no_relation "-5021 PARENT_SUB_HAVE_NO_RELATION的直接链接") * 当前的子账户和母账户没有从属关系。 ### \-5012 FUTURE\_ACCT\_OR\_SUBRELATION\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5012-future_acct_or_subrelation_not_exist "-5012 FUTURE_ACCT_OR_SUBRELATION_NOT_EXIST的直接链接") * 合约帐户或子账户关系不存在。 6XXX - 币安宝相关[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#6xxx---%E5%B8%81%E5%AE%89%E5%AE%9D%E7%9B%B8%E5%85%B3 "6XXX - 币安宝相关的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-6001 DAILY\_PRODUCT\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6001-daily_product_not_exist "-6001 DAILY_PRODUCT_NOT_EXIST的直接链接") * 理财产品不存在. ### \-6003 DAILY\_PRODUCT\_NOT\_ACCESSIBLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6003-daily_product_not_accessible "-6003 DAILY_PRODUCT_NOT_ACCESSIBLE的直接链接") * 产品不存在或者没有权限。 ### \-6004 DAILY\_PRODUCT\_NOT\_PURCHASABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6004-daily_product_not_purchasable "-6004 DAILY_PRODUCT_NOT_PURCHASABLE的直接链接") * 产品无法购买。 ### \-6005 DAILY\_LOWER\_THAN\_MIN\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6005-daily_lower_than_min_purchase_limit "-6005 DAILY_LOWER_THAN_MIN_PURCHASE_LIMIT的直接链接") * 低于可以购买的最小限额。 ### \-6006 DAILY\_REDEEM\_AMOUNT\_ERROR[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6006-daily_redeem_amount_error "-6006 DAILY_REDEEM_AMOUNT_ERROR的直接链接") * 赎回额度有误。 ### \-6007 DAILY\_REDEEM\_TIME\_ERROR[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6007-daily_redeem_time_error "-6007 DAILY_REDEEM_TIME_ERROR的直接链接") * 不在赎回的时间内。 ### \-6008 DAILY\_PRODUCT\_NOT\_REDEEMABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6008-daily_product_not_redeemable "-6008 DAILY_PRODUCT_NOT_REDEEMABLE的直接链接") * 产品暂时无法赎回。 ### \-6009 REQUEST\_FREQUENCY\_TOO\_HIGH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6009-request_frequency_too_high "-6009 REQUEST_FREQUENCY_TOO_HIGH的直接链接") * 发送请求太频繁。 ### \-6011 EXCEEDED\_USER\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6011-exceeded_user_purchase_limit "-6011 EXCEEDED_USER_PURCHASE_LIMIT的直接链接") * 超购每个月用户可以申购的最大次数。 ### \-6012 BALANCE\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6012-balance_not_enough "-6012 BALANCE_NOT_ENOUGH的直接链接") * 余额不足。 ### \-6013 PURCHASING\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6013-purchasing_failed "-6013 PURCHASING_FAILED的直接链接") * 申购失败。 ### \-6014 UPDATE\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6014-update_failed "-6014 UPDATE_FAILED的直接链接") * 超过可以申购的最大上限。 ### \-6015 EMPTY\_REQUEST\_BODY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6015-empty_request_body "-6015 EMPTY_REQUEST_BODY的直接链接") * 请求的`body`为空。 ### \-6016 PARAMS\_ERR[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6016-params_err "-6016 PARAMS_ERR的直接链接") * 请求的参数有误。 ### \-6017 NOT\_IN\_WHITELIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6017-not_in_whitelist "-6017 NOT_IN_WHITELIST的直接链接") * 不在白名单里面。 ### \-6018 ASSET\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6018-asset_not_enough "-6018 ASSET_NOT_ENOUGH的直接链接") * 资产不足。 ### \-6019 PENDING[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6019-pending "-6019 PENDING的直接链接") * 需要进一步确认。 ### \-6020 PROJECT\_NOT\_EXISTS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6020-project_not_exists "-6020 PROJECT_NOT_EXISTS的直接链接") * 此项目不存在。 70xx - 期货[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#70xx---%E6%9C%9F%E8%B4%A7 "70xx - 期货的直接链接") ---------------------------------------------------------------------------------------------------------------------------- ### \-7001 FUTURES\_BAD\_DATE\_RANGE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-7001-futures_bad_date_range "-7001 FUTURES_BAD_DATE_RANGE的直接链接") * 此日期范围不支持。 ### \-7002 FUTURES\_BAD\_TYPE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-7002-futures_bad_type "-7002 FUTURES_BAD_TYPE的直接链接") * 此数据请求类型不支持。 20xxx - 合约/现货策略交易[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#20xxx---%E5%90%88%E7%BA%A6%E7%8E%B0%E8%B4%A7%E7%AD%96%E7%95%A5%E4%BA%A4%E6%98%93 "20xxx - 合约/现货策略交易的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-20121 Invalid symbol[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20121-invalid-symbol "-20121 Invalid symbol的直接链接") * 无效交易对。 ### \-20124 Invalid algo id or it has been completed[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20124-invalid-algo-id-or-it-has-been-completed "-20124 Invalid algo id or it has been completed的直接链接") * 无效的策略订单ID或者它已经被执行。 ### \-20130 Invalid data sent for a parameter[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20130-invalid-data-sent-for-a-parameter "-20130 Invalid data sent for a parameter的直接链接") * 无效数据。 ### \-20132 The client algo id is duplicated[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20132-the-client-algo-id-is-duplicated "-20132 The client algo id is duplicated的直接链接") * 用户自定义策略订单ID重复。 ### \-20194 Duration is too short to execute all required quantity[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20194-duration-is-too-short-to-execute-all-required-quantity "-20194 Duration is too short to execute all required quantity的直接链接") * Duration 时间太短不足以执行用户选择的订单数量。 ### \-20195 The total size is too small[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20195-the-total-size-is-too-small "-20195 The total size is too small的直接链接") * 下单数量太小。 ### \-20196 The total size is too large[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20196-the-total-size-is-too-large "-20196 The total size is too large的直接链接") * 下单数量太大。 ### \-20198 Reach the max open orders allowed[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20198-reach-the-max-open-orders-allowed "-20198 Reach the max open orders allowed的直接链接") * 达到了最大挂单上限。 ### \-20204 The notional of USD is less or more than the limit[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20204-the-notional-of-usd-is-less-or-more-than-the-limit "-20204 The notional of USD is less or more than the limit的直接链接") * 订单小于最小USD名义价值 过滤器故障[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#%E8%BF%87%E6%BB%A4%E5%99%A8%E6%95%85%E9%9A%9C "过滤器故障的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- | 报错信息 | 描述 | | --- | --- | | "Filter failure: PRICE\_FILTER" | "价格"过高,过低和/或不遵循交易对的最小价格规则。 | | "Filter failure: PERCENT\_PRICE" | "价格"比最近Y分钟的平均加权价格高X%或X%太低。 | | "Filter failure: PERCENT\_PRICE\_BY\_SIDE" | `price` 在当前方向上(`BUY`或者`SELL`)比`lastPrice`价格超过X%或者低于Y%。 | | "Filter failure: LOT\_SIZE" | "数量"太高,太低和/或不遵循该交易对的步长规则。 | | "Filter failure: MIN\_NOTIONAL" | 价格\*数量太低,无法成为该交易对的有效订单。 | | "Filter failure: ICEBERG\_PARTS" | `ICEBERG` 订单会分成太多部分; icebergQty太小。 | | "Filter failure: MARKET\_LOT\_SIZE" | "MARKET"订单的"数量"过高,过低和/或未遵循交易对的步长规则。 | | "Filter failure: MAX\_POSITION" | 达到账户的最大仓位限制。这包括了账户的余额总额,以及所有处于open的买单的数量总和。 | | "Filter failure: MAX\_NUM\_ORDERS" | 客户在交易对上有太多挂单。 | | "Filter failure: MAX\_ALGO\_ORDERS" | 账户有太多未平仓止损和/或在交易对上执行获利指令。 | | "Filter failure: MAX\_NUM\_ICEBERG\_ORDERS" | 客户在交易对上有太多 iceberg 挂单。 | | "Filter failure: TRAILING\_DELTA" | `trailingDelta` 值不在限定的范围内. | | "Filter failure: EXCHANGE\_MAX\_NUM\_ORDERS" | 帐户上的交易所有太多挂单。 | | "Filter failure: EXCHANGE\_MAX\_ALGO\_ORDERS" | 帐户有太多止损挂单和/或在交易所收取获利指令。 | 10xxx - 质押借币[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#10xxx---%E8%B4%A8%E6%8A%BC%E5%80%9F%E5%B8%81 "10xxx - 质押借币的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- ### \-10001 SYSTEM\_MAINTENANCE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10001-system_maintenance "-10001 SYSTEM_MAINTENANCE的直接链接") * 系统维护中,请稍后再试 ### \-10002 INVALID\_INPUT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10002-invalid_input "-10002 INVALID_INPUT的直接链接") * 无效的输入参数 ### \-10005 NO\_RECORDS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10005-no_records "-10005 NO_RECORDS的直接链接") * 暂无记录 ### \-10007 COIN\_NOT\_LOANABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10007-coin_not_loanable "-10007 COIN_NOT_LOANABLE的直接链接") * 该币种暂不支持借贷 ### \-10008 COIN\_NOT\_LOANABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10008-coin_not_loanable "-10008 COIN_NOT_LOANABLE的直接链接") * 该币种暂不支持借贷 ### \-10009 COIN\_NOT\_COLLATERAL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10009-coin_not_collateral "-10009 COIN_NOT_COLLATERAL的直接链接") * 该币种暂不支持抵押 ### \-10010 COIN\_NOT\_COLLATERAL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10010-coin_not_collateral "-10010 COIN_NOT_COLLATERAL的直接链接") * 该币种暂不支持抵押 ### \-10011 INSUFFICIENT\_ASSET[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10011-insufficient_asset "-10011 INSUFFICIENT_ASSET的直接链接") * 现货资产不足 ### \-10012 INVALID\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10012-invalid_amount "-10012 INVALID_AMOUNT的直接链接") * 无效的还款金额 ### \-10013 INSUFFICIENT\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10013-insufficient_amount "-10013 INSUFFICIENT_AMOUNT的直接链接") * 抵押资产不足 ### \-10015 DEDUCTION\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10015-deduction_failed "-10015 DEDUCTION_FAILED的直接链接") * 抵押资产扣款失败 ### \-10016 LOAN\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10016-loan_failed "-10016 LOAN_FAILED的直接链接") * 放贷失败 ### \-10017 REPAY\_EXCEED\_DEBT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10017-repay_exceed_debt "-10017 REPAY_EXCEED_DEBT的直接链接") * 还款金额超过负债金额 ### \-10018 INVALID\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10018-invalid_amount "-10018 INVALID_AMOUNT的直接链接") * 无效的还款金额 ### \-10019 CONFIG\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10019-config_not_exist "-10019 CONFIG_NOT_EXIST的直接链接") * 配置不存在 ### \-10020 UID\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10020-uid_not_exist "-10020 UID_NOT_EXIST的直接链接") * 用户ID不存在 ### \-10021 ORDER\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10021-order_not_exist "-10021 ORDER_NOT_EXIST的直接链接") * 订单不存在 ### \-10022 INVALID\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10022-invalid_amount "-10022 INVALID_AMOUNT的直接链接") * 无效的调整金额 ### \-10023 ADJUST\_LTV\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10023-adjust_ltv_failed "-10023 ADJUST_LTV_FAILED的直接链接") * 调整质押率失败 ### \-10024 ADJUST\_LTV\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10024-adjust_ltv_not_supported "-10024 ADJUST_LTV_NOT_SUPPORTED的直接链接") * 暂不支持调整质押率 ### \-10025 REPAY\_FAILED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10025-repay_failed "-10025 REPAY_FAILED的直接链接") * 还款失败 ### \-10026 INVALID\_PARAMETER[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10026-invalid_parameter "-10026 INVALID_PARAMETER的直接链接") * 无效的参数 ### \-10028 INVALID\_PARAMETER[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10028-invalid_parameter "-10028 INVALID_PARAMETER的直接链接") * 无效的参数 ### \-10029 AMOUNT\_TOO\_SMALL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10029-amount_too_small "-10029 AMOUNT_TOO_SMALL的直接链接") * 借贷金额过小 ### \-10030 AMOUNT\_TOO\_LARGE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10030-amount_too_large "-10030 AMOUNT_TOO_LARGE的直接链接") * 借贷金额过大 ### \-10031 QUOTA\_REACHED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10031-quota_reached "-10031 QUOTA_REACHED的直接链接") * 已达到个人借贷限额 ### \-10032 REPAY\_NOT\_AVAILABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10032-repay_not_available "-10032 REPAY_NOT_AVAILABLE的直接链接") * 暂不支持换款 ### \-10034 REPAY\_NOT\_AVAILABLE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10034-repay_not_available "-10034 REPAY_NOT_AVAILABLE的直接链接") * 抵押物还款暂时不支持,请尝试用借贷币还款。 ### \-10039 AMOUNT\_TOO\_SMALL[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10039-amount_too_small "-10039 AMOUNT_TOO_SMALL的直接链接") * 还款金额过小 ### \-10040 AMOUNT\_TOO\_LARGE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10040-amount_too_large "-10040 AMOUNT_TOO_LARGE的直接链接") * 还款金额过大 ### \-10041 INSUFFICIENT\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10041-insufficient_amount "-10041 INSUFFICIENT_AMOUNT的直接链接") * 由于借贷需求过多,系统剩余可借{0}额度不足。请调整借贷金额或明天再试。 ### \-10042 ASSET\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10042-asset_not_supported "-10042 ASSET_NOT_SUPPORTED的直接链接") * 暂不支持%s币种 ### \-10043 ASSET\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10043-asset_not_supported "-10043 ASSET_NOT_SUPPORTED的直接链接") * 暂不支持{0} 借贷 ### \-10044 QUOTA\_REACHED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10044-quota_reached "-10044 QUOTA_REACHED的直接链接") * 抵押物数量已达到限额,请调整抵押金额或使用其他抵押资产。 ### \-10045 COLLTERAL\_REPAY\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10045-collteral_repay_not_supported "-10045 COLLTERAL_REPAY_NOT_SUPPORTED的直接链接") * 该借贷币种暂不支持抵押物还款,请稍后再试。 ### \-10046 EXCEED\_MAX\_ADJUSTMENT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10046-exceed_max_adjustment "-10046 EXCEED_MAX_ADJUSTMENT的直接链接") * 调整抵押物超过最大限额,请重试。 ### \-10047 REGION\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10047-region_not_supported "-10047 REGION_NOT_SUPPORTED的直接链接") * 受当地法规管制,您所在地区暂不支持该币种。 13xxx - 杠杆代币[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#13xxx---%E6%9D%A0%E6%9D%86%E4%BB%A3%E5%B8%81 "13xxx - 杠杆代币的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- ### \-13000 BLVT\_FORBID\_REDEEM[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13000-blvt_forbid_redeem "-13000 BLVT_FORBID_REDEEM的直接链接") * 当前该杠杆代币关闭赎回 ### \-13001 BLVT\_EXCEED\_DAILY\_LIMIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13001-blvt_exceed_daily_limit "-13001 BLVT_EXCEED_DAILY_LIMIT的直接链接") * 超过该代币个人24小时赎回金额上限 ### \-13002 BLVT\_EXCEED\_TOKEN\_DAILY\_LIMIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13002-blvt_exceed_token_daily_limit "-13002 BLVT_EXCEED_TOKEN_DAILY_LIMIT的直接链接") * 超过该代币全局24小时赎回金额上限 ### \-13003 BLVT\_FORBID\_PURCHASE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13003-blvt_forbid_purchase "-13003 BLVT_FORBID_PURCHASE的直接链接") * 当前该杠杆代币关闭申购 ### \-13004 BLVT\_EXCEED\_DAILY\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13004-blvt_exceed_daily_purchase_limit "-13004 BLVT_EXCEED_DAILY_PURCHASE_LIMIT的直接链接") * 超过该代币个人24小时申购金额上限 ### \-13005 BLVT\_EXCEED\_TOKEN\_DAILY\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13005-blvt_exceed_token_daily_purchase_limit "-13005 BLVT_EXCEED_TOKEN_DAILY_PURCHASE_LIMIT的直接链接") * 超过该代币全局24小时申购金额上限 ### \-13006 BLVT\_PURCHASE\_LESS\_MIN\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13006-blvt_purchase_less_min_amount "-13006 BLVT_PURCHASE_LESS_MIN_AMOUNT的直接链接") * 申购金额低于规定下限 ### \-13007 BLVT\_PURCHASE\_AGREEMENT\_NOT\_SIGN[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13007-blvt_purchase_agreement_not_sign "-13007 BLVT_PURCHASE_AGREEMENT_NOT_SIGN的直接链接") * 没有签署开通交易协议 12xxx - 流动性挖矿[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#12xxx---%E6%B5%81%E5%8A%A8%E6%80%A7%E6%8C%96%E7%9F%BF "12xxx - 流动性挖矿的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-12014 TOO MANY REQUESTS[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-12014-too-many-requests "-12014 TOO MANY REQUESTS的直接链接") * 2秒内接收的请求数量多于1条 18xxx - 币安码[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#18xxx---%E5%B8%81%E5%AE%89%E7%A0%81 "18xxx - 币安码的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ ### \-18002[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18002 "-18002的直接链接") * The total amount of codes you created has exceeded the 24-hour limit, please try again after UTC 0 * 24小时内制码总金额已超过限额,请UTC0点后再尝试 ### \-18003[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18003 "-18003的直接链接") * Too many codes created in 24 hours, please try again after UTC 0 * 24小时内制码总次数已超过限额,请UTC0点后再尝试 ### \-18004[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18004 "-18004的直接链接") * Too many invalid redeem attempts in 24 hours, please try again after UTC 0 * 24小时内兑现币安码输错次数已超过限额,请UTC0点后再尝试 ### \-18005[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18005 "-18005的直接链接") * Too many invalid verify attempts, please try later * 参考号输错次数过多,请稍后再试 ### \-18006[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18006 "-18006的直接链接") * The amount is too small, please re-enter * 金额过小,请重新输入 ### \-18007[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18007 "-18007的直接链接") * This token is not currently supported, please re-enter * 尚未支持该币种,请重新输入 21xxx - 統一帳戶[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#21xxx---%E7%B5%B1%E4%B8%80%E5%B8%B3%E6%88%B6 "21xxx - 統一帳戶的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- ### \-21001 USER\_IS\_NOT\_UNIACCOUNT[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21001-user_is_not_uniaccount "-21001 USER_IS_NOT_UNIACCOUNT的直接链接") * 尚未开通统一账户。 ### \-21002 UNI\_ACCOUNT\_CANT\_TRANSFER\_FUTURE[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21002-uni_account_cant_transfer_future "-21002 UNI_ACCOUNT_CANT_TRANSFER_FUTURE的直接链接") * 统一账户禁用margin向futures转账。 ### \-21003 NET\_ASSET\_MUST\_LTE\_RATIO[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21003-net_asset_must_lte_ratio "-21003 NET_ASSET_MUST_LTE_RATIO的直接链接") * margin资产更新失败。 ### \-21004 USER\_NO\_LIABILITY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21004-user_no_liability "-21004 USER_NO_LIABILITY的直接链接") * 用户不存在统一账户穿仓负债 ### \-21005 NO\_ENOUGH\_ASSET[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21005-no_enough_asset "-21005 NO_ENOUGH_ASSET的直接链接") * 用户现货钱包BUSD资产不足以偿还统一账户穿仓负债 ### \-21006 HAD\_IN\_PROCESS\_REPAY[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21006-had_in_process_repay "-21006 HAD_IN_PROCESS_REPAY的直接链接") * 用户存在正在偿还的统一账户穿仓负债 ### \-21007 IN\_FORCE\_LIQUIDATION[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21007-in_force_liquidation "-21007 IN_FORCE_LIQUIDATION的直接链接") * 强平进行中,用户偿还统一账户穿仓负债失败 订单拒绝错误[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#%E8%AE%A2%E5%8D%95%E6%8B%92%E7%BB%9D%E9%94%99%E8%AF%AF "订单拒绝错误的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------- 以下错误代码表示撮合引擎返回的订单相关错误: * `-1010 ERROR_MSG_RECEIVED` * `-2010 NEW_ORDER_REJECTED` * `-2011 CANCEL_REJECTED` 结合以下消息将指示特定的错误: | 错误信息 | 描述 | | --- | --- | | "Unknown order sent." | 找不到订单(通过"orderId","clientOrderId","origClientOrderId") | | "Duplicate order sent." | `clientOrderId`已经被使用 | | "Market is closed." | 该交易对不在交易范围 | | "Account has insufficient balance for requested action." | 没有足够的资金来完成行动 | | "Market orders are not supported for this symbol." | 交易对上未启用"MARKET" | | "Iceberg orders are not supported for this symbol." | 交易对上未启用`icebergQty` | | "Stop loss orders are not supported for this symbol." | 交易对上未启用 `STOP_LOSS` | | "Stop loss limit orders are not supported for this symbol." | 交易对上未启`STOP_LOSS_LIMIT` | | "Take profit orders are not supported for this symbol." | 交易对上未启用`TAKE_PROFIT` | | "Take profit limit orders are not supported for this symbol." | 交易对上未启用`TAKE_PROFIT_LIMIT` | | "Price \* QTY is zero or less." | `price` \* `quantity`太小 | | "IcebergQty exceeds QTY." | `icebergQty` 必须少于订单数量 | | "This action is disabled on this account." | 联系客户支持; 该账户已禁用了某些操作。 | | "This account may not place or cancel orders." | 联系客户支持: 该账户已被禁用了交易操作。 | | "Unsupported order combination" | 不允许组合`orderType`, `timeInForce`, `stopPrice`, 和/或 `icebergQty` 。 | | "Order would trigger immediately." | 与最后交易价格相比,订单的止损价无效。 | | "Cancel order is invalid. Check origClientOrderId and orderId." | 未发送`origClientOrderId` 或`orderId` 。 | | "Order would immediately match and take." | `LIMIT_MAKER` 订单类型将立即匹配并进行交易,而不是纯粹的生成订单。 | | "The relationship of the prices for the orders is not correct." | `OCO`订单中设置的价格不符合报价规则:

The rules are:

`SELL Orders`: Limit Price > Last Price > Stop Price

`BUY Orders`: Limit Price < Last Price < Stop Price | | "OCO orders are not supported for this symbol" | `OCO`订单不支持该交易对 | | "Quote order qty market orders are not support for this symbol." | 这个交易对,市价单不支持参数`quoteOrderQty` | | "Trailing stop orders are not supported for this symbol." | 此symbol不支持 `trailingDelta` | | | "Order cancel-replace is not supported for this symbol." | 此symbol不支持 `POST /api/v3/order/cancelReplace` 或者 `order.cancelReplace` (WebSocket API) | | | "This symbol is not permitted for this account." | 账户和交易对的权限不一致 (比如 `SPOT`, `MARGIN` 等)。| | | "This symbol is restricted for this account." | 账户没有权限在此交易对交易 (比如账户只拥有 `ISOLATED_MARGIN`权限,则无法下`SPOT` 订单)。 | | | "Order was not canceled due to cancel restrictions." | `cancelRestrictions` 设置为 `ONLY_NEW` 但订单状态不是 `NEW`

`cancelRestrictions` 设置为 `ONLY_PARTIALLY_FILLED` 但订单状态不是 `PARTIALLY_FILLED`。 | | 关于 POST /api/v3/order/cancelReplace 的错误[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#%E5%85%B3%E4%BA%8E-post-apiv3ordercancelreplace-%E7%9A%84%E9%94%99%E8%AF%AF "关于 POST /api/v3/order/cancelReplace 的错误的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ### \-2021 Order cancel-replace partially failed[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2021-order-cancel-replace-partially-failed "-2021 Order cancel-replace partially failed的直接链接") 收到该错误码代表撤单**或者**下单失败。 ### \-2022 Order cancel-replace failed.[​](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2022-order-cancel-replace-failed "-2022 Order cancel-replace failed.的直接链接") 收到该错误码代表撤单**和**下单都失败。 * [10xx -常规服务器或网络问题](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#10xx--%E5%B8%B8%E8%A7%84%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%88%96%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98) * [\-1000 UNKNOWN](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1000-unknown) * [\-1001 DISCONNECTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1001-disconnected) * [\-1002 UNAUTHORIZED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1002-unauthorized) * [\-1003 TOO\_MANY\_REQUESTS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1003-too_many_requests) * [\-1004 SERVER\_BUSY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1004-server_busy) * [\-1006 UNEXPECTED\_RESP](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1006-unexpected_resp) * [\-1007 TIMEOUT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1007-timeout) * [\-1008 SERVER\_BUSY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1008-server_busy) * [\-1014 UNKNOWN\_ORDER\_COMPOSITION](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1014-unknown_order_composition) * [\-1015 TOO\_MANY\_ORDERS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1015-too_many_orders) * [\-1016 SERVICE\_SHUTTING\_DOWN](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1016-service_shutting_down) * [\-1020 UNSUPPORTED\_OPERATION](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1020-unsupported_operation) * [\-1021 INVALID\_TIMESTAMP](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1021-invalid_timestamp) * [\-1022 INVALID\_SIGNATURE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1022-invalid_signature) * [\-1099 Not found, authenticated, or authorized](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1099-not-found-authenticated-or-authorized) * [11xx - 2xxx Request issues](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#11xx---2xxx-request-issues) * [\-1100 ILLEGAL\_CHARS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1100-illegal_chars) * [\-1101 TOO\_MANY\_PARAMETERS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1101-too_many_parameters) * [\-1102 MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1102-mandatory_param_empty_or_malformed) * [\-1103 UNKNOWN\_PARAM](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1103-unknown_param) * [\-1104 UNREAD\_PARAMETERS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1104-unread_parameters) * [\-1105 PARAM\_EMPTY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1105-param_empty) * [\-1106 PARAM\_NOT\_REQUIRED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1106-param_not_required) * [\-1111 BAD\_PRECISION](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1111-bad_precision) * [\-1112 NO\_DEPTH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1112-no_depth) * [\-1114 TIF\_NOT\_REQUIRED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1114-tif_not_required) * [\-1115 INVALID\_TIF](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1115-invalid_tif) * [\-1116 INVALID\_ORDER\_TYPE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1116-invalid_order_type) * [\-1117 INVALID\_SIDE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1117-invalid_side) * [\-1118 EMPTY\_NEW\_CL\_ORD\_ID](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1118-empty_new_cl_ord_id) * [\-1119 EMPTY\_ORG\_CL\_ORD\_ID](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1119-empty_org_cl_ord_id) * [\-1120 BAD\_INTERVAL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1120-bad_interval) * [\-1121 BAD\_SYMBOL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1121-bad_symbol) * [\-1125 INVALID\_LISTEN\_KEY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1125-invalid_listen_key) * [\-1127 MORE\_THAN\_XX\_HOURS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1127-more_than_xx_hours) * [\-1128 OPTIONAL\_PARAMS\_BAD\_COMBO](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1128-optional_params_bad_combo) * [\-1130 INVALID\_PARAMETER](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1130-invalid_parameter) * [\-1131 BAD\_RECV\_WINDOW](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1131-bad_recv_window) * [\-1134 BAD\_STRATEGY\_TYPE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-1134-bad_strategy_type) * [\-2010 NEW\_ORDER\_REJECTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2010-new_order_rejected) * [\-2011 CANCEL\_REJECTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2011-cancel_rejected) * [\-2013 NO\_SUCH\_ORDER](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2013-no_such_order) * [\-2014 BAD\_API\_KEY\_FMT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2014-bad_api_key_fmt) * [\-2015 REJECTED\_MBX\_KEY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2015-rejected_mbx_key) * [\-2016 NO\_TRADING\_WINDOW](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2016-no_trading_window) * [3xxx-5xxx SAPI 具体问题](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#3xxx-5xxx-sapi-%E5%85%B7%E4%BD%93%E9%97%AE%E9%A2%98) * [\-3000 INNER\_FAILURE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3000-inner_failure) * [\-3001 NEED\_ENABLE\_2FA](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3001-need_enable_2fa) * [\-3002 ASSET\_DEFICIENCY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3002-asset_deficiency) * [\-3003 NO\_OPENED\_MARGIN\_ACCOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3003-no_opened_margin_account) * [\-3004 TRADE\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3004-trade_not_allowed) * [\-3005 TRANSFER\_OUT\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3005-transfer_out_not_allowed) * [\-3006 EXCEED\_MAX\_BORROWABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3006-exceed_max_borrowable) * [\-3007 HAS\_PENDING\_TRANSACTION](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3007-has_pending_transaction) * [\-3008 BORROW\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3008-borrow_not_allowed) * [\-3009 ASSET\_NOT\_MORTGAGEABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3009-asset_not_mortgageable) * [\-3010 REPAY\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3010-repay_not_allowed) * [\-3011 BAD\_DATE\_RANGE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3011-bad_date_range) * [\-3012 ASSET\_ADMIN\_BAN\_BORROW](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3012-asset_admin_ban_borrow) * [\-3013 LT\_MIN\_BORROWABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3013-lt_min_borrowable) * [\-3014 ACCOUNT\_BAN\_BORROW](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3014-account_ban_borrow) * [\-3015 REPAY\_EXCEED\_LIABILITY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3015-repay_exceed_liability) * [\-3016 LT\_MIN\_REPAY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3016-lt_min_repay) * [\-3017 ASSET\_ADMIN\_BAN\_MORTGAGE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3017-asset_admin_ban_mortgage) * [\-3018 ACCOUNT\_BAN\_MORTGAGE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3018-account_ban_mortgage) * [\-3019 ACCOUNT\_BAN\_ROLLOUT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3019-account_ban_rollout) * [\-3020 EXCEED\_MAX\_ROLLOUT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3020-exceed_max_rollout) * [\-3021 PAIR\_ADMIN\_BAN\_TRADE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3021-pair_admin_ban_trade) * [\-3022 ACCOUNT\_BAN\_TRADE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3022-account_ban_trade) * [\-3023 WARNING\_MARGIN\_LEVEL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3023-warning_margin_level) * [\-3024 FEW\_LIABILITY\_LEFT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3024-few_liability_left) * [\-3025 INVALID\_EFFECTIVE\_TIME](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3025-invalid_effective_time) * [\-3026 VALIDATION\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3026-validation_failed) * [\-3027 NOT\_VALID\_MARGIN\_ASSET](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3027-not_valid_margin_asset) * [\-3028 NOT\_VALID\_MARGIN\_PAIR](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3028-not_valid_margin_pair) * [\-3029 TRANSFER\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3029-transfer_failed) * [\-3036 ACCOUNT\_BAN\_REPAY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3036-account_ban_repay) * [\-3037 PNL\_CLEARING](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3037-pnl_clearing) * [\-3038 LISTEN\_KEY\_NOT\_FOUND](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3038-listen_key_not_found) * [\-3041 BALANCE\_NOT\_CLEARED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3041-balance_not_cleared) * [\-3042 PRICE\_INDEX\_NOT\_FOUND](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3042-price_index_not_found) * [\-3043 TRANSFER\_IN\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3043-transfer_in_not_allowed) * [\-3044 SYSTEM\_BUSY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3044-system_busy) * [\-3045 SYSTEM](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3045-system) * [\-3999 NOT\_WHITELIST\_USER](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-3999-not_whitelist_user) * [\-4001 CAPITAL\_INVALID](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4001-capital_invalid) * [\-4002 CAPITAL\_IG](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4002-capital_ig) * [\-4003 CAPITAL\_IEV](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4003-capital_iev) * [\-4004 CAPITAL\_UA](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4004-capital_ua) * [\-4005 CAPAITAL\_TOO\_MANY\_REQUEST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4005-capaital_too_many_request) * [\-4006 CAPITAL\_ONLY\_SUPPORT\_PRIMARY\_ACCOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4006-capital_only_support_primary_account) * [\-4007 CAPITAL\_ADDRESS\_VERIFICATION\_NOT\_PASS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4007-capital_address_verification_not_pass) * [\-4008 CAPITAL\_ADDRESS\_TAG\_VERIFICATION\_NOT\_PASS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4008-capital_address_tag_verification_not_pass) * [\-4010 CAPITAL\_WHITELIST\_EMAIL\_CONFIRM](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4010-capital_whitelist_email_confirm) * [\-4011 CAPITAL\_WHITELIST\_EMAIL\_EXPIRED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4011-capital_whitelist_email_expired) * [\-4012 CAPITAL\_WHITELIST\_CLOSE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4012-capital_whitelist_close) * [\-4013 CAPITAL\_WITHDRAW\_2FA\_VERIFY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4013-capital_withdraw_2fa_verify) * [\-4014 CAPITAL\_WITHDRAW\_LOGIN\_DELAY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4014-capital_withdraw_login_delay) * [\-4015 CAPITAL\_WITHDRAW\_RESTRICTED\_MINUTE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4015-capital_withdraw_restricted_minute) * [\-4016 CAPITAL\_WITHDRAW\_RESTRICTED\_PASSWORD](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4016-capital_withdraw_restricted_password) * [\-4017 CAPITAL\_WITHDRAW\_RESTRICTED\_UNBIND\_2FA](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4017-capital_withdraw_restricted_unbind_2fa) * [\-4018 CAPITAL\_WITHDRAW\_ASSET\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4018-capital_withdraw_asset_not_exist) * [\-4019 CAPITAL\_WITHDRAW\_ASSET\_PROHIBIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4019-capital_withdraw_asset_prohibit) * [\-4021 CAPITAL\_WITHDRAW\_AMOUNT\_MULTIPLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4021-capital_withdraw_amount_multiple) * [\-4022 CAPITAL\_WITHDRAW\_MIN\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4022-capital_withdraw_min_amount) * [\-4023 CAPITAL\_WITHDRAW\_MAX\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4023-capital_withdraw_max_amount) * [\-4024 CAPITAL\_WITHDRAW\_USER\_NO\_ASSET](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4024-capital_withdraw_user_no_asset) * [\-4025 CAPITAL\_WITHDRAW\_USER\_ASSET\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4025-capital_withdraw_user_asset_less_than_zero) * [\-4026 CAPITAL\_WITHDRAW\_USER\_ASSET\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4026-capital_withdraw_user_asset_not_enough) * [\-4027 CAPITAL\_WITHDRAW\_GET\_TRAN\_ID\_FAILURE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4027-capital_withdraw_get_tran_id_failure) * [\-4028 CAPITAL\_WITHDRAW\_MORE\_THAN\_FEE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4028-capital_withdraw_more_than_fee) * [\-4029 CAPITAL\_WITHDRAW\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4029-capital_withdraw_not_exist) * [\-4030 CAPITAL\_WITHDRAW\_CONFIRM\_SUCCESS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4030-capital_withdraw_confirm_success) * [\-4031 CAPITAL\_WITHDRAW\_CANCEL\_FAILURE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4031-capital_withdraw_cancel_failure) * [\-4032 CAPITAL\_WITHDRAW\_CHECKSUM\_VERIFY\_FAILURE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4032-capital_withdraw_checksum_verify_failure) * [\-4033 CAPITAL\_WITHDRAW\_ILLEGAL\_ADDRESS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4033-capital_withdraw_illegal_address) * [\-4034 CAPITAL\_WITHDRAW\_ADDRESS\_CHEAT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4034-capital_withdraw_address_cheat) * [\-4035 CAPITAL\_WITHDRAW\_NOT\_WHITE\_ADDRESS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4035-capital_withdraw_not_white_address) * [\-4036 CAPITAL\_WITHDRAW\_NEW\_ADDRESS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4036-capital_withdraw_new_address) * [\-4037 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_FAIL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4037-capital_withdraw_resend_email_fail) * [\-4038 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_TIME\_OUT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4038-capital_withdraw_resend_email_time_out) * [\-4039 CAPITAL\_USER\_EMPTY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4039-capital_user_empty) * [\-4041 CAPITAL\_MINUTE\_TOO\_SMALL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4041-capital_minute_too_small) * [\-4042 CAPITAL\_CHARGE\_NOT\_RESET](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4042-capital_charge_not_reset) * [\-4043 CAPITAL\_ADDRESS\_TOO\_MUCH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4043-capital_address_too_much) * [\-4044 CAPITAL\_BLACKLIST\_COUNTRY\_GET\_ADDRESS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4044-capital_blacklist_country_get_address) * [\-4045 CAPITAL\_GET\_ASSET\_ERROR](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4045-capital_get_asset_error) * [\-4046 CAPITAL\_AGREEMENT\_NOT\_CONFIRMED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4046-capital_agreement_not_confirmed) * [\-4047 CAPITAL\_DATE\_INTERVAL\_LIMIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4047-capital_date_interval_limit) * [\-4060 CAPITAL\_WITHDRAW\_USER\_ASSET\_LOCK\_DEPOSIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-4060-capital_withdraw_user_asset_lock_deposit) * [\-5001 ASSET\_DRIBBLET\_CONVERT\_SWITCH\_OFF](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5001-asset_dribblet_convert_switch_off) * [\-5002 ASSET\_ASSET\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5002-asset_asset_not_enough) * [\-5003 ASSET\_USER\_HAVE\_NO\_ASSET](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5003-asset_user_have_no_asset) * [\-5004 USER\_OUT\_OF\_TRANSFER\_FLOAT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5004-user_out_of_transfer_float) * [\-5005 USER\_ASSET\_AMOUNT\_IS\_TOO\_LOW](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5005-user_asset_amount_is_too_low) * [\-5006 USER\_CAN\_NOT\_REQUEST\_IN\_24\_HOURS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5006-user_can_not_request_in_24_hours) * [\-5007 AMOUNT\_OVER\_ZERO](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5007-amount_over_zero) * [\-5008 ASSET\_WITHDRAW\_WITHDRAWING\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5008-asset_withdraw_withdrawing_not_enough) * [\-5009 PRODUCT\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5009-product_not_exist) * [\-5010 TRANSFER\_FAIL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5010-transfer_fail) * [\-5011 FUTURE\_ACCT\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5011-future_acct_not_exist) * [\-5012 TRANSFER\_PENDING](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5012-transfer_pending) * [\-5021 PARENT\_SUB\_HAVE\_NO\_RELATION](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5021-parent_sub_have_no_relation) * [\-5012 FUTURE\_ACCT\_OR\_SUBRELATION\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-5012-future_acct_or_subrelation_not_exist) * [6XXX - 币安宝相关](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#6xxx---%E5%B8%81%E5%AE%89%E5%AE%9D%E7%9B%B8%E5%85%B3) * [\-6001 DAILY\_PRODUCT\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6001-daily_product_not_exist) * [\-6003 DAILY\_PRODUCT\_NOT\_ACCESSIBLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6003-daily_product_not_accessible) * [\-6004 DAILY\_PRODUCT\_NOT\_PURCHASABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6004-daily_product_not_purchasable) * [\-6005 DAILY\_LOWER\_THAN\_MIN\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6005-daily_lower_than_min_purchase_limit) * [\-6006 DAILY\_REDEEM\_AMOUNT\_ERROR](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6006-daily_redeem_amount_error) * [\-6007 DAILY\_REDEEM\_TIME\_ERROR](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6007-daily_redeem_time_error) * [\-6008 DAILY\_PRODUCT\_NOT\_REDEEMABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6008-daily_product_not_redeemable) * [\-6009 REQUEST\_FREQUENCY\_TOO\_HIGH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6009-request_frequency_too_high) * [\-6011 EXCEEDED\_USER\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6011-exceeded_user_purchase_limit) * [\-6012 BALANCE\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6012-balance_not_enough) * [\-6013 PURCHASING\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6013-purchasing_failed) * [\-6014 UPDATE\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6014-update_failed) * [\-6015 EMPTY\_REQUEST\_BODY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6015-empty_request_body) * [\-6016 PARAMS\_ERR](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6016-params_err) * [\-6017 NOT\_IN\_WHITELIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6017-not_in_whitelist) * [\-6018 ASSET\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6018-asset_not_enough) * [\-6019 PENDING](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6019-pending) * [\-6020 PROJECT\_NOT\_EXISTS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-6020-project_not_exists) * [70xx - 期货](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#70xx---%E6%9C%9F%E8%B4%A7) * [\-7001 FUTURES\_BAD\_DATE\_RANGE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-7001-futures_bad_date_range) * [\-7002 FUTURES\_BAD\_TYPE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-7002-futures_bad_type) * [20xxx - 合约/现货策略交易](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#20xxx---%E5%90%88%E7%BA%A6%E7%8E%B0%E8%B4%A7%E7%AD%96%E7%95%A5%E4%BA%A4%E6%98%93) * [\-20121 Invalid symbol](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20121-invalid-symbol) * [\-20124 Invalid algo id or it has been completed](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20124-invalid-algo-id-or-it-has-been-completed) * [\-20130 Invalid data sent for a parameter](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20130-invalid-data-sent-for-a-parameter) * [\-20132 The client algo id is duplicated](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20132-the-client-algo-id-is-duplicated) * [\-20194 Duration is too short to execute all required quantity](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20194-duration-is-too-short-to-execute-all-required-quantity) * [\-20195 The total size is too small](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20195-the-total-size-is-too-small) * [\-20196 The total size is too large](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20196-the-total-size-is-too-large) * [\-20198 Reach the max open orders allowed](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20198-reach-the-max-open-orders-allowed) * [\-20204 The notional of USD is less or more than the limit](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-20204-the-notional-of-usd-is-less-or-more-than-the-limit) * [过滤器故障](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#%E8%BF%87%E6%BB%A4%E5%99%A8%E6%95%85%E9%9A%9C) * [10xxx - 质押借币](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#10xxx---%E8%B4%A8%E6%8A%BC%E5%80%9F%E5%B8%81) * [\-10001 SYSTEM\_MAINTENANCE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10001-system_maintenance) * [\-10002 INVALID\_INPUT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10002-invalid_input) * [\-10005 NO\_RECORDS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10005-no_records) * [\-10007 COIN\_NOT\_LOANABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10007-coin_not_loanable) * [\-10008 COIN\_NOT\_LOANABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10008-coin_not_loanable) * [\-10009 COIN\_NOT\_COLLATERAL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10009-coin_not_collateral) * [\-10010 COIN\_NOT\_COLLATERAL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10010-coin_not_collateral) * [\-10011 INSUFFICIENT\_ASSET](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10011-insufficient_asset) * [\-10012 INVALID\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10012-invalid_amount) * [\-10013 INSUFFICIENT\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10013-insufficient_amount) * [\-10015 DEDUCTION\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10015-deduction_failed) * [\-10016 LOAN\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10016-loan_failed) * [\-10017 REPAY\_EXCEED\_DEBT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10017-repay_exceed_debt) * [\-10018 INVALID\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10018-invalid_amount) * [\-10019 CONFIG\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10019-config_not_exist) * [\-10020 UID\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10020-uid_not_exist) * [\-10021 ORDER\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10021-order_not_exist) * [\-10022 INVALID\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10022-invalid_amount) * [\-10023 ADJUST\_LTV\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10023-adjust_ltv_failed) * [\-10024 ADJUST\_LTV\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10024-adjust_ltv_not_supported) * [\-10025 REPAY\_FAILED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10025-repay_failed) * [\-10026 INVALID\_PARAMETER](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10026-invalid_parameter) * [\-10028 INVALID\_PARAMETER](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10028-invalid_parameter) * [\-10029 AMOUNT\_TOO\_SMALL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10029-amount_too_small) * [\-10030 AMOUNT\_TOO\_LARGE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10030-amount_too_large) * [\-10031 QUOTA\_REACHED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10031-quota_reached) * [\-10032 REPAY\_NOT\_AVAILABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10032-repay_not_available) * [\-10034 REPAY\_NOT\_AVAILABLE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10034-repay_not_available) * [\-10039 AMOUNT\_TOO\_SMALL](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10039-amount_too_small) * [\-10040 AMOUNT\_TOO\_LARGE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10040-amount_too_large) * [\-10041 INSUFFICIENT\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10041-insufficient_amount) * [\-10042 ASSET\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10042-asset_not_supported) * [\-10043 ASSET\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10043-asset_not_supported) * [\-10044 QUOTA\_REACHED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10044-quota_reached) * [\-10045 COLLTERAL\_REPAY\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10045-collteral_repay_not_supported) * [\-10046 EXCEED\_MAX\_ADJUSTMENT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10046-exceed_max_adjustment) * [\-10047 REGION\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-10047-region_not_supported) * [13xxx - 杠杆代币](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#13xxx---%E6%9D%A0%E6%9D%86%E4%BB%A3%E5%B8%81) * [\-13000 BLVT\_FORBID\_REDEEM](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13000-blvt_forbid_redeem) * [\-13001 BLVT\_EXCEED\_DAILY\_LIMIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13001-blvt_exceed_daily_limit) * [\-13002 BLVT\_EXCEED\_TOKEN\_DAILY\_LIMIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13002-blvt_exceed_token_daily_limit) * [\-13003 BLVT\_FORBID\_PURCHASE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13003-blvt_forbid_purchase) * [\-13004 BLVT\_EXCEED\_DAILY\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13004-blvt_exceed_daily_purchase_limit) * [\-13005 BLVT\_EXCEED\_TOKEN\_DAILY\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13005-blvt_exceed_token_daily_purchase_limit) * [\-13006 BLVT\_PURCHASE\_LESS\_MIN\_AMOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13006-blvt_purchase_less_min_amount) * [\-13007 BLVT\_PURCHASE\_AGREEMENT\_NOT\_SIGN](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-13007-blvt_purchase_agreement_not_sign) * [12xxx - 流动性挖矿](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#12xxx---%E6%B5%81%E5%8A%A8%E6%80%A7%E6%8C%96%E7%9F%BF) * [\-12014 TOO MANY REQUESTS](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-12014-too-many-requests) * [18xxx - 币安码](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#18xxx---%E5%B8%81%E5%AE%89%E7%A0%81) * [\-18002](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18002) * [\-18003](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18003) * [\-18004](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18004) * [\-18005](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18005) * [\-18006](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18006) * [\-18007](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-18007) * [21xxx - 統一帳戶](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#21xxx---%E7%B5%B1%E4%B8%80%E5%B8%B3%E6%88%B6) * [\-21001 USER\_IS\_NOT\_UNIACCOUNT](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21001-user_is_not_uniaccount) * [\-21002 UNI\_ACCOUNT\_CANT\_TRANSFER\_FUTURE](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21002-uni_account_cant_transfer_future) * [\-21003 NET\_ASSET\_MUST\_LTE\_RATIO](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21003-net_asset_must_lte_ratio) * [\-21004 USER\_NO\_LIABILITY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21004-user_no_liability) * [\-21005 NO\_ENOUGH\_ASSET](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21005-no_enough_asset) * [\-21006 HAD\_IN\_PROCESS\_REPAY](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21006-had_in_process_repay) * [\-21007 IN\_FORCE\_LIQUIDATION](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-21007-in_force_liquidation) * [订单拒绝错误](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#%E8%AE%A2%E5%8D%95%E6%8B%92%E7%BB%9D%E9%94%99%E8%AF%AF) * [关于 POST /api/v3/order/cancelReplace 的错误](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#%E5%85%B3%E4%BA%8E-post-apiv3ordercancelreplace-%E7%9A%84%E9%94%99%E8%AF%AF) * [\-2021 Order cancel-replace partially failed](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2021-order-cancel-replace-partially-failed) * [\-2022 Order cancel-replace failed.](https://developers.binance.com/docs/zh-CN/advanced_earn/error-code#-2022-order-cancel-replace-failed) --- # K线 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#__docusaurus_skipToContent_fallback) 本页总览 K线 == 描述[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E6%8F%8F%E8%BF%B0 "描述的直接链接") ---------------------------------------------------------------------------------------------------------------- 获取某一交易对的K线/蜡烛图数据,包含开盘价、最高价、最低价、收盘价及成交量等信息,适用于图表绘制和行情分析。 HTTP Request[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------ GET `/bapi/defi/v1/public/alpha-trade/klines` 完整URL示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%AE%8C%E6%95%B4url%E7%A4%BA%E4%BE%8B "完整URL示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- [https://www.binance.com/bapi/defi/v1/public/alpha-trade/klines?interval=1h&limit=2&symbol=ALPHA\_175USDT](https://www.binance.com/bapi/defi/v1/public/alpha-trade/klines?interval=1h&limit=2&symbol=ALPHA_175USDT) 参数[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%8F%82%E6%95%B0 "参数的直接链接") ---------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必填 | 描述 | | --- | --- | --- | --- | | symbol | STRING | 是 | 例如 "ALPHA\_175USDT",需使用Token列表中的代币ID | | interval | STRING | 是 | 例如 "1h",支持时间区间:1s, 15s, 1m、3m、5m、15m、30m、1h、2h、4h、6h、8h、12h、1d、3d、1w、1M | | limit | INT | 否 | 默认500,最大1500,返回的K线数量 | | startTime | LONG | 否 | 起始时间戳(毫秒) | | endTime | LONG | 否 | 结束时间戳(毫秒) | 响应结构[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84 "响应结构的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- * `code`: 字符串,响应状态码,"000000"表示成功。 * `message`: 字符串,通常用于返回附加消息或错误提示,此处为空。 * `messageDetail`: 字符串,消息详细信息,此处为空。 * `success`: 布尔值,表示请求是否成功,此处为true。 * `data`: 嵌套数组,每个内层数组包含多个字符串,表示一根K线数据内容: 1. 开盘时间(毫秒时间戳,字符串),如 "1752642000000" 2. 开盘价(字符串),如 "0.00171473" 3. 最高价(字符串),如 "0.00172515" 4. 最低价(字符串),如 "0.00171473" 5. 收盘价(字符串),如 "0.00172515" 6. 成交量(字符串),如 "1771.86000000" 7. 收盘时间(毫秒时间戳,字符串),如 "1752645599999" 8. 计价资产成交量(字符串),如 "3.05093481" 9. 成交笔数(字符串整型),如 "2" 10. 主动买入基础资产成交量(字符串),如 "1771.86000000" 11. 主动买入计价资产成交量(字符串),如 "3.05093481" 12. 静态值0,请忽略 响应示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "", "messageDetail": "", "success": true, "data": [ [ "1752642000000", "0.00171473", "0.00172515", "0.00171473", "0.00172515", "1771.86000000", "1752645599999", "3.05093481", "2", "1771.86000000", "3.05093481", 0 ] ]} * [描述](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E6%8F%8F%E8%BF%B0) * [HTTP Request](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#http-request) * [完整URL示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%AE%8C%E6%95%B4url%E7%A4%BA%E4%BE%8B) * [参数](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%8F%82%E6%95%B0) * [响应结构](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84) * [响应示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/klines#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # APIs Spec | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/babt/apis-spec#__docusaurus_skipToContent_fallback) 本页总览 Abstract[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#abstract "Abstract的直接链接") ----------------------------------------------------------------------------------------------- A soulbound token is a token that is bound to another Non-Fungible Token when it is minted, and cannot be transferred/moved after that. APIs Map - Extends from ERC721[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#apis-map---extends-from-erc721 "APIs Map - Extends from ERC721的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- ![apis-map](https://developers.binance.com/docs/zh-CN/assets/images/sbt-apis-map-a2c7b02e0189fd2ae964ed5947d1ade5.png) Specification[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#specification "Specification的直接链接") -------------------------------------------------------------------------------------------------------------- // SPDX-License-Identifier: MITpragma solidity ^0.8.0;interface ISBT721 { /** * @dev This emits when a new token is created and bound to an account by * any mechanism. * Note: For a reliable `to` parameter, retrieve the transaction's * authenticated `to` field. */ event Attest(address indexed to, uint256 indexed tokenId); /** * @dev This emits when an existing SBT is revoked from an account and * destroyed by any mechanism. * Note: For a reliable `from` parameter, retrieve the transaction's * authenticated `from` field. */ event Revoke(address indexed from, uint256 indexed tokenId); /** * @dev This emits when an existing SBT is burned by an account */ event Burn(address indexed from, uint256 indexed tokenId); /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Mints SBT * * Requirements: * * - `to` must be valid. * - `to` must not exist. * * Emits a {Attest} event. * Emits a {Transfer} event. * @return The tokenId of the minted SBT */ function attest(address to) external returns (uint256); /** * @dev Revokes SBT * * Requirements: * * - `from` must exist. * * Emits a {Revoke} event. * Emits a {Transfer} event. */ function revoke(address from) external; /** * @notice At any time, an SBT receiver must be able to * disassociate themselves from an SBT publicly through calling this * function. * * Emits a {Burn} event. * Emits a {Transfer} event. */ function burn() external; /** * @notice Count all SBTs assigned to an owner * @dev SBTs assigned to the zero address is considered invalid, and this * function throws for queries about the zero address. * @param owner An address for whom to query the balance * @return The number of SBTs owned by `owner`, possibly zero */ function balanceOf(address owner) external view returns (uint256); /** * @param from The address of the SBT owner * @return The tokenId of the owner's SBT, and throw an error if there is no SBT belongs to the given address */ function tokenIdOf(address from) external view returns (uint256); /** * @notice Find the address bound to a SBT * @dev SBTs assigned to zero address are considered invalid, and queries * about them do throw. * @param tokenId The identifier for an SBT * @return The address of the owner bound to the SBT */ function ownerOf(uint256 tokenId) external view returns (address); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256);} Mainnet[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#mainnet "Mainnet的直接链接") -------------------------------------------------------------------------------------------- | Network | Contract Address | | --- | --- | | BSC | [Proxy](https://bscscan.com/address/0x2b09d47d550061f995a3b5c6f0fd58005215d7c8) | Testnet[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#testnet "Testnet的直接链接") -------------------------------------------------------------------------------------------- | Network | Contract Address | | --- | --- | | BSC Testnet | [Proxy](https://testnet.bscscan.com/address/0x984E6a7b9cb73cB7884c9ca9b1Ee625546F9D0E3)
[Proxy Admin](https://testnet.bscscan.com/address/0x2CDB8E6C27Fa7bD71F660f1162a0388BF3967968#tokentxns) | | Goerli | [Proxy](https://goerli.etherscan.io/address/0x984E6a7b9cb73cB7884c9ca9b1Ee625546F9D0E3)
[Proxy Admin](https://goerli.etherscan.io/address/0x2CDB8E6C27Fa7bD71F660f1162a0388BF3967968) | FAQ[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#faq "FAQ的直接链接") -------------------------------------------------------------------------------- ### How to get the SBTs on testnet?[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#how-to-get-the-sbts-on-testnet "How to get the SBTs on testnet?的直接链接") If you want to mint the BAB Token to wallet accounts, please fill in the [form](https://forms.gle/9Diw8k7UrgsRp9kd8) . ### How to check if an account holds BABT or not? Any Code Example?[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#how-to-check-if-an-account-holds-babt-or-not-any-code-example "How to check if an account holds BABT or not? Any Code Example?的直接链接") To invoke the `balanceOf` method with the wallet address and it will return 0 or 1. \-> [Code Sandbox](https://codesandbox.io/s/babt-itiqdn?file=/src/App.tsx) const Web3 = require('web3')const provider = new Web3.providers.HttpProvider('https://data-seed-prebsc-1-s1.binance.org:8545')const web3 = new Web3(provider)const contractInstance = new web3.eth.Contract(abi, '0x2B09d47D550061f995A3b5C6F0Fd58005215D7c8')// 0 - does not have any SBT// 1 - has a SBTconst balance = await contractInstance.methods.balanceOf(address).call() ### How to recognize the user if he/she remint a new BAB token to another wallet address?[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#how-to-recognize-the-user-if-heshe-remint-a-new-bab-token-to-another-wallet-address "How to recognize the user if he/she remint a new BAB token to another wallet address?的直接链接") Don't use `tokenId` as the identity of a KYC user, because the user can revoke the old BAB token and mint a new one to another wallet, in this case, the `tokenId` will change. We now have exposed a new k/v named `id` to the token metadata. You can use the `id` as the identity and for the same person, `id` will never be changed. The flow diagram: ![flow-diagram](https://developers.binance.com/docs/zh-CN/assets/images/babt-remint-8116d3106166e5d8255dc4de1013f6c7.png) From a security perspective, we've utilized an encryption algorithm to prevent the `id` been inferred by the hash cracking(like the rainbow table). From a privacy perspective, if the user remints his/her BAB token to a new wallet, we will return empty when someone accesses the old token's metadata so that the others can't relate those two different wallets by the `id`. The metadata will look like the following: { "id": "0x7fef65adeab075496445d6d81956dffd32b57883fa263d0cda96cf3ca4590622", "description": "Binance Account Bound Token", "externalUrl": "https://safu.im/U9eeKjE4", "image": "https://public.nftstatic.com/images/babt/token-dark.gif", "name": "BABT", "attributes": []} Media Resources[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#media-resources "Media Resources的直接链接") -------------------------------------------------------------------------------------------------------------------- * [Logo](https://public.nftstatic.com/images/babt/token.png) * [NFT](https://public.nftstatic.com/images/babt/token-dark.gif) Refs[​](https://developers.binance.com/docs/zh-CN/babt/apis-spec#refs "Refs的直接链接") ----------------------------------------------------------------------------------- * [EIP-721: Non-Fungible Token Standard](https://eips.ethereum.org/EIPS/eip-721) * [EIPs/eip-747.md at master · ethereum/EIPs](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-747.md) * [EIP-4973: Account-bound Tokens](https://eips.ethereum.org/EIPS/eip-4973) * [EIP-5114: Soulbound Token](https://eips.ethereum.org/EIPS/eip-5114) * [Abstract](https://developers.binance.com/docs/zh-CN/babt/apis-spec#abstract) * [APIs Map - Extends from ERC721](https://developers.binance.com/docs/zh-CN/babt/apis-spec#apis-map---extends-from-erc721) * [Specification](https://developers.binance.com/docs/zh-CN/babt/apis-spec#specification) * [Mainnet](https://developers.binance.com/docs/zh-CN/babt/apis-spec#mainnet) * [Testnet](https://developers.binance.com/docs/zh-CN/babt/apis-spec#testnet) * [FAQ](https://developers.binance.com/docs/zh-CN/babt/apis-spec#faq) * [How to get the SBTs on testnet?](https://developers.binance.com/docs/zh-CN/babt/apis-spec#how-to-get-the-sbts-on-testnet) * [How to check if an account holds BABT or not? Any Code Example?](https://developers.binance.com/docs/zh-CN/babt/apis-spec#how-to-check-if-an-account-holds-babt-or-not-any-code-example) * [How to recognize the user if he/she remint a new BAB token to another wallet address?](https://developers.binance.com/docs/zh-CN/babt/apis-spec#how-to-recognize-the-user-if-heshe-remint-a-new-bab-token-to-another-wallet-address) * [Media Resources](https://developers.binance.com/docs/zh-CN/babt/apis-spec#media-resources) * [Refs](https://developers.binance.com/docs/zh-CN/babt/apis-spec#refs) --- # Time Weighted Average Price(Twap) New Order (TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#__docusaurus_skipToContent_fallback) 本页总览 时间加权平均价格策略(Twap)下单(TRADE) ========================= 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- 发送Twap下单 仅支持U本位合约 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/algo/futures/newOrderTwap` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **3000** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 eg. BTCUSDT | | side | ENUM | YES | 买卖方向 ( BUY or SELL ) | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填BOTH;在双向持仓模式下必填,且仅可选择 LONG 或 SHORT | | quantity | DECIMAL | YES | 下单数量, 以合约币种(base asset)个数下单; 名义价值 (`quantity` \* `标记价格(base asset)`) 需要大于 1,000 USDT,且不超过 1,000,000 USDT | | duration | LONG | YES | 请请以秒为单位发送\[300,86400\] | | clientAlgoId | STRING | NO | 必须传入32位,如果未发送,则自动生成 | | reduceOnly | BOOLEAN | NO | true, false; 非双开模式下默认false;双开模式下不接受此参数; 开仓不接受此参数 | | limitPrice | DECIMAL | NO | 限价单价格; 若未发送,则以市场价下单 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 最大所有策略订单挂单数量: 30。 > * 杠杆倍数和持仓模式与您的合约账户设置相同,您可以通过合约交易页面设置或者通过fapi设置。 > * 收到 `"success": true` 不代表您的订单一定会被执行。请通过查询订单接口(`GET sapi/v1/algo/futures/openOrders` 或者 `GET sapi/v1/algo/futures/historicalOrders`)以获取订单状态。 例如: 如果您的合约账户余额不足,或者开仓使用了`reduce only`参数,或者您下单选择的持仓模式与您设置的不符,这些情况您都会收到响应 `"success": true`,但订单状态会显示为 `expired`,代表订单过期。 > * `quantity` \* 60 / `duration` 必须大于minQty。 > * `duration` 不能小于5分钟,且不能大于24小时。 > * 对于U本位交割合约, TWAP 的结束时间必须早于交割时间1小时。 > * 您的 API Key 需要开通 `允许合约交易` 权限 > * 请使用Base URL: [https://api.binance.com](https://api.binance.com/) > 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- { "clientAlgoId": "65ce1630101a480b85915d7e11fd5078", //用户自定义策略订单ID "success": true, "code": 0, "msg": "OK"} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/future-algo/Time-Weighted-Average-Price-New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Change Log | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect#__docusaurus_skipToContent_fallback) 本页总览 Change Log ========== ### Nov 25, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#nov-25-2025 "Nov 25, 2025的直接链接") * Added userData in webhook and query-order-detail API. ### Oct 22, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#oct-22-2025 "Oct 22, 2025的直接链接") * Added p2p-only trading pair API ### Oct 20, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#oct-20-2025 "Oct 20, 2025的直接链接") * Added new field `webhookEventType` in the webhook payload. ### Oct 15, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#oct-15-2025 "Oct 15, 2025的直接链接") * Support 1024-bits RSA keys for enhanced security. ### Sep 10, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#sep-10-2025 "Sep 10, 2025的直接链接") * Added typical flow. ### Jul 24, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#jul-24-2025 "Jul 24, 2025的直接链接") * Added convert feature. * Added convert-related fields in the webhook payload. * Added convert-related fields in the query order detail API response. ### Jul 7, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#jul-7-2025 "Jul 7, 2025的直接链接") * Add REVOLUT, PIX payment methods examples to get payment method list API. * Add REVOLUT, PIX payment methods examples to get payment method list v2 API. Add lock crypto & net\_receive example to pre-order API. ======================================================== ### Jun 26, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#jun-26-2025 "Jun 26, 2025的直接链接") * Added swap-related fields to the webhook payload. ### May 26, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#may-26-2025 "May 26, 2025的直接链接") * Added buy any token (swap) section. * Added send primary mode section. * Added subtype of `FIAT_AMOUNT` and `CRYPTO_AMOUNT` for `LOCK_ORDER_ATTRIBUTES` customization capability. * Added customization capability of `NET_RECEIVE`. ### May 19, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#may-19-2025 "May 19, 2025的直接链接") * Added openUserId field in query order detail API and webhook payload. * Added LOCK\_ORDER\_ATTRIBUTES customization capability for amount for pre-order API. ### May 12, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect#may-12-2025 "May 12, 2025的直接链接") * Added buy any token feature. * Added new order status and state flow. * Added new error codes. * get payment method list API * Added `contractAddress` field. * get estimated quote API * Added `contractAddress`, `address` field. * pre-order API * Added `contractAddress` field. * query order detail API * Added `contractAddress` field. * Added `swapDetailInfoVo` field. ### December 25, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect#december-25-2024 "December 25, 2024的直接链接") * Added customization support. ### December 18, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect#december-18-2024 "December 18, 2024的直接链接") * Added Off-ramp (Sell) APIs. ### September 27, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect#september-27-2024 "September 27, 2024的直接链接") * Added get payment method list v2 API. * Added pay method code and pay method sub code in get estimated quote API response. * Added redirectDeepLink,failRedirectDeepLink and clientIp fields in pre-order API request. ### August 9, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect#august-9-2024 "August 9, 2024的直接链接") * Added revenue sharing related fields in API response. ### July 25, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect#july-25-2024 "July 25, 2024的直接链接") * Adjusted the data structure of API response. * [Nov 25, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#nov-25-2025) * [Oct 22, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#oct-22-2025) * [Oct 20, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#oct-20-2025) * [Oct 15, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#oct-15-2025) * [Sep 10, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#sep-10-2025) * [Jul 24, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#jul-24-2025) * [Jul 7, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#jul-7-2025) * [Jun 26, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#jun-26-2025) * [May 26, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#may-26-2025) * [May 19, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#may-19-2025) * [May 12, 2025](https://developers.binance.com/docs/zh-CN/binance_connect#may-12-2025) * [December 25, 2024](https://developers.binance.com/docs/zh-CN/binance_connect#december-25-2024) * [December 18, 2024](https://developers.binance.com/docs/zh-CN/binance_connect#december-18-2024) * [September 27, 2024](https://developers.binance.com/docs/zh-CN/binance_connect#september-27-2024) * [August 9, 2024](https://developers.binance.com/docs/zh-CN/binance_connect#august-9-2024) * [July 25, 2024](https://developers.binance.com/docs/zh-CN/binance_connect#july-25-2024) --- # token列表 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#__docusaurus_skipToContent_fallback) 本页总览 Token列表 ======= 描述[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E6%8F%8F%E8%BF%B0 "描述的直接链接") -------------------------------------------------------------------------------------------------------------------- 获取所有可用ALPHA代币的列表,包括它们的ID和符号。用于在其它接口构造symbol参数时查找代币ID。 HTTP Request[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- GET `/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list` 完整URL[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%AE%8C%E6%95%B4url "完整URL的直接链接") ----------------------------------------------------------------------------------------------------------------------------- [https://www.binance.com/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list](https://www.binance.com/bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list) 参数[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%8F%82%E6%95%B0 "参数的直接链接") -------------------------------------------------------------------------------------------------------------------- 无 响应结构[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84 "响应结构的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ * `code`:字符串(例如,000000表示成功) * `message`: 空,通常用于返回信息提示。 * `messageDetail`: 空,通常用于更详细信息或错误描述。 * `success`: 布尔值,表示此次API调用是否成功(true)。 * `data`:对象数组,每个对象代表一个代币,包含字段: * `alphaId`:整数(ALPHA代币ID,例如ALPHA\_175) * `symbol`:字符串(代币符号,例如“USDT”) * `name`:字符串(代币全名,例如“USDT”) * `chainId`: 字符串 (链ID) * `contractAddress`: 字符串 (合约地址) * 其他字段:可能包括小数位、网络信息等。 响应示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ { "code": "000000", "message": "", "messageDetail": "", "success": true, "data": [ { "tokenId": "3F350C8B3621770A673159B7A19BC034", "chainId": "56", "chainIconUrl": "https://bin.bnbstatic.com/image/admin_mgs_image_upload/20250228/d0216ce4-a3e9-4bda-8937-4a6aa943ccf2.png", "chainName": "BSC", "contractAddress": "0xcf640fdf9b3d9e45cbd69fda91d7e22579c14444", "name": "gorilla", "symbol": "gorilla", "iconUrl": "https://bin.bnbstatic.com/images/web3-data/public/token/logos/248b5406f88a4ee28913a29107875339.png", "price": "0.00080595003978242023", "percentChange24h": "-7.42", "volume24h": "14847.711222633409558029675", "marketCap": "805950.03978242", "fdv": "805950.03978242", "liquidity": "263192.72813121626034", "totalSupply": "1000000000", "circulatingSupply": "1000000000", "holders": "7120", "decimals": 18, "listingCex": false, "hotTag": false, "cexCoinName": "", "canTransfer": false, "denomination": 1, "offline": false, "tradeDecimal": 8, "alphaId": "ALPHA_175", "offsell": false, "priceHigh24h": "0.00088873864475645879", "priceLow24h": "0.0008020805165487083", "count24h": "166", "onlineTge": false, "onlineAirdrop": false, "score": 1, "cexOffDisplay": false, "stockState": false, "listingTime": 1746686700000, "mulPoint": 1, "bnExclusiveState": false } ]} 使用示例[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B "使用示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ 先调用此接口以映射代币符号到ALPHA代币ID。 * [描述](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E6%8F%8F%E8%BF%B0) * [HTTP Request](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#http-request) * [完整URL](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%AE%8C%E6%95%B4url) * [参数](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%8F%82%E6%95%B0) * [响应结构](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%93%8D%E5%BA%94%E7%BB%93%E6%9E%84) * [响应示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) * [使用示例](https://developers.binance.com/docs/zh-CN/alpha/market-data/rest-api/token-list#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B) --- # 快速开始 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/quick-start#__docusaurus_skipToContent_fallback) 本页总览 快速开始 ==== API Key 权限设置[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE "API Key 权限设置的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- * 新创建的API的默认权限是 `只读`。 * 如果需要通过API提款, 需要在UI修改权限, 选中 `允许提现`。 账户[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#%E8%B4%A6%E6%88%B7 "账户的直接链接") ----------------------------------------------------------------------------------------------- ### 现货账户[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7 "现货账户的直接链接") 新注册的币安账号都会有一个现货(`SPOT`)账号。 ### 杠杆账户[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7 "杠杆账户的直接链接") 为了开设杠杆(`MARGIN`)账户, 可以参考[Binance杠杆交易账户设置指南](https://www.binance.vision/zh/tutorials/binance-margin-trading-guide) API 代码库[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93 "API 代码库的直接链接") ---------------------------------------------------------------------------------------------------------------------- ### Connectors[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#connectors "Connectors的直接链接") 以下有一些轻量级的代码库,使不同语言的用户能够直接调用现货的 Binance 公共 API: * Python [https://github.com/binance/binance-connector-python](https://github.com/binance/binance-connector-python) * JavaScript [https://github.com/binance/binance-connector-js](https://github.com/binance/binance-connector-js) * Ruby [https://github.com/binance/binance-connector-ruby](https://github.com/binance/binance-connector-ruby) * DotNET C# [https://github.com/binance/binance-connector-dotnet](https://github.com/binance/binance-connector-dotnet) * Java [https://github.com/binance/binance-connector-java](https://github.com/binance/binance-connector-java) * Rust [https://github.com/binance/binance-spot-connector-rust](https://github.com/binance/binance-spot-connector-rust) * PHP [https://github.com/binance/binance-connector-php](https://github.com/binance/binance-connector-php) * Go [https://github.com/binance/binance-connector-go](https://github.com/binance/binance-connector-go) ### Postman Collections[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#postman-collections "Postman Collections的直接链接") Postman 集合现已推出。推荐给寻求快速和轻松地开始使用 API 的新用户。 [https://github.com/binance/binance-api-postman](https://github.com/binance/binance-api-postman) ### Swagger[​](https://developers.binance.com/docs/zh-CN/algo/quick-start#swagger "Swagger的直接链接") 以下有提供包含 RESTful API 的 OpenAPI 规范的 YAML 文件,以及可供参考的 Swagger UI 页面。 [https://github.com/binance/binance-api-swagger](https://github.com/binance/binance-api-swagger) * [API Key 权限设置](https://developers.binance.com/docs/zh-CN/algo/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE) * [账户](https://developers.binance.com/docs/zh-CN/algo/quick-start#%E8%B4%A6%E6%88%B7) * [现货账户](https://developers.binance.com/docs/zh-CN/algo/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7) * [杠杆账户](https://developers.binance.com/docs/zh-CN/algo/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7) * [API 代码库](https://developers.binance.com/docs/zh-CN/algo/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93) * [Connectors](https://developers.binance.com/docs/zh-CN/algo/quick-start#connectors) * [Postman Collections](https://developers.binance.com/docs/zh-CN/algo/quick-start#postman-collections) * [Swagger](https://developers.binance.com/docs/zh-CN/algo/quick-start#swagger) --- # Websocket行情推送 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#__docusaurus_skipToContent_fallback) 本页总览 WebSocket 行情接口 ============== 基本信息[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "基本信息的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- * 本篇所列出的所有wss接口的baseurl为: `wss://nbstream.binance.com/w3w/wsa/stream` 实时订阅/取消数据流[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%AE%9E%E6%97%B6%E8%AE%A2%E9%98%85%E5%8F%96%E6%B6%88%E6%95%B0%E6%8D%AE%E6%B5%81 "实时订阅/取消数据流的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 以下数据可以通过 WebSocket 发送以实现订阅或取消订阅数据流。示例如下. * 请求中的id被用作唯一标识来区分来回传递的消息。以下格式被接受: * 64位有符号整数 * 字母数字字符串;最大长度36 * null * 如果相应内容中的result 为 null,表示请求发送成功。 ### 订阅一个信息流[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81 "订阅一个信息流的直接链接") 请求 { "method": "SUBSCRIBE", "params": [ "came@allTokens@ticker24" ], "id": 1} 响应 { "result": null, "id": 1} * * * ### 取消订阅一个信息流[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81 "取消订阅一个信息流的直接链接") 请求 { "method": "UNSUBSCRIBE", "params": [ "came@allTokens@ticker24" ], "id": 1} 响应 { "result": null, "id": 1} * * * ### 已订阅信息流[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%B7%B2%E8%AE%A2%E9%98%85%E4%BF%A1%E6%81%AF%E6%B5%81 "已订阅信息流的直接链接") 请求 { "method": "LIST_SUBSCRIPTION", "id": 3} 响应 { "result": ["came@allTokens@ticker24"], "id": 3} * * * Streams[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#streams "Streams的直接链接") --------------------------------------------------------------------------------------------------------------------- ### came@allTokens@ticker24[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#camealltokensticker24 "came@allTokens@ticker24的直接链接") { "data": { "d": [ { "ca": "0x8fce7206e3043dd360f115afa956ee31b90b787c@56", // 合约地址@链ID "cnt24": 10426, // 24小时成交笔数 "fdv": "72834145.18711072", // 完全稀释市值 (FDV) "hc": "6822", // 持有者数量 "liq": "1442996.98151177662835", // 流动性 "mc": "13542034.24008014", // 市值 "p": "0.072849536538593663", // 当前价格 "pc24": "-2.32", // 24小时价格变化% "s": "1", "t": 1771825733000, // 时间戳 (ms) "vol24": "12930712.213702157742688594285" // 24小时交易量 } ], "e": "tickerList" }, "stream": "came@allTokens@ticker24"} * * * ### @aggTrade[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolaggtrade "@aggTrade的直接链接") { "data": { "E": 1771828569861, // 事件时间 (ms) "T": 1771828569702, // 成交时间 (ms) "a": 2684294, // 聚合交易ID "e": "aggTrade", // 事件类型 "f": 2684294, // 被归集的首个交易ID "l": 2684294, // 末个交易ID "m": false, // 是否为做市方 "p": "0.08530000", // 成交价格 "q": "879.24000000", // 成交数量 "s": "ALPHA_474USDT" // 交易对符号 }, "stream": "alpha_474usdt@aggTrade"} * * * ### @fulldepth@[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolfulldepthinterval "@fulldepth@的直接链接") interval: 0ms, 100ms, 500ms 这条数据流会返回所有可用的深度信息,其中包括 UI 和 API 的订单 { "data": { "E": 1771828614381, // 事件时间 (ms) "T": 1771828614258, // 撮合时间 (ms) "U": 42648947917, // 本次更新首个updateId "a": [ [ "0.07680652", "0.00000000" ], [ "0.08529794", "0.00000000" ] ], "b": [ [ "0.08513788", "0.00000000" ], [ "0.08520502", "23.47000000" ], [ "0.08521196", "320.94000000" ], [ "0.08529880", "0.00000000" ], [ "0.08529885", "0.00000000" ] ], "e": "depthUpdate", "pu": 42648947321, // 上次推送的updateId "s": "ALPHA_474USDT", "u": 42648948229 // 本次更新末个updateId }, "stream": "alpha_474usdt@fulldepth@500ms"} * * * ### came@contractAddress@chainId@kline\_[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#camecontractaddresschainidkline_interval "came@contractAddress@chainId@kline_的直接链接") interval: 1s, 1m, 5m, 15m, 1h, 4h, 1d { "data": { "ca": "G7vQWurMkMMm2dU3iZpXYFTHT9Biio4F4gZCrwFpKNwG@CT_501", // 合约地址@链ID "e": "kline", "k": { "c": "0.15584957424118055058", // 收盘价 "ct": 1771828656000, // k线结束时间 "h": "0.15584957424118055058", // 最高价 "i": "1s", // interval "l": "0.15584372258086979622", // 最低价 "o": "0.15584372258086979622", // 开盘价 "ot": 1771828655000, // k线开始时间 "v": "2.8584092999332775480" // 成交量 } }, "stream": "came@G7vQWurMkMMm2dU3iZpXYFTHT9Biio4F4gZCrwFpKNwG@CT_501@kline_1s"} * * * ### @bookTicker[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolbookticker "@bookTicker的直接链接") { "data": { "A": "2.00353200", // 卖一数量 "B": "0.91076900", // 买一数量 "E": 1773108379067, // 事件时间 "T": 1773108379054, // 成交时间/交易时间 "a": "9.30000000", // 卖一价格 "b": "8.30000000", // 买一价格 "e": "bookTicker", // 事件类型 "s": "ALPHA_116USDT", // 交易对 "u": 6663207693 // 更新 ID }, "stream": "alpha_116usdt@bookTicker"} * * * ### !bookTicker[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#bookticker "!bookTicker的直接链接") { "data": { "A": "2.00353200", // 卖一数量 "B": "0.91076900", // 买一数量 "E": 1773108379067, // 事件时间 "T": 1773108379054, // 成交时间/交易时间 "a": "9.30000000", // 卖一价格 "b": "8.30000000", // 买一价格 "e": "bookTicker", // 事件类型 "s": "ALPHA_116USDT", // 交易对 "u": 6663207693 // 更新 ID }, "stream": "!bookTicker"} * * * ### @miniTicker[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolminiticker "@miniTicker的直接链接") { "data": { "E": 1773109449908, // 事件时间 "c": "8.40000000", // 收盘价 "e": "24hrMiniTicker", // 事件类型 "h": "8.50000000", // 最高价 "l": "8.30000000", // 最低价 "o": "8.40000000", // 开盘价 "q": "543810.36005090", // 计价资产成交额 "s": "ALPHA_116USDT", // 交易对 "v": "64739.03978900" // 基础资产成交量 }, "stream": "alpha_116usdt@miniTicker"} * * * ### !miniTicker@arr[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#minitickerarr "!miniTicker@arr的直接链接") { "data": { "E": 1773109449908, // 事件时间 "c": "8.40000000", // 收盘价 "e": "24hrMiniTicker", // 事件类型 "h": "8.50000000", // 最高价 "l": "8.30000000", // 最低价 "o": "8.40000000", // 开盘价 "q": "543810.36005090", // 计价资产成交额 "s": "ALPHA_116USDT", // 交易对 "v": "64739.03978900" // 基础资产成交量 }, "stream": "!miniTicker@arr"} * * * ### @ticker[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolticker "@ticker的直接链接") { "data": { "C": 1773109631555, // 统计结束时间 "E": 1773109631569, // 事件时间 "F": 19847634, // 首笔成交 ID "L": 19911287, // 末笔成交 ID "O": 1773023220000, // 统计开始时间 "P": "0.00", // 涨跌幅 "Q": "0.49293200", // 最近一笔成交量 "c": "8.40000000", // 收盘价 "e": "24hrTicker", // 事件类型 "h": "8.50000000", // 最高价 "l": "8.30000000", // 最低价 "n": 217505, // 成交笔数 "o": "8.40000000", // 开盘价 "p": "0.00000000", // 涨跌额 "q": "543907.35169250", // 计价资产成交额 "s": "ALPHA_116USDT", // 交易对 "v": "64750.63418500", // 基础资产成交量 "w": "8.40003127" // 平均价 }, "stream": "alpha_116usdt@ticker"} * * * ### !ticker@arr[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#tickerarr "!ticker@arr的直接链接") { "data": { "C": 1773109631555, // 统计结束时间 "E": 1773109631569, // 事件时间 "F": 19847634, // 首笔成交 ID "L": 19911287, // 末笔成交 ID "O": 1773023220000, // 统计开始时间 "P": "0.00", // 涨跌幅 "Q": "0.49293200", // 最近一笔成交量 "c": "8.40000000", // 收盘价 "e": "24hrTicker", // 事件类型 "h": "8.50000000", // 最高价 "l": "8.30000000", // 最低价 "n": 217505, // 成交笔数 "o": "8.40000000", // 开盘价 "p": "0.00000000", // 涨跌额 "q": "543907.35169250", // 计价资产成交额 "s": "ALPHA_116USDT", // 交易对 "v": "64750.63418500", // 基础资产成交量 "w": "8.40003127" // 平均价 }, "stream": "!ticker@arr"} * * * ### @trade[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symboltrade "@trade的直接链接") { "data": { "E": 1773110023891, // 事件时间 "T": 1773110023877, // 成交时间 "e": "trade", // 事件类型 "m": false, // 是否为买方挂单成交 "p": "8.40000000", // 成交价 "q": "0.97915700", // 成交量 "s": "ALPHA_116USDT", // 交易对 "t": 19911650 // 成交 ID }, "stream": "alpha_116usdt@trade"} * * * ### @depth@[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symboldepthlevelsinterval "@depth@的直接链接") levels:可选,取值:\[5, 10, 20\] interval:可选,取值:\[0ms, 100ms, 500ms\] 请注意:这里只会展示 UI 订单。 { "data": { "E": 1773110222878, // 事件时间 "T": 1773110222767, // 成交时间/交易时间 "U": 6663367135, // 首个更新 ID "a": [ [ "8.30000000", // 价格 "8.02776700" // 数量 ] ], "b": [ [ "8.40000000", // 价格 "1266.84789600" // 数量 ] ], "e": "depthUpdate", // 事件类型 "pu": 6663366971, // 上一个更新 ID "s": "ALPHA_116USDT", // 交易对 "u": 6663367147 // 最后更新 ID }, "stream": "alpha_116usdt@depth"} * * * ### @kline\_[​](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolkline_interval "@kline_的直接链接") 可选 interval 取值:\[1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M\] { "data": { "E": 1773111055144, // 事件时间 "e": "kline", // 事件类型 "k": { "B": "0", // 忽略 "L": 19912765, // 末笔成交 ID "Q": "534.64960920", // 主动买入成交额 "T": 1773111059999, // K 线结束时间 "V": "63.64876300", // 主动买入成交量 "c": "8.40000000", // 收盘价 "f": 19912696, // 首笔成交 ID "h": "8.40000000", // 最高价 "i": "1m", // K 线周期 "l": "8.40000000", // 最低价 "n": 218, // 成交笔数 "o": "8.40000000", // 开盘价 "q": "534.64960920", // 成交额 "s": "ALPHA_116USDT", // 交易对 "t": 1773111000000, // K 线开始时间 "v": "63.64876300", // 成交量 "x": false // K 线是否已完结 }, "s": "ALPHA_116USDT" // 交易对 }, "stream": "alpha_116usdt@kline_1m"} * [基本信息](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF) * [实时订阅/取消数据流](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%AE%9E%E6%97%B6%E8%AE%A2%E9%98%85%E5%8F%96%E6%B6%88%E6%95%B0%E6%8D%AE%E6%B5%81) * [订阅一个信息流](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81) * [取消订阅一个信息流](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81) * [已订阅信息流](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#%E5%B7%B2%E8%AE%A2%E9%98%85%E4%BF%A1%E6%81%AF%E6%B5%81) * [Streams](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#streams) * [came@allTokens@ticker24](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#camealltokensticker24) * [@aggTrade](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolaggtrade) * [@fulldepth@](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolfulldepthinterval) * [came@contractAddress@chainId@kline\_](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#camecontractaddresschainidkline_interval) * [@bookTicker](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolbookticker) * [!bookTicker](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#bookticker) * [@miniTicker](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolminiticker) * [!miniTicker@arr](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#minitickerarr) * [@ticker](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolticker) * [!ticker@arr](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#tickerarr) * [@trade](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symboltrade) * [@depth@](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symboldepthlevelsinterval) * [@kline\_](https://developers.binance.com/docs/zh-CN/alpha/market-data/websocket-market-data#symbolkline_interval) --- # Buy any token (Swap) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/buy-any-token#__docusaurus_skipToContent_fallback) Buy any token (Swap) ==================== For crypto currencies not listed on Binance spot (such as popular memecoins), Binance Connect provides a suite of flexible and powerful APIs, through which you can quickly buy any token with one click! Its implementation principle is as follows, there are two steps: 1. First buy the bridge token with fiat currency, such as USDT, USDC, BNB, SOL, etc. The bridge token is automatically selected based on the liquidity of different networks and providers, and it may be the native token of the current chain or stable coins; 2. Then swap the target token (such as memecoins) by the bridge token; As a partner (client), you don't need to pay much attention to these implementation details. These two steps are happened automatically in Binance Connect, and users will not realize any unsmooth of this process. The whole user experience is to buy any token with one click. If you are going to integrate the "Buy any token" capability, it's quite easy. You only need to call the APIs in the following: * [Get payment method list](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/3.get-payment-method-list) . If there is success response and results of the API, it means that Binance Connect supports this token (contract address); * [Get estimated quote](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/4.get-estimated-quote) . If there is success response and result of the API, it means that there is quote and liquidity of this token (contract address), and it's fine to call the pre-order API to place an order; * [Pre order](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/5.pre-order) . In fact, these APIs are no different from the APIs in the On-ramp (Buy) section. The only difference is that On-ramp (Buy) requires the parameter `cryptoCurrency`, while the parameter for Buy any token is `contractAddress`. --- # 错误代码 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/error-code#__docusaurus_skipToContent_fallback) 本页总览 错误代码 ==== > 错误JSON格式: { "code":-1121, "msg":"Invalid symbol."} 错误由两部分组成:错误代码和消息。 代码是通用的,但是消息可能会有所不同。 10xx -常规服务器或网络问题[​](https://developers.binance.com/docs/zh-CN/algo/error-code#10xx--%E5%B8%B8%E8%A7%84%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%88%96%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98 "10xx -常规服务器或网络问题的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-1000 UNKNOWN[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1000-unknown "-1000 UNKNOWN的直接链接") * 处理请求时发生未知错误。 * 处理请求时发生未知错误。\[%s\] ### \-1001 DISCONNECTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1001-disconnected "-1001 DISCONNECTED的直接链接") * 内部错误; 无法处理您的请求。 请再试一次. ### \-1002 UNAUTHORIZED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1002-unauthorized "-1002 UNAUTHORIZED的直接链接") * 您无权执行此请求。 ### \-1003 TOO\_MANY\_REQUESTS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1003-too_many_requests "-1003 TOO_MANY_REQUESTS的直接链接") * 排队的请求过多。 * 请求权重过多; 当前限制是 %s 每 %s 的请求权重。 请使用 Websocket Streams 进行实时更新,以避免轮询API。 * 请求权重过多; IP被禁止,直到%s。 请使用 Websocket Streams 进行实时更新,以免被禁。 ### \-1004 SERVER\_BUSY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1004-server_busy "-1004 SERVER_BUSY的直接链接") * 服务器正忙,请稍候再试。 ### \-1006 UNEXPECTED\_RESP[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1006-unexpected_resp "-1006 UNEXPECTED_RESP的直接链接") * 从消息总线收到意外的响应。 执行状态未知。 ### \-1007 TIMEOUT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1007-timeout "-1007 TIMEOUT的直接链接") * 等待后端服务器响应超时。 发送状态未知; 执行状态未知。 ### \-1008 SERVER\_BUSY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1008-server_busy "-1008 SERVER_BUSY的直接链接") * 现货交易服务器当前因其他请求而过载。 请在几分钟后重试。 ### \-1014 UNKNOWN\_ORDER\_COMPOSITION[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1014-unknown_order_composition "-1014 UNKNOWN_ORDER_COMPOSITION的直接链接") * 不支持的订单组合。 ### \-1015 TOO\_MANY\_ORDERS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1015-too_many_orders "-1015 TOO_MANY_ORDERS的直接链接") * 新订单太多。 * 新订单太多; 当前限制为每%s %s个订单。 ### \-1016 SERVICE\_SHUTTING\_DOWN[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1016-service_shutting_down "-1016 SERVICE_SHUTTING_DOWN的直接链接") * 该服务不可用。 ### \-1020 UNSUPPORTED\_OPERATION[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1020-unsupported_operation "-1020 UNSUPPORTED_OPERATION的直接链接") * 不支持此操作。 ### \-1021 INVALID\_TIMESTAMP[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1021-invalid_timestamp "-1021 INVALID_TIMESTAMP的直接链接") * 此请求的时间戳在recvWindow之外。 * 此请求的时间戳比服务器时间提前1000毫秒。 ### \-1022 INVALID\_SIGNATURE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1022-invalid_signature "-1022 INVALID_SIGNATURE的直接链接") * 此请求的签名无效。 ### \-1099 Not found, authenticated, or authorized[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1099-not-found-authenticated-or-authorized "-1099 Not found, authenticated, or authorized的直接链接") * 替换错误代码-1999 11xx - 2xxx Request issues[​](https://developers.binance.com/docs/zh-CN/algo/error-code#11xx---2xxx-request-issues "11xx - 2xxx Request issues的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ ### \-1100 ILLEGAL\_CHARS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1100-illegal_chars "-1100 ILLEGAL_CHARS的直接链接") * 在参数中发现非法字符。 * 在参数中发现非法字符。`%s` * 在参数`%s`中发现非法字符; 合法范围是`%s`。 ### \-1101 TOO\_MANY\_PARAMETERS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1101-too_many_parameters "-1101 TOO_MANY_PARAMETERS的直接链接") * 为此端点发送的参数太多。 * 参数太多; 预期为`%s`并收到了`%s`。 * 检测到的参数值重复。 ### \-1102 MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1102-mandatory_param_empty_or_malformed "-1102 MANDATORY_PARAM_EMPTY_OR_MALFORMED的直接链接") * 未发送强制性参数,该参数为空/空或格式错误。 * 强制参数`%s`未发送,为空/空或格式错误。 * 必须发送参数`%s`或`%s`,但两者均为空! ### \-1103 UNKNOWN\_PARAM[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1103-unknown_param "-1103 UNKNOWN_PARAM的直接链接") * 发送了未知参数。 ### \-1104 UNREAD\_PARAMETERS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1104-unread_parameters "-1104 UNREAD_PARAMETERS的直接链接") * 并非所有发送的参数都被读取。 * 并非所有发送的参数都被读取; 读取了`%s`参数,但被发送了`%s`。 ### \-1105 PARAM\_EMPTY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1105-param_empty "-1105 PARAM_EMPTY的直接链接") * 参数为空。 * 参数`%s`为空。 ### \-1106 PARAM\_NOT\_REQUIRED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1106-param_not_required "-1106 PARAM_NOT_REQUIRED的直接链接") * 不需要时已发送参数。 * 不需要时发送参数`%s`。 ### \-1111 BAD\_PRECISION[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1111-bad_precision "-1111 BAD_PRECISION的直接链接") * 精度超过为此资产定义的最大值。 ### \-1112 NO\_DEPTH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1112-no_depth "-1112 NO_DEPTH的直接链接") * 交易对没有挂单。 ### \-1114 TIF\_NOT\_REQUIRED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1114-tif_not_required "-1114 TIF_NOT_REQUIRED的直接链接") * 不需要时发送了TimeInForce参数。 ### \-1115 INVALID\_TIF[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1115-invalid_tif "-1115 INVALID_TIF的直接链接") * 无效 timeInForce. ### \-1116 INVALID\_ORDER\_TYPE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1116-invalid_order_type "-1116 INVALID_ORDER_TYPE的直接链接") * 无效订单类型。 ### \-1117 INVALID\_SIDE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1117-invalid_side "-1117 INVALID_SIDE的直接链接") * 无效买卖方向。 ### \-1118 EMPTY\_NEW\_CL\_ORD\_ID[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1118-empty_new_cl_ord_id "-1118 EMPTY_NEW_CL_ORD_ID的直接链接") * 新的客户订单ID为空。 ### \-1119 EMPTY\_ORG\_CL\_ORD\_ID[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1119-empty_org_cl_ord_id "-1119 EMPTY_ORG_CL_ORD_ID的直接链接") * 客户自定义的订单ID为空。 ### \-1120 BAD\_INTERVAL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1120-bad_interval "-1120 BAD_INTERVAL的直接链接") * 无效时间间隔。 ### \-1121 BAD\_SYMBOL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1121-bad_symbol "-1121 BAD_SYMBOL的直接链接") * 无效的交易对。 ### \-1125 INVALID\_LISTEN\_KEY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1125-invalid_listen_key "-1125 INVALID_LISTEN_KEY的直接链接") * 该listenKey不存在。 ### \-1127 MORE\_THAN\_XX\_HOURS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1127-more_than_xx_hours "-1127 MORE_THAN_XX_HOURS的直接链接") * 查询间隔太大。 * 从开始时间到结束时间之间超过%s小时。 ### \-1128 OPTIONAL\_PARAMS\_BAD\_COMBO[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1128-optional_params_bad_combo "-1128 OPTIONAL_PARAMS_BAD_COMBO的直接链接") * 可选参数组合无效。 ### \-1130 INVALID\_PARAMETER[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1130-invalid_parameter "-1130 INVALID_PARAMETER的��直接链接") * 发送的参数为无效数据。 * 发送参数`%s`的数据无效。 ### \-1131 BAD\_RECV\_WINDOW[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1131-bad_recv_window "-1131 BAD_RECV_WINDOW的直接链接") * `recvWindow` 必须小于 60000 ### \-1134 BAD\_STRATEGY\_TYPE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1134-bad_strategy_type "-1134 BAD_STRATEGY_TYPE的直接链接") * `strategyType` 必须小于 1000000 #### \-1145 INVALID\_CANCEL\_RESTRICTIONS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1145-invalid_cancel_restrictions "-1145 INVALID_CANCEL_RESTRICTIONS的直接链接") * `cancelRestrictions` 必须是 `ONLY_NEW` 或者 `ONLY_PARTIALLY_FILLED`。 #### \-1151 重复的交易对[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-1151-%E9%87%8D%E5%A4%8D%E7%9A%84%E4%BA%A4%E6%98%93%E5%AF%B9 "-1151 重复的交易对的直接链接") * Symbol is present multiple times in the list. ### \-2010 NEW\_ORDER\_REJECTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2010-new_order_rejected "-2010 NEW_ORDER_REJECTED的直接链接") * 新订单被拒绝 ### \-2011 CANCEL\_REJECTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2011-cancel_rejected "-2011 CANCEL_REJECTED的直接链接") * 取消订单被拒绝 ### \-2013 NO\_SUCH\_ORDER[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2013-no_such_order "-2013 NO_SUCH_ORDER的直接链接") * 订单不存在。 ### \-2014 BAD\_API\_KEY\_FMT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2014-bad_api_key_fmt "-2014 BAD_API_KEY_FMT的直接链接") * API-key 格式无效。 ### \-2015 REJECTED\_MBX\_KEY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2015-rejected_mbx_key "-2015 REJECTED_MBX_KEY的直接链接") * 无效的API密钥,IP或操作权限。 ### \-2016 NO\_TRADING\_WINDOW[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2016-no_trading_window "-2016 NO_TRADING_WINDOW的直接链接") * 找不到该交易对的交易窗口。 尝试改为24小时自动报价。 #### \-2026 ORDER\_ARCHIVED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2026-order_archived "-2026 ORDER_ARCHIVED的直接链接") * 订单已被存档因为此订单被取消或过期,无交易数量而最后的更新已超过 90 天前。 3xxx-5xxx SAPI 具体问题[​](https://developers.binance.com/docs/zh-CN/algo/error-code#3xxx-5xxx-sapi-%E5%85%B7%E4%BD%93%E9%97%AE%E9%A2%98 "3xxx-5xxx SAPI 具体问题的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-3000 INNER\_FAILURE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3000-inner_failure "-3000 INNER_FAILURE的直接链接") * 内部服务器错误。 ### \-3001 NEED\_ENABLE\_2FA[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3001-need_enable_2fa "-3001 NEED_ENABLE_2FA的直接链接") * 请先启用2FA。 ### \-3002 ASSET\_DEFICIENCY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3002-asset_deficiency "-3002 ASSET_DEFICIENCY的直接链接") * 此资产不存在。 ### \-3003 NO\_OPENED\_MARGIN\_ACCOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3003-no_opened_margin_account "-3003 NO_OPENED_MARGIN_ACCOUNT的直接链接") * 杠杆账户不存在。 ### \-3004 TRADE\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3004-trade_not_allowed "-3004 TRADE_NOT_ALLOWED的直接链接") * 禁止交易。 ### \-3005 TRANSFER\_OUT\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3005-transfer_out_not_allowed "-3005 TRANSFER_OUT_NOT_ALLOWED的直接链接") * 不允许转账。 ### \-3006 EXCEED\_MAX\_BORROWABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3006-exceed_max_borrowable "-3006 EXCEED_MAX_BORROWABLE的直接链接") * 您的已借金额已超过最高可借金额。 ### \-3007 HAS\_PENDING\_TRANSACTION[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3007-has_pending_transaction "-3007 HAS_PENDING_TRANSACTION的直接链接") * 您有待处理的交易,请稍后再试。 ### \-3008 BORROW\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3008-borrow_not_allowed "-3008 BORROW_NOT_ALLOWED的直接链接") * 不允许借款。 ### \-3009 ASSET\_NOT\_MORTGAGEABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3009-asset_not_mortgageable "-3009 ASSET_NOT_MORTGAGEABLE的直接链接") * 此资产目前不允许转入杠杆账户。 ### \-3010 REPAY\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3010-repay_not_allowed "-3010 REPAY_NOT_ALLOWED��的直接链接") * 不允许还款。 ### \-3011 BAD\_DATE\_RANGE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3011-bad_date_range "-3011 BAD_DATE_RANGE的直接链接") * 您输入的日期无效。 ### \-3012 ASSET\_ADMIN\_BAN\_BORROW[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3012-asset_admin_ban_borrow "-3012 ASSET_ADMIN_BAN_BORROW的直接链接") * 此资产禁止借款。 ### \-3013 LT\_MIN\_BORROWABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3013-lt_min_borrowable "-3013 LT_MIN_BORROWABLE的直接链接") * 借入金额少于最低借入金额。 ### \-3014 ACCOUNT\_BAN\_BORROW[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3014-account_ban_borrow "-3014 ACCOUNT_BAN_BORROW的直接链接") * 此帐户禁止借款。 ### \-3015 REPAY\_EXCEED\_LIABILITY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3015-repay_exceed_liability "-3015 REPAY_EXCEED_LIABILITY的直接链接") * 还款额超过借款额。 ### \-3016 LT\_MIN\_REPAY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3016-lt_min_repay "-3016 LT_MIN_REPAY的直接链接") * 还款额少于最低还款额。 ### \-3017 ASSET\_ADMIN\_BAN\_MORTGAGE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3017-asset_admin_ban_mortgage "-3017 ASSET_ADMIN_BAN_MORTGAGE的直接链接") * 此资产目前不允许转入保证金账户。 ### \-3018 ACCOUNT\_BAN\_MORTGAGE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3018-account_ban_mortgage "-3018 ACCOUNT_BAN_MORTGAGE的直接链接") * 此帐户已禁止转入。 ### \-3019 ACCOUNT\_BAN\_ROLLOUT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3019-account_ban_rollout "-3019 ACCOUNT_BAN_ROLLOUT的直接链接") * 此帐户禁止转出。 ### \-3020 EXCEED\_MAX\_ROLLOUT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3020-exceed_max_rollout "-3020 EXCEED_MAX_ROLLOUT的直接链接") * 转出金额超过上限。 ### \-3021 PAIR\_ADMIN\_BAN\_TRADE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3021-pair_admin_ban_trade "-3021 PAIR_ADMIN_BAN_TRADE的直接链接") * 杠杆账户无法交易此交易对。 ### \-3022 ACCOUNT\_BAN\_TRADE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3022-account_ban_trade "-3022 ACCOUNT_BAN_TRADE的直接链接") * 账号被禁止交易。 ### \-3023 WARNING\_MARGIN\_LEVEL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3023-warning_margin_level "-3023 WARNING_MARGIN_LEVEL的直接链接") * 无法在当前杠杆倍数下转出资金或者下单 ### \-3024 FEW\_LIABILITY\_LEFT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3024-few_liability_left "-3024 FEW_LIABILITY_LEFT的直接链接") * 付款之后未付款的债务太小 ### \-3025 INVALID\_EFFECTIVE\_TIME[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3025-invalid_effective_time "-3025 INVALID_EFFECTIVE_TIME的直接链接") * 输入时间有误。 ### \-3026 VALIDATION\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3026-validation_failed "-3026 VALIDATION_FAILED的直接链接") * 输入参数有误。 ### \-3027 NOT\_VALID\_MARGIN\_ASSET[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3027-not_valid_margin_asset "-3027 NOT_VALID_MARGIN_ASSET的直接链接") * 无效的杠杆资产。 ### \-3028 NOT\_VALID\_MARGIN\_PAIR[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3028-not_valid_margin_pair "-3028 NOT_VALID_MARGIN_PAIR的直接链接") * 无效的杠杆交易对。 ### \-3029 TRANSFER\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3029-transfer_failed "-3029 TRANSFER_FAILED的直接链接") * 转账失败。 ### \-3036 ACCOUNT\_BAN\_REPAY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3036-account_ban_repay "-3036 ACCOUNT_BAN_REPAY的直接链接") * 此账号无法还款。 ### \-3037 PNL\_CLEARING[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3037-pnl_clearing "-3037 PNL_CLEARING的直接链接") * `PNL`正在清帐,请稍等。 ### \-3038 LISTEN\_KEY\_NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3038-listen_key_not_found "-3038 LISTEN_KEY_NOT_FOUND的直接链接") * 找不到`Listen key` ### \-3041 BALANCE\_NOT\_CLEARED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3041-balance_not_cleared "-3041 BALANCE_NOT_CLEARED的直接链接") * 余额不足 ### \-3042 PRICE\_INDEX\_NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3042-price_index_not_found "-3042 PRICE_INDEX_NOT_FOUND的直接链接") * 该杠杆交易对无可用价格指数。 ### \-3043 TRANSFER\_IN\_NOT\_ALLOWED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3043-transfer_in_not_allowed "-3043 TRANSFER_IN_NOT_ALLOWED的直接链接") * 不允许转入。 ### \-3044 SYSTEM\_BUSY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3044-system_busy "-3044 SYSTEM_BUSY的直接链接") * 系统繁忙。 ### \-3045 SYSTEM[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3045-system "-3045 SYSTEM的直接链接") * 系统目前没有足够可借的资产。 ### \-3999 NOT\_WHITELIST\_USER[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-3999-not_whitelist_user "-3999 NOT_WHITELIST_USER的直接链接") * 此功能只面向邀请的用户。 ### \-4001 CAPITAL\_INVALID[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4001-capital_invalid "-4001 CAPITAL_INVALID的直接链接") * 非法操作 ### \-4002 CAPITAL\_IG[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4002-capital_ig "-4002 CAPITAL_IG的直接链接") * 非法获取 ### \-4003 CAPITAL\_IEV[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4003-capital_iev "-4003 CAPITAL_IEV的直接链接") * 非法邮箱验证 ### \-4004 CAPITAL\_UA[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4004-capital_ua "-4004 CAPITAL_UA的直接链接") * 未登录或者认证。 ### \-4005 CAPAITAL\_TOO\_MANY\_REQUEST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4005-capaital_too_many_request "-4005 CAPAITAL_TOO_MANY_REQUEST的直接链接") * 请求太频繁。 ### \-4006 CAPITAL\_ONLY\_SUPPORT\_PRIMARY\_ACCOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4006-capital_only_support_primary_account "-4006 CAPITAL_ONLY_SUPPORT_PRIMARY_ACCOUNT的直接链接") * 只支持主账号。 ### \-4007 CAPITAL\_ADDRESS\_VERIFICATION\_NOT\_PASS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4007-capital_address_verification_not_pass "-4007 CAPITAL_ADDRESS_VERIFICATION_NOT_PASS的直接链接") * 地址的没有通过校验。 ### \-4008 CAPITAL\_ADDRESS\_TAG\_VERIFICATION\_NOT\_PASS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4008-capital_address_tag_verification_not_pass "-4008 CAPITAL_ADDRESS_TAG_VERIFICATION_NOT_PASS的直接链接") * 地址的标记信息(`tag`)没有通过校验。 ### \-4010 CAPITAL\_WHITELIST\_EMAIL\_CONFIRM[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4010-capital_whitelist_email_confirm "-4010 CAPITAL_WHITELIST_EMAIL_CONFIRM的直接链接") * 确认电子邮件已经列入白名单。 ### \-4011 CAPITAL\_WHITELIST\_EMAIL\_EXPIRED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4011-capital_whitelist_email_expired "-4011 CAPITAL_WHITELIST_EMAIL_EXPIRED的直接链接") * 列入白名单的电子邮件无效。 ### \-4012 CAPITAL\_WHITELIST\_CLOSE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4012-capital_whitelist_close "-4012 CAPITAL_WHITELIST_CLOSE的直接链接") * 白名单未打开。 ### \-4013 CAPITAL\_WITHDRAW\_2FA\_VERIFY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4013-capital_withdraw_2fa_verify "-4013 CAPITAL_WITHDRAW_2FA_VERIFY的直接链接") * 2FA未打开。 ### \-4014 CAPITAL\_WITHDRAW\_LOGIN\_DELAY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4014-capital_withdraw_login_delay "-4014 CAPITAL_WITHDRAW_LOGIN_DELAY的直接链接") * 在登录后的2分钟之内不允许提款。 ### \-4015 CAPITAL\_WITHDRAW\_RESTRICTED\_MINUTE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4015-capital_withdraw_restricted_minute "-4015 CAPITAL_WITHDRAW_RESTRICTED_MINUTE的直接链接") * 暂停提款 ### \-4016 CAPITAL\_WITHDRAW\_RESTRICTED\_PASSWORD[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4016-capital_withdraw_restricted_password "-4016 CAPITAL_WITHDRAW_RESTRICTED_PASSWORD的直接链接") * 在密码修改后的24小时之内不允许提款。 ### \-4017 CAPITAL\_WITHDRAW\_RESTRICTED\_UNBIND\_2FA[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4017-capital_withdraw_restricted_unbind_2fa "-4017 CAPITAL_WITHDRAW_RESTRICTED_UNBIND_2FA的直接链接") * 在2FA发行后的24小时之内不允许提款。 ### \-4018 CAPITAL\_WITHDRAW\_ASSET\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4018-capital_withdraw_asset_not_exist "-4018 CAPITAL_WITHDRAW_ASSET_NOT_EXIST的直接链接") * 此资产不存在。 ### \-4019 CAPITAL\_WITHDRAW\_ASSET\_PROHIBIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4019-capital_withdraw_asset_prohibit "-4019 CAPITAL_WITHDRAW_ASSET_PROHIBIT的直接链接") * 此资产不允许提款。 ### \-4021 CAPITAL\_WITHDRAW\_AMOUNT\_MULTIPLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4021-capital_withdraw_amount_multiple "-4021 CAPITAL_WITHDRAW_AMOUNT_MULTIPLE的直接链接") * 资产的提款数量必须是%s的%s倍。 ### \-4022 CAPITAL\_WITHDRAW\_MIN\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4022-capital_withdraw_min_amount "-4022 CAPITAL_WITHDRAW_MIN_AMOUNT的直接链接") * 不须少于最低的提款数量%s。 ### \-4023 CAPITAL\_WITHDRAW\_MAX\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4023-capital_withdraw_max_amount "-4023 CAPITAL_WITHDRAW_MAX_AMOUNT的直接链接") * 在24小时之内,不须超过最高的提款数量。 ### \-4024 CAPITAL\_WITHDRAW\_USER\_NO\_ASSET[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4024-capital_withdraw_user_no_asset "-4024 CAPITAL_WITHDRAW_USER_NO_ASSET�的直接链接") * 当前用户没有此资产。 ### \-4025 CAPITAL\_WITHDRAW\_USER\_ASSET\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4025-capital_withdraw_user_asset_less_than_zero "-4025 CAPITAL_WITHDRAW_USER_ASSET_LESS_THAN_ZERO的直接链接") * 持有资产的数量小于零。 ### \-4026 CAPITAL\_WITHDRAW\_USER\_ASSET\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4026-capital_withdraw_user_asset_not_enough "-4026 CAPITAL_WITHDRAW_USER_ASSET_NOT_ENOUGH的直接链接") * 此资产余额不足。 ### \-4027 CAPITAL\_WITHDRAW\_GET\_TRAN\_ID\_FAILURE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4027-capital_withdraw_get_tran_id_failure "-4027 CAPITAL_WITHDRAW_GET_TRAN_ID_FAILURE的直接链接") * 无法获取tranId。 ### \-4028 CAPITAL\_WITHDRAW\_MORE\_THAN\_FEE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4028-capital_withdraw_more_than_fee "-4028 CAPITAL_WITHDRAW_MORE_THAN_FEE的直接链接") * 提款金额必须多于佣金额。 ### \-4029 CAPITAL\_WITHDRAW\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4029-capital_withdraw_not_exist "-4029 CAPITAL_WITHDRAW_NOT_EXIST的直接链接") * 此提款记录不存在。 ### \-4030 CAPITAL\_WITHDRAW\_CONFIRM\_SUCCESS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4030-capital_withdraw_confirm_success "-4030 CAPITAL_WITHDRAW_CONFIRM_SUCCESS的直接链接") * 提款资产成功。 ### \-4031 CAPITAL\_WITHDRAW\_CANCEL\_FAILURE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4031-capital_withdraw_cancel_failure "-4031 CAPITAL_WITHDRAW_CANCEL_FAILURE的直接链接") * 取消提款失败。 ### \-4032 CAPITAL\_WITHDRAW\_CHECKSUM\_VERIFY\_FAILURE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4032-capital_withdraw_checksum_verify_failure "-4032 CAPITAL_WITHDRAW_CHECKSUM_VERIFY_FAILURE的直接链接") * 验证提款失败。 ### \-4033 CAPITAL\_WITHDRAW\_ILLEGAL\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4033-capital_withdraw_illegal_address "-4033 CAPITAL_WITHDRAW_ILLEGAL_ADDRESS的直接链接") * 提款地址不合法。 ### \-4034 CAPITAL\_WITHDRAW\_ADDRESS\_CHEAT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4034-capital_withdraw_address_cheat "-4034 CAPITAL_WITHDRAW_ADDRESS_CHEAT的直接链接") * 当前地址有异常。 ### \-4035 CAPITAL\_WITHDRAW\_NOT\_WHITE\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4035-capital_withdraw_not_white_address "-4035 CAPITAL_WITHDRAW_NOT_WHITE_ADDRESS的直接链接") * 此地址不在白名单上。请加入然后重试。 ### \-4036 CAPITAL\_WITHDRAW\_NEW\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4036-capital_withdraw_new_address "-4036 CAPITAL_WITHDRAW_NEW_ADDRESS的直接链接") * 新地址在{0}小时后才可以提款。 ### \-4037 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_FAIL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4037-capital_withdraw_resend_email_fail "-4037 CAPITAL_WITHDRAW_RESEND_EMAIL_FAIL的直接链接") * 重新发送邮件失败。 ### \-4038 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_TIME\_OUT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4038-capital_withdraw_resend_email_time_out "-4038 CAPITAL_WITHDRAW_RESEND_EMAIL_TIME_OUT的直接链接") * 请5分钟后重试。 ### \-4039 CAPITAL\_USER\_EMPTY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4039-capital_user_empty "-4039 CAPITAL_USER_EMPTY的直接链接") * 用户不存在。 ### \-4041 CAPITAL\_MINUTE\_TOO\_SMALL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4041-capital_minute_too_small "-4041 CAPITAL_MINUTE_TOO_SMALL的直接链接") * 请一分钟后重试。 ### \-4042 CAPITAL\_CHARGE\_NOT\_RESET[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4042-capital_charge_not_reset "-4042 CAPITAL_CHARGE_NOT_RESET的直接链接") * 资产无法重新获取存款地址。 ### \-4043 CAPITAL\_ADDRESS\_TOO\_MUCH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4043-capital_address_too_much "-4043 CAPITAL_ADDRESS_TOO_MUCH的直接链接") * 在24小时之内充值超过100多个地址。 ### \-4044 CAPITAL\_BLACKLIST\_COUNTRY\_GET\_ADDRESS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4044-capital_blacklist_country_get_address "-4044 CAPITAL_BLACKLIST_COUNTRY_GET_ADDRESS的直接链接") * 此国家在黑名单上。 ### \-4045 CAPITAL\_GET\_ASSET\_ERROR[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4045-capital_get_asset_error "-4045 CAPITAL_GET_ASSET_ERROR的直接链接") * 获得资产失败。 ### \-4046 CAPITAL\_AGREEMENT\_NOT\_CONFIRMED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4046-capital_agreement_not_confirmed "-4046 CAPITAL_AGREEMENT_NOT_CONFIRMED的直接链接") * 协议未确认。 ### \-4047 CAPITAL\_DATE\_INTERVAL\_LIMIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4047-capital_date_interval_limit "-4047 CAPITAL_DATE_INTERVAL_LIMIT的直接链接") * 时间间隔必须在0-90天之内 ### \-4060 CAPITAL\_WITHDRAW\_USER\_ASSET\_LOCK\_DEPOSIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-4060-capital_withdraw_user_asset_lock_deposit "-4060 CAPITAL_WITHDRAW_USER_ASSET_LOCK_DEPOSIT的直接链接") * 体现仍在区块确认中,暂时锁定部分资产 ### \-5001 ASSET\_DRIBBLET\_CONVERT\_SWITCH\_OFF[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5001-asset_dribblet_convert_switch_off "-5001 ASSET_DRIBBLET_CONVERT_SWITCH_OFF的直接链接") * 不允许转移到微型资产。 ### \-5002 ASSET\_ASSET\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5002-asset_asset_not_enough "-5002 ASSET_ASSET_NOT_ENOUGH的直接链接") * 此余额不足。 ### \-5003 ASSET\_USER\_HAVE\_NO\_ASSET[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5003-asset_user_have_no_asset "-5003 ASSET_USER_HAVE_NO_ASSET的直接链接") * 此资产不存在。 ### \-5004 USER\_OUT\_OF\_TRANSFER\_FLOAT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5004-user_out_of_transfer_float "-5004 USER_OUT_OF_TRANSFER_FLOAT的直接链接") * 剩余余额已超过0.001BTC,请重新选择。 * %s的剩余余额已超过0.001BTC,请重新选择。 ### \-5005 USER\_ASSET\_AMOUNT\_IS\_TOO\_LOW[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5005-user_asset_amount_is_too_low "-5005 USER_ASSET_AMOUNT_IS_TOO_LOW的直接链接") * BTC的剩余余额太低,请重新选择。 * %s的剩余余额太低,请重新选择。 ### \-5006 USER\_CAN\_NOT\_REQUEST\_IN\_24\_HOURS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5006-user_can_not_request_in_24_hours "-5006 USER_CAN_NOT_REQUEST_IN_24_HOURS的直接链接") * 24小时内只能转账一次。 ### \-5007 AMOUNT\_OVER\_ZERO[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5007-amount_over_zero "-5007 AMOUNT_OVER_ZERO的直接链接") * 数量必须大于零。 ### \-5008 ASSET\_WITHDRAW\_WITHDRAWING\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5008-asset_withdraw_withdrawing_not_enough "-5008 ASSET_WITHDRAW_WITHDRAWING_NOT_ENOUGH的直接链接") * 可退回资产的金额不足。 ### \-5009 PRODUCT\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5009-product_not_exist "-5009 PRODUCT_NOT_EXIST的直接链接") * 产品不存在。 ### \-5010 TRANSFER\_FAIL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5010-transfer_fail "-5010 TRANSFER_FAIL的直接链接") * 资产转移失败。 ### \-5011 FUTURE\_ACCT\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5011-future_acct_not_exist "-5011 FUTURE_ACCT_NOT_EXIST的直接链接") * 合约帐户不存在。 ### \-5012 TRANSFER\_PENDING[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5012-transfer_pending "-5012 TRANSFER_PENDING的直接链接") * 资产转移正在进行中。 ### \-5021 PARENT\_SUB\_HAVE\_NO\_RELATION[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5021-parent_sub_have_no_relation "-5021 PARENT_SUB_HAVE_NO_RELATION的直接链接") * 当前的子账户和母账户没有从属关系。 ### \-5012 FUTURE\_ACCT\_OR\_SUBRELATION\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-5012-future_acct_or_subrelation_not_exist "-5012 FUTURE_ACCT_OR_SUBRELATION_NOT_EXIST的直接链接") * 合约帐户或子账户关系不存在。 6XXX - 币安宝相关[​](https://developers.binance.com/docs/zh-CN/algo/error-code#6xxx---%E5%B8%81%E5%AE%89%E5%AE%9D%E7%9B%B8%E5%85%B3 "6XXX - 币安宝相关的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- ### \-6001 DAILY\_PRODUCT\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6001-daily_product_not_exist "-6001 DAILY_PRODUCT_NOT_EXIST的直接链接") * 理财产品不存在. ### \-6003 DAILY\_PRODUCT\_NOT\_ACCESSIBLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6003-daily_product_not_accessible "-6003 DAILY_PRODUCT_NOT_ACCESSIBLE的直接链接") * 产品不存在或者没有权限。 ### \-6004 DAILY\_PRODUCT\_NOT\_PURCHASABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6004-daily_product_not_purchasable "-6004 DAILY_PRODUCT_NOT_PURCHASABLE的直接链接") * 产品无法购买。 ### \-6005 DAILY\_LOWER\_THAN\_MIN\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6005-daily_lower_than_min_purchase_limit "-6005 DAILY_LOWER_THAN_MIN_PURCHASE_LIMIT的直接链接") * 低于可以购买的最小限额。 ### \-6006 DAILY\_REDEEM\_AMOUNT\_ERROR[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6006-daily_redeem_amount_error "-6006 DAILY_REDEEM_AMOUNT_ERROR的直接链接") * 赎回额度有误。 ### \-6007 DAILY\_REDEEM\_TIME\_ERROR[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6007-daily_redeem_time_error "-6007 DAILY_REDEEM_TIME_ERROR的直接链接") * 不在赎回的时间内。 ### \-6008 DAILY\_PRODUCT\_NOT\_REDEEMABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6008-daily_product_not_redeemable "-6008 DAILY_PRODUCT_NOT_REDEEMABLE的直接链接") * 产品暂时无法赎回。 ### \-6009 REQUEST\_FREQUENCY\_TOO\_HIGH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6009-request_frequency_too_high "-6009 REQUEST_FREQUENCY_TOO_HIGH的直接链接") * 发送请求太频繁。 ### \-6011 EXCEEDED\_USER\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6011-exceeded_user_purchase_limit "-6011 EXCEEDED_USER_PURCHASE_LIMIT的直接链接") * 超购每个月用户可以申购的最大次数。 ### \-6012 BALANCE\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6012-balance_not_enough "-6012 BALANCE_NOT_ENOUGH的直接链接") * 余额不足。 ### \-6013 PURCHASING\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6013-purchasing_failed "-6013 PURCHASING_FAILED的直接链接") * 申购失败。 ### \-6014 UPDATE\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6014-update_failed "-6014 UPDATE_FAILED的直接链接") * 超过可以申购的最大上限。 ### \-6015 EMPTY\_REQUEST\_BODY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6015-empty_request_body "-6015 EMPTY_REQUEST_BODY的直接链接") * 请求的`body`为空。 ### \-6016 PARAMS\_ERR[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6016-params_err "-6016 PARAMS_ERR的直接链��接") * 请求的参数有误。 ### \-6017 NOT\_IN\_WHITELIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6017-not_in_whitelist "-6017 NOT_IN_WHITELIST的直接链接") * 不在白名单里面。 ### \-6018 ASSET\_NOT\_ENOUGH[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6018-asset_not_enough "-6018 ASSET_NOT_ENOUGH的直接链接") * 资产不足。 ### \-6019 PENDING[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6019-pending "-6019 PENDING的直接链接") * 需要进一步确认。 ### \-6020 PROJECT\_NOT\_EXISTS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-6020-project_not_exists "-6020 PROJECT_NOT_EXISTS的直接链接") * 此项目不存在。 70xx - 期货[​](https://developers.binance.com/docs/zh-CN/algo/error-code#70xx---%E6%9C%9F%E8%B4%A7 "70xx - 期货的直接链接") ------------------------------------------------------------------------------------------------------------------- ### \-7001 FUTURES\_BAD\_DATE\_RANGE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-7001-futures_bad_date_range "-7001 FUTURES_BAD_DATE_RANGE的直接链接") * 此日期范围不支持。 ### \-7002 FUTURES\_BAD\_TYPE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-7002-futures_bad_type "-7002 FUTURES_BAD_TYPE的直接链接") * 此数据请求类型不支持。 20xxx - 合约/现货策略交易[​](https://developers.binance.com/docs/zh-CN/algo/error-code#20xxx---%E5%90%88%E7%BA%A6%E7%8E%B0%E8%B4%A7%E7%AD%96%E7%95%A5%E4%BA%A4%E6%98%93 "20xxx - 合约/现货策略交易的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ### \-20121 Invalid symbol[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20121-invalid-symbol "-20121 Invalid symbol的直接链接") * 无效交易对。 ### \-20124 Invalid algo id or it has been completed[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20124-invalid-algo-id-or-it-has-been-completed "-20124 Invalid algo id or it has been completed的直接链接") * 无效的策略订单ID或者它已经被执行。 ### \-20130 Invalid data sent for a parameter[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20130-invalid-data-sent-for-a-parameter "-20130 Invalid data sent for a parameter的直接链接") * 无效数据。 ### \-20132 The client algo id is duplicated[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20132-the-client-algo-id-is-duplicated "-20132 The client algo id is duplicated的直接链接") * 用户自定义策略订单ID重复。 ### \-20194 Duration is too short to execute all required quantity[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20194-duration-is-too-short-to-execute-all-required-quantity "-20194 Duration is too short to execute all required quantity的直接链接") * Duration 时间太短不足以执行用户选择的订单数量。 ### \-20195 The total size is too small[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20195-the-total-size-is-too-small "-20195 The total size is too small的直接链接") * 下单数量太小。 ### \-20196 The total size is too large[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20196-the-total-size-is-too-large "-20196 The total size is too large的直接链接") * 下单数量太大。 ### \-20198 Reach the max open orders allowed[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20198-reach-the-max-open-orders-allowed "-20198 Reach the max open orders allowed的直接链接") * 达到了最大挂单上限。 ### \-20204 The notional of USD is less or more than the limit[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-20204-the-notional-of-usd-is-less-or-more-than-the-limit "-20204 The notional of USD is less or more than the limit的直接链接") * 订单小于最小USD名义价值 过滤器故障[​](https://developers.binance.com/docs/zh-CN/algo/error-code#%E8%BF%87%E6%BB%A4%E5%99%A8%E6%95%85%E9%9A%9C "过滤器故障的直接链接") ------------------------------------------------------------------------------------------------------------------------------- | 报错信息 | 描述 | | --- | --- | | "Filter failure: PRICE\_FILTER" | "价格"过高,过低和/或不遵循交易对的最小价格规则。 | | "Filter failure: PERCENT\_PRICE" | "价格"比最近Y分钟的平均加权价格高X%或X%太低。 | | "Filter failure: PERCENT\_PRICE\_BY\_SIDE" | `price` 在当前方向上(`BUY`或者`SELL`)比`lastPrice`价格超过X%或者低于Y%。 | | "Filter failure: LOT\_SIZE" | "数量"太高,太低和/或不遵循该交易对的步长规则。 | | "Filter failure: MIN\_NOTIONAL" | 价格\*数量太低,无法成为该交易对的有效订单。 | | "Filter failure: ICEBERG\_PARTS" | `ICEBERG` 订单会分成太多部分; icebergQty太小。 | | "Filter failure: MARKET\_LOT\_SIZE" | "MARKET"订单的"数量"过高,过低和/或未遵循交易对的步长规则。 | | "Filter failure: MAX\_POSITION" | 达到账户的最大仓位限制。这包括了账户的余额总额,以及所有处于open的买单的数量总和。 | | "Filter failure: MAX\_NUM\_ORDERS" | 客户在交易对上有太多挂单。 | | "Filter failure: MAX\_ALGO\_ORDERS" | 账户有太多未平仓止损和/或在交易对上执行获利指令。 | | "Filter failure: MAX\_NUM\_ICEBERG\_ORDERS" | 客户在交易对上有太多 iceberg 挂单。 | | "Filter failure: TRAILING\_DELTA" | `trailingDelta` 值不在限定的范围内. | | "Filter failure: EXCHANGE\_MAX\_NUM\_ORDERS" | 帐户上的交易所有太多挂单。 | | "Filter failure: EXCHANGE\_MAX\_ALGO\_ORDERS" | 帐户有太多止损挂单和/或在交易所收取获利指令。 | 10xxx - 质押借币[​](https://developers.binance.com/docs/zh-CN/algo/error-code#10xxx---%E8%B4%A8%E6%8A%BC%E5%80%9F%E5%B8%81 "10xxx - 质押借币的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- ### \-10001 SYSTEM\_MAINTENANCE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10001-system_maintenance "-10001 SYSTEM_MAINTENANCE的直接链接") * 系统维护中,请稍后再试 ### \-10002 INVALID\_INPUT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10002-invalid_input "-10002 INVALID_INPUT的直接链接") * 无效的输入参数 ### \-10005 NO\_RECORDS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10005-no_records "-10005 NO_RECORDS的直接链接") * 暂无记录 ### \-10007 COIN\_NOT\_LOANABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10007-coin_not_loanable "-10007 COIN_NOT_LOANABLE的直接链接") * 该币种暂不支持借贷 ### \-10008 COIN\_NOT\_LOANABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10008-coin_not_loanable "-10008 COIN_NOT_LOANABLE的直接链接") * 该币种暂不支持借贷 ### \-10009 COIN\_NOT\_COLLATERAL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10009-coin_not_collateral "-10009 COIN_NOT_COLLATERAL的直接链接") * 该币种暂不支持抵押 ### \-10010 COIN\_NOT\_COLLATERAL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10010-coin_not_collateral "-10010 COIN_NOT_COLLATERAL的直接链接") * 该币种暂不支持抵押 ### \-10011 INSUFFICIENT\_ASSET[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10011-insufficient_asset "-10011 INSUFFICIENT_ASSET的直接链接") * 现货资产不足 ### \-10012 INVALID\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10012-invalid_amount "-10012 INVALID_AMOUNT的直接链接") * 无效的还款金额 ### \-10013 INSUFFICIENT\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10013-insufficient_amount "-10013 INSUFFICIENT_AMOUNT的直接链接") * 抵押资产不足 ### \-10015 DEDUCTION\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10015-deduction_failed "-10015 DEDUCTION_FAILED的直接链接") * 抵押资产扣款失败 ### \-10016 LOAN\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10016-loan_failed "-10016 LOAN_FAILED的直接链接") * 放贷失败 ### \-10017 REPAY\_EXCEED\_DEBT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10017-repay_exceed_debt "-10017 REPAY_EXCEED_DEBT的直接链接") * 还款金额超过负债金额 ### \-10018 INVALID\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10018-invalid_amount "-10018 INVALID_AMOUNT的直接链接") * 无效的还款金额 ### \-10019 CONFIG\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10019-config_not_exist "-10019 CONFIG_NOT_EXIST的直接链接") * 配置不存在 ### \-10020 UID\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10020-uid_not_exist "-10020 UID_NOT_EXIST的直接链接") * 用户ID不存在 ### \-10021 ORDER\_NOT\_EXIST[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10021-order_not_exist "-10021 ORDER_NOT_EXIST的直接链接") * 订单不存在 ### \-10022 INVALID\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10022-invalid_amount "-10022 INVALID_AMOUNT的直接链接") * 无效的调整金额 ### \-10023 ADJUST\_LTV\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10023-adjust_ltv_failed "-10023 ADJUST_LTV_FAILED的直接链接") * 调整质押率失败 ### \-10024 ADJUST\_LTV\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10024-adjust_ltv_not_supported "-10024 ADJUST_LTV_NOT_SUPPORTED的直接链接") * 暂不支持调整质押率 ### \-10025 REPAY\_FAILED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10025-repay_failed "-10025 REPAY_FAILED的直接链接") * 还款失败 ### \-10026 INVALID\_PARAMETER[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10026-invalid_parameter "-10026 INVALID_PARAMETER的直接链接") * 无效的参数 ### \-10028 INVALID\_PARAMETER[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10028-invalid_parameter "-10028 INVALID_PARAMETER的直接链接") * 无效的参数 ### \-10029 AMOUNT\_TOO\_SMALL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10029-amount_too_small "-10029 AMOUNT_TOO_SMALL的直接链接") * 借贷金额过小 ### \-10030 AMOUNT\_TOO\_LARGE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10030-amount_too_large "-10030 AMOUNT_TOO_LARGE的直接链接") * 借贷金额过大 ### \-10031 QUOTA\_REACHED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10031-quota_reached "-10031 QUOTA_REACHED的直接链接") * 已达到个人借贷限额 ### \-10032 REPAY\_NOT\_AVAILABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10032-repay_not_available "-10032 REPAY_NOT_AVAILABLE的直接链接") * 暂不支持换款 ### \-10034 REPAY\_NOT\_AVAILABLE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10034-repay_not_available "-10034 REPAY_NOT_AVAILABLE的直接链接") * 抵押物还款暂时不支持,请尝试用借贷币还款。 ### \-10039 AMOUNT\_TOO\_SMALL[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10039-amount_too_small "-10039 AMOUNT_TOO_SMALL的直接链接") * 还款金额过小 ### \-10040 AMOUNT\_TOO\_LARGE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10040-amount_too_large "-10040 AMOUNT_TOO_LARGE的直接链接") * 还款金额过大 ### \-10041 INSUFFICIENT\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10041-insufficient_amount "-10041 INSUFFICIENT_AMOUNT的直接链接") * 由于借贷需求过多,系统剩余可借{0}额度不足。请调整借贷金额或明天再试。 ### \-10042 ASSET\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10042-asset_not_supported "-10042 ASSET_NOT_SUPPORTED的直接链接") * 暂不支持%s币种 ### \-10043 ASSET\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10043-asset_not_supported "-10043 ASSET_NOT_SUPPORTED的直接链接") * 暂不支持{0} 借贷 ### \-10044 QUOTA\_REACHED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10044-quota_reached "-10044 QUOTA_REACHED的直接链接") * 抵押物数量已达到限额,请调整抵押金额或使用其他抵押资产。 ### \-10045 COLLTERAL\_REPAY\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10045-collteral_repay_not_supported "-10045 COLLTERAL_REPAY_NOT_SUPPORTED的直接链接") * 该借贷币种暂不支持抵押物还款,请稍后再试。 ### \-10046 EXCEED\_MAX\_ADJUSTMENT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10046-exceed_max_adjustment "-10046 EXCEED_MAX_ADJUSTMENT的直接链接") * 调整抵押物超过最大限额,请重试。 ### \-10047 REGION\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-10047-region_not_supported "-10047 REGION_NOT_SUPPORTED的直接链接") * 受当地法规管制,您所在地区暂不支持该币种。 13xxx - 杠杆代币[​](https://developers.binance.com/docs/zh-CN/algo/error-code#13xxx---%E6%9D%A0%E6%9D%86%E4%BB%A3%E5%B8%81 "13xxx - 杠杆代币的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- ### \-13000 BLVT\_FORBID\_REDEEM[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13000-blvt_forbid_redeem "-13000 BLVT_FORBID_REDEEM的直接链接") * 当前该杠杆代币关闭赎回 ### \-13001 BLVT\_EXCEED\_DAILY\_LIMIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13001-blvt_exceed_daily_limit "-13001 BLVT_EXCEED_DAILY_LIMIT的直接链接") * 超过该代币个人24小时赎回金额上限 ### \-13002 BLVT\_EXCEED\_TOKEN\_DAILY\_LIMIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13002-blvt_exceed_token_daily_limit "-13002 BLVT_EXCEED_TOKEN_DAILY_LIMIT的直接链接") * 超过该代币全局24小时赎回金额上限 ### \-13003 BLVT\_FORBID\_PURCHASE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13003-blvt_forbid_purchase "-13003 BLVT_FORBID_PURCHASE的直接链接") * 当前该杠杆代币关闭申购 ### \-13004 BLVT\_EXCEED\_DAILY\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13004-blvt_exceed_daily_purchase_limit "-13004 BLVT_EXCEED_DAILY_PURCHASE_LIMIT的直接链接") * 超过该代币个人24小时申购金额上限 ### \-13005 BLVT\_EXCEED\_TOKEN\_DAILY\_PURCHASE\_LIMIT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13005-blvt_exceed_token_daily_purchase_limit "-13005 BLVT_EXCEED_TOKEN_DAILY_PURCHASE_LIMIT的直接链接") * 超过该代币全局24小时申购金额上限 ### \-13006 BLVT\_PURCHASE\_LESS\_MIN\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13006-blvt_purchase_less_min_amount "-13006 BLVT_PURCHASE_LESS_MIN_AMOUNT的直接链接") * 申购金额低于规定下限 ### \-13007 BLVT\_PURCHASE\_AGREEMENT\_NOT\_SIGN[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-13007-blvt_purchase_agreement_not_sign "-13007 BLVT_PURCHASE_AGREEMENT_NOT_SIGN的直接链接") * 没有签署开通交易协议 12xxx - 流动性挖矿[​](https://developers.binance.com/docs/zh-CN/algo/error-code#12xxx---%E6%B5%81%E5%8A%A8%E6%80%A7%E6%8C%96%E7%9F%BF "12xxx - 流动性挖矿的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-12014 TOO MANY REQUESTS[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-12014-too-many-requests "-12014 TOO MANY REQUESTS的直接链接") * 2秒内接收的请求数量多于1条 18xxx - 币安码[​](https://developers.binance.com/docs/zh-CN/algo/error-code#18xxx---%E5%B8%81%E5%AE%89%E7%A0%81 "18xxx - 币安码的直接链接") --------------------------------------------------------------------------------------------------------------------------------- ### \-18002[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-18002 "-18002的直接链接") * The total amount of codes you created has exceeded the 24-hour limit, please try again after UTC 0 * 24小时内制码总金额已超过限额,请UTC0点后再尝试 ### \-18003[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-18003 "-18003的直接链接") * Too many codes created in 24 hours, please try again after UTC 0 * 24小时内制码总次数已超过限额,请UTC0点后再尝试 ### \-18004[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-18004 "-18004的直接链接") * Too many invalid redeem attempts in 24 hours, please try again after UTC 0 * 24小时内兑现币安码输错次数已超过限额,请UTC0点后再尝试 ### \-18005[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-18005 "-18005的直接链接") * Too many invalid verify attempts, please try later * 参考号输错次数过多,请稍后再试 ### \-18006[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-18006 "-18006的直接链接") * The amount is too small, please re-enter * 金额过小,请重新输入 ### \-18007[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-18007 "-18007的直接链接") * This token is not currently supported, please re-enter * 尚未支持该币种,请重新输入 21xxx - 統一帳戶[​](https://developers.binance.com/docs/zh-CN/algo/error-code#21xxx---%E7%B5%B1%E4%B8%80%E5%B8%B3%E6%88%B6 "21xxx - 統一帳戶的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- ### \-21001 USER\_IS\_NOT\_UNIACCOUNT[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-21001-user_is_not_uniaccount "-21001 USER_IS_NOT_UNIACCOUNT的直接链接") * 尚未开通统一账户。 ### \-21002 UNI\_ACCOUNT\_CANT\_TRANSFER\_FUTURE[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-21002-uni_account_cant_transfer_future "-21002 UNI_ACCOUNT_CANT_TRANSFER_FUTURE的直接链接") * 统一账户禁用margin向futures转账。 ### \-21003 NET\_ASSET\_MUST\_LTE\_RATIO[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-21003-net_asset_must_lte_ratio "-21003 NET_ASSET_MUST_LTE_RATIO的直接链接") * margin资产更新失败。 ### \-21004 USER\_NO\_LIABILITY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-21004-user_no_liability "-21004 USER_NO_LIABILITY的直接链接") * 用户不存在统一账户穿仓负债 ### \-21005 NO\_ENOUGH\_ASSET[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-21005-no_enough_asset "-21005 NO_ENOUGH_ASSET的直接链接") * 用户现货钱包BUSD资产不足以偿还统一账户穿仓负债 ### \-21006 HAD\_IN\_PROCESS\_REPAY[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-21006-had_in_process_repay "-21006 HAD_IN_PROCESS_REPAY的直接链接") * 用户存在正在偿还的统一账户穿仓负债 ### \-21007 IN\_FORCE\_LIQUIDATION[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-21007-in_force_liquidation "-21007 IN_FORCE_LIQUIDATION的直接链接") * 强平进行中,用户偿还统一账户穿仓负债失败 订单拒绝错误[​](https://developers.binance.com/docs/zh-CN/algo/error-code#%E8%AE%A2%E5%8D%95%E6%8B%92%E7%BB%9D%E9%94%99%E8%AF%AF "订单拒绝错误的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ 以下错误代码表示撮合引擎返回的订单相关错误: * `-1010 ERROR_MSG_RECEIVED` * `-2010 NEW_ORDER_REJECTED` * `-2011 CANCEL_REJECTED` 结合以下消息将指示特定的错误: | 错误信息 | 描述 | | --- | --- | | "Unknown order sent." | 找不到订单(通过"orderId","clientOrderId","origClientOrderId") | | "Duplicate order sent." | `clientOrderId`已经被使用 | | "Market is closed." | 该交易对不在交易范围 | | "Account has insufficient balance for requested action." | 没有足够的资金来完成行动 | | "Market orders are not supported for this symbol." | 交易对上未启用"MARKET" | | "Iceberg orders are not supported for this symbol." | 交易对上未启用`icebergQty` | | "Stop loss orders are not supported for this symbol." | 交易对上未启用 `STOP_LOSS` | | "Stop loss limit orders are not supported for this symbol." | 交易对上未启`STOP_LOSS_LIMIT` | | "Take profit orders are not supported for this symbol." | 交易对上未启用`TAKE_PROFIT` | | "Take profit limit orders are not supported for this symbol." | 交易对上未启用`TAKE_PROFIT_LIMIT` | | "Price \* QTY is zero or less." | `price` \* `quantity`太小 | | "IcebergQty exceeds QTY." | `icebergQty` 必须少于订单数量 | | "This action is disabled on this account." | 联系客户支持; 该账户已禁用了某些操作。 | | "This account may not place or cancel orders." | 联系客户支持: 该账户已被禁用了交易操作。 | | "Unsupported order combination" | 不允许组合`orderType`, `timeInForce`, `stopPrice`, 和/或 `icebergQty` 。 | | "Order would trigger immediately." | 与最后交易价格相比,订单的止损价无效。 | | "Cancel order is invalid. Check origClientOrderId and orderId." | 未发送`origClientOrderId` 或`orderId` 。 | | "Order would immediately match and take." | `LIMIT_MAKER` 订单类型将立即匹配并进行交易,而不是纯粹的生成订单。 | | "The relationship of the prices for the orders is not correct." | `OCO`订单中设置的价格不符合报价规则:

The rules are:

`SELL Orders`: Limit Price > Last Price > Stop Price

`BUY Orders`: Limit Price < Last Price < Stop Price | | "OCO orders are not supported for this symbol" | `OCO`订单不支持该交易对 | | "Quote order qty market orders are not support for this symbol." | 这个交易对,市价单不支持参数`quoteOrderQty` | | "Trailing stop orders are not supported for this symbol." | 此symbol不支持 `trailingDelta` | | | "Order cancel-replace is not supported for this symbol." | 此symbol不支持 `POST /api/v3/order/cancelReplace` 或者 `order.cancelReplace` (WebSocket API) | | | "This symbol is not permitted for this account." | 账户和交易对的权限不一致 (比如 `SPOT`, `MARGIN` 等)。| | | "This symbol is restricted for this account." | 账户没有权限在此交易对交易 (比如账户只拥有 `ISOLATED_MARGIN`权限,则无法下`SPOT` 订单)。 | | | "Order was not canceled due to cancel restrictions." | `cancelRestrictions` 设置为 `ONLY_NEW` 但订单状态不是 `NEW`

`cancelRestrictions` 设置为 `ONLY_PARTIALLY_FILLED` 但订单状态不是 `PARTIALLY_FILLED`。 | | 关于 POST /api/v3/order/cancelReplace 的错误[​](https://developers.binance.com/docs/zh-CN/algo/error-code#%E5%85%B3%E4%BA%8E-post-apiv3ordercancelreplace-%E7%9A%84%E9%94%99%E8%AF%AF "关于 POST /api/v3/order/cancelReplace 的错误的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-2021 Order cancel-replace partially failed[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2021-order-cancel-replace-partially-failed "-2021 Order cancel-replace partially failed的直接链接") 收到该错误码代表撤单**或者**下单失败。 ### \-2022 Order cancel-replace failed.[​](https://developers.binance.com/docs/zh-CN/algo/error-code#-2022-order-cancel-replace-failed "-2022 Order cancel-replace failed.的直接链接") 收到该错误码代表撤单**和**下单都失败。 * [10xx -常规服务器或网络问题](https://developers.binance.com/docs/zh-CN/algo/error-code#10xx--%E5%B8%B8%E8%A7%84%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%88%96%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98) * [\-1000 UNKNOWN](https://developers.binance.com/docs/zh-CN/algo/error-code#-1000-unknown) * [\-1001 DISCONNECTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-1001-disconnected) * [\-1002 UNAUTHORIZED](https://developers.binance.com/docs/zh-CN/algo/error-code#-1002-unauthorized) * [\-1003 TOO\_MANY\_REQUESTS](https://developers.binance.com/docs/zh-CN/algo/error-code#-1003-too_many_requests) * [\-1004 SERVER\_BUSY](https://developers.binance.com/docs/zh-CN/algo/error-code#-1004-server_busy) * [\-1006 UNEXPECTED\_RESP](https://developers.binance.com/docs/zh-CN/algo/error-code#-1006-unexpected_resp) * [\-1007 TIMEOUT](https://developers.binance.com/docs/zh-CN/algo/error-code#-1007-timeout) * [\-1008 SERVER\_BUSY](https://developers.binance.com/docs/zh-CN/algo/error-code#-1008-server_busy) * [\-1014 UNKNOWN\_ORDER\_COMPOSITION](https://developers.binance.com/docs/zh-CN/algo/error-code#-1014-unknown_order_composition) * [\-1015 TOO\_MANY\_ORDERS](https://developers.binance.com/docs/zh-CN/algo/error-code#-1015-too_many_orders) * [\-1016 SERVICE\_SHUTTING\_DOWN](https://developers.binance.com/docs/zh-CN/algo/error-code#-1016-service_shutting_down) * [\-1020 UNSUPPORTED\_OPERATION](https://developers.binance.com/docs/zh-CN/algo/error-code#-1020-unsupported_operation) * [\-1021 INVALID\_TIMESTAMP](https://developers.binance.com/docs/zh-CN/algo/error-code#-1021-invalid_timestamp) * [\-1022 INVALID\_SIGNATURE](https://developers.binance.com/docs/zh-CN/algo/error-code#-1022-invalid_signature) * [\-1099 Not found, authenticated, or authorized](https://developers.binance.com/docs/zh-CN/algo/error-code#-1099-not-found-authenticated-or-authorized) * [11xx - 2xxx Request issues](https://developers.binance.com/docs/zh-CN/algo/error-code#11xx---2xxx-request-issues) * [\-1100 ILLEGAL\_CHARS](https://developers.binance.com/docs/zh-CN/algo/error-code#-1100-illegal_chars) * [\-1101 TOO\_MANY\_PARAMETERS](https://developers.binance.com/docs/zh-CN/algo/error-code#-1101-too_many_parameters) * [\-1102 MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED](https://developers.binance.com/docs/zh-CN/algo/error-code#-1102-mandatory_param_empty_or_malformed) * [\-1103 UNKNOWN\_PARAM](https://developers.binance.com/docs/zh-CN/algo/error-code#-1103-unknown_param) * [\-1104 UNREAD\_PARAMETERS](https://developers.binance.com/docs/zh-CN/algo/error-code#-1104-unread_parameters) * [\-1105 PARAM\_EMPTY](https://developers.binance.com/docs/zh-CN/algo/error-code#-1105-param_empty) * [\-1106 PARAM\_NOT\_REQUIRED](https://developers.binance.com/docs/zh-CN/algo/error-code#-1106-param_not_required) * [\-1111 BAD\_PRECISION](https://developers.binance.com/docs/zh-CN/algo/error-code#-1111-bad_precision) * [\-1112 NO\_DEPTH](https://developers.binance.com/docs/zh-CN/algo/error-code#-1112-no_depth) * [\-1114 TIF\_NOT\_REQUIRED](https://developers.binance.com/docs/zh-CN/algo/error-code#-1114-tif_not_required) * [\-1115 INVALID\_TIF](https://developers.binance.com/docs/zh-CN/algo/error-code#-1115-invalid_tif) * [\-1116 INVALID\_ORDER\_TYPE](https://developers.binance.com/docs/zh-CN/algo/error-code#-1116-invalid_order_type) * [\-1117 INVALID\_SIDE](https://developers.binance.com/docs/zh-CN/algo/error-code#-1117-invalid_side) * [\-1118 EMPTY\_NEW\_CL\_ORD\_ID](https://developers.binance.com/docs/zh-CN/algo/error-code#-1118-empty_new_cl_ord_id) * [\-1119 EMPTY\_ORG\_CL\_ORD\_ID](https://developers.binance.com/docs/zh-CN/algo/error-code#-1119-empty_org_cl_ord_id) * [\-1120 BAD\_INTERVAL](https://developers.binance.com/docs/zh-CN/algo/error-code#-1120-bad_interval) * [\-1121 BAD\_SYMBOL](https://developers.binance.com/docs/zh-CN/algo/error-code#-1121-bad_symbol) * [\-1125 INVALID\_LISTEN\_KEY](https://developers.binance.com/docs/zh-CN/algo/error-code#-1125-invalid_listen_key) * [\-1127 MORE\_THAN\_XX\_HOURS](https://developers.binance.com/docs/zh-CN/algo/error-code#-1127-more_than_xx_hours) * [\-1128 OPTIONAL\_PARAMS\_BAD\_COMBO](https://developers.binance.com/docs/zh-CN/algo/error-code#-1128-optional_params_bad_combo) * [\-1130 INVALID\_PARAMETER](https://developers.binance.com/docs/zh-CN/algo/error-code#-1130-invalid_parameter) * [\-1131 BAD\_RECV\_WINDOW](https://developers.binance.com/docs/zh-CN/algo/error-code#-1131-bad_recv_window) * [\-1134 BAD\_STRATEGY\_TYPE](https://developers.binance.com/docs/zh-CN/algo/error-code#-1134-bad_strategy_type) * [\-2010 NEW\_ORDER\_REJECTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-2010-new_order_rejected) * [\-2011 CANCEL\_REJECTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-2011-cancel_rejected) * [\-2013 NO\_SUCH\_ORDER](https://developers.binance.com/docs/zh-CN/algo/error-code#-2013-no_such_order) * [\-2014 BAD\_API\_KEY\_FMT](https://developers.binance.com/docs/zh-CN/algo/error-code#-2014-bad_api_key_fmt) * [\-2015 REJECTED\_MBX\_KEY](https://developers.binance.com/docs/zh-CN/algo/error-code#-2015-rejected_mbx_key) * [\-2016 NO\_TRADING\_WINDOW](https://developers.binance.com/docs/zh-CN/algo/error-code#-2016-no_trading_window) * [3xxx-5xxx SAPI 具体问题](https://developers.binance.com/docs/zh-CN/algo/error-code#3xxx-5xxx-sapi-%E5%85%B7%E4%BD%93%E9%97%AE%E9%A2%98) * [\-3000 INNER\_FAILURE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3000-inner_failure) * [\-3001 NEED\_ENABLE\_2FA](https://developers.binance.com/docs/zh-CN/algo/error-code#-3001-need_enable_2fa) * [\-3002 ASSET\_DEFICIENCY](https://developers.binance.com/docs/zh-CN/algo/error-code#-3002-asset_deficiency) * [\-3003 NO\_OPENED\_MARGIN\_ACCOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-3003-no_opened_margin_account) * [\-3004 TRADE\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3004-trade_not_allowed) * [\-3005 TRANSFER\_OUT\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3005-transfer_out_not_allowed) * [\-3006 EXCEED\_MAX\_BORROWABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3006-exceed_max_borrowable) * [\-3007 HAS\_PENDING\_TRANSACTION](https://developers.binance.com/docs/zh-CN/algo/error-code#-3007-has_pending_transaction) * [\-3008 BORROW\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3008-borrow_not_allowed) * [\-3009 ASSET\_NOT\_MORTGAGEABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3009-asset_not_mortgageable) * [\-3010 REPAY\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3010-repay_not_allowed) * [\-3011 BAD\_DATE\_RANGE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3011-bad_date_range) * [\-3012 ASSET\_ADMIN\_BAN\_BORROW](https://developers.binance.com/docs/zh-CN/algo/error-code#-3012-asset_admin_ban_borrow) * [\-3013 LT\_MIN\_BORROWABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3013-lt_min_borrowable) * [\-3014 ACCOUNT\_BAN\_BORROW](https://developers.binance.com/docs/zh-CN/algo/error-code#-3014-account_ban_borrow) * [\-3015 REPAY\_EXCEED\_LIABILITY](https://developers.binance.com/docs/zh-CN/algo/error-code#-3015-repay_exceed_liability) * [\-3016 LT\_MIN\_REPAY](https://developers.binance.com/docs/zh-CN/algo/error-code#-3016-lt_min_repay) * [\-3017 ASSET\_ADMIN\_BAN\_MORTGAGE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3017-asset_admin_ban_mortgage) * [\-3018 ACCOUNT\_BAN\_MORTGAGE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3018-account_ban_mortgage) * [\-3019 ACCOUNT\_BAN\_ROLLOUT](https://developers.binance.com/docs/zh-CN/algo/error-code#-3019-account_ban_rollout) * [\-3020 EXCEED\_MAX\_ROLLOUT](https://developers.binance.com/docs/zh-CN/algo/error-code#-3020-exceed_max_rollout) * [\-3021 PAIR\_ADMIN\_BAN\_TRADE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3021-pair_admin_ban_trade) * [\-3022 ACCOUNT\_BAN\_TRADE](https://developers.binance.com/docs/zh-CN/algo/error-code#-3022-account_ban_trade) * [\-3023 WARNING\_MARGIN\_LEVEL](https://developers.binance.com/docs/zh-CN/algo/error-code#-3023-warning_margin_level) * [\-3024 FEW\_LIABILITY\_LEFT](https://developers.binance.com/docs/zh-CN/algo/error-code#-3024-few_liability_left) * [\-3025 INVALID\_EFFECTIVE\_TIME](https://developers.binance.com/docs/zh-CN/algo/error-code#-3025-invalid_effective_time) * [\-3026 VALIDATION\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3026-validation_failed) * [\-3027 NOT\_VALID\_MARGIN\_ASSET](https://developers.binance.com/docs/zh-CN/algo/error-code#-3027-not_valid_margin_asset) * [\-3028 NOT\_VALID\_MARGIN\_PAIR](https://developers.binance.com/docs/zh-CN/algo/error-code#-3028-not_valid_margin_pair) * [\-3029 TRANSFER\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3029-transfer_failed) * [\-3036 ACCOUNT\_BAN\_REPAY](https://developers.binance.com/docs/zh-CN/algo/error-code#-3036-account_ban_repay) * [\-3037 PNL\_CLEARING](https://developers.binance.com/docs/zh-CN/algo/error-code#-3037-pnl_clearing) * [\-3038 LISTEN\_KEY\_NOT\_FOUND](https://developers.binance.com/docs/zh-CN/algo/error-code#-3038-listen_key_not_found) * [\-3041 BALANCE\_NOT\_CLEARED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3041-balance_not_cleared) * [\-3042 PRICE\_INDEX\_NOT\_FOUND](https://developers.binance.com/docs/zh-CN/algo/error-code#-3042-price_index_not_found) * [\-3043 TRANSFER\_IN\_NOT\_ALLOWED](https://developers.binance.com/docs/zh-CN/algo/error-code#-3043-transfer_in_not_allowed) * [\-3044 SYSTEM\_BUSY](https://developers.binance.com/docs/zh-CN/algo/error-code#-3044-system_busy) * [\-3045 SYSTEM](https://developers.binance.com/docs/zh-CN/algo/error-code#-3045-system) * [\-3999 NOT\_WHITELIST\_USER](https://developers.binance.com/docs/zh-CN/algo/error-code#-3999-not_whitelist_user) * [\-4001 CAPITAL\_INVALID](https://developers.binance.com/docs/zh-CN/algo/error-code#-4001-capital_invalid) * [\-4002 CAPITAL\_IG](https://developers.binance.com/docs/zh-CN/algo/error-code#-4002-capital_ig) * [\-4003 CAPITAL\_IEV](https://developers.binance.com/docs/zh-CN/algo/error-code#-4003-capital_iev) * [\-4004 CAPITAL\_UA](https://developers.binance.com/docs/zh-CN/algo/error-code#-4004-capital_ua) * [\-4005 CAPAITAL\_TOO\_MANY\_REQUEST](https://developers.binance.com/docs/zh-CN/algo/error-code#-4005-capaital_too_many_request) * [\-4006 CAPITAL\_ONLY\_SUPPORT\_PRIMARY\_ACCOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4006-capital_only_support_primary_account) * [\-4007 CAPITAL\_ADDRESS\_VERIFICATION\_NOT\_PASS](https://developers.binance.com/docs/zh-CN/algo/error-code#-4007-capital_address_verification_not_pass) * [\-4008 CAPITAL\_ADDRESS\_TAG\_VERIFICATION\_NOT\_PASS](https://developers.binance.com/docs/zh-CN/algo/error-code#-4008-capital_address_tag_verification_not_pass) * [\-4010 CAPITAL\_WHITELIST\_EMAIL\_CONFIRM](https://developers.binance.com/docs/zh-CN/algo/error-code#-4010-capital_whitelist_email_confirm) * [\-4011 CAPITAL\_WHITELIST\_EMAIL\_EXPIRED](https://developers.binance.com/docs/zh-CN/algo/error-code#-4011-capital_whitelist_email_expired) * [\-4012 CAPITAL\_WHITELIST\_CLOSE](https://developers.binance.com/docs/zh-CN/algo/error-code#-4012-capital_whitelist_close) * [\-4013 CAPITAL\_WITHDRAW\_2FA\_VERIFY](https://developers.binance.com/docs/zh-CN/algo/error-code#-4013-capital_withdraw_2fa_verify) * [\-4014 CAPITAL\_WITHDRAW\_LOGIN\_DELAY](https://developers.binance.com/docs/zh-CN/algo/error-code#-4014-capital_withdraw_login_delay) * [\-4015 CAPITAL\_WITHDRAW\_RESTRICTED\_MINUTE](https://developers.binance.com/docs/zh-CN/algo/error-code#-4015-capital_withdraw_restricted_minute) * [\-4016 CAPITAL\_WITHDRAW\_RESTRICTED\_PASSWORD](https://developers.binance.com/docs/zh-CN/algo/error-code#-4016-capital_withdraw_restricted_password) * [\-4017 CAPITAL\_WITHDRAW\_RESTRICTED\_UNBIND\_2FA](https://developers.binance.com/docs/zh-CN/algo/error-code#-4017-capital_withdraw_restricted_unbind_2fa) * [\-4018 CAPITAL\_WITHDRAW\_ASSET\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-4018-capital_withdraw_asset_not_exist) * [\-4019 CAPITAL\_WITHDRAW\_ASSET\_PROHIBIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4019-capital_withdraw_asset_prohibit) * [\-4021 CAPITAL\_WITHDRAW\_AMOUNT\_MULTIPLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-4021-capital_withdraw_amount_multiple) * [\-4022 CAPITAL\_WITHDRAW\_MIN\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4022-capital_withdraw_min_amount) * [\-4023 CAPITAL\_WITHDRAW\_MAX\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4023-capital_withdraw_max_amount) * [\-4024 CAPITAL\_WITHDRAW\_USER\_NO\_ASSET](https://developers.binance.com/docs/zh-CN/algo/error-code#-4024-capital_withdraw_user_no_asset) * [\-4025 CAPITAL\_WITHDRAW\_USER\_ASSET\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/algo/error-code#-4025-capital_withdraw_user_asset_less_than_zero) * [\-4026 CAPITAL\_WITHDRAW\_USER\_ASSET\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/algo/error-code#-4026-capital_withdraw_user_asset_not_enough) * [\-4027 CAPITAL\_WITHDRAW\_GET\_TRAN\_ID\_FAILURE](https://developers.binance.com/docs/zh-CN/algo/error-code#-4027-capital_withdraw_get_tran_id_failure) * [\-4028 CAPITAL\_WITHDRAW\_MORE\_THAN\_FEE](https://developers.binance.com/docs/zh-CN/algo/error-code#-4028-capital_withdraw_more_than_fee) * [\-4029 CAPITAL\_WITHDRAW\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-4029-capital_withdraw_not_exist) * [\-4030 CAPITAL\_WITHDRAW\_CONFIRM\_SUCCESS](https://developers.binance.com/docs/zh-CN/algo/error-code#-4030-capital_withdraw_confirm_success) * [\-4031 CAPITAL\_WITHDRAW\_CANCEL\_FAILURE](https://developers.binance.com/docs/zh-CN/algo/error-code#-4031-capital_withdraw_cancel_failure) * [\-4032 CAPITAL\_WITHDRAW\_CHECKSUM\_VERIFY\_FAILURE](https://developers.binance.com/docs/zh-CN/algo/error-code#-4032-capital_withdraw_checksum_verify_failure) * [\-4033 CAPITAL\_WITHDRAW\_ILLEGAL\_ADDRESS](https://developers.binance.com/docs/zh-CN/algo/error-code#-4033-capital_withdraw_illegal_address) * [\-4034 CAPITAL\_WITHDRAW\_ADDRESS\_CHEAT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4034-capital_withdraw_address_cheat) * [\-4035 CAPITAL\_WITHDRAW\_NOT\_WHITE\_ADDRESS](https://developers.binance.com/docs/zh-CN/algo/error-code#-4035-capital_withdraw_not_white_address) * [\-4036 CAPITAL\_WITHDRAW\_NEW\_ADDRESS](https://developers.binance.com/docs/zh-CN/algo/error-code#-4036-capital_withdraw_new_address) * [\-4037 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_FAIL](https://developers.binance.com/docs/zh-CN/algo/error-code#-4037-capital_withdraw_resend_email_fail) * [\-4038 CAPITAL\_WITHDRAW\_RESEND\_EMAIL\_TIME\_OUT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4038-capital_withdraw_resend_email_time_out) * [\-4039 CAPITAL\_USER\_EMPTY](https://developers.binance.com/docs/zh-CN/algo/error-code#-4039-capital_user_empty) * [\-4041 CAPITAL\_MINUTE\_TOO\_SMALL](https://developers.binance.com/docs/zh-CN/algo/error-code#-4041-capital_minute_too_small) * [\-4042 CAPITAL\_CHARGE\_NOT\_RESET](https://developers.binance.com/docs/zh-CN/algo/error-code#-4042-capital_charge_not_reset) * [\-4043 CAPITAL\_ADDRESS\_TOO\_MUCH](https://developers.binance.com/docs/zh-CN/algo/error-code#-4043-capital_address_too_much) * [\-4044 CAPITAL\_BLACKLIST\_COUNTRY\_GET\_ADDRESS](https://developers.binance.com/docs/zh-CN/algo/error-code#-4044-capital_blacklist_country_get_address) * [\-4045 CAPITAL\_GET\_ASSET\_ERROR](https://developers.binance.com/docs/zh-CN/algo/error-code#-4045-capital_get_asset_error) * [\-4046 CAPITAL\_AGREEMENT\_NOT\_CONFIRMED](https://developers.binance.com/docs/zh-CN/algo/error-code#-4046-capital_agreement_not_confirmed) * [\-4047 CAPITAL\_DATE\_INTERVAL\_LIMIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4047-capital_date_interval_limit) * [\-4060 CAPITAL\_WITHDRAW\_USER\_ASSET\_LOCK\_DEPOSIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-4060-capital_withdraw_user_asset_lock_deposit) * [\-5001 ASSET\_DRIBBLET\_CONVERT\_SWITCH\_OFF](https://developers.binance.com/docs/zh-CN/algo/error-code#-5001-asset_dribblet_convert_switch_off) * [\-5002 ASSET\_ASSET\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/algo/error-code#-5002-asset_asset_not_enough) * [\-5003 ASSET\_USER\_HAVE\_NO\_ASSET](https://developers.binance.com/docs/zh-CN/algo/error-code#-5003-asset_user_have_no_asset) * [\-5004 USER\_OUT\_OF\_TRANSFER\_FLOAT](https://developers.binance.com/docs/zh-CN/algo/error-code#-5004-user_out_of_transfer_float) * [\-5005 USER\_ASSET\_AMOUNT\_IS\_TOO\_LOW](https://developers.binance.com/docs/zh-CN/algo/error-code#-5005-user_asset_amount_is_too_low) * [\-5006 USER\_CAN\_NOT\_REQUEST\_IN\_24\_HOURS](https://developers.binance.com/docs/zh-CN/algo/error-code#-5006-user_can_not_request_in_24_hours) * [\-5007 AMOUNT\_OVER\_ZERO](https://developers.binance.com/docs/zh-CN/algo/error-code#-5007-amount_over_zero) * [\-5008 ASSET\_WITHDRAW\_WITHDRAWING\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/algo/error-code#-5008-asset_withdraw_withdrawing_not_enough) * [\-5009 PRODUCT\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-5009-product_not_exist) * [\-5010 TRANSFER\_FAIL](https://developers.binance.com/docs/zh-CN/algo/error-code#-5010-transfer_fail) * [\-5011 FUTURE\_ACCT\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-5011-future_acct_not_exist) * [\-5012 TRANSFER\_PENDING](https://developers.binance.com/docs/zh-CN/algo/error-code#-5012-transfer_pending) * [\-5021 PARENT\_SUB\_HAVE\_NO\_RELATION](https://developers.binance.com/docs/zh-CN/algo/error-code#-5021-parent_sub_have_no_relation) * [\-5012 FUTURE\_ACCT\_OR\_SUBRELATION\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-5012-future_acct_or_subrelation_not_exist) * [6XXX - 币安宝相关](https://developers.binance.com/docs/zh-CN/algo/error-code#6xxx---%E5%B8%81%E5%AE%89%E5%AE%9D%E7%9B%B8%E5%85%B3) * [\-6001 DAILY\_PRODUCT\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-6001-daily_product_not_exist) * [\-6003 DAILY\_PRODUCT\_NOT\_ACCESSIBLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-6003-daily_product_not_accessible) * [\-6004 DAILY\_PRODUCT\_NOT\_PURCHASABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-6004-daily_product_not_purchasable) * [\-6005 DAILY\_LOWER\_THAN\_MIN\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-6005-daily_lower_than_min_purchase_limit) * [\-6006 DAILY\_REDEEM\_AMOUNT\_ERROR](https://developers.binance.com/docs/zh-CN/algo/error-code#-6006-daily_redeem_amount_error) * [\-6007 DAILY\_REDEEM\_TIME\_ERROR](https://developers.binance.com/docs/zh-CN/algo/error-code#-6007-daily_redeem_time_error) * [\-6008 DAILY\_PRODUCT\_NOT\_REDEEMABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-6008-daily_product_not_redeemable) * [\-6009 REQUEST\_FREQUENCY\_TOO\_HIGH](https://developers.binance.com/docs/zh-CN/algo/error-code#-6009-request_frequency_too_high) * [\-6011 EXCEEDED\_USER\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-6011-exceeded_user_purchase_limit) * [\-6012 BALANCE\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/algo/error-code#-6012-balance_not_enough) * [\-6013 PURCHASING\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-6013-purchasing_failed) * [\-6014 UPDATE\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-6014-update_failed) * [\-6015 EMPTY\_REQUEST\_BODY](https://developers.binance.com/docs/zh-CN/algo/error-code#-6015-empty_request_body) * [\-6016 PARAMS\_ERR](https://developers.binance.com/docs/zh-CN/algo/error-code#-6016-params_err) * [\-6017 NOT\_IN\_WHITELIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-6017-not_in_whitelist) * [\-6018 ASSET\_NOT\_ENOUGH](https://developers.binance.com/docs/zh-CN/algo/error-code#-6018-asset_not_enough) * [\-6019 PENDING](https://developers.binance.com/docs/zh-CN/algo/error-code#-6019-pending) * [\-6020 PROJECT\_NOT\_EXISTS](https://developers.binance.com/docs/zh-CN/algo/error-code#-6020-project_not_exists) * [70xx - 期货](https://developers.binance.com/docs/zh-CN/algo/error-code#70xx---%E6%9C%9F%E8%B4%A7) * [\-7001 FUTURES\_BAD\_DATE\_RANGE](https://developers.binance.com/docs/zh-CN/algo/error-code#-7001-futures_bad_date_range) * [\-7002 FUTURES\_BAD\_TYPE](https://developers.binance.com/docs/zh-CN/algo/error-code#-7002-futures_bad_type) * [20xxx - 合约/现货策略交易](https://developers.binance.com/docs/zh-CN/algo/error-code#20xxx---%E5%90%88%E7%BA%A6%E7%8E%B0%E8%B4%A7%E7%AD%96%E7%95%A5%E4%BA%A4%E6%98%93) * [\-20121 Invalid symbol](https://developers.binance.com/docs/zh-CN/algo/error-code#-20121-invalid-symbol) * [\-20124 Invalid algo id or it has been completed](https://developers.binance.com/docs/zh-CN/algo/error-code#-20124-invalid-algo-id-or-it-has-been-completed) * [\-20130 Invalid data sent for a parameter](https://developers.binance.com/docs/zh-CN/algo/error-code#-20130-invalid-data-sent-for-a-parameter) * [\-20132 The client algo id is duplicated](https://developers.binance.com/docs/zh-CN/algo/error-code#-20132-the-client-algo-id-is-duplicated) * [\-20194 Duration is too short to execute all required quantity](https://developers.binance.com/docs/zh-CN/algo/error-code#-20194-duration-is-too-short-to-execute-all-required-quantity) * [\-20195 The total size is too small](https://developers.binance.com/docs/zh-CN/algo/error-code#-20195-the-total-size-is-too-small) * [\-20196 The total size is too large](https://developers.binance.com/docs/zh-CN/algo/error-code#-20196-the-total-size-is-too-large) * [\-20198 Reach the max open orders allowed](https://developers.binance.com/docs/zh-CN/algo/error-code#-20198-reach-the-max-open-orders-allowed) * [\-20204 The notional of USD is less or more than the limit](https://developers.binance.com/docs/zh-CN/algo/error-code#-20204-the-notional-of-usd-is-less-or-more-than-the-limit) * [过滤器故障](https://developers.binance.com/docs/zh-CN/algo/error-code#%E8%BF%87%E6%BB%A4%E5%99%A8%E6%95%85%E9%9A%9C) * [10xxx - 质押借币](https://developers.binance.com/docs/zh-CN/algo/error-code#10xxx---%E8%B4%A8%E6%8A%BC%E5%80%9F%E5%B8%81) * [\-10001 SYSTEM\_MAINTENANCE](https://developers.binance.com/docs/zh-CN/algo/error-code#-10001-system_maintenance) * [\-10002 INVALID\_INPUT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10002-invalid_input) * [\-10005 NO\_RECORDS](https://developers.binance.com/docs/zh-CN/algo/error-code#-10005-no_records) * [\-10007 COIN\_NOT\_LOANABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-10007-coin_not_loanable) * [\-10008 COIN\_NOT\_LOANABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-10008-coin_not_loanable) * [\-10009 COIN\_NOT\_COLLATERAL](https://developers.binance.com/docs/zh-CN/algo/error-code#-10009-coin_not_collateral) * [\-10010 COIN\_NOT\_COLLATERAL](https://developers.binance.com/docs/zh-CN/algo/error-code#-10010-coin_not_collateral) * [\-10011 INSUFFICIENT\_ASSET](https://developers.binance.com/docs/zh-CN/algo/error-code#-10011-insufficient_asset) * [\-10012 INVALID\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10012-invalid_amount) * [\-10013 INSUFFICIENT\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10013-insufficient_amount) * [\-10015 DEDUCTION\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10015-deduction_failed) * [\-10016 LOAN\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10016-loan_failed) * [\-10017 REPAY\_EXCEED\_DEBT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10017-repay_exceed_debt) * [\-10018 INVALID\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10018-invalid_amount) * [\-10019 CONFIG\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-10019-config_not_exist) * [\-10020 UID\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-10020-uid_not_exist) * [\-10021 ORDER\_NOT\_EXIST](https://developers.binance.com/docs/zh-CN/algo/error-code#-10021-order_not_exist) * [\-10022 INVALID\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10022-invalid_amount) * [\-10023 ADJUST\_LTV\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10023-adjust_ltv_failed) * [\-10024 ADJUST\_LTV\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10024-adjust_ltv_not_supported) * [\-10025 REPAY\_FAILED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10025-repay_failed) * [\-10026 INVALID\_PARAMETER](https://developers.binance.com/docs/zh-CN/algo/error-code#-10026-invalid_parameter) * [\-10028 INVALID\_PARAMETER](https://developers.binance.com/docs/zh-CN/algo/error-code#-10028-invalid_parameter) * [\-10029 AMOUNT\_TOO\_SMALL](https://developers.binance.com/docs/zh-CN/algo/error-code#-10029-amount_too_small) * [\-10030 AMOUNT\_TOO\_LARGE](https://developers.binance.com/docs/zh-CN/algo/error-code#-10030-amount_too_large) * [\-10031 QUOTA\_REACHED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10031-quota_reached) * [\-10032 REPAY\_NOT\_AVAILABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-10032-repay_not_available) * [\-10034 REPAY\_NOT\_AVAILABLE](https://developers.binance.com/docs/zh-CN/algo/error-code#-10034-repay_not_available) * [\-10039 AMOUNT\_TOO\_SMALL](https://developers.binance.com/docs/zh-CN/algo/error-code#-10039-amount_too_small) * [\-10040 AMOUNT\_TOO\_LARGE](https://developers.binance.com/docs/zh-CN/algo/error-code#-10040-amount_too_large) * [\-10041 INSUFFICIENT\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10041-insufficient_amount) * [\-10042 ASSET\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10042-asset_not_supported) * [\-10043 ASSET\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10043-asset_not_supported) * [\-10044 QUOTA\_REACHED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10044-quota_reached) * [\-10045 COLLTERAL\_REPAY\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10045-collteral_repay_not_supported) * [\-10046 EXCEED\_MAX\_ADJUSTMENT](https://developers.binance.com/docs/zh-CN/algo/error-code#-10046-exceed_max_adjustment) * [\-10047 REGION\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/algo/error-code#-10047-region_not_supported) * [13xxx - 杠杆代币](https://developers.binance.com/docs/zh-CN/algo/error-code#13xxx---%E6%9D%A0%E6%9D%86%E4%BB%A3%E5%B8%81) * [\-13000 BLVT\_FORBID\_REDEEM](https://developers.binance.com/docs/zh-CN/algo/error-code#-13000-blvt_forbid_redeem) * [\-13001 BLVT\_EXCEED\_DAILY\_LIMIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-13001-blvt_exceed_daily_limit) * [\-13002 BLVT\_EXCEED\_TOKEN\_DAILY\_LIMIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-13002-blvt_exceed_token_daily_limit) * [\-13003 BLVT\_FORBID\_PURCHASE](https://developers.binance.com/docs/zh-CN/algo/error-code#-13003-blvt_forbid_purchase) * [\-13004 BLVT\_EXCEED\_DAILY\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-13004-blvt_exceed_daily_purchase_limit) * [\-13005 BLVT\_EXCEED\_TOKEN\_DAILY\_PURCHASE\_LIMIT](https://developers.binance.com/docs/zh-CN/algo/error-code#-13005-blvt_exceed_token_daily_purchase_limit) * [\-13006 BLVT\_PURCHASE\_LESS\_MIN\_AMOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-13006-blvt_purchase_less_min_amount) * [\-13007 BLVT\_PURCHASE\_AGREEMENT\_NOT\_SIGN](https://developers.binance.com/docs/zh-CN/algo/error-code#-13007-blvt_purchase_agreement_not_sign) * [12xxx - 流动性挖矿](https://developers.binance.com/docs/zh-CN/algo/error-code#12xxx---%E6%B5%81%E5%8A%A8%E6%80%A7%E6%8C%96%E7%9F%BF) * [\-12014 TOO MANY REQUESTS](https://developers.binance.com/docs/zh-CN/algo/error-code#-12014-too-many-requests) * [18xxx - 币安码](https://developers.binance.com/docs/zh-CN/algo/error-code#18xxx---%E5%B8%81%E5%AE%89%E7%A0%81) * [\-18002](https://developers.binance.com/docs/zh-CN/algo/error-code#-18002) * [\-18003](https://developers.binance.com/docs/zh-CN/algo/error-code#-18003) * [\-18004](https://developers.binance.com/docs/zh-CN/algo/error-code#-18004) * [\-18005](https://developers.binance.com/docs/zh-CN/algo/error-code#-18005) * [\-18006](https://developers.binance.com/docs/zh-CN/algo/error-code#-18006) * [\-18007](https://developers.binance.com/docs/zh-CN/algo/error-code#-18007) * [21xxx - 統一帳戶](https://developers.binance.com/docs/zh-CN/algo/error-code#21xxx---%E7%B5%B1%E4%B8%80%E5%B8%B3%E6%88%B6) * [\-21001 USER\_IS\_NOT\_UNIACCOUNT](https://developers.binance.com/docs/zh-CN/algo/error-code#-21001-user_is_not_uniaccount) * [\-21002 UNI\_ACCOUNT\_CANT\_TRANSFER\_FUTURE](https://developers.binance.com/docs/zh-CN/algo/error-code#-21002-uni_account_cant_transfer_future) * [\-21003 NET\_ASSET\_MUST\_LTE\_RATIO](https://developers.binance.com/docs/zh-CN/algo/error-code#-21003-net_asset_must_lte_ratio) * [\-21004 USER\_NO\_LIABILITY](https://developers.binance.com/docs/zh-CN/algo/error-code#-21004-user_no_liability) * [\-21005 NO\_ENOUGH\_ASSET](https://developers.binance.com/docs/zh-CN/algo/error-code#-21005-no_enough_asset) * [\-21006 HAD\_IN\_PROCESS\_REPAY](https://developers.binance.com/docs/zh-CN/algo/error-code#-21006-had_in_process_repay) * [\-21007 IN\_FORCE\_LIQUIDATION](https://developers.binance.com/docs/zh-CN/algo/error-code#-21007-in_force_liquidation) * [订单拒绝错误](https://developers.binance.com/docs/zh-CN/algo/error-code#%E8%AE%A2%E5%8D%95%E6%8B%92%E7%BB%9D%E9%94%99%E8%AF%AF) * [关于 POST /api/v3/order/cancelReplace 的错误](https://developers.binance.com/docs/zh-CN/algo/error-code#%E5%85%B3%E4%BA%8E-post-apiv3ordercancelreplace-%E7%9A%84%E9%94%99%E8%AF%AF) * [\-2021 Order cancel-replace partially failed](https://developers.binance.com/docs/zh-CN/algo/error-code#-2021-order-cancel-replace-partially-failed) * [\-2022 Order cancel-replace failed.](https://developers.binance.com/docs/zh-CN/algo/error-code#-2022-order-cancel-replace-failed) --- # Cancel Algo Order(TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#__docusaurus_skipToContent_fallback) 本页总览 取消TWAP策略订单(TRADE) ================= 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- 取消正在委托的TWAP订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------- DELETE `/sapi/v1/algo/spot/order` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoId | LONG | YES | eg. 14511 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- { "algoId": 14511, //策略订单ID "success": true, "code": 0, "msg": "OK"} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Current Algo Open Orders(USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询当前策略订单挂单(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- 查询当前策略订单挂单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/algo/spot/openOrders` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- { "total": 1, "orders": [ { "algoId": 14517, //策略订单ID "symbol": "ETHUSDT", //交易对 "side": "SELL", //买卖方向 "totalQty": "5.000", //总共下单数量 "executedQty": "0.000", //执行数量 "executedAmt": "0.00000000", //执行价值 "avgPrice": "0.00", //平均价格 "clientAlgoId": "d7096549481642f8a0bb69e9e2e31f2e", //用户自定义策略订单ID "bookTime": 1649756817004, //用户下单时间 "endTime": 0, //结束时间 "algoStatus": "WORKING", //策略订单状态 "algoType": "VP", //策略订单类型 "urgency": "LOW" //执行速率 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Current-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Sub Orders(USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询执行子订单(USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ 获取指定 algoId 的相应子订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/algo/spot/subOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoId | LONG | YES | | | page | INT | NO | 默认1 | | pageSize | INT | NO | 最小 1, 最大 100; 默认 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ { "total": 1, "executedQty": "1.000", "executedAmt": "3229.44000000", "subOrders": [ { "algoId": 13723, //策略订单ID "orderId": 8389765519993908929, //子订单ID "orderStatus": "FILLED", //子订单状态 "executedQty": "1.000", //执行数量 "executedAmt": "3229.44000000", //执行价值 "feeAmt": "-1.61471999", //手续费 "feeAsset": "USDT", //手续费币种 "bookTime": 1649319001964, //下单时间 "avgPrice": "3229.44", //平均价格 "side": "SELL", //买卖方向 "symbol": "ETHUSDT", //交易对 "subId": 1, //子订单执行顺序ID "timeInForce": "IMMEDIATE_OR_CANCEL", //有效方式 "origQty": "1.000" //原始委托数量 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Sub-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Historical Algo Orders(USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询历史策略订单(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ 查询现货TWAP历史订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/algo/spot/historicalOrders` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 eg. BTCUSDT | | side | ENUM | NO | BUY 或者 SELL | | startTime | LONG | NO | 毫秒级时间戳 eg.1641522717552 | | endTime | LONG | NO | 毫秒级时间戳 eg.1641522526562 | | page | INT | NO | 默认 1 | | pageSize | INT | NO | 最小 1, 最大 100; 默认 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ { "total": 1, "orders": [ { "algoId": 14518, //策略订单ID "symbol": "BNBUSDT", //交易对 "side": "BUY", //买卖方向 "totalQty": "100.00", //总共下单数量 "executedQty": "0.00", //执行数量 "executedAmt": "0.00000000", //执行价值 "avgPrice": "0.000", //平均价格 "clientAlgoId": "acacab56b3c44bef9f6a8f8ebd2a8408", //用户自定义策略订单ID "bookTime": 1649757019503, //用户下单时间 "endTime": 1649757088101, //结束时间 "algoStatus": "CANCELLED", //策略订单状态 "algoType": "VP", //策略订单类型 "urgency": "LOW" //执行速率 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/algo/spot-algo/Query-Historical-Algo-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get supported trading pairs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis#__docusaurus_skipToContent_fallback) 本页总览 Get supported trading pairs =========================== POST /papi/v1/ramp/connect/sell/trading-pairs ### Request Body[​](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis#request-body "Request Body的直接链接") No request body ### Response Body[​](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis#response-body "Response Body的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | fiatCurrencies | string array | fiat currency list | | cryptoCurrencies | string array | crypto currency list | ### Example[​](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis#example "Example的直接链接") Response: { "success": true, "code": "000000", "message": "success", "data": { "fiatCurrencies": [ "USD", "EUR", "VND", "AUD", "TWD", "DEFAULT" ], "cryptoCurrencies": [ "BTC", "ETH", "BNB", "USDT", "USDC", "DAI" ] }} * [Request Body](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis#request-body) * [Response Body](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis#response-body) * [Example](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis#example) --- # Typical flow | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#__docusaurus_skipToContent_fallback) 本页总览 Typical Buy Flow ================ Overview[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#overview "Overview的直接链接") ----------------------------------------------------------------------------------------------------------------- This document describes the standard cryptocurrency purchase flow using Binance Connect's on-ramp service. The sequence diagram below illustrates the interaction between partner systems and Binance Connect APIs throughout the purchase process. Flow Steps[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#flow-steps "Flow Steps的直接链接") ----------------------------------------------------------------------------------------------------------------------- ### 1\. Initialize[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#1-initialize "1. Initialize的直接链接") * Partner frontend renders the buy interface for users * Backend provides necessary configuration and settings (when applicable) ### 2\. Query Options[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#2-query-options "2. Query Options的直接链接") * Fetch supported blockchain networks for crypto delivery * Retrieve available trading pairs * Get supported payment methods * Return data to the frontend * You can be done in parallel. Depending on your UI/UX design, you may choose to call these APIs in different sequences. ### 3\. Get Quote[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#3-get-quote "3. Get Quote的直接链接") * Request real-time price quote for the selected trading pair, payment method and amount * Display quote information to the user ### 4\. Create PreOrder[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#4-create-preorder "4. Create PreOrder的直接链接") * Submit pre-order request to Binance Connect with user's selection * Receive a redirect URL for payment processing ### 5\. Payment[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#5-payment "5. Payment的直接链接") * Redirect user to Binance * User completes the purchase using their preferred payment method * Binance processes the transaction ### 6\. Confirmation[​](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#6-confirmation "6. Confirmation的直接链接") * Receive webhook notifications for order status updates * Query order details to confirm final transaction status * Update user interface with purchase results and crypto delivery details ![buy-flow.png](https://developers.binance.com/docs/zh-CN/assets/images/buy-flow-b437ea0f6bd98aded4729814c6f95783.png) * [Overview](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#overview) * [Flow Steps](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#flow-steps) * [1\. Initialize](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#1-initialize) * [2\. Query Options](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#2-query-options) * [3\. Get Quote](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#3-get-quote) * [4\. Create PreOrder](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#4-create-preorder) * [5\. Payment](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#5-payment) * [6\. Confirmation](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis#6-confirmation) --- # Convert feature | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/convert#__docusaurus_skipToContent_fallback) 本页总览 Convert ======= Binance Connect provides a flexible and powerful Convert capability as part of the On-ramp (Buy) functionality, through which you can quickly convert one cryptocurrency to another with competitive rates! The Convert capability is a branch of the On-ramp flow that allows users to exchange their existing cryptocurrency holdings directly without going through fiat currency. This is particularly useful for: * Converting between different cryptocurrencies * Portfolio rebalancing * Taking advantage of market opportunities As a partner (client), the conversion process is seamless and uses the same On-ramp APIs with specific parameters. There are no separate Convert APIs - it utilizes the existing On-ramp infrastructure. Key Differences for Convert Operations[​](https://developers.binance.com/docs/zh-CN/binance_connect/convert#key-differences-for-convert-operations "Key Differences for Convert Operations的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- When using the On-ramp APIs for Convert operations, there are some key differences: ### 1\. Fiat Fields[​](https://developers.binance.com/docs/zh-CN/binance_connect/convert#1-fiat-fields "1. Fiat Fields的直接链接") For Convert operations, the following fields will be empty since no fiat currency is involved: * `fiat` - This field will be empty * `fiatAmount` - This field will be 0 ### 2\. Additional Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_connect/convert#2-additional-response-fields "2. Additional Response Fields的直接链接") The [Get order detail](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/6.query-order-details) API and webhook payload will include an additional object field when processing Convert orders: **For API responses:** { "convertInfo": { "fromCoin": "BTC", "fromCoinAmount": "0.01" }} **For webhook payloads:** { "convertInfo": { "fromCoin": "BTC", "fromCoinAmount": "0.01" }} #### ConvertInfo Fields:[​](https://developers.binance.com/docs/zh-CN/binance_connect/convert#convertinfo-fields "ConvertInfo Fields:的直接链接") * `fromCoin`: The source cryptocurrency being converted from * `fromCoinAmount`: The amount of source cryptocurrency being converted ### 3\. Order Status Flow[​](https://developers.binance.com/docs/zh-CN/binance_connect/convert#3-order-status-flow "3. Order Status Flow的直接链接") Convert operations will use the following order statuses: * `CONVERT_PROCESSING` (3): In the process of converting crypto * `CONVERT_COMPLETED` (4): Successfully converted crypto. The converted crypto is in the user's Binance wallet, but the withdrawal has not been initiated yet For detailed order status information, refer to [Order Status](https://developers.binance.com/docs/zh-CN/binance_connect/basics/7.order-status) . * [Key Differences for Convert Operations](https://developers.binance.com/docs/zh-CN/binance_connect/convert#key-differences-for-convert-operations) * [1\. Fiat Fields](https://developers.binance.com/docs/zh-CN/binance_connect/convert#1-fiat-fields) * [2\. Additional Response Fields](https://developers.binance.com/docs/zh-CN/binance_connect/convert#2-additional-response-fields) * [3\. Order Status Flow](https://developers.binance.com/docs/zh-CN/binance_connect/convert#3-order-status-flow) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/introduction#__docusaurus_skipToContent_fallback) Build with Binance Connect ========================== Welcome to Binance Connect’s Open API Documentation. Our platform offers a comprehensive suite of flexible APIs and SDKs, designed for a wide variety of Web3 partners such as crypto wallets, Defi projects, etc. With these Open APIs and SDKs, you can easily make on/off ramp transactions in hundreds of regions, using hundreds of payment methods, in the mode of fiat currency or P2P trading. Join us now, you can quickly make your product have all the payment channels and capabilities of Binance Fiat and Binance P2P with a few lines of code. --- # 基本信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/algo/general-info#__docusaurus_skipToContent_fallback) 本页总览 基本信息 ==== API 基本信息[​](https://developers.binance.com/docs/zh-CN/algo/general-info#api-%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "API 基本信息的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- * 接口可能需要用户的 API Key,如何创建API-KEY请参考[这里](https://www.binance.com/cn/support/articles/360002502072) * 本篇列出接口的 base URL 有: * **[https://api.binance.com](https://api.binance.com/) ** * **[https://api-gcp.binance.com](https://api-gcp.binance.com/) ** * **[https://api1.binance.com](https://api1.binance.com/) ** * **[https://api2.binance.com](https://api2.binance.com/) ** * **[https://api3.binance.com](https://api3.binance.com/) ** * **[https://api4.binance.com](https://api4.binance.com/) ** * 上述列表的最后4个接口 (`api1`\-`api4`) 可能会提供更好的性能,但其稳定性略为逊色。因此,请务必使用最适合您现有配置的那款。 * 所有接口的响应都是 JSON 格式。 * 响应中如有数组,数组元素以时间**升序**排列,越早的数据越提前。 * 所有时间、时间戳均为UNIX时间,单位为**毫秒**。 ### HTTP 返回代码[​](https://developers.binance.com/docs/zh-CN/algo/general-info#http-%E8%BF%94%E5%9B%9E%E4%BB%A3%E7%A0%81 "HTTP 返回代码的直接链接") * HTTP `4XX` 错误码用于指示错误的请求内容、行为、格式。问题在于请求者。 * HTTP `403` 错误码表示违反WAF限制(Web应用程序防火墙)。 * HTTP `409` 错误码表示重新下单(cancelReplace)的请求部分成功。(比如取消订单失败,但是下单成功了) * HTTP `429` 错误码表示警告访问频次超限,即将被封IP。 * HTTP `418` 表示收到429后继续访问,于是被封了。 * HTTP `5XX` 错误码用于指示Binance服务侧的问题。 ### 接口错误代码[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E6%8E%A5%E5%8F%A3%E9%94%99%E8%AF%AF%E4%BB%A3%E7%A0%81 "接口错误代码的直接链接") * 使用接口 `/api/v3`, 以及 `/sapi/v1/margin`时, 每个接口都有可能抛出异常; > API 与 SAPI 的错误代码返回形式如下: { "code": -1121, "msg": "Invalid symbol."} * 具体的错误码及其解释在 [错误代码](https://developers.binance.com/docs/zh-CN/algo/general-info#cf68bca02a) . ### 接口的基本信息[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E6%8E%A5%E5%8F%A3%E7%9A%84%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "接口的基本信息的直接链接") * `GET` 方法的接口, 参数必须在 `query string`中发送。 * `POST`, `PUT`, 和 `DELETE` 方法的接口,参数可以在内容形式为`application/x-www-form-urlencoded`的 `query string` 中发送,也可以在 `request body` 中发送。 如果你喜欢,也可以混合这两种方式发送参数。 * 对参数的顺序不做要求。 * 但如果同一个参数名在query string和request body中都有,query string中的会被优先采用。 * * * 访问限制[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "访问限制的直接链接") ---------------------------------------------------------------------------------------------------------------------- ### 访问限制基本信息[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "访问限制基本信息的直接链接") * 以下 是`intervalLetter` 作为头部值: * SECOND => S * MINUTE => M * HOUR => H * DAY => D * 在 `/api/v3/exchangeInfo` `rateLimits` 数组中包含与交易的有关RAW\_REQUESTS,REQUEST\_WEIGHT和ORDERS速率限制相关的对象。这些在 `限制种类 (rateLimitType)` 下的 `枚举定义` 部分中进一步定义。 * 违反任何一个速率限制时(访问频次限制或下单速率限制),将返回429。 ### IP 访问限制[​](https://developers.binance.com/docs/zh-CN/algo/general-info#ip-%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "IP 访问限制的直接链接") * 每个请求将包含一个`X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)`的头,其中包含当前IP所有请求的已使用权重。 * 每一个接口均有一个相应的权重(weight),有的接口根据参数不同可能拥有不同的权重。越消耗资源的接口权重就会越大。 * 收到429时,您有责任停止发送请求,不得滥用API。 * **收到429后仍然继续违反访问限制,会被封禁IP,并收到418错误码** * 频繁违反限制,封禁时间会逐渐延长,**从最短2分钟到最长3天**。 * `Retry-After`的头会与带有418或429的响应发送,并且会给出**以秒为单位**的等待时长(如果是429)以防止禁令,或者如果是418,直到禁令结束。 * **访问限制是基于IP的,而不是API Key** ###下单频率限制 * 每个成功的下单回报将包含一个`X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)`的头,其中包含当前账户已用的下单限制数量。 * 当下单数超过限制时,会收到带有429但不含`Retry-After`头的响应。请检查 `GET api/v3/exchangeInfo` 的下单频率限制 (rateLimitType = ORDERS) 并等待封禁时间结束。 * 被拒绝或不成功的下单并不保证回报中包含以上头内容。 * **下单频率限制是基于每个账户计数的。** * 用户可以通过接口 `GET api/v3/rateLimit/order` 来查询当前的下单量. ### WEB SOCKET 连接限制[​](https://developers.binance.com/docs/zh-CN/algo/general-info#web-socket-%E8%BF%9E%E6%8E%A5%E9%99%90%E5%88%B6 "WEB SOCKET 连接限制的直接链接") * Websocket服务器每秒最多接受5个消息。消息包括: * PING帧 * PONG帧 * JSON格式的消息, 比如订阅, 断开订阅. * 如果用户发送的消息超过限制,连接会被断开连接。反复被断开连接的IP有可能被服务器屏蔽。 * 单个连接最多可以订阅 **1024** 个Streams。 * 每IP地址、每5分钟最多可以发送300次连接请求。 ### /api/ 与 /sapi/ 接口限频说明[​](https://developers.binance.com/docs/zh-CN/algo/general-info#api-%E4%B8%8E-sapi-%E6%8E%A5%E5%8F%A3%E9%99%90%E9%A2%91%E8%AF%B4%E6%98%8E "/api/ 与 /sapi/ 接口限频说明的直接链接") `/api/*`接口和 `/sapi/*`接口采用两套不同的访问限频规则, 两者互相独立。 * `/api/*`的接口相关: * 按IP和按UID(account)两种模式分别统计, 两者互相独立。 * 以 `/api/*`开头的接口按IP限频,**且所有接口共用每分钟6,000限制**。 * 每个请求将包含一个 `X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)`的头,包含当前IP所有请求的已使用权重。 * 每个成功的下单回报将包含一个`X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)`的头,其中包含当前账户已用的下单限制数量。 * `/sapi/*`的接口相关: * 按IP和按UID(account)两种模式分别统计, 两者互相独立。 * 以`/sapi/*`开头的接口采用**单接口限频模式**。按IP统计的权重单接口权重总额为每分钟12000;按照UID统计的单接口权重总额是每分钟180000。 * 每个接口会标明是按照IP或者按照UID统计, 以及相应请求一次的权重值。 * 按照IP统计的接口, 请求返回头里面会包含`X-SAPI-USED-IP-WEIGHT-1M=`或`X-SAPI-USED-IP-WEIGHT-1S=`, 包含当前IP所有请求已使用权重。 * 按照UID统计的接口, 请求返回头里面会包含`X-SAPI-USED-UID-WEIGHT-1M=`或`X-SAPI-USED-UID-WEIGHT-1S=`, 包含当前账户所有已用的UID权重。 * * * 数据来源[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E6%95%B0%E6%8D%AE%E6%9D%A5%E6%BA%90 "数据来源的直接链接") ---------------------------------------------------------------------------------------------------------------------- * 因为API系统是异步的, 所以返回的数据有延时很正常, 也在预期之中。 * 在每个接口中,都列出了其数据的来源,可以用于理解数据的时效性。 系统一共有3个数据来源,按照更新速度的先后排序。排在前面的数据最新,在后面就有可能存在延迟。 * **撮合引擎** - 表示数据来源于撮合引擎 * **缓存** - 表示数据来源于内部或者外部的缓存 * **数据库** - 表示数据直接来源于数据库 请求鉴权类型[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E8%AF%B7%E6%B1%82%E9%89%B4%E6%9D%83%E7%B1%BB%E5%9E%8B "请求鉴权类型的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- * 每个接口都有一个鉴权类型,指示所需的 API 密钥权限,显示在接口名称旁边(例如,[下新订单 (TRADE)](https://developers.binance.com/docs/zh-CN/algo/general-info#place-new-order-trade) )。 * 如果未指定,则鉴权类型为 `NONE`。 * 除了为 `NONE` 外,所有具有鉴权类型的接口均视为 `SIGNED` 请求(即包含 `signature`),[listenKey 管理](https://developers.binance.com/docs/zh-CN/algo/general-info#user-data-stream-requests) 除外。 * 具有鉴权类型的接口需要提供有效的 API 密钥并验证通过。 * API 密钥可在您的 Binance 账户的 [API 管理](https://www.binance.com/en/support/faq/360002502072) 页面创建。 * **API 密钥和密钥对均为敏感信息,切勿与他人分享。** 如果发现账户有异常活动,请立即撤销所有密钥并联系 Binance 支持。 * API 密钥可配置为仅允许访问某些鉴权接口。 * 例如,您可以拥有具有 `TRADE` 权限的 API 密钥用于交易, 同时使用具有 `USER_DATA` 权限的另一个 API 密钥来监控订单状态。 * 默认情况下,API 密钥无法进行 `TRADE`,您需要先在 API 管理中启用交易权限。 | 鉴权类型 | 描述 | | --- | --- | | NONE | 不需要鉴权的接口 | | TRADE | 需要有效的 API-Key 和签名 | | MARGIN | 需要有效的 API-Key 和签名 | | USER\_DATA | 需要有效的 API-Key 和签名 | | USER\_STREAM | 需要有效的 API-Key | | MARKET\_DATA | 需要有效的 API-Key | ### 需要签名的接口[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E9%9C%80%E8%A6%81%E7%AD%BE%E5%90%8D%E7%9A%84%E6%8E%A5%E5%8F%A3 "需要签名的接口的直接链接") * 调用`SIGNED` 接口时,除了接口本身所需的参数外,还需要在 `query string` 或 `request body` 中传递 `signature`, 即签名参数。 #### 签名是否是大小写敏感的[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E7%AD%BE%E5%90%8D%E6%98%AF%E5%90%A6%E6%98%AF%E5%A4%A7%E5%B0%8F%E5%86%99%E6%95%8F%E6%84%9F%E7%9A%84 "签名是否是大小写敏感的的直接链接") * **HMAC:** 使用 HMAC 生成的签名**不区分大小写**。这意味着无论字母大小写如何,签名字符串都可以被验证。 * **RSA:** 使用 RSA 生成的签名是**大小写敏感的**。 * **Ed25519:** 使用 Ed25519 生成的签名也是**大小写敏感的**。 请参阅[已签名请求示例 (HMAC)](https://developers.binance.com/docs/zh-CN/algo/general-info#hmac-keys) 、[已签名请求示例 (RSA)](https://developers.binance.com/docs/zh-CN/algo/general-info#rsa-keys) 和[已签名请求示例 (Ed25519)](https://developers.binance.com/docs/zh-CN/algo/general-info#ed25519-keys) ,了解如何根据您使用的 API 密钥类型计算签名。 ### 时间同步安全[​](https://developers.binance.com/docs/zh-CN/algo/general-info#%E6%97%B6%E9%97%B4%E5%90%8C%E6%AD%A5%E5%AE%89%E5%85%A8 "时间同步安全的直接链接") * `SIGNED` 请求还需要一个 `timestamp` 参数,该参数应为当前时间戳,单位为毫秒或微秒。(参见 [通用 API 信息](https://developers.binance.com/docs/zh-CN/algo/general-info#general-api-information) ) * 另一个可选参数 `recvWindow`,用以指定请求的有效期,只能以毫秒为单位。 * `recvWindow` 扩展为三位小数(例如 6000.346),以便可以指定微秒。 * 如果未发送 `recvWindow`,则 **默认值为 5000 毫秒**。 * `recvWindow` 的最大值为 60000 毫秒。 * 请求处理逻辑如下: serverTime = getCurrentTime()if (timestamp < (serverTime + 1 second) && (serverTime - timestamp) <= recvWindow) { // 开始处理请求 serverTime = getCurrentTime() if (serverTime - timestamp) <= recvWindow { // 将请求转发到撮合引擎 } else { // 拒绝请求 } // 结束处理请求} else { // 拒绝请求} **关于交易时效性** 互联网状况并不100%可靠,不可完全依赖,因此你的程序本地到币安服务器的时延会有抖动. 这是我们设置`recvWindow`的目的所在,如果你从事高频交易,对交易时效性有较高的要求,可以灵活设置`recvWindow`以达到你的要求。 **不推荐使用5秒以上的recvWindow。最大值不能超过60秒!** ### POST /api/v3/order 的签名示例[​](https://developers.binance.com/docs/zh-CN/algo/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B "POST /api/v3/order 的签名示例的直接链接") #### HMAC Keys[​](https://developers.binance.com/docs/zh-CN/algo/general-info#hmac-keys "HMAC Keys的直接链接") 不使用分隔符,把查询字符串与 `HTTP body` 连接在一起将生成请求的签名 payload。任何非 ASCII 字符在签名前都必须进行百分比编码(percent-encoded)。 以下示例分步演示如何使用 `echo`、`openssl` 和 `curl` 从 Linux 命令行发送有效的签名 payload。其中一个例子中的交易对名称完全由 ASCII 字符组成,另一个例子中的交易对名称则包含非 ASCII 字符。 API 密钥和密钥示例: | Key | Value | | --- | --- | | `apiKey` | vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A | | `secretKey` | NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j | **警告:请勿与任何人分享您的 API 密钥和秘钥。** 此处提供的示例密钥仅用于示范说明目的。 交易对名称完全由 ASCII 字符组成的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | LTCBTC | | `side` | BUY | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.1 | | `recvWindow` | 5000 | | `timestamp` | 1499827319559 | 交易对名称包含非 ASCII 字符的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | 123456 | | `side` | BUY | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.1 | | `recvWindow` | 5000 | | `timestamp` | 1499827319559 | **第一步: 构建签名 payload。** 1. 将参数格式化为 `参数=取值` 对并用 `&` 分隔每个参数对。 2. 对字符串进行百分比编码(percent-encoded)。 对于第一组示例参数(仅限 ASCII 字符), `parameter=value` 字符串将如下所示: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 对于第二组示例参数(包含一些 Unicode 字符),`parameter=value` 字符串将如下所示: symbol=123456&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559 **第二步: 计算签名。** 1. 使用 API 密钥中的 `secretKey` 作为 HMAC-SHA-256 算法的签名密钥。 2. 对步骤 1 中构建的签名 payload 进行签名。 3. 将 HMAC-SHA-256 的输出编码为十六进制字符串。 请注意,`secretKey` 和 payload 是**大小写敏感的**,而生成的签名值是不区分大小写的。 **示例命令** 对于第一组示例参数(仅限 ASCII 字符): $ echo -n "symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71 对于第二组示例参数(包含一些 Unicode 字符): $ echo -n "symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"e1353ec6b14d888f1164ae9af8228a3dbd508bc82eb867db8ab6046442f33ef3 **第三步: 为请求添加签名** 通过在查询字符串中添加 `signature` 参数来完成请求。 对于第一组示例参数(仅限 ASCII 字符): curl -s -v -H "X-MBX-APIKEY: $apiKey" -X POST "https://api.binance.com/api/v3/order?symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71" 对于第二组示例参数(包含一些 Unicode 字符): curl -s -v -H "X-MBX-APIKEY: $apiKey" -X POST "https://api.binance.com/api/v3/order?symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=e1353ec6b14d888f1164ae9af8228a3dbd508bc82eb867db8ab6046442f33ef3" 以下是一个执行上述所有步骤的 Bash 脚本示例: apiKey="vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A"secretKey="NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"payload="symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559"# 对请求进行签名signature=$(echo -n "$payload" | openssl dgst -sha256 -hmac "$secretKey")signature=${signature#*= } # Keep only the part after the "= "# 发送请求curl -H "X-MBX-APIKEY: $apiKey" -X POST "https://api.binance.com/api/v3/order?$payload&signature=$signature" #### RSA Keys[​](https://developers.binance.com/docs/zh-CN/algo/general-info#rsa-keys "RSA Keys的直接链接") 不使用分隔符,把查询字符串与 `HTTP body` 连接在一起将生成请求的签名 payload。任何非 ASCII 字符在签名前都必须进行百分比编码(percent-encoded)。 要获取 API 密钥,您需要将 RSA 公钥上传到您的帐户中,系统将为您提供相应的 API 密钥。 仅支持 `PKCS#8` 密钥。 在以下示例中,其中一个例子中的交易对名称完全由 ASCII 字符组成,另一个例子中的交易对名称则包含非 ASCII 字符。 这些示例假设私钥存储在文件 `./test-prv-key.pem` 中。 | Key | Value | | --- | --- | | `apiKey` | CAvIjXy3F44yW6Pou5k8Dy1swsYDWJZLeoK2r8G4cFDnE9nosRppc2eKc1T8TRTQ | 交易对名称完全由 ASCII 字符组成的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | BTCUSDT | | `side` | SELL | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.2 | | `timestamp` | 1668481559918 | | `recvWindow` | 5000 | 交易对名称包含非 ASCII 字符的请求示例: | 参数 | 取值 | | --- | --- | | `symbol` | 123456 | | `side` | SELL | | `type` | LIMIT | | `timeInForce` | GTC | | `quantity` | 1 | | `price` | 0.2 | | `timestamp` | 1668481559918 | | `recvWindow` | 5000 | **第一步: 构建签名 payload。** 1. 将参数格式化为 `参数=取值` 对并用 `&` 分隔每个参数对。 2. 对字符串进行百分比编码(percent-encoded)。 对于第一组示例参数(仅限 ASCII 字符), `parameter=value` 字符串将如下所示: symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 对于第二组示例参数(包含一些 Unicode 字符),`parameter=value` 字符串将如下所示: symbol=123456=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 对字符串进行百分比编码(percent-encoded)后,签名 payload 如下所示: symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000 **第二步: 计算签名。** 1. 使用 RSASSA-PKCS1-v1\_5 算法和 SHA-256 哈希函数对步骤 1 中构建的签名 payload 进行签名。 2. 将输出结果编码为 base64 格式。 请注意,payload 和生成的`签名值`是**大小写敏感的**。 对于第一组示例参数(仅限 ASCII 字符): $ echo -n 'symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000' | openssl dgst -sha256 -sign ./test-prv-key.pem | openssl enc -base64 -A | tr -d '\n'HZ8HOjiJ1s/igS9JA+n7+7Ti/ihtkRF5BIWcPIEluJP6tlbFM/Bf44LfZka/iemtahZAZzcO9TnI5uaXh3++lrqtNonCwp6/245UFWkiW1elpgtVAmJPbogcAv6rSlokztAfWk296ZJXzRDYAtzGH0gq7CgSJKfH+XxaCmR0WcvlKjNQnp12/eKXJYO4tDap8UCBLuyxDnR7oJKLHQHJLP0r0EAVOOSIbrFang/1WOq+Jaq4Efc4XpnTgnwlBbWTmhWDR1pvS9iVEzcSYLHT/fNnMRxFc7u+j3qI//5yuGuu14KR0MuQKKCSpViieD+fIti46sxPTsjSemoUKp0oXA== 对于第二组示例参数(包含一些 Unicode 字符): $ echo -n 'symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000' | openssl dgst -sha256 -sign ./test-prv-key.pem | openssl enc -base64 -A | tr -d '\n'qJtv66wyp/1mZE+mIFAAMUoTe8xkmLN7/eAZjuC9x1ocxovItHLl/sNK7Wq8QjgiHqGn0bb8P7yVvGBEd1gFe71NQ8aM0M+JNIMz5UFxfeA53rXjFlvsyH1Sig+OuO9Nz5nhCaJ6bEfj2iuv7w27pB3L8MVqmoCi6D9C/QMiLxtPaR70CxtnvoOlIgPmpv2bQy029A31NEK19ieVLkoyp1EUkXRaX3v0mohx8yMnUG1dhX9nUg3Oy8TYZ03DQy7kHDGkMKisNX7rt/GuGx1HIgjFclDGLsbAFIodvSLjm9FbseasMELoxlAJDlwRnW8zo5sQmL0Fz7ao935QBynrng== 3. 对 base64 格式的字符串进行百分比编码(percent-encoded)。 对于第一组示例参数(仅限 ASCII 字符): HZ8HOjiJ1s%2FigS9JA%2Bn7%2B7Ti%2FihtkRF5BIWcPIEluJP6tlbFM%2FBf44LfZka%2FiemtahZAZzcO9TnI5uaXh3%2B%2BlrqtNonCwp6%2F245UFWkiW1elpgtVAmJPbogcAv6rSlokztAfWk296ZJXzRDYAtzGH0gq7CgSJKfH%2BXxaCmR0WcvlKjNQnp12%2FeKXJYO4tDap8UCBLuyxDnR7oJKLHQHJLP0r0EAVOOSIbrFang%2F1WOq%2BJaq4Efc4XpnTgnwlBbWTmhWDR1pvS9iVEzcSYLHT%2FfNnMRxFc7u%2Bj3qI%2F%2F5yuGuu14KR0MuQKKCSpViieD%2BfIti46sxPTsjSemoUKp0oXA%3D%3D 对于第二组示例参数(包含一些 Unicode 字符): qJtv66wyp%2F1mZE%2BmIFAAMUoTe8xkmLN7%2FeAZjuC9x1ocxovItHLl%2FsNK7Wq8QjgiHqGn0bb8P7yVvGBEd1gFe71NQ8aM0M%2BJNIMz5UFxfeA53rXjFlvsyH1Sig%2BOuO9Nz5nhCaJ6bEfj2iuv7w27pB3L8MVqmoCi6D9C%2FQMiLxtPaR70CxtnvoOlIgPmpv2bQy029A31NEK19ieVLkoyp1EUkXRaX3v0mohx8yMnUG1dhX9nUg3Oy8TYZ03DQy7kHDGkMKisNX7rt%2FGuGx1HIgjFclDGLsbAFIodvSLjm9FbseasMELoxlAJDlwRnW8zo5sQmL0Fz7ao935QBynrng%3D%3D **第三步: 为请求添加签名** 通过在查询字符串中添加 `signature` 参数来完成请求。 对于第一组示例参数(仅限 ASCII 字符): curl -H "X-MBX-APIKEY: CAvIjXy3F44yW6Pou5k8Dy1swsYDWJZLeoK2r8G4cFDnE9nosRppc2eKc1T8TRTQ" -X POST 'https://api.binance.com/api/v3/order?symbol=BTCUSDT&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000&signature=HZ8HOjiJ1s%2FigS9JA%2Bn7%2B7Ti%2FihtkRF5BIWcPIEluJP6tlbFM%2FBf44LfZka%2FiemtahZAZzcO9TnI5uaXh3%2B%2BlrqtNonCwp6%2F245UFWkiW1elpgtVAmJPbogcAv6rSlokztAfWk296ZJXzRDYAtzGH0gq7CgSJKfH%2BXxaCmR0WcvlKjNQnp12%2FeKXJYO4tDap8UCBLuyxDnR7oJKLHQHJLP0r0EAVOOSIbrFang%2F1WOq%2BJaq4Efc4XpnTgnwlBbWTmhWDR1pvS9iVEzcSYLHT%2FfNnMRxFc7u%2Bj3qI%2F%2F5yuGuu14KR0MuQKKCSpViieD%2BfIti46sxPTsjSemoUKp0oXA%3D%3D' 对于第二组示例参数(包含一些 Unicode 字符): curl -H "X-MBX-APIKEY: CAvIjXy3F44yW6Pou5k8Dy1swsYDWJZLeoK2r8G4cFDnE9nosRppc2eKc1T8TRTQ" -X POST 'https://api.binance.com/api/v3/order?symbol=%EF%BC%91%EF%BC%92%EF%BC%93%EF%BC%94%EF%BC%95%EF%BC%96&side=SELL&type=LIMIT&timeInForce=GTC&quantity=1&price=0.2×tamp=1668481559918&recvWindow=5000&signature=qJtv66wyp%2F1mZE%2BmIFAAMUoTe8xkmLN7%2FeAZjuC9x1ocxovItHLl%2FsNK7Wq8QjgiHqGn0bb8P7yVvGBEd1gFe71NQ8aM0M%2BJNIMz5UFxfeA53rXjFlvsyH1Sig%2BOuO9Nz5nhCaJ6bEfj2iuv7w27pB3L8MVqmoCi6D9C%2FQMiLxtPaR70CxtnvoOlIgPmpv2bQy029A31NEK19ieVLkoyp1EUkXRaX3v0mohx8yMnUG1dhX9nUg3Oy8TYZ03DQy7kHDGkMKisNX7rt%2FGuGx1HIgjFclDGLsbAFIodvSLjm9FbseasMELoxlAJDlwRnW8zo5sQmL0Fz7ao935QBynrng%3D%3D' 以下是一个执行上述所有步骤的 Bash 脚本示例: function rawurlencode { local string="${1}" local strlen=${#string} local encoded="" local pos c o for (( pos=0 ; pos **Note**: You should only use either `SEND_PRIMARY` or `SEND_PRIMARY_FLEXIBLE`, not both at the same time. Typical Send Flow[​](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode/send-primary-mode#typical-send-flow "Typical Send Flow的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. **Initiate Send & Fetch Info** * The user initiates a crypto transfer from Binance on the partner's frontend. * The partner's backend requests the list of supported crypto networks and trading pairs from Binance Connect. * This information is then relayed to the partner's frontend to be displayed to the user. 2. **Confirm & Create Pre-order** * The user confirms the details on the partner's frontend. * The partner's backend sends a pre-order request to Binance Connect. * Binance Connect returns a `redirectUrl` in the response. 3. **Redirect to Binance** * The partner's frontend redirects the user to the Binance App/website using the `redirectUrl`. 4. **Complete Flow on Binance** * The user completes the send process on the Binance platform. * Note: If the user's balance is insufficient, the flow will include a buy step before sending. 5. **Webhook Notification** * Binance Connect sends a webhook notification to the partner's backend about the order status update. 6. **Query Order Status** * The partner's backend can then query the order details from Binance Connect to get the final status of the transaction. Diagram[​](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode/send-primary-mode#diagram "Diagram的直接链接") --------------------------------------------------------------------------------------------------------------------------------- ![send-flow.png](https://developers.binance.com/docs/zh-CN/assets/images/send-flow-fb3d602472913895b2a78cedd0550281.png) * [How to integrate send primary mode](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode/send-primary-mode#how-to-integrate-send-primary-mode) * [Difference between SEND\_PRIMARY and SEND\_PRIMARY\_FLEXIBLE](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode/send-primary-mode#difference-between-send_primary-and-send_primary_flexible) * [Typical Send Flow](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode/send-primary-mode#typical-send-flow) * [Diagram](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode/send-primary-mode#diagram) --- # Send primary mode | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#__docusaurus_skipToContent_fallback) 本页总览 Send primary mode ================= As we know, Binance Connect has a wide range of application scenarios. In addition to on-ramp (buy) and off-ramp (sell), Binance Connect can also be used as a crypto payment channel/tool, that is, users can directly use the crypto balance in their Binance wallet to make third-party payments. This is the "send primary mode" we launched. In send primary mode, the product process and user flow are different from the normal on-ramp (buy), as follows: * Send (transfer) crypto will be promoted as the first priority; * Buy crypto related features will be downgraded and hidden, users don't need to buy crypto, they only need to send (transfer) crypto from their Binance wallet; * Only in one case, when the crypto balance in user's Binance wallet is insufficient, the flow will return back to the buy crypto process, to avoid users being blocked here; How to integrate send primary mode[​](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#how-to-integrate-send-primary-mode "How to integrate send primary mode的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ If you are going to integrate send primary mode, please follow these instructions: 1. Contact Binance Connect team to enable this feature for you (it's disabled by default); 2. Pass `"SEND_PRIMARY": true` or `"SEND_PRIMARY_FLEXIBLE": true` in the `customization` parameter of the pre-order API. Please refer to [Customization](https://developers.binance.com/docs/zh-CN/binance_connect/basics/9.customization) . ### Difference between SEND\_PRIMARY and SEND\_PRIMARY\_FLEXIBLE[​](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#difference-between-send_primary-and-send_primary_flexible "Difference between SEND_PRIMARY and SEND_PRIMARY_FLEXIBLE的直接链接") * **SEND\_PRIMARY**: The crypto amount is locked and fixed based on the amount specified in the pre-order API. Users cannot modify the amount on the Binance Connect page. Should work together with `amountType: 2`. * **SEND\_PRIMARY\_FLEXIBLE**: The crypto amount specified in the pre-order API will be used as a default value, but users can freely input and modify the amount on the Binance Connect page. This provides more flexibility for users to adjust the payment amount as needed. > **Note**: You should only use either `SEND_PRIMARY` or `SEND_PRIMARY_FLEXIBLE`, not both at the same time. Typical Send Flow[​](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#typical-send-flow "Typical Send Flow的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- 1. **Initiate Send & Fetch Info** * The user initiates a crypto transfer from Binance on the partner's frontend. * The partner's backend requests the list of supported crypto networks and trading pairs from Binance Connect. * This information is then relayed to the partner's frontend to be displayed to the user. 2. **Confirm & Create Pre-order** * The user confirms the details on the partner's frontend. * The partner's backend sends a pre-order request to Binance Connect. * Binance Connect returns a `redirectUrl` in the response. 3. **Redirect to Binance** * The partner's frontend redirects the user to the Binance App/website using the `redirectUrl`. 4. **Complete Flow on Binance** * The user completes the send process on the Binance platform. * Note: If the user's balance is insufficient, the flow will include a buy step before sending. 5. **Webhook Notification** * Binance Connect sends a webhook notification to the partner's backend about the order status update. 6. **Query Order Status** * The partner's backend can then query the order details from Binance Connect to get the final status of the transaction. Diagram[​](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#diagram "Diagram的直接链接") --------------------------------------------------------------------------------------------------------------- ![send-flow.png](https://developers.binance.com/docs/zh-CN/assets/images/send-flow-fb3d602472913895b2a78cedd0550281.png) * [How to integrate send primary mode](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#how-to-integrate-send-primary-mode) * [Difference between SEND\_PRIMARY and SEND\_PRIMARY\_FLEXIBLE](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#difference-between-send_primary-and-send_primary_flexible) * [Typical Send Flow](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#typical-send-flow) * [Diagram](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode#diagram) --- # Webhook | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#__docusaurus_skipToContent_fallback) 本页总览 Webhook ======= Whenever a key event (currently only "order status change") occurs, Binance Connect will send a webhook message, and the partner (client) can receive this message at the webhook callback url and react accordingly, such as updating order data and frontend UI. ### Request Headers[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#request-headers "Request Headers的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | X-BN-Connect-Timestamp | timestamp | timestamp | | X-BN-Connect-Signature | string | SHA256withRSA(**requestBody** + **X-Connect-Timestamp**) | | X-BN-Connect-For | string | Same with your client id (X-Tesla-ClientId) | ### Request Body[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#request-body "Request Body的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | webhookEventType | string | A fixed value: connect\_order\_event | | externalOrderId | string | The unique order id from the partner side. | | type | int | 1: buy, 2: sell, 3: send | | businessType | int | 1: fiat, 2: p2p, 3: send, 4: convert | | status | int | Please refer to "[Order status](https://developers.binance.com/docs/zh-CN/binance_connect/basics/7.order-status)
" | | payMethodCode | string | The payment method code is from payment method list API | | payMethodSubCode | string | The payment method sub code is from payment method list API | | fiatCurrency | string | fiat currency | | cryptoCurrency | string | crypto currency | | openUserId | string | OpenUserId represents a Binance user ID that has been securely hashed. This field is provided to merchants to facilitate the identification of whether multiple orders originate from the same user. | | fiatAmount | string | fiat amount | | cryptoAmount | string | crypto amount | | feeAmount | string | fee amount | | feeCurrency | string | fee currency, USD or crypto | | revenueAmount | string | partner revenue amount | | revenueCurrency | string | partner revenue currency, USD or crypto | | networkFee | string | network fee amount | | withdrawWalletAddress | string | withdraw wallet address | | withdrawNetwork | string | withdraw network | | withdrawMemo | string | withdraw network memo | | withdrawTxHash | string | withdraw tx hash | | orderDetailLink | string | order detail link | | orderTime | timestamp | order time | | completionTime | timestamp | completion time | | updateTime | timestamp | update time | | convertInfo | object | Convert information. This field is only present for Convert orders. Refer to **ConvertInfo** | | swapDetailInfoVo | object | If the order has swap operation. Then this field has value. Refer to **SwapDetailInfoVo** | | userData | string | AES-encrypted JSON string (see details below). Disabled by default; contact us to enable | #### SwapDetailInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#swapdetailinfovo "SwapDetailInfoVo的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | fromCryptoCurrencyContractAddress | string | The "from" crypto contract address, typically a stablecoin or native token. | | toCryptoCurrencyContractAddress | string | The contract address of the target coin the user intends to swap online. | | toCryptoCurrencyAmount | string | The final amount of cryptocurrency the user swapped and received in their wallet. | #### ConvertInfo[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#convertinfo "ConvertInfo的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | fromCoin | string | The source cryptocurrency being converted from | | fromCoinAmount | string | The amount of source cryptocurrency being converted | #### userData field[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#userdata-field "userData field的直接链接") * Type: string * Remarks: When enabled, `userData` contains a JSON object (serialized to a string) that is encrypted with AES. The field value is the AES-encrypted ciphertext encoded as a string. This field is disabled by default — please contact us if you need it enabled and for access to the AES key and configuration. * Decryption reference: follow the AES decryption instructions described in Binance documentation: [https://developers.binance.com/docs/binance-pay/authentication#decryption-instructions-for-merchant-data-sharing](https://developers.binance.com/docs/binance-pay/authentication#decryption-instructions-for-merchant-data-sharing) * JSON structure (plaintext before AES encryption): | Field | Type | Remarks | | --- | --- | --- | | firstName | string | User's first name | | middleName | string | User's middle name (optional) | | lastName | string | User's last name | | residenceCountry | string | Country code of residence (ISO) | | birthday | string | Birthday in YYYY-MM-DD format | | country | string | Country code (ISO) | | refundAddress | string | Refund crypto address (if any) | | refundNetwork | string | Network of refund (e.g., ETH) | | refundMemo | string | Refund memo/memo field (if any) | Notes: * Field names and types above show the expected JSON keys that will be present after decrypting `userData`. * The concrete AES parameters (mode, IV, padding) and key delivery method will be provided when the field is enabled; see the decryption reference link above for an example. ### Response Body[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#response-body "Response Body的直接链接") * HTTP status code is 200 * Response body is in JSON format. | **Field** | **Type** | **Remarks** | | --- | --- | --- | | returnCode | string | SUCCESS or other code you wish to return to Binance Connect | | returnMessage | string | the message you wish to return to Binance Connect | ### How signature works[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#how-signature-works "How signature works的直接链接") The encryption/decryption and verification process of webhook is exactly the opposite/mirrored of API request process. The sender and receiver of the two are opposite, but they are both processes that signed by the sender with a private key and verified by the receiver with a public key. For API requests, the partner (client) generates a pair of keys. The private key is kept securely and privately by the partner (client). Then the partner (client) uses the private key to sign when initiating API requests. The public key is shared to Bianance Connect, with which Binance will verify the signature of the API request to ensure that the request is indeed initiated by the partner (client). For webhook, it's an opposite/mirrored process. Binance Connect generates a pair of keys. The private key is kept securely and privately by Binance Connect. Then Binance Connect uses the private key to sign when initiating the webhook message. The public key is shared to the partner (client), with which the partner (client) can verify the signature of the webhook message to ensure that the message is indeed initiated by Binance. #### The webhook signature flow is as follows:[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#the-webhook-signature-flow-is-as-follows "The webhook signature flow is as follows:的直接链接") ![signature-Webhook.png](https://developers.binance.com/docs/zh-CN/assets/images/signature-Webhook-8e2546351f3231e2cd4fa48bb8ed679f.png) ### Verify signature[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#verify-signature "Verify signature的直接链接") As mentioned above, Binance Connect initiates a webhook request to the webhook callback url provided by the partner ( client). And the partner (client) should verify the identity of the request initiator based on the public key provided by Binance Connect. The example code below shows how to verify signature with public key: public static boolean verify(String srcData, PublicKey publicKey, String sign) throws Exception { Signature signature = Signature.getInstance("SHA256withRSA"); signature.initVerify(publicKey); signature.update(srcData.getBytes()); return signature.verify(Base64.decodeBase64(sign.getBytes()));} ### Example[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#example "Example的直接链接") Request Body: { "webhookEventType": "connect_order_event", "externalOrderId": "180401941923045", "type": 1, "businessType": 1, "status": 2, "payMethodCode": "BUY_P2P", "payMethodSubCode": "BANK", "fiatCurrency": "EUR", "cryptoCurrency": "USDT", "openUserId": "f47ac10b58cc4372a5670e02b2c3d479", "fiatAmount": "100", "cryptoAmount": "107.8", "feeAmount": "1", "feeCurrency": "USDT", "revenueAmount": "0.08", "revenueCurrency": "USDT", "networkFee": "0.5", "withdrawWalletAddress": "0xbb4CdB98Bd36B01bD1cBaEA52De08d9173bc095c", "withdrawNetwork": "BSC", "withdrawMemo": "", "withdrawTxHash": "0xcb163e2e6322cd6aa7bc4d45306029e846c0c06e9cdee45a06e88801d1231e71", "orderDetailLink": "https://www.binance.com/en/my/wallet/exchange/buysell-history?type=buy", "orderTime": 1723186761000, "completionTime": 1723206761000, "updateTime": 1734446642930} ### Example (Convert Order)[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#example-convert-order "Example (Convert Order)的直接链接") Request Body: { "webhookEventType": "connect_order_event", "networkFee": null, "feeCurrency": "USDT", "type": 1, "businessType": 4, "withdrawMemo": "", "revenueAmount": null, "cryptoCurrency": "USDT", "withdrawTxHash": "", "completionTime": null, "orderTime": 1753344231742, "payMethodSubCode": "CUMBERLAND", "cryptoAmount": "1.03", "orderDetailLink": null, "payMethodCode": "SPOT", "revenueCurrency": "USDT", "convertInfoVo": { "fromCoin": "BNB", "fromCoinAmount": 0.00137386 }, "swapDetailInfoVo": null, "updateTime": 1753344255279, "externalOrderId": "830315252102", "withdrawWalletAddress": "0xbb4CdB98Bd36B01bD1cBaEA52De08d9173bc095c", "fiatCurrency": "", "fiatAmount": "0", "withdrawNetwork": "ETH", "status": 11} * [Request Headers](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#request-headers) * [Request Body](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#request-body) * [Response Body](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#response-body) * [How signature works](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#how-signature-works) * [Verify signature](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#verify-signature) * [Example](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#example) * [Example (Convert Order)](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook#example-convert-order) --- # Overview | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#__docusaurus_skipToContent_fallback) 本页总览 Sandbox APIs Overview ===================== Overview[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#overview "Overview的直接链接") -------------------------------------------------------------------------------------------------------- The Sandbox APIs provide a safe testing environment for partners to integrate with Binance Connect without using real funds or affecting production systems. These APIs allow you to simulate the complete order lifecycle, test different order types, and verify your integration before going live. _**Note1: The sandbox environment is isolated from production. All data and operations here do not impact real user accounts or transactions.**_ _**Note2: Invoke the pre-order API first, then use the sandbox APIs below.**_ Purpose[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#purpose "Purpose的直接链接") ----------------------------------------------------------------------------------------------------- The sandbox environment enables you to: * Test order placement flows without real transactions * Simulate various order types (BUY, BUY\_P2P, SEND, Convert) * Manually control order status transitions for testing webhooks and order state management * Validate your integration with different scenarios and edge cases Available APIs[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#available-apis "Available APIs的直接链接") -------------------------------------------------------------------------------------------------------------------------- ### 1\. Place Order[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#1-place-order "1. Place Order的直接链接") Place standard test orders to simulate regular cryptocurrency purchase flows. ### 2\. Place Convert Feature Order[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#2-place-convert-feature-order "2. Place Convert Feature Order的直接链接") Test cryptocurrency conversion scenarios where users convert from one crypto to another. ### 3\. Place Buy Any Token Order[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#3-place-buy-any-token-order "3. Place Buy Any Token Order的直接链接") Simulate purchases of any token, including tokens not listed on Binance spot markets. ### 4\. Order Status Transition[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#4-order-status-transition "4. Order Status Transition的直接链接") Manually trigger order status changes to test your order lifecycle management and webhook handling. Testing Flow[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#testing-flow "Testing Flow的直接链接") -------------------------------------------------------------------------------------------------------------------- A typical testing workflow in the sandbox: 1. **Place an Order**: Use one of the place order endpoints to create a test order 2. **Verify Order Creation**: Check that your system correctly receives and processes the order 3. **Trigger Status Transitions**: Use the order status transition API to simulate different order states 4. **Test Webhooks**: Verify your webhook handlers correctly process status updates 5. **Validate Order Queries**: Use the order query API to fetch and verify order details Key Differences from Production[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#key-differences-from-production "Key Differences from Production的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * No real funds are used * Orders don't execute actual blockchain transactions * Status transitions are manual and controlled by the partner * All operations are isolated to the sandbox environment Getting Started[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#getting-started "Getting Started的直接链接") ----------------------------------------------------------------------------------------------------------------------------- To start testing with sandbox APIs: 1. Ensure you have sandbox credentials configured 2. Review the individual API documentation for each endpoint 3. Start with simple order placement and gradually test more complex scenarios 4. Use the order status transition API to simulate various order states Best Practices[​](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#best-practices "Best Practices的直接链接") -------------------------------------------------------------------------------------------------------------------------- * Test all possible order types your integration will support * Verify error handling for invalid requests * Test webhook delivery and processing for all status transitions * Validate order query functionality with different order states * Test edge cases like very small or large amounts * [Overview](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#overview) * [Purpose](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#purpose) * [Available APIs](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#available-apis) * [1\. Place Order](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#1-place-order) * [2\. Place Convert Feature Order](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#2-place-convert-feature-order) * [3\. Place Buy Any Token Order](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#3-place-buy-any-token-order) * [4\. Order Status Transition](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#4-order-status-transition) * [Testing Flow](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#testing-flow) * [Key Differences from Production](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#key-differences-from-production) * [Getting Started](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#getting-started) * [Best Practices](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox#best-practices) --- # Change Log | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#__docusaurus_skipToContent_fallback) 本页总览 Change Log ========== ### Nov 25, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#nov-25-2025 "Nov 25, 2025的直接链接") * Added userData in webhook and query-order-detail API. ### Oct 22, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#oct-22-2025 "Oct 22, 2025的直接链接") * Added p2p-only trading pair API ### Oct 20, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#oct-20-2025 "Oct 20, 2025的直接链接") * Added new field `webhookEventType` in the webhook payload. ### Oct 15, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#oct-15-2025 "Oct 15, 2025的直接链接") * Support 1024-bits RSA keys for enhanced security. ### Sep 10, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#sep-10-2025 "Sep 10, 2025的直接链接") * Added typical flow. ### Jul 24, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#jul-24-2025 "Jul 24, 2025的直接链接") * Added convert feature. * Added convert-related fields in the webhook payload. * Added convert-related fields in the query order detail API response. ### Jul 7, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#jul-7-2025 "Jul 7, 2025的直接链接") * Add REVOLUT, PIX payment methods examples to get payment method list API. * Add REVOLUT, PIX payment methods examples to get payment method list v2 API. Add lock crypto & net\_receive example to pre-order API. ======================================================== ### Jun 26, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#jun-26-2025 "Jun 26, 2025的直接链接") * Added swap-related fields to the webhook payload. ### May 26, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#may-26-2025 "May 26, 2025的直接链接") * Added buy any token (swap) section. * Added send primary mode section. * Added subtype of `FIAT_AMOUNT` and `CRYPTO_AMOUNT` for `LOCK_ORDER_ATTRIBUTES` customization capability. * Added customization capability of `NET_RECEIVE`. ### May 19, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#may-19-2025 "May 19, 2025的直接链接") * Added openUserId field in query order detail API and webhook payload. * Added LOCK\_ORDER\_ATTRIBUTES customization capability for amount for pre-order API. ### May 12, 2025[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#may-12-2025 "May 12, 2025的直接链接") * Added buy any token feature. * Added new order status and state flow. * Added new error codes. * get payment method list API * Added `contractAddress` field. * get estimated quote API * Added `contractAddress`, `address` field. * pre-order API * Added `contractAddress` field. * query order detail API * Added `contractAddress` field. * Added `swapDetailInfoVo` field. ### December 25, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#december-25-2024 "December 25, 2024的直接链接") * Added customization support. ### December 18, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#december-18-2024 "December 18, 2024的直接链接") * Added Off-ramp (Sell) APIs. ### September 27, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#september-27-2024 "September 27, 2024的直接链接") * Added get payment method list v2 API. * Added pay method code and pay method sub code in get estimated quote API response. * Added redirectDeepLink,failRedirectDeepLink and clientIp fields in pre-order API request. ### August 9, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#august-9-2024 "August 9, 2024的直接链接") * Added revenue sharing related fields in API response. ### July 25, 2024[​](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#july-25-2024 "July 25, 2024的直接链接") * Adjusted the data structure of API response. * [Nov 25, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#nov-25-2025) * [Oct 22, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#oct-22-2025) * [Oct 20, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#oct-20-2025) * [Oct 15, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#oct-15-2025) * [Sep 10, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#sep-10-2025) * [Jul 24, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#jul-24-2025) * [Jul 7, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#jul-7-2025) * [Jun 26, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#jun-26-2025) * [May 26, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#may-26-2025) * [May 19, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#may-19-2025) * [May 12, 2025](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#may-12-2025) * [December 25, 2024](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#december-25-2024) * [December 18, 2024](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#december-18-2024) * [September 27, 2024](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#september-27-2024) * [August 9, 2024](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#august-9-2024) * [July 25, 2024](https://developers.binance.com/docs/zh-CN/binance_connect/change-log#july-25-2024) --- # Change Log | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/change-log#__docusaurus_skipToContent_fallback) **2025-11-25** * New response fields for GET `/sapi/v1/apiReferral/rebate/recentRecord` * `distributeTime` * `commissionAsset` * `commission` * `convertPrice` * * * **2025-09-22** * New Futures Transfer for Link Sub-account endpoints * POST `/sapi/v1/broker/futures/accountTransfer` * * * **2025-09-16** * Futures commission rebate query endpoints require to input `symbol` or `pair`. * GET `/sapi/v1/broker/subAccountApi/commission/futures` * GET `/sapi/v1/broker/subAccountApi/commission/coinFutures` * * * **2025-07-02** * New endpoints for KYC SaaS Integration, KYC Querying, and Request for Information (RFI). * * * **2025-04-18** * New Endpoint for delete sub account `DELETE /sapi/v1/broker/subAccount` . * Create Link sub account API key endpoint and FAST api key creation endpoint support asymmetrical key type(Ed25519 and RSA). Please see [https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a](https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a) * * * **2025-03-07** * New Endpoint for query sub account deposit by depositId `GET /sapi/v2/broker/subAccount/depositHist` . * * * **2025-02-26** * Update sub account deposit history Endpoint `GET /sapi/v1/broker/subAccount/depositHist` , adding "travelRuleStatus". * * * **2024-10-30** * Update the `Weight(UID)` to 60 for Endpoint `GET /sapi/v3/broker/subAccount/futuresSummary` . * * * **2024-08-15** * New parameter `filterResult` will be available on August 16, 2024 for query futures commission rebate record:`GET /sapi/v1/broker/rebate/futures/recentRecord` . If `filterResult` \= TRUE, rebates not from its own sub accounts will be filtered out in response. * * * **2024-06-28** * New Endpoint for query futures assets of sub-accounts:`GET /sapi/v3/broker/subAccount/futuresSummary` . * Following endpoints will be deleted in a month: `GET /sapi/v1/broker/subAccount/futuresSummary` ,`GET /sapi/v2/broker/subAccount/futuresSummary` . Please migrate the usage of legacy version(v1&v2) to the new (v3) version as soon as possible. * * * **2024-06-06** * Endpoints adjustment: for internal transfers, the txid prefix has been replaced to “Off-chain transfer”on 28 May 2024. “internal transfer” flag is no longer available in the TXID field, including historical transactions, the following endpoints are impacted: `GET /sapi/v1/broker/subAccount/depositHist`. * * * **2024-04-30** * Update the request limit for endpoint: `POST /sapi/v1/broker/subAccountApi`. You can only create 1 api key for each sub account per second * Update the request limit for endpoint: `DELETE /sapi/v1/broker/subAccountApi`. You can only delete 1 api key for each sub account per second * * * **2024-03-05** * Remove endpoint: `POST /sapi/v1/broker/subAccount/blvt`. * * * **2023-12-15** * Update the default parameter values of endpoint: `GET /sapi/v1/broker/universalTransfer`. * * * **2023-11-20** * Add `depositId` and `selfReturnStatus` in response of endpoint: `GET /sapi/v1/broker/subAccount/deposit`. * * * **2023-10-04** * Remove endpoint: `POST /sapi/v1/broker/subAccountApi/permission/vanillaOptions`. * * * **2023-08-31** * Remove endpoint: `POST /sapi/v1/broker/subAccount/margin`. To enable the margin account, simply transfer assets into Cross Margin wallet. * * * **2023-06-08** * Update weight for endpoint: `POST /sapi/v1/broker/subAccountApi`. Weight(Master Account) changed to 3000 * * * **2023-01-13** * Remove 2 endpoints: `POST /sapi/v1/broker/subAccountApi/ipRestriction`, `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList`. * * * **2022-12-16** * Remove "thirdPartyName" for `POST /sapi/v2/broker/subAccountApi/ipRestriction (HMAC SHA256)`, `POST /sapi/v1/broker/subAccountApi/ipRestriction`, `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList`, `DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList`. * * * **2022-11-28** * Add "the max length is 32 characters" in the description of clientTranId for endpoints `POST /sapi/v1/broker/universalTransfer`, `POST /sapi/v1/broker/transfer/futures`, `POST /sapi/v1/broker/transfer`. * * * **2022-11-18** * Added new endpoint `POST /sapi/v2/sub-account/subAccountApi/ipRestriction` to support user update IP Restriction for Sub-Account API key. * * * **2022-09-22** * Update `POST /sapi/v1/broker/subAccountApi/ipRestriction` to support user enable or disable Third party IP list name restriction for sub-account api key. * Update `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to support user update Third party IP list name restriction for sub-account api key. * Update `DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to support user delete Third party IP list name restriction for sub-account api key. * * * **2022-09-12** * Update `GET /sapi/v1/broker/subAccountApi/ipRestriction` to support user query third party IP list name. * * * **2022-08-23** * Add 100-days query scope for `GET /sapi/v1/broker/universalTransfer` and `GET /sapi/v1/broker/transfer`. * Add requests per UID are limited to 60 requests per minute for `GET /sapi/v1/broker/subAccount/spotSummary`. * * * **2022-06-27** * Added a new rebate status field in API response for endpoints `GET /sapi/v1/broker/rebate/futures/recentRecord` and `GET /sapi/v1/broker/rebate/recentRecord`. * * * **2021-04-29** * Added parameter `tag` and new field `email` in endpoint `POST /sapi/v1/broker/subAccount`. * * * **2021-03-26** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/permission/universalTransfer` to enable the api permission for a sub account to use `POST /sapi/v1/asset/transfer`endpoint. * Added new endpoint `POST /sapi/v1/broker/subAccountApi/permission/vanillaOptions` to enable Vanilla Options permission for sub account api key. * * * **2021-02-04** * Added parameter `fromId` and `toId` in endpoint `GET /sapi/v1/broker/transfer`. The parameter `subaccountId` will be removed on 02/10 16:00(UTC+8). Please adjust the program as soon as possible. * * * **2021-02-04** * Added parameter showAllStatus in endpoint `GET /sapi/v1/broker/universalTransfer`. * * * **2021-01-27** * Added new endpoint `GET /sapi/v2/broker/subAccount/futuresSummary` to support query subaccount Coin Margined Futures asset info. * * * **2021-01-14** * Added parameter clientTranId in endpoint `POST /sapi/v1/broker/transfer/futures` and `GET /sapi/v1/broker/transfer/futures`. * * * **2020-12-28** * Added parameters page and size in endpoint `GET /sapi/v1/broker/subAccountApi`. * * * **2020-12-14** * The endpoint `GET /sapi/v1/broker/transfer/futures` can only get the latest history of past 30 days. * * * **2020-12-10** * Added new endpoint `POST /sapi/v1/broker/universalTransfer` to transfer spot and futures asset between master account and sub accounts. * Added new endpoint `GET /sapi/v1/broker/universalTransfer` to get universal transfer history. * * * **2020-11-27** * Added tranId in response of endpoint `GET /sapi/v1/broker/transfer/futures`. * * * **2020-10-23** * Added parameter showAllStatus in endpoint `GET /sapi/v1/broker/transfer`. * * * **2020-10-12** * Added parameter status in the response of endpoint `GET /sapi/v1/broker/transfer`. * * * **2020-09-16** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/commission/coinFutures` to change sub- account COIN-Ⓜ futures commission adjustment. * Added new endpoint `GET /sapi/v1/broker/subAccountApi/commission/coinFutures` query sub- account COIN-Ⓜ futures commission adjustment. * Added parameter confirmTimes in endpoint `GET /sapi/v1/broker/subAccount/depositHist`. **2020-09-11** * Added parameter email in endpoint `GET /sapi/v1/broker/subAccount`. * * * **2020-09-07** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/ipRestriction` to enable or disable IP restriction for sub-account api key. * Added new endpoint `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to add IP restricion for sub-account api key. * Added new endpoint `GET /sapi/v1/broker/subAccountApi/ipRestriction` to get IP restriction for sub-account api key. * Added new endpoint `DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to delete IP restriction for sub-account api key. * * * **2020-09-02** * Added new endpoint `GET /sapi/v1/broker/rebate/futures/recentRecord` to get futures commision rebate record. * Added new endpoint `POST /sapi/v1/broker/transfer/futures` to transfer futures asset directly. * Added new endpoint `GET /sapi/v1/broker/transfer/futures` to get futures transfer history. * * * **2020-08-25** * Added parameters page and size in endpoint `GET /sapi/v1/broker/rebate/recentRecord`. * * * **2020-07-29** * Added new endpoint `POST /sapi/v1/broker/subAccount/blvt` to enable leverage token for sub-account. * * * **2020-07-21** * Added parameters page and size in endpoint `GET /sapi/v1/broker/subAccount`. * * * **2020-07-10** * Added default limit 500 in endpoint `GET /sapi/v1/broker/transfer`. * * * **2020-06-15** * Added new endpoint `GET /sapi/v1/broker/subAccount/spotSummary` to query sub accounts spot asset. * Added new endpoint `GET /sapi/v1/broker/subAccount/marginSummary` to query sub accounts margin asset. * Added new endpoint `GET /sapi/v1/broker/subAccount/futuresSummary` to query sub accounts futures asset. * * * **2020-06-12** * Added new endpoint `GET /sapi/v1/broker/rebate/recentRecord` to query broker commission rebate recent record. * * * **2020-06-11** * Added new endpoint `GET /sapi/v1/broker/subAccount/depositHist` to query sub accounts deposit history. * * * **2020-04-22** * New fields in response to `GET /sapi/v1/broker/subAccountApi/commission/futures` and `POST /sapi/v1/broker/subAccountApi/commission/futures`: * `makerCommission` for current futures commission ratio for maker; * `takerCommission` for current futures commission ratio for taker; * * * **2020-04-03** * Added new endpoint `POST /sapi/v1/broker/subAccount/bnbBurn/spot` to enable or disable BNB Burn for sub-account spot and margin. * Added new endpoint `POST /sapi/v1/broker/subAccount/bnbBurn/marginInterest` to enable or disable BNB Burn for sub-account margin interest. * Added new endpoint `GET /sapi/v1/broker/subAccount/bnbBurn/status` to get BNB Burn status for sub-account. * * * **2020-03-27** * Added parameters `clientTranId` in endpoints: * `POST /sapi/v1/broker/transfer`, * `GET /sapi/v1/broker/transfer`. * * * **2020-02-12** * The below endpoints will be released in the future: * new endpoint `GET /sapi/v1/broker/rebate/recentRecord` to query broker commission rebate recent record. * new endpoint `GET /sapi/v1/broker/rebate/historicalRecord` to get broker commission rebate historical record. * * * **2019-12-23** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/commission/futures` to change sub-account futures commission adjustment. * Added new endpoint `GET /sapi/v1/broker/subAccountApi/commission/futures` to query sub-account futures commission adjustment. * * * **2019-11-11** * Added parameters `marginTrade` and `futuresTrade` in endpoints: * `POST /sapi/v1/broker/subAccountApi`, * `POST /sapi/v1/broker/subAccountApi/permission`. * Added keys `marginTrade` and `futuresTrade` in responses to endpoints: * `POST /sapi/v1/broker/subAccountApi`, * `GET /sapi/v1/broker/subAccountApi`, * `POST /sapi/v1/broker/subAccountApi/permission`. * Added parameters `marginMakerCommission` and `marginTakerCommission` in endpoint `POST /sapi/v1/broker/subAccountApi/commission`. * Added keys `marginMakerCommission` and `marginTakerCommission` in responses to endpoints: * `POST /sapi/v1/broker/subAccountApi/commission`, * `Get /sapi/v1/broker/subAccount/`. * Added new endpoint `POST /sapi/v1/broker/subAccount/margin` for setting subaccount enable on margin. * Added new endpoint `POST /sapi/v1/broker/subAccount/futures` for setting subaccount enable on futures. --- # Common API request headers | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/basics#__docusaurus_skipToContent_fallback) Common API request headers ========================== | Parameter | Description | Mandatory | Remarks | | --- | --- | --- | --- | | Content-Type | application/json | Yes | | | X-Tesla-ClientId | Partner (client) id provided by Binance Connect | Yes | | | X-Tesla-SignAccessToken | Access token provided by Binance Connect | Yes | | | X-Tesla-Signature | A signature generated by request body, timestamp and partner (client) private key\* | Yes | Refer to “[API Request signing](https://developers.binance.com/docs/zh-CN/binance_connect/basics/3.request-signing)
” | | X-Tesla-Timestamp | Timestamp in millisecond | Yes | | > \*_The private key and public key are generated by the partner (client). Please refer to “[API Request signing](https://developers.binance.com/docs/zh-CN/binance_connect/basics/3.request-signing) > ” for the generation method._ --- # Create a Sub Account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#__docusaurus_skipToContent_fallback) 本页总览 Create a Sub Account ==================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#api-description "API Description的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- To create a link sub-account HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccount` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | tag | STRING | NO | tag length should be less than 32 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * This request will generate a sub account under your brokerage master account. * You need to enable "trade" option for the api key which requests this endpoint. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "email": "vai_42038996_47411276_brokersubuser@lac.info", "tag":"bob123d"} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account#example-response) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#__docusaurus_skipToContent_fallback) 本页总览 Rest API Information[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#rest-api-information "Rest API Information的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- * The base endpoint for Exchange Link is: **[https://api.binance.com](https://api.binance.com/) ** * The base endpoint for Link and Trade(Spot) is: **[https://api.binance.com](https://api.binance.com/) ** * The base endpoint for Link and Trade(Futures) is: **[https://fapi.binance.com](https://fapi.binance.com/) ** * All endpoints return either a JSON object or array. * Data is returned in **ascending** order. Oldest first, newest last. * All time and timestamp related fields are in milliseconds. * HTTP `4XX` return codes are used for for malformed requests; the issue is on the sender's side. * HTTP `429` return code is used when breaking a request rate limit. * HTTP `418` return code is used when an IP has been auto-banned for continuing to send requests after receiving `429` codes. * HTTP `5XX` return codes are used for internal errors; the issue is on Binance's side. It is important to **NOT** treat this as a failure operation; the execution status is **UNKNOWN** and could have been a success. * Any endpoint can return an ERROR; the error payload is as follows: { "code": -1121, "msg": "Invalid symbol."} * Specific error codes and messages defined in another document. * For `GET` endpoints, parameters must be sent as a `query string`. * For `POST`, `PUT`, and `DELETE` endpoints, the parameters may be sent as a `query string` or in the `request body` with content type `application/x-www-form-urlencoded`. You may mix parameters between both the `query string` and `request body` if you wish to do so. * Parameters may be sent in any order. * If a parameter sent in both the `query string` and `request body`, the `query string` parameter will be used. IP Limits[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#ip-limits "IP Limits的直接链接") -------------------------------------------------------------------------------------------------------------- * Every request will contain `X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)` in the response headers which has the current used weight for the IP for all request rate limiters defined. * Each route has a `weight` which determines for the number of requests each endpoint counts for. Heavier endpoints and endpoints that do operations on multiple symbols will have a heavier `weight`. The default weight for each request is 1, if not specify. * When a 429 is received, it's your obligation as an API to back off and not spam the API. * **Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (HTTP status 418).** * IP bans are tracked and **scale in duration** for repeat offenders, **from 2 minutes to 3 days**. * A `Retry-After` header is sent with a 418 or 429 responses and will give the **number of seconds** required to wait, in the case of a 429, to prevent a ban, or, in the case of a 418, until the ban is over. * **The limits on the API are based on the IPs, not the API keys.** Endpoint Security Type[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#endpoint-security-type "Endpoint Security Type的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- * Each endpoint has a security type that determines the how you will interact with it. * API-keys are passed into the Rest API via the `X-MBX-APIKEY` header. * API-keys and secret-keys **are case sensitive**. * API-keys can be configured to only access certain types of secure endpoints. For example, one API-key could be used for TRADE only, while another API-key can access everything except for TRADE routes. * By default, API-keys can access all secure routes. | Security Type | Description | | --- | --- | | TRADE | Endpoint requires sending a valid API-Key and signature. | | USER\_DATA | Endpoint requires sending a valid API-Key and signature. | Note[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#note "Note的直接链接") ----------------------------------------------------------------------------------------------- ### Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#request-parameters "Request Parameters的直接链接") #### Email address[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#email-address "Email address的直接链接") * Email address should be encoded. e.g. [alice@test.com](mailto:alice@test.com) should be encoded into alice%40test.com * Email address should be in lower case. * [Rest API Information](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#rest-api-information) * [IP Limits](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#ip-limits) * [Endpoint Security Type](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#endpoint-security-type) * [Note](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#note) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link#request-parameters) --- # Create a Sub Account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#__docusaurus_skipToContent_fallback) 本页总览 Create a Sub Account ==================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- To create a link sub-account HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccount` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | tag | STRING | NO | tag length should be less than 32 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * This request will generate a sub account under your brokerage master account. * You need to enable "trade" option for the api key which requests this endpoint. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#example-response "Example Response的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "email": "vai_42038996_47411276_brokersubuser@lac.info", "tag":"bob123d"} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-a-Sub-Account#example-response) --- # Change Log | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link#__docusaurus_skipToContent_fallback) **2025-11-25** * New response fields for GET `/sapi/v1/apiReferral/rebate/recentRecord` * `distributeTime` * `commissionAsset` * `commission` * `convertPrice` * * * **2025-09-22** * New Futures Transfer for Link Sub-account endpoints * POST `/sapi/v1/broker/futures/accountTransfer` * * * **2025-09-16** * Futures commission rebate query endpoints require to input `symbol` or `pair`. * GET `/sapi/v1/broker/subAccountApi/commission/futures` * GET `/sapi/v1/broker/subAccountApi/commission/coinFutures` * * * **2025-07-02** * New endpoints for KYC SaaS Integration, KYC Querying, and Request for Information (RFI). * * * **2025-04-18** * New Endpoint for delete sub account `DELETE /sapi/v1/broker/subAccount` . * Create Link sub account API key endpoint and FAST api key creation endpoint support asymmetrical key type(Ed25519 and RSA). Please see [https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a](https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a) * * * **2025-03-07** * New Endpoint for query sub account deposit by depositId `GET /sapi/v2/broker/subAccount/depositHist` . * * * **2025-02-26** * Update sub account deposit history Endpoint `GET /sapi/v1/broker/subAccount/depositHist` , adding "travelRuleStatus". * * * **2024-10-30** * Update the `Weight(UID)` to 60 for Endpoint `GET /sapi/v3/broker/subAccount/futuresSummary` . * * * **2024-08-15** * New parameter `filterResult` will be available on August 16, 2024 for query futures commission rebate record:`GET /sapi/v1/broker/rebate/futures/recentRecord` . If `filterResult` \= TRUE, rebates not from its own sub accounts will be filtered out in response. * * * **2024-06-28** * New Endpoint for query futures assets of sub-accounts:`GET /sapi/v3/broker/subAccount/futuresSummary` . * Following endpoints will be deleted in a month: `GET /sapi/v1/broker/subAccount/futuresSummary` ,`GET /sapi/v2/broker/subAccount/futuresSummary` . Please migrate the usage of legacy version(v1&v2) to the new (v3) version as soon as possible. * * * **2024-06-06** * Endpoints adjustment: for internal transfers, the txid prefix has been replaced to “Off-chain transfer”on 28 May 2024. “internal transfer” flag is no longer available in the TXID field, including historical transactions, the following endpoints are impacted: `GET /sapi/v1/broker/subAccount/depositHist`. * * * **2024-04-30** * Update the request limit for endpoint: `POST /sapi/v1/broker/subAccountApi`. You can only create 1 api key for each sub account per second * Update the request limit for endpoint: `DELETE /sapi/v1/broker/subAccountApi`. You can only delete 1 api key for each sub account per second * * * **2024-03-05** * Remove endpoint: `POST /sapi/v1/broker/subAccount/blvt`. * * * **2023-12-15** * Update the default parameter values of endpoint: `GET /sapi/v1/broker/universalTransfer`. * * * **2023-11-20** * Add `depositId` and `selfReturnStatus` in response of endpoint: `GET /sapi/v1/broker/subAccount/deposit`. * * * **2023-10-04** * Remove endpoint: `POST /sapi/v1/broker/subAccountApi/permission/vanillaOptions`. * * * **2023-08-31** * Remove endpoint: `POST /sapi/v1/broker/subAccount/margin`. To enable the margin account, simply transfer assets into Cross Margin wallet. * * * **2023-06-08** * Update weight for endpoint: `POST /sapi/v1/broker/subAccountApi`. Weight(Master Account) changed to 3000 * * * **2023-01-13** * Remove 2 endpoints: `POST /sapi/v1/broker/subAccountApi/ipRestriction`, `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList`. * * * **2022-12-16** * Remove "thirdPartyName" for `POST /sapi/v2/broker/subAccountApi/ipRestriction (HMAC SHA256)`, `POST /sapi/v1/broker/subAccountApi/ipRestriction`, `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList`, `DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList`. * * * **2022-11-28** * Add "the max length is 32 characters" in the description of clientTranId for endpoints `POST /sapi/v1/broker/universalTransfer`, `POST /sapi/v1/broker/transfer/futures`, `POST /sapi/v1/broker/transfer`. * * * **2022-11-18** * Added new endpoint `POST /sapi/v2/sub-account/subAccountApi/ipRestriction` to support user update IP Restriction for Sub-Account API key. * * * **2022-09-22** * Update `POST /sapi/v1/broker/subAccountApi/ipRestriction` to support user enable or disable Third party IP list name restriction for sub-account api key. * Update `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to support user update Third party IP list name restriction for sub-account api key. * Update `DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to support user delete Third party IP list name restriction for sub-account api key. * * * **2022-09-12** * Update `GET /sapi/v1/broker/subAccountApi/ipRestriction` to support user query third party IP list name. * * * **2022-08-23** * Add 100-days query scope for `GET /sapi/v1/broker/universalTransfer` and `GET /sapi/v1/broker/transfer`. * Add requests per UID are limited to 60 requests per minute for `GET /sapi/v1/broker/subAccount/spotSummary`. * * * **2022-06-27** * Added a new rebate status field in API response for endpoints `GET /sapi/v1/broker/rebate/futures/recentRecord` and `GET /sapi/v1/broker/rebate/recentRecord`. * * * **2021-04-29** * Added parameter `tag` and new field `email` in endpoint `POST /sapi/v1/broker/subAccount`. * * * **2021-03-26** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/permission/universalTransfer` to enable the api permission for a sub account to use `POST /sapi/v1/asset/transfer`endpoint. * Added new endpoint `POST /sapi/v1/broker/subAccountApi/permission/vanillaOptions` to enable Vanilla Options permission for sub account api key. * * * **2021-02-04** * Added parameter `fromId` and `toId` in endpoint `GET /sapi/v1/broker/transfer`. The parameter `subaccountId` will be removed on 02/10 16:00(UTC+8). Please adjust the program as soon as possible. * * * **2021-02-04** * Added parameter showAllStatus in endpoint `GET /sapi/v1/broker/universalTransfer`. * * * **2021-01-27** * Added new endpoint `GET /sapi/v2/broker/subAccount/futuresSummary` to support query subaccount Coin Margined Futures asset info. * * * **2021-01-14** * Added parameter clientTranId in endpoint `POST /sapi/v1/broker/transfer/futures` and `GET /sapi/v1/broker/transfer/futures`. * * * **2020-12-28** * Added parameters page and size in endpoint `GET /sapi/v1/broker/subAccountApi`. * * * **2020-12-14** * The endpoint `GET /sapi/v1/broker/transfer/futures` can only get the latest history of past 30 days. * * * **2020-12-10** * Added new endpoint `POST /sapi/v1/broker/universalTransfer` to transfer spot and futures asset between master account and sub accounts. * Added new endpoint `GET /sapi/v1/broker/universalTransfer` to get universal transfer history. * * * **2020-11-27** * Added tranId in response of endpoint `GET /sapi/v1/broker/transfer/futures`. * * * **2020-10-23** * Added parameter showAllStatus in endpoint `GET /sapi/v1/broker/transfer`. * * * **2020-10-12** * Added parameter status in the response of endpoint `GET /sapi/v1/broker/transfer`. * * * **2020-09-16** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/commission/coinFutures` to change sub- account COIN-Ⓜ futures commission adjustment. * Added new endpoint `GET /sapi/v1/broker/subAccountApi/commission/coinFutures` query sub- account COIN-Ⓜ futures commission adjustment. * Added parameter confirmTimes in endpoint `GET /sapi/v1/broker/subAccount/depositHist`. **2020-09-11** * Added parameter email in endpoint `GET /sapi/v1/broker/subAccount`. * * * **2020-09-07** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/ipRestriction` to enable or disable IP restriction for sub-account api key. * Added new endpoint `POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to add IP restricion for sub-account api key. * Added new endpoint `GET /sapi/v1/broker/subAccountApi/ipRestriction` to get IP restriction for sub-account api key. * Added new endpoint `DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList` to delete IP restriction for sub-account api key. * * * **2020-09-02** * Added new endpoint `GET /sapi/v1/broker/rebate/futures/recentRecord` to get futures commision rebate record. * Added new endpoint `POST /sapi/v1/broker/transfer/futures` to transfer futures asset directly. * Added new endpoint `GET /sapi/v1/broker/transfer/futures` to get futures transfer history. * * * **2020-08-25** * Added parameters page and size in endpoint `GET /sapi/v1/broker/rebate/recentRecord`. * * * **2020-07-29** * Added new endpoint `POST /sapi/v1/broker/subAccount/blvt` to enable leverage token for sub-account. * * * **2020-07-21** * Added parameters page and size in endpoint `GET /sapi/v1/broker/subAccount`. * * * **2020-07-10** * Added default limit 500 in endpoint `GET /sapi/v1/broker/transfer`. * * * **2020-06-15** * Added new endpoint `GET /sapi/v1/broker/subAccount/spotSummary` to query sub accounts spot asset. * Added new endpoint `GET /sapi/v1/broker/subAccount/marginSummary` to query sub accounts margin asset. * Added new endpoint `GET /sapi/v1/broker/subAccount/futuresSummary` to query sub accounts futures asset. * * * **2020-06-12** * Added new endpoint `GET /sapi/v1/broker/rebate/recentRecord` to query broker commission rebate recent record. * * * **2020-06-11** * Added new endpoint `GET /sapi/v1/broker/subAccount/depositHist` to query sub accounts deposit history. * * * **2020-04-22** * New fields in response to `GET /sapi/v1/broker/subAccountApi/commission/futures` and `POST /sapi/v1/broker/subAccountApi/commission/futures`: * `makerCommission` for current futures commission ratio for maker; * `takerCommission` for current futures commission ratio for taker; * * * **2020-04-03** * Added new endpoint `POST /sapi/v1/broker/subAccount/bnbBurn/spot` to enable or disable BNB Burn for sub-account spot and margin. * Added new endpoint `POST /sapi/v1/broker/subAccount/bnbBurn/marginInterest` to enable or disable BNB Burn for sub-account margin interest. * Added new endpoint `GET /sapi/v1/broker/subAccount/bnbBurn/status` to get BNB Burn status for sub-account. * * * **2020-03-27** * Added parameters `clientTranId` in endpoints: * `POST /sapi/v1/broker/transfer`, * `GET /sapi/v1/broker/transfer`. * * * **2020-02-12** * The below endpoints will be released in the future: * new endpoint `GET /sapi/v1/broker/rebate/recentRecord` to query broker commission rebate recent record. * new endpoint `GET /sapi/v1/broker/rebate/historicalRecord` to get broker commission rebate historical record. * * * **2019-12-23** * Added new endpoint `POST /sapi/v1/broker/subAccountApi/commission/futures` to change sub-account futures commission adjustment. * Added new endpoint `GET /sapi/v1/broker/subAccountApi/commission/futures` to query sub-account futures commission adjustment. * * * **2019-11-11** * Added parameters `marginTrade` and `futuresTrade` in endpoints: * `POST /sapi/v1/broker/subAccountApi`, * `POST /sapi/v1/broker/subAccountApi/permission`. * Added keys `marginTrade` and `futuresTrade` in responses to endpoints: * `POST /sapi/v1/broker/subAccountApi`, * `GET /sapi/v1/broker/subAccountApi`, * `POST /sapi/v1/broker/subAccountApi/permission`. * Added parameters `marginMakerCommission` and `marginTakerCommission` in endpoint `POST /sapi/v1/broker/subAccountApi/commission`. * Added keys `marginMakerCommission` and `marginTakerCommission` in responses to endpoints: * `POST /sapi/v1/broker/subAccountApi/commission`, * `Get /sapi/v1/broker/subAccount/`. * Added new endpoint `POST /sapi/v1/broker/subAccount/margin` for setting subaccount enable on margin. * Added new endpoint `POST /sapi/v1/broker/subAccount/futures` for setting subaccount enable on futures. --- # Webhook | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#__docusaurus_skipToContent_fallback) 本页总览 Webhook ======= Whenever a key event (currently only "order status change") occurs, Binance Connect will send a webhook message, and the partner (client) can receive this message at the webhook callback url and react accordingly, such as updating order data and frontend UI. ### Request Headers[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#request-headers "Request Headers的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | X-BN-Connect-Timestamp | timestamp | timestamp | | X-BN-Connect-Signature | string | SHA256withRSA(**requestBody** + **X-Connect-Timestamp**) | | X-BN-Connect-For | string | Same with your client id (X-Tesla-ClientId) | ### Request Body[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#request-body "Request Body的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | webhookEventType | string | A fixed value: connect\_order\_event | | externalOrderId | string | The unique order id from the partner side. | | type | int | 1: buy, 2: sell, 3: send | | businessType | int | 1: fiat, 2: p2p, 3: send, 4: convert | | status | int | Please refer to "[Order status](https://developers.binance.com/docs/zh-CN/binance_connect/basics/7.order-status)
" | | payMethodCode | string | The payment method code is from payment method list API | | payMethodSubCode | string | The payment method sub code is from payment method list API | | fiatCurrency | string | fiat currency | | cryptoCurrency | string | crypto currency | | openUserId | string | OpenUserId represents a Binance user ID that has been securely hashed. This field is provided to merchants to facilitate the identification of whether multiple orders originate from the same user. | | fiatAmount | string | fiat amount | | cryptoAmount | string | crypto amount | | feeAmount | string | fee amount | | feeCurrency | string | fee currency, USD or crypto | | revenueAmount | string | partner revenue amount | | revenueCurrency | string | partner revenue currency, USD or crypto | | networkFee | string | network fee amount | | withdrawWalletAddress | string | withdraw wallet address | | withdrawNetwork | string | withdraw network | | withdrawMemo | string | withdraw network memo | | withdrawTxHash | string | withdraw tx hash | | orderDetailLink | string | order detail link | | orderTime | timestamp | order time | | completionTime | timestamp | completion time | | updateTime | timestamp | update time | | convertInfo | object | Convert information. This field is only present for Convert orders. Refer to **ConvertInfo** | | swapDetailInfoVo | object | If the order has swap operation. Then this field has value. Refer to **SwapDetailInfoVo** | | userData | string | AES-encrypted JSON string (see details below). Disabled by default; contact us to enable | #### SwapDetailInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#swapdetailinfovo "SwapDetailInfoVo的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | fromCryptoCurrencyContractAddress | string | The "from" crypto contract address, typically a stablecoin or native token. | | toCryptoCurrencyContractAddress | string | The contract address of the target coin the user intends to swap online. | | toCryptoCurrencyAmount | string | The final amount of cryptocurrency the user swapped and received in their wallet. | #### ConvertInfo[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#convertinfo "ConvertInfo的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | fromCoin | string | The source cryptocurrency being converted from | | fromCoinAmount | string | The amount of source cryptocurrency being converted | #### userData field[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#userdata-field "userData field的直接链接") * Type: string * Remarks: When enabled, `userData` contains a JSON object (serialized to a string) that is encrypted with AES. The field value is the AES-encrypted ciphertext encoded as a string. This field is disabled by default — please contact us if you need it enabled and for access to the AES key and configuration. * Decryption reference: follow the AES decryption instructions described in Binance documentation: [https://developers.binance.com/docs/binance-pay/authentication#decryption-instructions-for-merchant-data-sharing](https://developers.binance.com/docs/binance-pay/authentication#decryption-instructions-for-merchant-data-sharing) * JSON structure (plaintext before AES encryption): | Field | Type | Remarks | | --- | --- | --- | | firstName | string | User's first name | | middleName | string | User's middle name (optional) | | lastName | string | User's last name | | residenceCountry | string | Country code of residence (ISO) | | birthday | string | Birthday in YYYY-MM-DD format | | country | string | Country code (ISO) | | refundAddress | string | Refund crypto address (if any) | | refundNetwork | string | Network of refund (e.g., ETH) | | refundMemo | string | Refund memo/memo field (if any) | Notes: * Field names and types above show the expected JSON keys that will be present after decrypting `userData`. * The concrete AES parameters (mode, IV, padding) and key delivery method will be provided when the field is enabled; see the decryption reference link above for an example. ### Response Body[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#response-body "Response Body的直接链接") * HTTP status code is 200 * Response body is in JSON format. | **Field** | **Type** | **Remarks** | | --- | --- | --- | | returnCode | string | SUCCESS or other code you wish to return to Binance Connect | | returnMessage | string | the message you wish to return to Binance Connect | ### How signature works[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#how-signature-works "How signature works的直接链接") The encryption/decryption and verification process of webhook is exactly the opposite/mirrored of API request process. The sender and receiver of the two are opposite, but they are both processes that signed by the sender with a private key and verified by the receiver with a public key. For API requests, the partner (client) generates a pair of keys. The private key is kept securely and privately by the partner (client). Then the partner (client) uses the private key to sign when initiating API requests. The public key is shared to Bianance Connect, with which Binance will verify the signature of the API request to ensure that the request is indeed initiated by the partner (client). For webhook, it's an opposite/mirrored process. Binance Connect generates a pair of keys. The private key is kept securely and privately by Binance Connect. Then Binance Connect uses the private key to sign when initiating the webhook message. The public key is shared to the partner (client), with which the partner (client) can verify the signature of the webhook message to ensure that the message is indeed initiated by Binance. #### The webhook signature flow is as follows:[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#the-webhook-signature-flow-is-as-follows "The webhook signature flow is as follows:的直接链接") ![signature-Webhook.png](https://developers.binance.com/docs/zh-CN/assets/images/signature-Webhook-8e2546351f3231e2cd4fa48bb8ed679f.png) ### Verify signature[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#verify-signature "Verify signature的直接链接") As mentioned above, Binance Connect initiates a webhook request to the webhook callback url provided by the partner ( client). And the partner (client) should verify the identity of the request initiator based on the public key provided by Binance Connect. The example code below shows how to verify signature with public key: public static boolean verify(String srcData, PublicKey publicKey, String sign) throws Exception { Signature signature = Signature.getInstance("SHA256withRSA"); signature.initVerify(publicKey); signature.update(srcData.getBytes()); return signature.verify(Base64.decodeBase64(sign.getBytes()));} ### Example[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#example "Example的直接链接") Request Body: { "webhookEventType": "connect_order_event", "externalOrderId": "180401941923045", "type": 1, "businessType": 1, "status": 2, "payMethodCode": "BUY_P2P", "payMethodSubCode": "BANK", "fiatCurrency": "EUR", "cryptoCurrency": "USDT", "openUserId": "f47ac10b58cc4372a5670e02b2c3d479", "fiatAmount": "100", "cryptoAmount": "107.8", "feeAmount": "1", "feeCurrency": "USDT", "revenueAmount": "0.08", "revenueCurrency": "USDT", "networkFee": "0.5", "withdrawWalletAddress": "0xbb4CdB98Bd36B01bD1cBaEA52De08d9173bc095c", "withdrawNetwork": "BSC", "withdrawMemo": "", "withdrawTxHash": "0xcb163e2e6322cd6aa7bc4d45306029e846c0c06e9cdee45a06e88801d1231e71", "orderDetailLink": "https://www.binance.com/en/my/wallet/exchange/buysell-history?type=buy", "orderTime": 1723186761000, "completionTime": 1723206761000, "updateTime": 1734446642930} ### Example (Convert Order)[​](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#example-convert-order "Example (Convert Order)的直接链接") Request Body: { "webhookEventType": "connect_order_event", "networkFee": null, "feeCurrency": "USDT", "type": 1, "businessType": 4, "withdrawMemo": "", "revenueAmount": null, "cryptoCurrency": "USDT", "withdrawTxHash": "", "completionTime": null, "orderTime": 1753344231742, "payMethodSubCode": "CUMBERLAND", "cryptoAmount": "1.03", "orderDetailLink": null, "payMethodCode": "SPOT", "revenueCurrency": "USDT", "convertInfoVo": { "fromCoin": "BNB", "fromCoinAmount": 0.00137386 }, "swapDetailInfoVo": null, "updateTime": 1753344255279, "externalOrderId": "830315252102", "withdrawWalletAddress": "0xbb4CdB98Bd36B01bD1cBaEA52De08d9173bc095c", "fiatCurrency": "", "fiatAmount": "0", "withdrawNetwork": "ETH", "status": 11} * [Request Headers](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#request-headers) * [Request Body](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#request-body) * [Response Body](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#response-body) * [How signature works](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#how-signature-works) * [Verify signature](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#verify-signature) * [Example](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#example) * [Example (Convert Order)](https://developers.binance.com/docs/zh-CN/binance_connect/webhook#example-convert-order) --- # Change Sub Account Api Permission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission#__docusaurus_skipToContent_fallback) 本页总览 Change Sub Account Api Permission ================================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission#http-request "HTTP Request的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccountApi/permission` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | subAccountApiKey | STRING | YES | | | canTrade | ENUM | YES | | | marginTrade | ENUM | YES | | | futuresTrade | ENUM | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * This request will change the api permission for a sub account. * You need to enable "trade" option for the api key which requests this endpoint. * Sub account should be enable `margin` before its api-key's `marginTrade` being enabled. * Sub account should be enable `futures` before its api-key's `futuresTrade` being enabled. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission#example-response "Example Response的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "apikey":"vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "canTrade": true, "marginTrade": true, "futuresTrade": true} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission#example-response) --- # Delete IP Restriction for Sub Account Api Key | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key#__docusaurus_skipToContent_fallback) 本页总览 Delete IP Restriction for Sub Account Api Key ============================================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/sapi/v1/broker/subAccountApi/ipRestriction/ipList` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | subAccountApiKey | STRING | YES | | | ipAddress | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key#example-response "Example Response的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "ipList": [ "54.128.193.28" ], "updateTime": 1544433328000 } * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key#example-response) --- # Delete Sub Account Api Key | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key#__docusaurus_skipToContent_fallback) 本页总览 Delete Sub Account Api Key ========================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/sapi/v1/broker/subAccountApi` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | subAccountApiKey | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * This request will delete a api key for a sub account * You need to enable "trade" option for the api key which requests this endpoint * You can only delete 1 api key for each sub account per second Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key#example-response "Example Response的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- {} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key#example-response) --- # Enable Futures for Sub Account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Futures-for-Sub-Account#__docusaurus_skipToContent_fallback) 本页总览 Enable Futures for Sub Account ============================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Futures-for-Sub-Account#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccount/futures` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Futures-for-Sub-Account#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | futures | ENUM | YES | only `true` for now | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Futures-for-Sub-Account#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "enableFutures": true, "updateTime": 1570801523523} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Futures-for-Sub-Account#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Futures-for-Sub-Account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Futures-for-Sub-Account#example-response) --- # Enable Or Disable BNB Burn for Sub Account SPOT and MARGIN | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin#__docusaurus_skipToContent_fallback) 本页总览 Enable Or Disable BNB Burn for Sub Account SPOT and MARGIN ========================================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccount/bnbBurn/spot` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | spotBNBBurn | ENUM | YES | "true" or "false", spot and margin whether use BNB to pay for transaction fees or not | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subAccountId":1, "spotBNBBurn":true} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin#example-response) --- # Delete Sub Account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account#__docusaurus_skipToContent_fallback) 本页总览 Delete Sub Account ================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/sapi/v1/broker/subAccount` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- {} **Caution:** * The operation will delete a sub account under your brokerage master account. * Please transfer out all funds from the sub account and delete API key of the sub account before deleting it. * The deleted sub account CANNOT be reverted. * The daily deletion limit for a broker Master is 20 sub accounts. * You need to enable "trade" option for the api key which requests this endpoint. * This endpoint requires user to be whitelisted. Please contact Binance Link team. * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Delete-Sub-Account#example-response) --- # Get BNB Burn Status for Sub Account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account#__docusaurus_skipToContent_fallback) 本页总览 Get BNB Burn Status for Sub Account =================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccount/bnbBurn/status` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subAccountId": 1, "spotBNBBurn": true, "interestBNBBurn": true} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account#example-response) --- # Update IP Restriction for Sub-Account API key (For Master Account) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#__docusaurus_skipToContent_fallback) 本页总览 Update IP Restriction for Sub-Account API key (For Master Account) ================================================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ POST `/sapi/v2/broker/subAccountApi/ipRestriction` Weight(UID):[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#weightuid "Weight(UID):的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **3000** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | subAccountApiKey | STRING | YES | | | status | STRING | YES | IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. | | ipAddress | STRING | NO | Insert static IP in batch, separated by commas. | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "status": "2", "ipList": [ "69.210.67.14", "8.34.21.10" //only return if you open IP restriction and input IP address. ], "updateTime": 1636371437000, "apiKey": "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf"} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#http-request) * [Weight(UID):](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#weightuid) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account#example-response) --- # Query Sub Account Api Key | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account-Api-Key#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account Api Key ========================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account-Api-Key#http-request "HTTP Request的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccountApi` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account-Api-Key#request-parameters "Request Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | subAccountApiKey | STRING | NO | | | page | LONG | NO | default 1 | | size | LONG | NO | default 500, max 500 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * You need to enable "trade" option for the api key which requests this endpoint Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account-Api-Key#example-response "Example Response的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "apikey":"vmP*************", "subaccountId": "1", "canTrade": true, "marginTrade": true, "futuresTrade": false }, { "apikey":"5VN*************", "subaccountId": "1", "canTrade": true, "marginTrade": false, "futuresTrade": false }] * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account-Api-Key#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account-Api-Key#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account-Api-Key#example-response) --- # Enable Universal Transfer Permission For Sub Account Api Key | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key#__docusaurus_skipToContent_fallback) 本页总览 Enable Universal Transfer Permission For Sub Account Api Key ============================================================ HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccountApi/permission/universalTransfer` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | LONG | YES | | | subAccountApiKey | STRING | YES | | | canUniversalTransfer | ENUM | YES | true or false | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * This request will enable the api permission for a sub account to use `POST /sapi/v1/asset/transfer`endpoint. * You need to enable "trade" option for the api key which requests this endpoint. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "canUniversalTransfer":true } * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key#example-response) --- # Query Sub Account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account ================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccount` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | NO | | | page | LONG | NO | default 1 | | size | LONG | NO | default 500 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "subaccountId": "1", "email": "vai_42038996_47411276_brokersubuser@lac.info", "tag":"bob123", "makerCommission": 0.001, "takerCommission": 0.001, "marginMakerCommission": -1, // if margin disabled, return -1 "marginTakerCommission": -1, // if margin disabled, return -1 "createTime":1544433328000 }, { "subaccountId": "2", "email":"123@abc.com", "tag":"bob123", "makerCommission":0.001, "takerCommission":0.001, "marginMakerCommission": 10, "marginTakerCommission": 10, "createTime":1544433328000 }] * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Query-Sub-Account#example-response) --- # Futures Transfer for Link Sub-account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#__docusaurus_skipToContent_fallback) 本页总览 Futures Transfer for Link Sub-account (For Master Account) (USER\_DATA) ======================================================================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#api-description "API Description的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Futures Transfer for Link Sub-account HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/futures/accountTransfer` Request Weight(IP)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#request-weightip "Request Weight(IP)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | LONG | YES | | | asset | STRING | YES | The asset being transferred, e.g., USDT | | amount | DECIMAL | YES | The amount to be transferred | | type | INT | YES | 1: transfer from subaccount's spot account to its USDT-margined futures account 2: transfer from subaccount's USDT-margined futures account to its spot account 3: transfer from subaccount's spot account to its COIN-margined futures account 4:transfer from subaccount's COIN-margined futures account to its spot account | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#response-example "Response Example的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "txnId":"2966662589"} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#http-request) * [Request Weight(IP)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#request-weightip) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#request-parameters) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Futures-Transfer-for-Link-Sub-account#response-example) --- # Sub Account Transfer(spot) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Spot#__docusaurus_skipToContent_fallback) 本页总览 Sub Account Transfer(SPOT) ========================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Spot#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/transfer` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Spot#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | fromId | STRING | NO | | | toId | STRING | NO | | | clientTranId | STRING | NO | client transfer id, must be unique. The max length is 32 characters | | asset | STRING | YES | | | amount | DECIMAL | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * You need to enable "internal transfer" option for the api key which requests this endpoint. * Transfer from master account if `fromId` not sent. * Transfer to master account if `toId` not sent. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Spot#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "txnId":"2966662589", "clientTranId":"abc"} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Spot#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Spot#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Spot#example-response) --- # Sub Account Transfer(spot) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset#__docusaurus_skipToContent_fallback) 本页总览 Sub Account Transfer(SPOT) ========================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset#http-request "HTTP Request的直接链接") ----------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/transfer` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | fromId | STRING | NO | | | toId | STRING | NO | | | clientTranId | STRING | NO | client transfer id, must be unique. The max length is 32 characters | | asset | STRING | YES | | | amount | DECIMAL | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * You need to enable "internal transfer" option for the api key which requests this endpoint. * Transfer from master account if `fromId` not sent. * Transfer to master account if `toId` not sent. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset#example-response "Example Response的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------- { "txnId":"2966662589", "clientTranId":"abc"} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset#example-response) --- # Get Sub Account Deposit History V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#__docusaurus_skipToContent_fallback) 本页总览 Get Sub Account Deposit History V2 ================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v2/broker/subAccount/depositHist` Weight(Master Account)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#weightmaster-account "Weight(Master Account)的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **10** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | depositId | STRING | YES | | | subAccountId | STRING | YES | | | limit | INT | NO | Default:500 | | offset | INT | NO | Default:0 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#example-response "Example Response的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "depositId": 1234567890123, "subAccountId": "1", "address": "0xddc66e4313fd6c737b6cae67cad90bb4e0ac7092", "addressTag": "", "amount": "139.04370000", "coin": "USDT", "insertTime": 1566791463000, "transferType": 0, "network": "ETH", "status": 3, "txId": "0x5759dfe9983a4c7619bce9bc736bb6c26f804091753bf66fa91e7cd5cfeebafd", "confirmTimes": "12/12", "selfReturnStatus": 0 , "travelRuleStatus": 0 //0: travel rule not required OR info already provided and funds ready to use, 1: travel rule required to provide deposit info }] * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#http-request) * [Weight(Master Account)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#weightmaster-account) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History-v2#example-response) --- # Query Sub Account Margin Asset info | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account Margin Asset info =================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info#http-request "HTTP Request的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccount/marginSummary` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | NO | | | page | LONG | NO | default 1 | | size | LONG | NO | default 10, max 20 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If subaccountId is not sent, the size must be sent Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info#example-response "Example Response的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { data:[ { "marginEnable": true, //if enable margin "subAccountId": "367537027503425913", "totalAssetOfBtc": "0.03558520", // margin asset "totalLiabilityOfBtc": "0.34585210", //liability "totalNetAssetOfBtc" :"0.23334213", // net asset "marginLevel": "0.009" // margin level }, { "marginEnable": false, "subAccountId": "367537027503435242" } ], "timestamp": 1583127900000 } * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info#example-response) --- # Query Sub Account Transfer History(Futures) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account Transfer History(FUTURES) =========================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v1/broker/transfer/futures` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | futuresType | LONG | YES | 1:USDT Futures,2: COIN Futures | | clientTranId | STRING | NO | | | startTime | LONG | NO | default 30 days records | | endTime | LONG | NO | default 30 days records | | page | INT | NO | default 1 | | limit | INT | NO | default 50, max 500 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * Only get the latest history of past 30 days. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "success": true, "futuresType": 2, "transfers":[ { "from":"", // master account "to":"2", "asset":"BTC", "qty":"1", "tranId": "12137888538", "clientTranId":"a123", "time":1544433328000 }, { "fromId":"1", "toId":"2", "asset":"ETH", "qty":"2", "tranId": "12137888538", "clientTranId":"", "time":1544433328000, } ]} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures#example-response) --- # Create Api Key for Sub Account | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#__docusaurus_skipToContent_fallback) 本页总览 Create Api Key for Sub Account ============================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccountApi` Weight(IP)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#weightip "Weight(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ **8** Weight(Master Account)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#weightmaster-account "Weight(Master Account)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **3000** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | publicKey | STRING | NO | The public key for asymmetrical key type(Ed25519 and RSA). Please see [https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a](https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a) | | canTrade | ENUM | YES | spot trade | | marginTrade | ENUM | NO | margin trade | | futuresTrade | ENUM | NO | futures trade | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * This request will generate a api key for a sub account. * You need to enable "trade" option for the api key which requests this endpoint * Sub account should be enable `margin` before its api-key's `marginTrade` being enabled * Sub account should be enable `futures` before its api-key's `futuresTrade` being enabled * You can only create 1 api key for each sub account per second Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "apiKey":"vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "secretKey":"NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0", "canTrade": true, "marginTrade": false, "futuresTrade": false} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#http-request) * [Weight(IP)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#weightip) * [Weight(Master Account)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#weightmaster-account) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account#example-response) --- # Change Sub Account Commission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#__docusaurus_skipToContent_fallback) 本页总览 Change Sub Account Commission ============================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ * This request will change the commission for a sub account. * You need to enable "trade" option for the api key which requests this endpoint. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#http-request "HTTP Request的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccountApi/commission` Weight(UID)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#weightuid "Weight(UID)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- **4** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#request-parameters "Request Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | makerCommission | FLOAT | YES | 0.001 | | takerCommission | FLOAT | YES | 0.002 | | marginMakerCommission | FLOAT | NO | | | marginTakerCommission | FLOAT | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If margin disabled, it is not allowed to send `marginMakerCommission` or `marginTakerCommission`. * If margin enabled, `marginMakerCommission` or `marginTakerCommission` has default value as `makerCommission` or `takerCommission` . Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#example-response "Example Response的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subAccountId": "1", "makerCommission": 0.001, "takerCommission": 0.002, "marginMakerCommission": 0.001, "marginTakerCommission": 0.002} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#http-request) * [Weight(UID)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#weightuid) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-Commission#example-response) --- # Enable Or Disable BNB Burn for Sub Account Margin Interest | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest#__docusaurus_skipToContent_fallback) 本页总览 Enable Or Disable BNB Burn for Sub Account Margin Interest ========================================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ POST `/sapi/v1/broker/subAccount/bnbBurn/marginInterest` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | interestBNBBurn | ENUM | YES | "true" or "false", margin loan whether uses BNB to pay for margin interest or not | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * Subaccount must be enabled `margin` before using this switch Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "subAccountId":1, "interestBNBBurn":true} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest#example-response) --- # Sub Account Transfer(Futures) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures#__docusaurus_skipToContent_fallback) 本页总览 Sub Account Transfer(FUTURES) ============================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/transfer/futures` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | fromId | STRING | NO | | | toId | STRING | NO | | | futuresType | LONG | YES | 1:USDT Futures,2: COIN Futures | | asset | STRING | YES | | | amount | DECIMAL | YES | | | clientTranId | STRING | NO | The max length is 32 characters | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * You need to enable "internal transfer" option for the api key which requests this endpoint. * Transfer from master account if `fromId` not sent. * Transfer to master account if `toId` not sent. * Each master account could transfer 5000 times/min Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures#example-response "Example Response的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "success":true, "txnId":"2966662589", "clientTranId":"a123"} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures#example-response) --- # Query Sub Account Transfer History(Spot) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account Transfer History(SPOT) ======================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot#http-request "HTTP Request的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/transfer` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot#request-parameters "Request Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | fromId | STRING | NO | | | toId | STRING | NO | | | clientTranId | STRING | NO | client transfer id | | showAllStatus | ENUM | NO | true or false, default: false | | startTime | LONG | NO | | | endTime | LONG | NO | | | page | INT | NO | | | limit | INT | NO | default 500, max 500 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * If showAllStatus is true, the status in response will show four types: INIT,PROCESS,SUCCESS,FAILURE. * If showAllStatus is false, the status in response will show three types: INIT,PROCESS,SUCCESS. * Either fromId or toId must be sent. Return fromId equal master account by default. **Query scope is limited to 100 days:** * Both _startTime_ and _endTime_ are provided: If it exceeds, the endTime will be re-calculated 100 days after the startTime. * Neither _startTime_ nor _endTime_ are provided: Calculate 100 days before today. * _endTime_ is not provided: Calculate 100 days after startTime. * _startTime_ is not provided: Calculate 100 days before endTime. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot#example-response "Example Response的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "fromId":"1", "toId":"2", "asset":"BTC", "qty":"1", "time":1544433328000, "txnId":"2966662589", "clientTranId":"abc", "status": "SUCCESS" // Status Type:INIT,PROCESS,SUCCESS }, { "fromId":"1", "toId":"2", "asset":"ETH", "qty":"2", "time":1544433328000, "txnId":"296666999", "clientTranId":"", "status": "SUCCESS" }] * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot#example-response) --- # Query Universal Transfer History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Universal-Transfer-History#__docusaurus_skipToContent_fallback) 本页总览 Query Universal Transfer History ================================ HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Universal-Transfer-History#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/universalTransfer` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Universal-Transfer-History#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | fromId | STRING | NO | | | toId | STRING | NO | | | clientTranId | STRING | NO | client transfer id | | startTime | LONG | NO | | | endTime | LONG | NO | | | page | INT | NO | default 1 | | limit | INT | NO | default 500, max 500 | | showAllStatus | Boolean | NO | TRUE or FALSE | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * Either fromId or toId must be sent. * If either fromId or toId is the master account itself, it will not return in response. * If showAllStatus is true, the status in response will show four types: INIT,PROCESS,SUCCESS,FAILURE. **Query scope is limited to 100 days:** * Both _startTime_ and _endTime_ are provided: If it exceeds, the endTime will be re-calculated 100 days after the startTime. * Neither _startTime_ nor _endTime_ are provided: Calculate 30 days before today. * _endTime_ is not provided: Calculate as Current time. * _startTime_ is not provided: Calculate 30 days before endTime. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Universal-Transfer-History#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "toId":"444016824578949121", "asset":"BTC", "qty":"0.1", "time":1544433328000, "status":"SUCCESS", "txnId":"12831078279", "clientTranId":"abc", "fromAccountType": "SPOT", "toAccountType": "USDT_FUTURE" }, { "toId":"444016824578949121", "asset":"USDT", "qty":"2", "time":1544433328000, "status":"SUCCESS", "txnId":"296666999", "clientTranId":"", "fromAccountType": "SPOT", "toAccountType": "USDT_FUTURE" }] * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Universal-Transfer-History#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Universal-Transfer-History#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Universal-Transfer-History#example-response) --- # Get IP Restriction for Sub Account Api Key | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key#__docusaurus_skipToContent_fallback) 本页总览 Get IP Restriction for Sub Account Api Key ========================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccountApi/ipRestriction` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | subAccountApiKey | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subaccountId": "1", "ipRestrict": true, "apikey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "ipList": [ "54.128.193.23", "542.234.192.290" ], "updateTime": 1544433328000 } * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key#example-response) --- # Change Sub Account Commission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#__docusaurus_skipToContent_fallback) 本页总览 Change Sub Account Commission ============================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ * This request will change the commission for a sub account. * You need to enable "trade" option for the api key which requests this endpoint. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#http-request "HTTP Request的直接链接") --------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccountApi/commission` Weight(UID)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#weightuid "Weight(UID)的直接链接") ---------------------------------------------------------------------------------------------------------------------- **4** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#request-parameters "Request Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | makerCommission | FLOAT | YES | 0.001 | | takerCommission | FLOAT | YES | 0.002 | | marginMakerCommission | FLOAT | NO | | | marginTakerCommission | FLOAT | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If margin disabled, it is not allowed to send `marginMakerCommission` or `marginTakerCommission`. * If margin enabled, `marginMakerCommission` or `marginTakerCommission` has default value as `makerCommission` or `takerCommission` . Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#example-response "Example Response的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- { "subAccountId": "1", "makerCommission": 0.001, "takerCommission": 0.002, "marginMakerCommission": 0.001, "marginTakerCommission": 0.002} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#http-request) * [Weight(UID)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#weightuid) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee#example-response) --- # Universal Transfer | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Universal-Transfer#__docusaurus_skipToContent_fallback) 本页总览 Universal Transfer ================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Universal-Transfer#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ POST `/sapi/v1/broker/universalTransfer` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Universal-Transfer#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | fromId | STRING | NO | | | toId | STRING | NO | | | fromAccountType | STRING | YES | SPOT,USDT\_FUTURE,COIN\_FUTURE | | toAccountType | STRING | YES | SPOT,USDT\_FUTURE,COIN\_FUTURE | | clientTranId | STRING | NO | Client transfer id, must be unique. The max length is 32 characters | | asset | STRING | YES | | | amount | DECIMAL | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **Caution:** * You need to enable "internal transfer" option for the api key which requests this endpoint. * Transfer from master account if `fromId` not sent. * Transfer to master account if `toId` not sent. * Transfer between futures acount is not supported. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Universal-Transfer#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ { "txnId":12831061179, "clientTranId":"abc"} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Universal-Transfer#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Universal-Transfer#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Universal-Transfer#example-response) --- # Link Account Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Link-Account-Information#__docusaurus_skipToContent_fallback) 本页总览 Link Account Information ======================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Link-Account-Information#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- Get `/sapi/v1/broker/info` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Link-Account-Information#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Link-Account-Information#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "maxMakerCommission":0.002, "minMakerCommission":0.001, "maxTakerCommission":0.002, "minTakerCommission":0.001, "subAccountQty":400, "maxSubAccountQty":1000} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Link-Account-Information#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Link-Account-Information#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/account/Link-Account-Information#example-response) --- # Overall Workflow | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Overall-Workflow#__docusaurus_skipToContent_fallback) Getting Started =============== Integrating with Binance Link KYC Saas broadly follows the below steps. 1. Create an Exchange Link sub-account via API. 2. KYC is processed for the user in one of two methods. 3. Validate that KYC is passed. 4. Create an API Key for the sub-account, and proceed from there. Sub Account Creation Flow with Link Module integration ====================================================== 1. Create a Sub account `POST /sapi/v1/broker/subAccount` 2. Complete KYC and bind to Sub account via KYC module through one of: * Share KYC API `/bapi/ekyc/v2/public/ekyc/customer/share-kyc-data` * Oauth Link `/bapi/ekyc/v2/public/ekyc/customer/add-account-info-list` 3. Check KYC Status is passed `/bapi/ekyc/v2/public/ekyc/customer/check-kyc-status` * Requirement: `data.levelInfo.currentLevel.kycStatus` = `PASS` 4. Create Sub account API Key `POST /sapi/v1/broker/subAccountApi` --- # Change Sub Account USDT-Ⓜ Futures Commission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#__docusaurus_skipToContent_fallback) 本页总览 Change Sub Account USDT-Ⓜ Futures Commission Adjustment ======================================================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#api-description "API Description的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * This request will change the USDT-Ⓜ futures commission for a sub account. * You need to enable "trade" option for the api key which requests this endpoint. * The sub-account's USDT-Ⓜ futures commission of a symbol equals to the base commission of the symbol on the sub-account's fee tier plus the commission adjustment. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccountApi/commission/futures` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | symbol | STRING | YES | | | makerAdjustment | INT | YES | 100 for 0.01% | | takerAdjustment | INT | YES | 100 for 0.01% | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If futures disabled, it is not allowed to set subaccount's USDT-Ⓜ futures commission adjustment on any symbol. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subAccountId": 1, "symbol": "BTCUSDT", "makerAdjustment": 150, // USDT-Ⓜ futures commission adjustment for maker "takerAdjustment": 150, // USDT-Ⓜ futures commission adjustment for taker "makerCommission": 450, // USDT-Ⓜ futures commission (after adjusted) for maker "takerCommission": 550, // USDT-Ⓜ futures commission (after adjusted) for taker} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission#example-response) --- # Query Sub Account Spot Asset info | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account Spot Asset info ================================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#http-request "HTTP Request的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccount/spotSummary` Weight(UID)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#weightuid "Weight(UID)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- **3000** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#request-parameters "Request Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | NO | | | page | LONG | NO | default 1 | | size | LONG | NO | default 10, max 20 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If subaccountId is not sent, the size must be sent * Requests per UID are limited to 60 requests per minute Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#example-response "Example Response的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { data:[ { "subAccountId": "367537027503425913", "totalBalanceOfBtc": "0.0355852154360000" //spot asset }, { "subAccountId": "367537027503421232", "totalBalanceOfBtc": "0.0233852154360000" } ], "timestamp": 1583432900000 } * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#http-request) * [Weight(UID)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#weightuid) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info#example-response) --- # Query Futures Commission Rebate Record | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record#__docusaurus_skipToContent_fallback) 本页总览 Query Broker Futures Commission Rebate Record ============================================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v1/broker/rebate/futures/recentRecord` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | futuresType | LONG | YES | 1:USDT Futures, 2: Coin Futures | | startTime | LONG | YES | | | endTime | LONG | YES | | | page | LONG | NO | default 1 | | size | LONG | NO | default 10, max 100 | | filterResult | BOOLEAN | NO | TRUE or FALSE. Default: FALSE | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If filterResult = TRUE, rebates not from its own sub accounts will be filtered out in response. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "subaccountId": "1", "income": "0.02063898", "asset": "USDT", "symbol": "ETHUSDT", "tradeId": 123456, "time": 1544433328000, "status": 1 }, { "subaccountId": "2", "income": "0.02060008", "asset": "USDT", "symbol": "BTCUSDT", "tradeId": 223456, "time": 1544433328000, "status": 1 }] * Status: 0: Pending, 1: Successful, 2: Failed * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record#example-response) --- # Get Sub Account Deposit History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#__docusaurus_skipToContent_fallback) 本页总览 Get Sub Account Deposit History =============================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccount/depositHist` Weight(Master Account)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#weightmaster-account "Weight(Master Account)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **10** Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | NO | | | coin | STRING | NO | | | status | INT | NO | 0(0:pending,6: credited but cannot withdraw, 1:success) | | startTime | LONG | NO | Default: 7 days from current timestamp | | endTime | LONG | NO | Default: present timestamp | | limit | INT | NO | Default:500 | | offset | INT | NO | Default:0 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * The query time period must be less than 7 days( default as the recent 7 days). Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "depositId": 1234567890123, "subAccountId": "1", "address": "0xddc66e4313fd6c737b6cae67cad90bb4e0ac7092", "addressTag": "", "amount": "139.04370000", "coin": "USDT", "insertTime": 1566791463000, "transferType": 0, "network": "ETH", "status": 1, "txId": "0x5759dfe9983a4c7619bce9bc736bb6c26f804091753bf66fa91e7cd5cfeebafd", "sourceAddress": "xxxxxxxxxxxxxx", "confirmTimes": "12/12", "selfReturnStatus": 0, "travelRuleStatus": 0 //0: travel rule not required OR info already provided and funds ready to use, 1: travel rule required to provide deposit info }, { "depositId": 1234567890123, "subAccountId": "2", "address": "0xddc66e4313fd6c737b6cae67kld90bb4e0ac7092", "addressTag": "", "amount": "1589.12345678", "coin": "BTC", "insertTime": 1566791463000, "transferType": 1, "network": "BNB", "status": 1, "txId": "Off-chain transfer dbea58fa48ef4cc59393da4552ae77d7", "sourceAddress": "xxxxxxxxxxxxxx", "confirmTimes": "12/12", "selfReturnStatus": 0, "travelRuleStatus": 1 //0: travel rule not required OR info already provided and funds ready to use, 1: travel rule required to provide deposit info }] * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#http-request) * [Weight(Master Account)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#weightmaster-account) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History#example-response) --- # Query Sub Account Futures Asset info | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account Futures Asset info (V3) ========================================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v3/broker/subAccount/futuresSummary` Weight (UID)[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#weight-uid "Weight (UID)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 60 Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | NO | | | futuresType | INT | YES | 1:USD Margined Futures, 2:COIN Margined Futures | | page | LONG | NO | default 1 | | size | LONG | NO | default 10, max 20 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `USDT Margined Futures` { data:[ { "subAccountId":"1", "totalInitialMargin":"0.0000000000", // initial margin "totalMaintenanceMargin":"0.0000000000", // maintenance margin "totalWalletBalance":"577.6799732808", // wallet balance "totalUnrealizedProfit":"0.0000000000", // unrealized profit "totalMarginBalance":"577.6799732808", // margin balance "totalPositionInitialMargin":"0.0000000000", // position initial margin "totalOpenOrderInitialMargin":"0.0000000000", // open order initial margin "futuresEnable":true, // if enable futures "asset":"USD" }, { "futuresEnable": false, "subAccountId": "2" } ], "timestamp": 1583127900000} `COIN Margined Futures` { data:[ { "subAccountId":"1", "totalWalletBalanceOfUsdt":"6.73252085685700", "totalUnrealizedProfitOfUsdt":"0.00000000000000", "totalMarginBalanceOfUsdt":"6.73252085685700", "futuresEnable":true }, { "futuresEnable": false, "subAccountId": "2" } ], "timestamp": 1583127900000} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#http-request) * [Weight (UID)](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#weight-uid) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info#example-response) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Introduction#__docusaurus_skipToContent_fallback) 本页总览 Rest API Information[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Introduction#rest-api-information "Rest API Information的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- Binance Link KYC SaaS is a KYC-as-a-Service solution designed for our Exchange Link clients. It enables clients to integrate KYC verification for sub-accounts, offering services such as collecting and validating customer information, auditing customer data, and screening for sanctions and politically exposed persons (PEPs). * [Rest API Information](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Introduction#rest-api-information) --- # Query Sub Account COIN-Ⓜ Futures Commission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account COIN-Ⓜ Futures Commission Adjustment ====================================================== * The sub-account's COIN-Ⓜ futures commission of a symbol equals to the base commission of the symbol on the sub-account's fee tier plus the commission adjustment. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccountApi/commission/coinFutures` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | pair | STRING | YES | BTCUSD | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If futures disabled, it is not allowed to set subaccount's COIN-Ⓜ futures commission adjustment on any symbol. * Different symbols have the same commission for the same pair Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "subAccountId": 1, "pair": "BTCUSD", "makerCommission": 450, // COIN-Ⓜ futures commission (after adjusted) for maker "takerCommission": 550, // COIN-Ⓜ futures commission (after adjusted) for taker }, { "subAccountId": 1, "pair": "ETHUSD", "makerCommission": 400, "takerCommission": 500, },] * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission#example-response) --- # Query Spot Commission Rebate Recent Record | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record#__docusaurus_skipToContent_fallback) 本页总览 Query Broker Commission Rebate Recent Record(Spot) ================================================== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/rebate/recentRecord` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | NO | | | startTime | LONG | NO | Default: 7 days from current timestamp | | endTime | LONG | NO | Default: present timestamp | | page | LONG | NO | default 1 | | size | LONG | NO | default 500,max500 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * The query time period must be less than 7 days (default as the recent 7 days). Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record#example-response "Example Response的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "subaccountId":"1", "income": "0.02063898", "asset":"BTC", "symbol": "ETHBTC", "tradeId": 123456, "time":1544433328000, "status": 1 }, { "subaccountId":"2", "income": "1.2063898", "asset":"USDT", "symbol": "BTCUSDT", "tradeId": 223456, "time":1581580800000, "status": 1 }] * Status: 0: Pending, 1: Successful, 2: Failed * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record#example-response) --- # Query Sub Account USDT-Ⓜ Futures Commission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#__docusaurus_skipToContent_fallback) 本页总览 Query Sub Account USDT-Ⓜ Futures Commission Adjustment ====================================================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#api-description "API Description的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * The sub-account's USDT-Ⓜ futures commission of a symbol equals to the base commission of the symbol on the sub-account's fee tier plus the commission adjustment. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/broker/subAccountApi/commission/futures` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | symbol | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If futures disabled, it is not allowed to set subaccount's USDT-Ⓜ futures commission adjustment on any symbol. Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#example-response "Example Response的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "subAccountId": 1, "symbol": "BTCUSDT", "makerCommission": 450, // USDT-Ⓜ futures commission (after adjusted) for maker "takerCommission": 550, // USDT-Ⓜ futures commission (after adjusted) for taker }, { "subAccountId": 1, "symbol": "ETHUSDT", "makerCommission": 400, "takerCommission": 500, },] * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission#example-response) --- # Change Sub Account COIN-Ⓜ Futures Commission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#__docusaurus_skipToContent_fallback) 本页总览 Change Sub Account COIN-Ⓜ Futures Commission Adjustment ======================================================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#api-description "API Description的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * This request will change the COIN-Ⓜ futures commission for a sub account. * You need to enable "trade" option for the api key which requests this endpoint. * The sub-account's COIN-Ⓜ futures commission of a symbol equals to the base commission of the symbol on the sub-account's fee tier plus the commission adjustment. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/broker/subAccountApi/commission/coinFutures` Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | subAccountId | STRING | YES | | | pair | STRING | YES | BTCUSD | | makerAdjustment | INT | YES | 100 for 0.01% | | takerAdjustment | INT | YES | 100 for 0.01% | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * If futures disabled, it is not allowed to set subaccount's COIN-Ⓜ futures commission adjustment on any symbol. * Different symbols have the same commission for the same pair Example Response[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#example-response "Example Response的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "subAccountId": 1, "pair": "BTCUSD", "makerAdjustment": 150, // COIN-Ⓜ futures commission adjustment for maker "takerAdjustment": 150, // COIN-Ⓜ futures commission adjustment for taker "makerCommission": 450, // COIN-Ⓜ futures commission (after adjusted) for maker "takerCommission": 550, // COIN-Ⓜ futures commission (after adjusted) for taker} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#http-request) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#request-parameters) * [Example Response](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission#example-response) --- # KYC Sharing | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#__docusaurus_skipToContent_fallback) 本页总览 KYC Sharing =========== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- Share Exchange Link User KYC Info API. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/share-kyc-data` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#request-header "Request Header的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | requestNo | STRING | YES | every request unique number, max length is 120 | | kycInfo | STRING | YES | KycInfo | ### KycInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#kycinfo "KycInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | userInfo | UserInfo | YES | | | basicInfo | BasicInfo | YES | | | identifyInfo | IdentifyInfo | YES | | ### UserInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#userinfo "UserInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site, max length is 128 | | brokerMainAccountId | STRING | YES | broker main account id | | brokerSubAccountId | STRING | YES | broker sub account id | | notifyUrl | STRING | YES | notify url when kyc status changed | | extra | STRING | NO | extra info in JSON format | ### BasicInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#basicinfo "BasicInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | firstName | STRING | YES | | | middleName | STRING | NO | | | lastName | STRING | YES | | | residentialCountry | STRING | YES | country of residence: 2-alpha code in UPPER CASE | | dob | STRING | YES | yyyy-MM-dd | | country | STRING | YES | nationality, 2-alpha code in UPPER CASE | | userSubmitIp | STRING | YES | | | address | STRING | YES | max is 400 | | city | STRING | YES | max is 100 | | postalCode | STRING | NO | max is 50 | ### IdentifyInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#identifyinfo "IdentifyInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | documentType | STRING | YES | document type, for example: ID\_CARD, PASSPORT, DRIVING\_LICENSE,RESIDENCE\_PERMIT | | selectCountry | STRING | Yes | user selected country when do Id verification 2-alpha code in UPPER CASE | | frontFileUrl | STRING | YES | id front image download url | | backFileUrl | STRING | NO | id back image download url | | faceFileUrl | STRING | YES | face image download url | | firstName | STRING | YES | please ensure this matches the “firstName” under Basic Info table above, if not it will be rejected. | | middleName | STRING | NO | | | lastName | STRING | YES | please ensure this matches the “lastName” under Basic Info table above, if not it will be rejected. | | dob | STRING | YES | date of birth: yyyy-MM-dd | | idType | STRING | YES | id doc type. for example: ID\_CARD, PASSPORT, DRIVING\_LICENSE,RESIDENCE\_PERMIT | | idSubType | STRING | NO | id doc sub type | | idCountry | STRING | YES | 2-alpha code in UPPER CASE | | nationalityCountry | STRING | YES | 2-alpha code in UPPER CASE | | idNumber | STRING | YES | id Number | | idExpiry | STRING | NO | yyyy-MM-dd | | userSubmitIp | STRING | YES | | | idUsState | STRING | NO | | | personalNumber | STRING | NO | | | gender | STRING | NO | | | issuingAuthority | STRING | NO | | | issuingDate | STRING | NO | yyyy-MM-dd | | issuingPlace | STRING | NO | | | registrationNumber | STRING | NO | | | city | STRING | NO | | | stateCode | STRING | NO | | | postalCode | STRING | NO | | | address | STRING | NO | | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#request-body-example "Request Body Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "kycInfo": { "userInfo": { "brokerMainAccountId": "1234567", "brokerSubAccountId": "12345678123456767", "bizEntityKey": "BROKERKEY", "entityCustomerId": "12345678123456767", "extra": "extraTestData", "notifyUrl": "https://webhook.site/" }, "identityInfo": { "lastName": "testLastNameLItest01", "frontFileUrl": "https://image.cnbcfm.com/api/v1/image/104853635-GettyImages-870113330.jpg?v=1709055832&w=740&h=416&ffmt=webp&vtcrop=y", "gender": "M", "documentType": "ID_CARD", "idUsState": "testIdUsState", "issuingDate": "2010-09-19", "city": "testCity", "postalCode": "123456", "selectCountry": "SG", "idNumber": "testSaasBrokers0144288491", "userSubmitIp": "192.168.1.1", "issuingPlace": "AE", "backFileUrl": "https://cdn.shortpixel.ai/spai/q_lossless+w_1776+to_webp+ret_img/independent-photo.com/wp-content/uploads/2022/03/Karen-Pape-1800x1200.jpeg", "idSubType": "INTERNATIONAL_PASSPORT", "idType": "ID_CARD", "address": "testAddressData", "personalNumber": "personalNumber6462313972", "idCountry": "AE", "firstName": "testFirstName", "issuingAuthority": "firstName", "faceFileUrl": "https://cdn.shortpixel.ai/spai/q_lossless+w_1776+to_webp+ret_img/independent-photo.com/wp-content/uploads/2022/03/Karen-Pape-1800x1200.jpeg", "dob": "1999-09-19", "idExpiry": "2030-09-19", "registrationNumber": "registrationNumber4039460415", "middleName": "testMiddleNameboli", "stateCode": "QWER", "nationalityCountry": "AE" }, "basicInfo": { "firstName": "AA", "lastName": "BB", "country": "AE", "residentialCountry": "AE", "dob": "1999-09-19", "middleName": "testMiddleName", "userSubmitIp": "192.168.1.1", "address": "aaa", "city": "bbb", "postalCode": "123456" } }, "requestNo": "23454312345365012111113"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#response-example "Response Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": null, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#request-parameters) * [KycInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#kycinfo) * [UserInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#userinfo) * [BasicInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#basicinfo) * [IdentifyInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#identifyinfo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Kyc-Sharing#response-example) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#__docusaurus_skipToContent_fallback) 本页总览 Rest API Information[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#rest-api-information "Rest API Information的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ * The base endpoint for Exchange Link is: **[https://api.binance.com](https://api.binance.com/) ** * The base endpoint for Link and Trade(Spot) is: **[https://api.binance.com](https://api.binance.com/) ** * The base endpoint for Link and Trade(Futures) is: **[https://fapi.binance.com](https://fapi.binance.com/) ** * All endpoints return either a JSON object or array. * Data is returned in **ascending** order. Oldest first, newest last. * All time and timestamp related fields are in milliseconds. * HTTP `4XX` return codes are used for for malformed requests; the issue is on the sender's side. * HTTP `429` return code is used when breaking a request rate limit. * HTTP `418` return code is used when an IP has been auto-banned for continuing to send requests after receiving `429` codes. * HTTP `5XX` return codes are used for internal errors; the issue is on Binance's side. It is important to **NOT** treat this as a failure operation; the execution status is **UNKNOWN** and could have been a success. * Any endpoint can return an ERROR; the error payload is as follows: { "code": -1121, "msg": "Invalid symbol."} * Specific error codes and messages defined in another document. * For `GET` endpoints, parameters must be sent as a `query string`. * For `POST`, `PUT`, and `DELETE` endpoints, the parameters may be sent as a `query string` or in the `request body` with content type `application/x-www-form-urlencoded`. You may mix parameters between both the `query string` and `request body` if you wish to do so. * Parameters may be sent in any order. * If a parameter sent in both the `query string` and `request body`, the `query string` parameter will be used. IP Limits[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#ip-limits "IP Limits的直接链接") --------------------------------------------------------------------------------------------------------------------------- * Every request will contain `X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)` in the response headers which has the current used weight for the IP for all request rate limiters defined. * Each route has a `weight` which determines for the number of requests each endpoint counts for. Heavier endpoints and endpoints that do operations on multiple symbols will have a heavier `weight`. The default weight for each request is 1, if not specify. * When a 429 is received, it's your obligation as an API to back off and not spam the API. * **Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (HTTP status 418).** * IP bans are tracked and **scale in duration** for repeat offenders, **from 2 minutes to 3 days**. * A `Retry-After` header is sent with a 418 or 429 responses and will give the **number of seconds** required to wait, in the case of a 429, to prevent a ban, or, in the case of a 418, until the ban is over. * **The limits on the API are based on the IPs, not the API keys.** Endpoint Security Type[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#endpoint-security-type "Endpoint Security Type的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ * Each endpoint has a security type that determines the how you will interact with it. * API-keys are passed into the Rest API via the `X-MBX-APIKEY` header. * API-keys and secret-keys **are case sensitive**. * API-keys can be configured to only access certain types of secure endpoints. For example, one API-key could be used for TRADE only, while another API-key can access everything except for TRADE routes. * By default, API-keys can access all secure routes. | Security Type | Description | | --- | --- | | TRADE | Endpoint requires sending a valid API-Key and signature. | | USER\_DATA | Endpoint requires sending a valid API-Key and signature. | Note[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#note "Note的直接链接") ------------------------------------------------------------------------------------------------------------ ### Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#request-parameters "Request Parameters的直接链接") #### Email address[​](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#email-address "Email address的直接链接") * Email address should be encoded. e.g. [alice@test.com](mailto:alice@test.com) should be encoded into alice%40test.com * Email address should be in lower case. * [Rest API Information](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#rest-api-information) * [IP Limits](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#ip-limits) * [Endpoint Security Type](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#endpoint-security-type) * [Note](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#note) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/exchange-link/Introduction#request-parameters) --- # Query KYC Sharing Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#__docusaurus_skipToContent_fallback) 本页总览 Query Share KYC Info Status API =============================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#api-description "API Description的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Query Share KYC Info Status API HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/query-share-data-status` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#request-header "Request Header的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id, that is, the user id of the access entity site | | requestNo | STRING | YES | every request unique number, max length is 120. If want to search previous request, need to use previous “requestNo” | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#response-fields "Response Fields的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | | | data | ShareDataStatus | No | | ### ShareDataStatus[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#sharedatastatus "ShareDataStatus的直接链接") | Name | Type | Description | | --- | --- | --- | | bizEntityKey | STRING | | | entityCustomerId | STRING | | | failMessage | STRING | when status=FAIL, the reason about fail | | requestNo | STRING | every request unique number | | status | STRING | import result: INIT, SUCCESS, FAIL | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#request-body-example "Request Body Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "requestNo": "123456"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#response-example "Response Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": null, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#response-fields) * [ShareDataStatus](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#sharedatastatus) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Sharing-Status#response-example) --- # Overall Workflow | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info#__docusaurus_skipToContent_fallback) Getting Started =============== Integrating with Binance Link KYC Saas broadly follows the below steps. 1. Create an Exchange Link sub-account via API. 2. KYC is processed for the user in one of two methods. 3. Validate that KYC is passed. 4. Create an API Key for the sub-account, and proceed from there. Sub Account Creation Flow with Link Module integration ====================================================== 1. Create a Sub account `POST /sapi/v1/broker/subAccount` 2. Complete KYC and bind to Sub account via KYC module through one of: * Share KYC API `/bapi/ekyc/v2/public/ekyc/customer/share-kyc-data` * Oauth Link `/bapi/ekyc/v2/public/ekyc/customer/add-account-info-list` 3. Check KYC Status is passed `/bapi/ekyc/v2/public/ekyc/customer/check-kyc-status` * Requirement: `data.levelInfo.currentLevel.kycStatus` = `PASS` 4. Create Sub account API Key `POST /sapi/v1/broker/subAccountApi` --- # Error Code | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Error-Code#__docusaurus_skipToContent_fallback) API Error Code ============== | Code | Name | Description | | --- | --- | --- | | 000002 | ILLEGAL\_PARAM | required param is missing, or invalid/illegal param

example:
bizEntityKey is wrong
kycType Value is invalid
brokerMainAccountId/brokerSubAccountId includes characters other than numbers
entityCustomerId includes characters other than numbers, letters and + - \_ @ | | 10040005 | ILLEGAL\_REQUEST | request body format is invalid | | 10040080 | SIGN\_MISMATCH | sign mismatch
value in the header X-SHA2-Signature is incorrect | | 10040008 | DUPLICATE\_REQUEST | duplicate request | | 10040004 | SYS\_ERROR | system error, please contact Binance support | | 100001001 | SYS\_ERROR | system error, please contact Binance support | | 10115005 | TOKEN\_TIME\_OUT | token expired, please login again | | 10115001 | SYS\_ERROR\_NEED\_CONTACT | system error, please contact Binance support | | 10040082 | SUB\_ACCOUNT\_ALREADY\_LINKED\_TO\_OTHER | This Sub account is already linked to other users | | 10040101 | USER\_LINKED\_SUB\_ACCOUNTS\_EXCEED\_LIMIT | This user linked sub account ids count exceed limit | | 10040102 | INVALID\_BROKER\_ACCOUNT | Invalid broker account, please provide correct broker sub account id and matched main account id. | | 10040103 | CHECK\_BROKER\_ACCOUNT\_ERROR | System error during validating broker accounts. | | 10040104 | SUB\_ACCOUNT\_ALREADY\_LINKED\_TO\_OTHER\_MAIN\_ACCOUNT | This Sub account was already linked to other Main account. | | 10040106 | FILE\_TOO\_LARGE | File is too large | | 10040108 | INVALID\_OAUTH\_BROKER\_OPENID | Invalid broker open id or oauth client id. | | 10040109 | CHECK\_OAUTH\_BROKER\_OPENID\_ERROR | Error to check broker open id and oauth client id. | --- # Unlink KYC Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#__docusaurus_skipToContent_fallback) 本页总览 Unlink User KYC Data ==================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#api-description "API Description的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- Unlink User KYC Data HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/unlink-kyc-data` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#request-header "Request Header的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site | | brokerMainAccountId | STRING | YES | broker main account id | | brokerSubAccountId | STRING | YES | broker sub account id | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#response-fields "Response Fields的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | error code, 000000 is success | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#request-body-example "Request Body Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "brokerMainAccountId": "123456789", "brokerSubAccountId": "45712345678999212345"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#response-example "Response Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": null, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#response-fields) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Unlink-Kyc-Data#response-example) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas#__docusaurus_skipToContent_fallback) 本页总览 Rest API Information[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas#rest-api-information "Rest API Information的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ Binance Link KYC SaaS is a KYC-as-a-Service solution designed for our Exchange Link clients. It enables clients to integrate KYC verification for sub-accounts, offering services such as collecting and validating customer information, auditing customer data, and screening for sanctions and politically exposed persons (PEPs). * [Rest API Information](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas#rest-api-information) --- # Query Kyc Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#__docusaurus_skipToContent_fallback) 本页总览 Check KYC Status ================ API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#api-description "API Description的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- Check KYC Status HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ POST `/bapi/ekyc/v2/public/ekyc/customer/check-kyc-status` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#request-header "Request Header的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site | | kycType | STRING | YES | kyc type,USER | | brokerMainAccountId | STRING | YES | broker main account id | | brokerSubAccountId | STRING | YES | broker sub account id | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#response-fields "Response Fields的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | error code, 000000 is success | | data | StatusVo | NO | | ### StatusVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#statusvo "StatusVo的直接链接") | Name | Type | Description | | --- | --- | --- | | statusInfo | KycVerifyStatusInfoVo | KycVerifyStatusInfoVo | | levelInfo | KycLevelInfoVo | KycLevelInfoVo | | nonExisted | Boolean | If kyc verify record is existed or not, true - not existed false/null - existed | ### KycVerifyStatusInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#kycverifystatusinfovo "KycVerifyStatusInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | failReason | STRING | fail reason | | basicStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | identityStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | faceStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT,SKIP | | wckStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | kycUserId | STRING | kyc user id in SAAS | ### KycLevelInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#kyclevelinfovo "KycLevelInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | currentLevel | KycLevelItemVo | Current level status | | passedLevel | KycLevelItemVo | Current passing KYC status level info | | kycPass | Boolean | If the current user pass the kyc | ### KycLevelItemVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#kyclevelitemvo "KycLevelItemVo的直接链接") | Name | Type | Description | | --- | --- | --- | | levelName | STRING | kyc level name INTERMEDIATE | | kycStatus | STRING | PROCESS,REVIEW,REFUSED,PASS,DISABLE | | kycLevelSubStatus | STRING | WCK\_REJECT,HIGH\_RISK | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#request-body-example "Request Body Example的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "bizEntityKey": "BROKERKEY", "entityCustomerId": "123123123123123123", "kycType": "USER", "brokerMainAccountId": "12312312", "brokerSubAccountId": "123123123123123123"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#response-example "Response Example的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ { "code": "000000", "message": null, "messageDetail": null, "data": { "statusInfo": { "bizEntityKey": "BROKERKEY", "entityCustomerId": "4574117426369925632", "kycUserId": "4575836000526931200", "userType": "USER", "kycType": "USER", "businessType": null, "status": null, "expectTime": null, "expectTimeText": null, "kycStatus": "REJECT", "failReason": "This ID number has been used. Log in to your original account to complete the transaction.", "basicStatus": "PASS", "basicExpectTime": null, "basicExpectTimeText": null, "basicFailReason": "", "basicSubStatus": null, "documentStatus": null, "documentExpectTime": null, "documentExpectTimeText": null, "documentFailReason": null, "identityStatus": "REJECT", "identityExpectTime": null, "identityExpectTimeText": null, "identityFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "identityFailCode": null, "faceStatus": "REJECT", "faceExpectTime": null, "faceExpectTimeText": null, "faceFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "faceEmailStatus": null, "faceEmailMask": null, "wckStatus": "INITIAL", "wckExpectTime": null, "wckExpectTimeText": null, "wckFailReason": null, "firstName": null, "middleName": null, "lastName": null, "poaStatus": null, "poaExpectTime": null, "poaExpectTimeText": null, "poaFailReason": null, "eddStatus": null, "eddExpectTime": null, "eddExpectTimeText": null, "eddFailReason": null, "dbCreateTime": 1750699479373, "dbModifyTime": 1750699512711, "questionStatus": null, "questionFailReason": null, "completeTime": null, "basicCompleteTime": null, "documentCompleteTime": null, "identityCompleteTime": 1750699512647, "faceCompleteTime": 1750699512651, "wckCompleteTime": null, "poaCompleteTime": null, "eddCompleteTime": null, "questionCompleteTime": null, "kycSubType": null, "kycSubStatus": null, "credentialStatus": null, "credentialFailReason": null, "fiatPtStatus": null, "fiatPtFailReason": null, "memberStatus": null, "remediationStatus": null, "remediationExpectTime": null, "riskRateLevel": "MEDIUM", "riskRateScore": 31.00 }, "levelInfo": { "currentLevel": { "levelName": "INTERMEDIATE", "levelDesc": "INTERMEDIATE", "kycStatus": "REFUSED", "kycLevelSubStatus": null, "limit": { "fiatCurrency": "USD", "depositFiatDailyLimit": null, "withdrawFiatDailyLimit": 20000, "totalFiatDailyLimit": null, "depositFiatMonthlyLimit": null, "withdrawFiatMonthlyLimit": null, "totalFiatMonthlyLimit": null, "depositFiatYearlyLimit": null, "withdrawFiatYearlyLimit": null, "totalFiatYearlyLimit": null, "depositFiatLifeTimeLimit": null, "withdrawFiatLifeTimeLimit": null, "totalFiatLifeTimeLimit": null, "cryptoCurrency": "BTC", "depositCryptoDailyLimit": -1, "withdrawCryptoDailyLimit": 100, "totalCryptoDailyLimit": null } }, "completedLevel": null, "passedLevel": null, "definedKycPassLevel": null, "kycPass": false, "hasMultipleLevels": false, "passedLevels": [] }, "remainingSteps": null, "nonExisted": null, "oauthUserInfo": null, "version": 1750699512711 }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#response-fields) * [StatusVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#statusvo) * [KycVerifyStatusInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#kycverifystatusinfovo) * [KycLevelInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#kyclevelinfovo) * [KycLevelItemVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#kyclevelitemvo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status#response-example) --- # RFI Records Query | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#__docusaurus_skipToContent_fallback) 本页总览 Kyc RFI Records Query API ========================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Kyc RFI Record Submit API HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/page-query-rfi-records` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#request-header "Request Header的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | NO | customer id, that is, the user id of the access entity site. | | kycType | STRING | NO | kyc type,USER | | recordId | STRING | NO | Rfi Record Id | | status | STRING | NO | Rfi record status:
PROCESS(under process)
UPLOADING(uploading files)
REVIEW(under review)
PASS(file review pass)
REFUSED(file refused)
EXPIRED(file expired)
CLOSE(close file flow) | | startTime | STRING | NO | min create time, yyyy-MM-dd | | endTime | STRING | NO | max create time, yyyy-MM-dd | | page | INT | YES | page number, start from 1 | | rows | INT | YES | rows | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#response-fields "Response Fields的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | | | data | SearchResult | NO | | ### SearchResult[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#searchresult "SearchResult的直接链接") | Name | Type | Description | | --- | --- | --- | | total | LONG | total records count | | rows | List | | ### SimpleKycRfiRecordVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#simplekycrfirecordvo "SimpleKycRfiRecordVo的直接链接") | Name | Type | Description | | --- | --- | --- | | recordId | STRING | Rfi record id | | bizEntityKey | STRING | business entity key | | entityCustomerId | STRING | Customer id | | kycType | STRING | KYC type | | status | STRING | Rfi record status:PROCESS,UPLOADING,REVIEW,PASS,REFUSED,EXPIRED,CLOSE | | fileTypes | List | Rfi record required file types | | expireTime | DATE | Expired time | | recordType | STRING | Rfi record type:IDENTITY,WCK | | auditor | STRING | auditor | | auditTime | DATE | Audit time | | dbCreateTime | DATE | Rfi record create time | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#request-body-example "Request Body Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycType": "USER"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#response-example "Response Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "total": 1, "rows": [ { "recordId": "12345", "bizEntityKey": "BROKERKEY", "kycUserId": "4276875665261234567", "entityCustomerId": "45712345678999212345", "kycType": "USER", "status": "PROCESS", "subStatus": "INIT", "fileTypes": [ "SOF" ], "fileData": null, "expireTime": 1752105600000, "requestComment": "test", "recordType": "IDENTITY", "reason": null, "remark": null, "creator": "test@example.com", "submitter": null, "auditor": null, "auditTime": null, "completeTime": null, "dbCreateTime": 1750927524935, "dbModifyTime": 1750927524935 } ] }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#response-fields) * [SearchResult](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#searchresult) * [SimpleKycRfiRecordVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#simplekycrfirecordvo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Records-Query#response-example) --- # Query Kyc Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#__docusaurus_skipToContent_fallback) 本页总览 Check KYC Status ================ API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#api-description "API Description的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- Check KYC Status HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/check-kyc-status` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#request-header "Request Header的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site | | kycType | STRING | YES | kyc type,USER | | brokerMainAccountId | STRING | YES | broker main account id | | brokerSubAccountId | STRING | YES | broker sub account id | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#response-fields "Response Fields的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | error code, 000000 is success | | data | StatusVo | NO | | ### StatusVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#statusvo "StatusVo的直接链接") | Name | Type | Description | | --- | --- | --- | | statusInfo | KycVerifyStatusInfoVo | KycVerifyStatusInfoVo | | levelInfo | KycLevelInfoVo | KycLevelInfoVo | | nonExisted | Boolean | If kyc verify record is existed or not, true - not existed false/null - existed | ### KycVerifyStatusInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#kycverifystatusinfovo "KycVerifyStatusInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | failReason | STRING | fail reason | | basicStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | identityStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | faceStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT,SKIP | | wckStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | kycUserId | STRING | kyc user id in SAAS | ### KycLevelInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#kyclevelinfovo "KycLevelInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | currentLevel | KycLevelItemVo | Current level status | | passedLevel | KycLevelItemVo | Current passing KYC status level info | | kycPass | Boolean | If the current user pass the kyc | ### KycLevelItemVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#kyclevelitemvo "KycLevelItemVo的直接链接") | Name | Type | Description | | --- | --- | --- | | levelName | STRING | kyc level name INTERMEDIATE | | kycStatus | STRING | PROCESS,REVIEW,REFUSED,PASS,DISABLE | | kycLevelSubStatus | STRING | WCK\_REJECT,HIGH\_RISK | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#request-body-example "Request Body Example的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "123123123123123123", "kycType": "USER", "brokerMainAccountId": "12312312", "brokerSubAccountId": "123123123123123123"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#response-example "Response Example的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "statusInfo": { "bizEntityKey": "BROKERKEY", "entityCustomerId": "4574117426369925632", "kycUserId": "4575836000526931200", "userType": "USER", "kycType": "USER", "businessType": null, "status": null, "expectTime": null, "expectTimeText": null, "kycStatus": "REJECT", "failReason": "This ID number has been used. Log in to your original account to complete the transaction.", "basicStatus": "PASS", "basicExpectTime": null, "basicExpectTimeText": null, "basicFailReason": "", "basicSubStatus": null, "documentStatus": null, "documentExpectTime": null, "documentExpectTimeText": null, "documentFailReason": null, "identityStatus": "REJECT", "identityExpectTime": null, "identityExpectTimeText": null, "identityFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "identityFailCode": null, "faceStatus": "REJECT", "faceExpectTime": null, "faceExpectTimeText": null, "faceFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "faceEmailStatus": null, "faceEmailMask": null, "wckStatus": "INITIAL", "wckExpectTime": null, "wckExpectTimeText": null, "wckFailReason": null, "firstName": null, "middleName": null, "lastName": null, "poaStatus": null, "poaExpectTime": null, "poaExpectTimeText": null, "poaFailReason": null, "eddStatus": null, "eddExpectTime": null, "eddExpectTimeText": null, "eddFailReason": null, "dbCreateTime": 1750699479373, "dbModifyTime": 1750699512711, "questionStatus": null, "questionFailReason": null, "completeTime": null, "basicCompleteTime": null, "documentCompleteTime": null, "identityCompleteTime": 1750699512647, "faceCompleteTime": 1750699512651, "wckCompleteTime": null, "poaCompleteTime": null, "eddCompleteTime": null, "questionCompleteTime": null, "kycSubType": null, "kycSubStatus": null, "credentialStatus": null, "credentialFailReason": null, "fiatPtStatus": null, "fiatPtFailReason": null, "memberStatus": null, "remediationStatus": null, "remediationExpectTime": null, "riskRateLevel": "MEDIUM", "riskRateScore": 31.00 }, "levelInfo": { "currentLevel": { "levelName": "INTERMEDIATE", "levelDesc": "INTERMEDIATE", "kycStatus": "REFUSED", "kycLevelSubStatus": null, "limit": { "fiatCurrency": "USD", "depositFiatDailyLimit": null, "withdrawFiatDailyLimit": 20000, "totalFiatDailyLimit": null, "depositFiatMonthlyLimit": null, "withdrawFiatMonthlyLimit": null, "totalFiatMonthlyLimit": null, "depositFiatYearlyLimit": null, "withdrawFiatYearlyLimit": null, "totalFiatYearlyLimit": null, "depositFiatLifeTimeLimit": null, "withdrawFiatLifeTimeLimit": null, "totalFiatLifeTimeLimit": null, "cryptoCurrency": "BTC", "depositCryptoDailyLimit": -1, "withdrawCryptoDailyLimit": 100, "totalCryptoDailyLimit": null } }, "completedLevel": null, "passedLevel": null, "definedKycPassLevel": null, "kycPass": false, "hasMultipleLevels": false, "passedLevels": [] }, "remainingSteps": null, "nonExisted": null, "oauthUserInfo": null, "version": 1750699512711 }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#response-fields) * [StatusVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#statusvo) * [KycVerifyStatusInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#kycverifystatusinfovo) * [KycLevelInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#kyclevelinfovo) * [KycLevelItemVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#kyclevelitemvo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying#response-example) --- # Query Client If New User | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#__docusaurus_skipToContent_fallback) 本页总览 * * * id: Query-Client-If-New-User sidebar\_label: 查询是否属于新用户 (USER DATA)[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#id-query-client-if-new-usersidebar_label-%E6%9F%A5%E8%AF%A2%E6%98%AF%E5%90%A6%E5%B1%9E%E4%BA%8E%E6%96%B0%E7%94%A8%E6%88%B7-user-data "id: Query-Client-If-New-User sidebar_label: 查询是否属于新用户 (USER DATA)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询是否属于新用户 (USER DATA) ===================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/apiReferral/ifNewUser` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------ **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | brokerId | STRING | YES | | | type | INT | NO | 1:U本位合约 2: 币本位合约; 默认:1:U本位合约 | | revWindow | LONG | NO | | | timestamp | LONG | YES | | * 如用户启用统一帐户,请使用对应的 `/papi` 接口 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- { "brokerId": "ABCD1234", "rebateWorking":false, //true or false,是否满足API返佣条件(不判断新老用户是否返佣) "ifNewUser": "true" //true 新用户标准,false 老用户标准} * [id: Query-Client-If-New-User sidebar\_label: 查询是否属于新用户 (USER DATA)](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#id-query-client-if-new-usersidebar_label-%E6%9F%A5%E8%AF%A2%E6%98%AF%E5%90%A6%E5%B1%9E%E4%BA%8E%E6%96%B0%E7%94%A8%E6%88%B7-user-data) * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Customize Id For Client (For Client) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#__docusaurus_skipToContent_fallback) 本页总览 用户为自己所在的 apiAgent 定制 Id(USER DATA) ================================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/apiReferral/userCustomization` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#%E6%9D%83%E9%87%8D "权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | YES | | | brokerId | STRING | YES | | | revWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 必须唯一 * 如用户启用统一帐户,请使用对应的 `/papi` 接口 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "brokerId": "ABCD1234", "customerId": "abc123"} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Reject KYC Record | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#__docusaurus_skipToContent_fallback) 本页总览 Refused User KYC Data ===================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- Refuse User KYC Data HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/refused-kyc-data` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#request-header "Request Header的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#response-fields "Response Fields的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | error code,000000 is success | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#request-body-example "Request Body Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#response-example "Response Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": null, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#response-fields) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Reject-Kyc-Record#response-example) --- # KYC Sharing | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#__docusaurus_skipToContent_fallback) 本页总览 KYC Sharing =========== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- Share Exchange Link User KYC Info API. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/share-kyc-data` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#request-header "Request Header的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | requestNo | STRING | YES | every request unique number, max length is 120 | | kycInfo | STRING | YES | KycInfo | ### KycInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#kycinfo "KycInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | userInfo | UserInfo | YES | | | basicInfo | BasicInfo | YES | | | identifyInfo | IdentifyInfo | YES | | ### UserInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#userinfo "UserInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site, max length is 128 | | brokerMainAccountId | STRING | YES | broker main account id | | brokerSubAccountId | STRING | YES | broker sub account id | | notifyUrl | STRING | YES | notify url when kyc status changed | | extra | STRING | NO | extra info in JSON format | ### BasicInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#basicinfo "BasicInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | firstName | STRING | YES | | | middleName | STRING | NO | | | lastName | STRING | YES | | | residentialCountry | STRING | YES | country of residence: 2-alpha code in UPPER CASE | | dob | STRING | YES | yyyy-MM-dd | | country | STRING | YES | nationality, 2-alpha code in UPPER CASE | | userSubmitIp | STRING | YES | | | address | STRING | YES | max is 400 | | city | STRING | YES | max is 100 | | postalCode | STRING | NO | max is 50 | ### IdentifyInfo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#identifyinfo "IdentifyInfo的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | documentType | STRING | YES | document type, for example: ID\_CARD, PASSPORT, DRIVING\_LICENSE,RESIDENCE\_PERMIT | | selectCountry | STRING | Yes | user selected country when do Id verification 2-alpha code in UPPER CASE | | frontFileUrl | STRING | YES | id front image download url | | backFileUrl | STRING | NO | id back image download url | | faceFileUrl | STRING | YES | face image download url | | firstName | STRING | YES | please ensure this matches the “firstName” under Basic Info table above, if not it will be rejected. | | middleName | STRING | NO | | | lastName | STRING | YES | please ensure this matches the “lastName” under Basic Info table above, if not it will be rejected. | | dob | STRING | YES | date of birth: yyyy-MM-dd | | idType | STRING | YES | id doc type. for example: ID\_CARD, PASSPORT, DRIVING\_LICENSE,RESIDENCE\_PERMIT | | idSubType | STRING | NO | id doc sub type | | idCountry | STRING | YES | 2-alpha code in UPPER CASE | | nationalityCountry | STRING | YES | 2-alpha code in UPPER CASE | | idNumber | STRING | YES | id Number | | idExpiry | STRING | NO | yyyy-MM-dd | | userSubmitIp | STRING | YES | | | idUsState | STRING | NO | | | personalNumber | STRING | NO | | | gender | STRING | NO | | | issuingAuthority | STRING | NO | | | issuingDate | STRING | NO | yyyy-MM-dd | | issuingPlace | STRING | NO | | | registrationNumber | STRING | NO | | | city | STRING | NO | | | stateCode | STRING | NO | | | postalCode | STRING | NO | | | address | STRING | NO | | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#request-body-example "Request Body Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "kycInfo": { "userInfo": { "brokerMainAccountId": "1234567", "brokerSubAccountId": "12345678123456767", "bizEntityKey": "BROKERKEY", "entityCustomerId": "12345678123456767", "extra": "extraTestData", "notifyUrl": "https://webhook.site/" }, "identityInfo": { "lastName": "testLastNameLItest01", "frontFileUrl": "https://image.cnbcfm.com/api/v1/image/104853635-GettyImages-870113330.jpg?v=1709055832&w=740&h=416&ffmt=webp&vtcrop=y", "gender": "M", "documentType": "ID_CARD", "idUsState": "testIdUsState", "issuingDate": "2010-09-19", "city": "testCity", "postalCode": "123456", "selectCountry": "SG", "idNumber": "testSaasBrokers0144288491", "userSubmitIp": "192.168.1.1", "issuingPlace": "AE", "backFileUrl": "https://cdn.shortpixel.ai/spai/q_lossless+w_1776+to_webp+ret_img/independent-photo.com/wp-content/uploads/2022/03/Karen-Pape-1800x1200.jpeg", "idSubType": "INTERNATIONAL_PASSPORT", "idType": "ID_CARD", "address": "testAddressData", "personalNumber": "personalNumber6462313972", "idCountry": "AE", "firstName": "testFirstName", "issuingAuthority": "firstName", "faceFileUrl": "https://cdn.shortpixel.ai/spai/q_lossless+w_1776+to_webp+ret_img/independent-photo.com/wp-content/uploads/2022/03/Karen-Pape-1800x1200.jpeg", "dob": "1999-09-19", "idExpiry": "2030-09-19", "registrationNumber": "registrationNumber4039460415", "middleName": "testMiddleNameboli", "stateCode": "QWER", "nationalityCountry": "AE" }, "basicInfo": { "firstName": "AA", "lastName": "BB", "country": "AE", "residentialCountry": "AE", "dob": "1999-09-19", "middleName": "testMiddleName", "userSubmitIp": "192.168.1.1", "address": "aaa", "city": "bbb", "postalCode": "123456" } }, "requestNo": "23454312345365012111113"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#response-example "Response Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": null, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#request-parameters) * [KycInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#kycinfo) * [UserInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#userinfo) * [BasicInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#basicinfo) * [IdentifyInfo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#identifyinfo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration#response-example) --- # Webhook Notifications | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#__docusaurus_skipToContent_fallback) 本页总览 Webhook Notifications ===================== The webhook notifications function can be implemented by passing a `notifyUrl` when calling our KYC endpoints to initialize KYC. `notifyUrl` is a mandatory parameter when initiating KYC. If not required, you can pass a "." instead. Binance will send a POST request webhook to your notifyUrl when there are updates to the KYC record. If the system's request to your notifyUrl fails, the system will auto retry as per the below policy: * On first failure, retry in 3 minutes * On second failure, retry in 5 minutes * On third failure, retry in 10 minutes Request sample[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#request-sample "Request sample的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycType": "USER", "eventType": "USER-STATUS", "eventVo": { "statusInfo": { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycUserId": "45712345678999212345", "userType": "USER", "kycType": "USER", "kycStatus": "REJECT", "failReason": "This ID number has been used. Log in to your original account to complete the transaction.", "basicStatus": "PASS", "basicFailReason": "", "identityStatus": "REJECT", "identityFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "faceStatus": "REJECT", "faceFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "wckStatus": "INITIAL", "dbCreateTime": 1751010142158, "dbModifyTime": 1751010192997, "identityCompleteTime": 1751010192926, "faceCompleteTime": 1751010192931, "riskRateLevel": "MEDIUM", "riskRateScore": 31 }, "levelInfo": { "currentLevel": { "levelName": "INTERMEDIATE", "levelDesc": "INTERMEDIATE", "kycStatus": "REFUSED", "limit": { "fiatCurrency": "USD", "withdrawFiatDailyLimit": 20000, "cryptoCurrency": "BTC", "depositCryptoDailyLimit": -1, "withdrawCryptoDailyLimit": 100 } }, "kycPass": false, "hasMultipleLevels": false, "passedLevels": [] }, "basicInfo": { "id": 4581048056761212345, "bizEntityKey": "BROKERKEY", "bizKey": "BROKERKEY", "kycUserId": "45712345678999212345", "basicType": "USER", "basicStatus": "PASS", "firstName": "BO", "middleName": "testMiddleName", "lastName": "LI", "residentialCountry": "AE", "dob": "1986-08-14", "postalCode": "123456", "city": "bbb", "address": "aaa", "submitIp": "192.168.1.1", "dbCreateTime": 1751010142182, "dbModifyTime": 1751010142182, "country": "AE", "requestTime": 1751010142182, "requestIp": "192.168.1.1" } }, "version": 1751010193080} Notify Webhook Verification[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#notify-webhook-verification "Notify Webhook Verification的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. Receive the webhook request body as String 2. Use the `HmacSHA256` algorithm to sign the request body String obtained in 1st step, and compare the value of request header - `X-SHA2-Signature` , if they are the same, then the request body is valid, otherwise invalid. ### javascript example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#javascript-example "javascript example的直接链接") const crypto = require('crypto')const secret = ''const postData = ''const hash = crypto.createHmac('sha256', secret).update(postData).digest('hex') ### java example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#java-example "java example的直接链接") import org.apache.commons.codec.binary.Hex;import javax.crypto.Mac;import javax.crypto.spec.SecretKeySpec;import java.nio.charset.StandardCharsets;import java.security.MessageDigest;public class App { public static void main(String[] args) throws Exception { String rawString = ""; Mac sha256Hmac = Mac.getInstance("HmacSHA256"); SecretKeySpec secretKey = new SecretKeySpec("".getBytes(), "HmacSHA256"); sha256Hmac.init(secretKey); String eventSignature = new String(Hex.encodeHex(sha256Hmac.doFinal(rawString.getBytes(StandardCharsets.UTF_8)))); System.err.println(eventSignature); }} * [Request sample](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#request-sample) * [Notify Webhook Verification](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#notify-webhook-verification) * [javascript example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#javascript-example) * [java example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Webhook-Notifications#java-example) --- # Request Specifications | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#__docusaurus_skipToContent_fallback) 本页总览 Request Specifications ====================== General API Information[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#general-api-information "General API Information的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * The base endpoint is: **[https://cb.link-kycapi.com](https://cb.link-kycapi.com/) ** * All endpoints return either a JSON object or array. * All request parameters should be passed in the request body as either a JSON object or array. * All endpoints require passing a valid `X-SHA-Signature` header. * Do note that the signature generation method here may not align with the method used for calling other Binance API endpoints (such as [https://fapi.binance.com](https://fapi.binance.com/) ) * All endpoints should be called from whitelisted IP addresses. * Otherwise, it is expected that you would encounter a HTTP `403` return code. Signature Generation[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#signature-generation "Signature Generation的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 1. KYC Data should be sent in the Request Body in JSON format. 2. Convert the Request Body JSON to a JSON String 3. Use the **HmacSHA256** algorithm to sign the JSON String, and assign the result to the `X-SHA-Signature` request header. Examples[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#examples "Examples的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ 1. Request Body to be sent: { "bizEntityKey": "", "entityCustomerId": "", "kycType": "USER", "extra": { }, "notifyUrl": ""} 2. Converted Request BODY to JSON String: { "bizEntityKey": "", "entityCustomerId": "", "kycType": "USER", "extra": { },"notifyUrl": "" } 3. Sign the JSON String (see below examples). ### NodeJS Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#nodejs-example "NodeJS Example的直接链接") const crypto = require('crypto')const secret = ''const postData = { bizEntityKey: '', // entity key will be decided and given Binance team entityCustomerId: '', kycType: 'USER', extra: {}, notifyUrl: ''}const hash = crypto.createHmac('sha256', secret).update(JSON.stringify(postData)).digest('hex') ### Java Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#java-example "Java Example的直接链接") import org.apache.commons.codec.binary.Hex;import javax.crypto.Mac;import javax.crypto.spec.SecretKeySpec;import java.nio.charset.StandardCharsets;import java.security.MessageDigest;public class App { public static void main(String[] args) throws Exception { String rawString = "{ \"bizEntityKey\": \"\", \"entityCustomerId\": \"\", \"kycType\": \"USER\", \"extra\": { }, \"notifyUrl\": \"\" }"; Mac sha256Hmac = Mac.getInstance("HmacSHA256"); SecretKeySpec secretKey = new SecretKeySpec("".getBytes(), "HmacSHA256"); sha256Hmac.init(secretKey); String eventSignature = new String(Hex.encodeHex(sha256Hmac.doFinal(rawString.getBytes(StandardCharsets.UTF_8)))); System.err.println(eventSignature); }} ### Python Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#python-example "Python Example的直接链接") import requestsimport jsonimport hmacimport hashlibbody = { "bizEntityKey": "", "entityCustomerId": "", "kycType": "USER", "extra": { }, "notifyUrl": ""}api_secret = '' ##please replace with your ownjson.dumps(body, separators=(',', ':')) #use this instead to remove extra spacessignature = hmac.new(api_secret.encode(), json_str.encode(), hashlib.sha256).hexdigest() * [General API Information](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#general-api-information) * [Signature Generation](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#signature-generation) * [Examples](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#examples) * [NodeJS Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#nodejs-example) * [Java Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#java-example) * [Python Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/general-info/Request-Specifications#python-example) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#__docusaurus_skipToContent_fallback) 本页总览 Fast API can help users quickly authorize specific account permissions, create API keys, and automatically connect to third-party API link platforms. For more details, please refer to the [FAQ](https://www.binance.com/en/support/faq/what-is-fast-api-and-how-does-it-work-6aa7e2253c544d91b60746bfd03fd75d) . Onboarding Steps[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#onboarding-steps "Onboarding Steps的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- 1. Log in [Binance Developer center](https://developers.binance.com/en) with [verified entity(enterprise) account](https://www.binance.com/en/support/faq/how-to-complete-entity-verification-kyb-on-binance-step-by-step-guide-360015552032) 2. Apply for "**Entity KYB**" & "**OAuth Security KYB**" 3. Once both passed, client can create "**Client ID**", upload "**logo(60 x60)**" and set up "**callback url**". We will send an Email that include “**Client ID**” and “**Client Secret**”(**please do not share your Client secret with anyone**) 4. Download the [SDK](https://drive.google.com/file/d/1xFvDTEjUQCL8bviGR9FfszzTiV6pN8Ci/view) for utilizing the pop up dialogues. 5. Apply for the oAuth scopes required. 6. Start development of oAuth and Fast API. ### Minimum requirements for Fast API:[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#minimum-requirements-for-fast-api "Minimum requirements for Fast API:的直接链接") * **account:status** * **create:apikey** (For Spot & Margin trading permission, and Futures trading permission) _Or_ **create:apikey:margin** (For Margin Loan, repay, and Transfer permission) _Or_ **create:apikey:options** (For European Options Trading permission) * **user:openId** Remarks[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#remarks "Remarks的直接链接") ------------------------------------------------------------------------------------------------------------------------------- 1. The baseurl is "[https://www.binanceapis.com/oauth-api](https://www.binanceapis.com/oauth-api) " 2. When Link clients start to use oAuth, they will get their unique “Client ID” and “Client secret”. 3. When each User grants permission via oAuth, the Link client will get an unique “User’s open ID” and an "Access token". 4. Access token will be expired once the User’s API key is generated. 5. **Each user account** can only use the Fast API to connect with **Each Link client Once**. 6. Link client need to provide a public key for encrypting User’s API key, when requesting the API generation. Additionally, Link clients should be able to decrypt the API key package, and store it safely. 7. When Link client request to generate a user's API key, it should state clearly if this API key should have certain permission(s). In request params: * enableTrade → whether to enable Spot & Margin Trading * enableFutureTrade → whether to enable Futures Trading * enableMargin → whether to enable Margin Loan, Repay and Transfer * enableEuropeanOptions → whether to enable European Options Trading 8. To know if a user has a Futures account, Link client should use Oauth to check the user's status.and show the necessary Front end UI to allow the user to select. The standard Front end is provided as a SDK. Common Error messages[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#common-error-messages "Common Error messages的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 050009[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#050009 "050009的直接链接") * Invalid public key. Solution: 1. Do not use pem format 2. Encode the Public key ### 050010[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#050010 "050010的直接链接") * API generation failed. ### 001512[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#001512 "001512的直接链接") * Each account can only generate one API key for a certain third party via Fast API. ### 001464[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#001464 "001464的直接链接") * You have reached the API Key limit. Please delete the unused ones to create new API Keys. ### 2000039xxx[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#2000039xxx "2000039xxx的直接链接") * There may be multi error starting with 2000039, which represents the error message related to compliance. * [Onboarding Steps](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#onboarding-steps) * [Minimum requirements for Fast API:](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#minimum-requirements-for-fast-api) * [Remarks](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#remarks) * [Common Error messages](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#common-error-messages) * [050009](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#050009) * [050010](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#050010) * [001512](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#001512) * [001464](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#001464) * [2000039xxx](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/Introduction#2000039xxx) --- # Get Client Email Customized Id | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#__docusaurus_skipToContent_fallback) 本页总览 * * * id: Get-Client-Email-Customized-Id sidebar\_label: 查询用户 email 和定制化 Id(USER DATA)(仅支持brokerId拥有者)[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#id-get-client-email-customized-idsidebar_label-%E6%9F%A5%E8%AF%A2%E7%94%A8%E6%88%B7-email-%E5%92%8C%E5%AE%9A%E5%88%B6%E5%8C%96-iduser-data%E4%BB%85%E6%94%AF%E6%8C%81brokerid%E6%8B%A5%E6%9C%89%E8%80%85 "id: Get-Client-Email-Customized-Id sidebar_label: 查询用户 email 和定制化 Id(USER DATA)(仅支持brokerId拥有者)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询用户 email 和定制化 Id(USER DATA)(仅支持brokerId拥有者) ============================================= HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/apiReferral/customization` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | NO | | | email | STRING | NO | | | page | LONG | NO | 分页,默认 1 | | limit | LONG | NO | 单页条目数,默认 100,最大 1000 | | revWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 和 email 不能同时发,返回 broker 自定义的 customization关系 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "customerId": "abc123", "email": "test12345@126.com" }, { "customerId": "abc345", "email": "testABCD@gmail.com" }] * [id: Get-Client-Email-Customized-Id sidebar\_label: 查询用户 email 和定制化 Id(USER DATA)(仅支持brokerId拥有者)](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#id-get-client-email-customized-idsidebar_label-%E6%9F%A5%E8%AF%A2%E7%94%A8%E6%88%B7-email-%E5%92%8C%E5%AE%9A%E5%88%B6%E5%8C%96-iduser-data%E4%BB%85%E6%94%AF%E6%8C%81brokerid%E6%8B%A5%E6%9C%89%E8%80%85) * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Client-Email-Customized-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Income History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#__docusaurus_skipToContent_fallback) 本页总览 * * * id: Get-Income-History sidebar\_label: 获取账户损益资金流水(USER DATA)[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#id-get-income-historysidebar_label-%E8%8E%B7%E5%8F%96%E8%B4%A6%E6%88%B7%E6%8D%9F%E7%9B%8A%E8%B5%84%E9%87%91%E6%B5%81%E6%B0%B4user-data "id: Get-Income-History sidebar_label: 获取账户损益资金流水(USER DATA)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取账户损益资金流水(USER DATA) ===================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/income` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | incomeType | STRING | NO | 收益类型 "TRANSFER","WELCOME\_BONUS", "REALIZED\_PNL","FUNDING\_FEE", "COMMISSION", and "INSURANCE\_CLEAR" | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间 | | limit | INT | NO | 返回的结果集数量 默认值:100 最大值:1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * 如果`incomeType`没有发送,返回所有类型账户损益资金流水 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BTCUSDT", // 交易对,仅针对涉及交易对的资金流 "incomeType": "TRANSFER", // 资金流类型 "income": "-0.37500000", // 资金流数量,正数代表流入,负数代表流出 "asset": "USDT", // 资产内容 "info":"", // 备注信息,取决于流水类型 "time": 1570608000000, // 时间 }, { "symbol": "BTCUSDT", "incomeType": "COMMISSION", "income": "-0.01000000", "asset": "USDT", "info":"", "time": 1570636800000, }] * [id: Get-Income-History sidebar\_label: 获取账户损益资金流水(USER DATA)](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#id-get-income-historysidebar_label-%E8%8E%B7%E5%8F%96%E8%B4%A6%E6%88%B7%E6%8D%9F%E7%9B%8A%E8%B5%84%E9%87%91%E6%B5%81%E6%B0%B4user-data) * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Income-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Rebate Data Overview | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#__docusaurus_skipToContent_fallback) 本页总览 * * * id: Get-Rebate-Data-Overview sidebar\_label: 获取返佣数据总览(USER DATA)[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#id-get-rebate-data-overviewsidebar_label-%E8%8E%B7%E5%8F%96%E8%BF%94%E4%BD%A3%E6%95%B0%E6%8D%AE%E6%80%BB%E8%A7%88user-data "id: Get-Rebate-Data-Overview sidebar_label: 获取返佣数据总览(USER DATA)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 获取返佣数据总览(USER DATA) =================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/apiReferral/overview` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | type | INT | NO | 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "brokerId": "ABCD1234", "newTraderRebateCommission":"0.30000000", //新用户返佣比例 "oldTraderRebateCommission":"0.20000000", //老用户返佣比例 "totalTradeUser":13, // 总交易者数量 "unit": "USDT", // 单位 "totalTradeVol": "405.54379000", // 总交易量 "totalRebateVol": "0.01833800", // 总返佣量 "time": 1597708800000} * [id: Get-Rebate-Data-Overview sidebar\_label: 获取返佣数据总览(USER DATA)](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#id-get-rebate-data-overviewsidebar_label-%E8%8E%B7%E5%8F%96%E8%BF%94%E4%BD%A3%E6%95%B0%E6%8D%AE%E6%80%BB%E8%A7%88user-data) * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#%E8%AF%B7%E6%B1%82%E5%8F%82%EF%BF%BD%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Data-Overview#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Rebate Volume | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#__docusaurus_skipToContent_fallback) 本页总览 获取每天返佣金额 (USER DATA) ==================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/apiReferral/rebateVol` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | type | INT | NO | 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures | | startTime | LONG | NO | | | endTime | LONG | NO | | | limit | INT | NO | 默认 500, 最大 1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "unit": "USDT", "rebateVol": "0.00023200", //每天返佣金额 "time": 1586736000000 }, { "unit": "USDT", "rebateVol": "0.00064800", "time": 1588723200000 }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Rebate-Volume#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Customize Id For Client(For Client)(PAPI) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#__docusaurus_skipToContent_fallback) 本页总览 用户为自己所在的 apiAgent 定制 Id (USER DATA)(For client)(PAPI) ===================================================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/papi/v1/apiReferral/userCustomization` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#%E6%9D%83%E9%87%8D "权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | YES | | | brokerId | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 必须唯一 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { “brokerId”: “ABCD1234”, "customerId": "abc123"} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Client-PAPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # FAQ | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#__docusaurus_skipToContent_fallback) 本页总览 FAQ === What is KYC Status Notification URL?[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#what-is-kyc-status-notification-url "What is KYC Status Notification URL?的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A POST webhook notify function that provides call backs when KYC information changes. Retry Policy : Retry at 3rd, 5th, and 10th minute Where can I get BizEntityKey?[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#where-can-i-get-bizentitykey "Where can I get BizEntityKey?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ You can ask Binance to provide `BizEntityKey` for you. What is entityCustomerId?[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#what-is-entitycustomerid "What is entityCustomerId?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ A unique user id in the Exchange Link system. Client/user needs to provide this to Binance to link accounts How to populate the "language" field?[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#how-to-populate-the-language-field "How to populate the "language" field?的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Language code For Example: en Other possible options: { "en": "English", "ar": "العربية", "ar-BH": "العربية (البحرين)", "bg": "български", "bn": "বাংলা", "cs": "Čeština", "de": "Deutsch", "de-CH": "Deutsch (Schweiz)", "en-AU": "English (Australia)", "en-BH": "English (Bahrain)", "en-GB": "English (Britain)", "en-KZ": "English (Kazakhstan)", "en-NZ": "English (New Zealand)", "es": "Español (Internacional)", "es-AR": "Español (Argentina)", "es-LA": "Español (Latinoamérica)", "fr": "Français", "he": "עברית", "id": "Bahasa Indonesia", "en-IN": "English (India)", "it": "Italiano", "kk-KZ": "Қазақша (Қазақстан)", "ko": "한국어", "kz": "Қазақша", "lv": "latviešu valoda", "ng": "English (Nigeria)", "nl": "Nederlands", "ph": "Filipino", "pl": "Polski", "pt": "Português", "pt-BR": "Português (Brasil)", "pt-PT": "Português (Portugal)", "ro": "Română", "ru": "Русский", "ru-KZ": "Русский (Казахстан)", "sv": "svenska", "th": "ไทย", "tr": "Türkçe", "uk-UA": "Українська", "vi": "Tiếng Việt", "zh-CN": "简体中文", "zh-TC": "繁體中文" } About Sharing Data?[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#about-sharing-data "About Sharing Data?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ For KYC records originally initiated through KYC url, you cannot use KYC Sharing even if the KYC record is reset. For KYC records originally initiated through KYC Sharing, you can reset and generate KYC url to redo it. Misplaced / Uncredited Deposits?[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#misplaced--uncredited-deposits "Misplaced / Uncredited Deposits?的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### What if my user deposited into a retired wallet address, or into a sub-account that has not completed KYC yet?[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#what-if-my-user-deposited-into-a-retired-wallet-address-or-into-a-sub-account-that-has-not-completed-kyc-yet "What if my user deposited into a retired wallet address, or into a sub-account that has not completed KYC yet?的直接链接") Since the implementation of KYC restrictions, newly created sub accounts will not be able to create an API key and retrieve a deposit address without first completing KYC, hence this scenario would not be applicable. For older sub-accounts where users might have saved a copy of the wallet address and did not complete KYC, the deposit will be rejected. In order to retrieve the deposit, please use the SAPI asset recovery API to submit an appeal request. If you do not have the SAPI asset recovery API documentation, please approach our business team or contact our Binance Link team. Please note that the appeal will be refunded to the source address, and could take up to 30 days to process. Please manage your user accordingly. Overview of Restrictions[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#overview-of-restrictions "Overview of Restrictions的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- ### 1.Service Restrictions[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#1service-restrictions "1.Service Restrictions的直接链接") Sub-Account Restrictions | Services | Restrictions | | --- | --- | | Deposits | Restricted | | Withdrawals | Allowed, unless otherwise specified | | Spot Trading | Restricted. Cannot place new orders and all existing spot orders will be canceled | | Futures Trading | Restricted. Cannot place new orders, but can reduce existing positions | | Margin Trading | Restricted. Cannot place new orders, but can reduce existing positions | ### 2.API Restrictions[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#2api-restrictions "2.API Restrictions的直接链接") Not allowed to create or permission API keys on a non-KYC-ed sub account Common APIs affected: * POST /sapi/v1/broker/subAccountApi * POST /sapi/v1/broker/subAccount/futures * POST /sapi/v1/broker/subAccountApi/permission Not allowed to receive deposits into a non-KYC-ed sub account Common APIs affected: * POST /sapi/v1/broker/subAccountApi/permission/universalTransfer * POST /sapi/v1/broker/transfer * POST /sapi/v1/broker/transfer/futures * POST /sapi/v1/broker/universalTransfer Note: * Non-KYC-ed Sub account can withdraw to Master account * Non-KYC-ed Sub account can withdraw to a sub account that is KYC-ed. * Non-KYC-ed Sub account CANNOT withdraw to another non-KYC-ed sub account * Master account CANNOT deposit into a non-KYC-ed sub account * [What is KYC Status Notification URL?](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#what-is-kyc-status-notification-url) * [Where can I get BizEntityKey?](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#where-can-i-get-bizentitykey) * [What is entityCustomerId?](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#what-is-entitycustomerid) * [How to populate the "language" field?](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#how-to-populate-the-language-field) * [About Sharing Data?](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#about-sharing-data) * [Misplaced / Uncredited Deposits?](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#misplaced--uncredited-deposits) * [What if my user deposited into a retired wallet address, or into a sub-account that has not completed KYC yet?](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#what-if-my-user-deposited-into-a-retired-wallet-address-or-into-a-sub-account-that-has-not-completed-kyc-yet) * [Overview of Restrictions](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#overview-of-restrictions) * [1.Service Restrictions](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#1service-restrictions) * [2.API Restrictions](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/Faq#2api-restrictions) --- # Get Trader Detail | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#__docusaurus_skipToContent_fallback) 本页总览 获取交易者每天交易明细 (USER DATA) ======================= HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/apiReferral/traderSummary` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | NO | | | type | INT | NO | 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures | | startTime | LONG | NO | | | endTime | LONG | NO | | | limit | INT | NO | 默认 500, 最大 1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "customerId": "sde001", "unit": "USDT", "tradeVol":"9.57083000", //该用户每天交易量 "rebateVol":"0.00035400", //该用户每天交易产生的返佣 "time": 1586736000000 }, { "customerId": "ft****@gmail.com", "unit": "USDT", "tradeVol":"9.66741000", "rebateVol":"0.00034800", "time": 1588723200000 }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Detail#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Trader Number | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#__docusaurus_skipToContent_fallback) 本页总览 获取交易者数量 (USER DATA) =================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/apiReferral/traderNum` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | type | INT | NO | 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures | | startTime | LONG | NO | | | endTime | LONG | NO | | | limit | INT | NO | 默认 500, 最大 1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "newTrader": "1", "oldTrader": "2", "time": 1586736000000 }, { "newTrader": "0", "oldTrader": "1", "time": 1586736000000 }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-Trader-Number#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Link Multiple Accounts | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#__docusaurus_skipToContent_fallback) 本页总览 Link Multiple Accounts ====================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ If one person has multiple accounts, you can link these accounts together so the customers have to do KYC once. The only step you need to do is call `add-account-info-list` API This is also the relevant endpoint for utilizing Oauth Link. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#http-request "HTTP Request的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/add-account-info-list` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#request-header "Request Header的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#request-parameters "Request Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | accountList | LIST | YES | Account relation list | ### Account relation list[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#account-relation-list "Account relation list的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site, Not Required for Oauth Link | | openId | STRING | NO | Required for Oauth Link | | oauthClientId | STRING | NO | Required for Oauth Link | | brokerMainAccountId | STRING | YES | Broker main account id | | brokerSubAccountId | STRING | YES | Broker sub account id | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#response-fields "Response Fields的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | error code,000000000 is success | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#request-body-example "Request Body Example的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "accountList": [{ "entityCustomerId": "ABC", "brokerSubAccountId": "2789382993653477377", "brokerMainAccountId": "123456789" }, { "entityCustomerId": "ABC", "brokerSubAccountId": "2789382993653477377", "brokerMainAccountId": "123456789" } ]} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#response-example "Response Example的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": null, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#request-parameters) * [Account relation list](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#account-relation-list) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#response-fields) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-integration/Link-Multiple-Accounts#response-example) --- # Create API key for User | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#__docusaurus_skipToContent_fallback) 本页总览 Create API key for User ======================= HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ POST `/v1/api-key/create` **Authorization:** Bearer {access\_token} Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | apiName | STRING | YES | custom api name, can be repeated | | enableTrade | BOOLEAN | YES | `true` or `false` | | enableFutureTrade | BOOLEAN | YES | `true` or `false` | | enableMargin | BOOLEAN | NO | `true` or `false`. If it's not sent or the user doesn't have Margin account, it will be false by default. | | enableEuropeanOptions | BOOLEAN | NO | `true` or `false`. If it's not sent or the user doesn't have Options account, it will be false by default. | | status | ENUM | NO | `1` or `null` = Access IP unrestricted, `2` = Trusted IPs only, `3` = Trusted Third Party IPs only. If you want to enable any Trade permission(including Spot, Margin or Futures), you must restrict the IP access. | | ipAddress | STRING | NO | Trusted IPs. Can be added in batches, separated by commas. Max 30 for an API key | | thirdPartyName | STRING | NO | Third party name must match the name in the server side. | | publicKey | STRING | YES | Your custom public key. The server side will use it to encrypt the apikey, and client decrypts with a private key. Use RSA algorithm, the keysize is customized with client, usually 1024 or 2048 ([Reference](https://www.devglan.com/online-tools/rsa-encryption-decryption)
). | | apiKeyPublicKey | STRING | NO | The public key for asymmetrical key type(Ed25519 and RSA). Please see [https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a](https://www.binance.com/en/support/faq/detail/6b9a63f1e3384cf48a2eedb82767a69a) | Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#response-example "Response Example的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ { "code": "000000", "message": null, "data": { "apiKey": "ZN02rGiWOE6*****yjOZg==", "apiName": "testoauth1", "secretKey": "rH1cO1374UhZXfn2*********3EJjg/JT6gg==", "enableTrade": true, "enableFutureTrade": true, "enableMargin": false, "enableEuropeanOptions": true, "createTime": 1717746281067 }, "success": true } * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#http-request) * [Header](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#request-parameters) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/create-api-key#response-example) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#__docusaurus_skipToContent_fallback) 本页总览 Fast API can help users quickly authorize specific account permissions, create API keys, and automatically connect to third-party API link platforms. For more details, please refer to the [FAQ](https://www.binance.com/en/support/faq/what-is-fast-api-and-how-does-it-work-6aa7e2253c544d91b60746bfd03fd75d) . Onboarding Steps[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#onboarding-steps "Onboarding Steps的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- 1. Log in [Binance Developer center](https://developers.binance.com/en) with [verified entity(enterprise) account](https://www.binance.com/en/support/faq/how-to-complete-entity-verification-kyb-on-binance-step-by-step-guide-360015552032) 2. Apply for "**Entity KYB**" & "**OAuth Security KYB**" 3. Once both passed, client can create "**Client ID**", upload "**logo(60 x60)**" and set up "**callback url**". We will send an Email that include “**Client ID**” and “**Client Secret**”(**please do not share your Client secret with anyone**) 4. Download the [SDK](https://drive.google.com/file/d/1xFvDTEjUQCL8bviGR9FfszzTiV6pN8Ci/view) for utilizing the pop up dialogues. 5. Apply for the oAuth scopes required. 6. Start development of oAuth and Fast API. ### Minimum requirements for Fast API:[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#minimum-requirements-for-fast-api "Minimum requirements for Fast API:的直接链接") * **account:status** * **create:apikey** (For Spot & Margin trading permission, and Futures trading permission) _Or_ **create:apikey:margin** (For Margin Loan, repay, and Transfer permission) _Or_ **create:apikey:options** (For European Options Trading permission) * **user:openId** Remarks[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#remarks "Remarks的直接链接") ------------------------------------------------------------------------------------------------------------------ 1. The baseurl is "[https://www.binanceapis.com/oauth-api](https://www.binanceapis.com/oauth-api) " 2. When Link clients start to use oAuth, they will get their unique “Client ID” and “Client secret”. 3. When each User grants permission via oAuth, the Link client will get an unique “User’s open ID” and an "Access token". 4. Access token will be expired once the User’s API key is generated. 5. **Each user account** can only use the Fast API to connect with **Each Link client Once**. 6. Link client need to provide a public key for encrypting User’s API key, when requesting the API generation. Additionally, Link clients should be able to decrypt the API key package, and store it safely. 7. When Link client request to generate a user's API key, it should state clearly if this API key should have certain permission(s). In request params: * enableTrade → whether to enable Spot & Margin Trading * enableFutureTrade → whether to enable Futures Trading * enableMargin → whether to enable Margin Loan, Repay and Transfer * enableEuropeanOptions → whether to enable European Options Trading 8. To know if a user has a Futures account, Link client should use Oauth to check the user's status.and show the necessary Front end UI to allow the user to select. The standard Front end is provided as a SDK. Common Error messages[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#common-error-messages "Common Error messages的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ ### 050009[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#050009 "050009的直接链接") * Invalid public key. Solution: 1. Do not use pem format 2. Encode the Public key ### 050010[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#050010 "050010的直接链接") * API generation failed. ### 001512[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#001512 "001512的直接链接") * Each account can only generate one API key for a certain third party via Fast API. ### 001464[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#001464 "001464的直接链接") * You have reached the API Key limit. Please delete the unused ones to create new API Keys. ### 2000039xxx[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#2000039xxx "2000039xxx的直接链接") * There may be multi error starting with 2000039, which represents the error message related to compliance. * [Onboarding Steps](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#onboarding-steps) * [Minimum requirements for Fast API:](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#minimum-requirements-for-fast-api) * [Remarks](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#remarks) * [Common Error messages](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#common-error-messages) * [050009](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#050009) * [050010](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#050010) * [001512](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#001512) * [001464](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#001464) * [2000039xxx](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api#2000039xxx) --- # Get User Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#__docusaurus_skipToContent_fallback) 本页总览 Get User Status =============== HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- GET `/v1/api-key/user-status` **Authorization:** Bearer {access\_token} Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- None Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#response-example "Response Example的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "data": { "isExistFutureAccount": true }, "success": true} * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#http-request) * [Header](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#request-parameters) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/fast-api/get-user-status#response-example) --- # OAuth 2.0 Scopes (Permissions) for Binance APIs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-open-api#__docusaurus_skipToContent_fallback) | Scopes | Description | | --- | --- | --- # OAuth 2.0 APIs for Binance APIs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-open-api/apis#__docusaurus_skipToContent_fallback) 本页总览 API 1. Get user info[​](https://developers.binance.com/docs/zh-CN/binance-open-api/apis#api-1-get-user-info "API 1. Get user info的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------- curl 'https://www.binanceapis.com/oauth-api/v1/user-info' \--header 'Authorization: Bearer {access_token}' **Parameters:** | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | access\_token | String | YES | | **Response:** { "code": "000000", "message": null, "data": { "userId": "e10e20b7f20947e7bd206b15ce3dae90" }, "success": true} API 2. Revoke access\_token[​](https://developers.binance.com/docs/zh-CN/binance-open-api/apis#api-2-revoke-access_token "API 2. Revoke access_token的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ curl --request POST 'https://www.binanceapis.com/oauth-api/v1/revoke-token' \--header 'Authorization: Bearer {access_token}' **Parameters:** | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | access\_token | String | YES | | **Response:** { "code": "000000", "message": null, "data": true, // true means clear access_token success "success": true} * [API 1. Get user info](https://developers.binance.com/docs/zh-CN/binance-open-api/apis#api-1-get-user-info) * [API 2. Revoke access\_token](https://developers.binance.com/docs/zh-CN/binance-open-api/apis#api-2-revoke-access_token) --- # Query KYC Status by brokerSubAccountId | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#__docusaurus_skipToContent_fallback) 本页总览 Query KYC status By Broker SubAccountId ======================================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Query KYC status By Exchange Link SubAccountId HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/inner-query-kyc-status` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#request-header "Request Header的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | brokerMainAccountId | STRING | YES | broker main account id | | brokerSubAccountId | STRING | YES | broker sub account id | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#response-fields "Response Fields的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | | | data | StatusVo | NO | refer to the StatusVo field in the response from POST `/bapi/ekyc/v2/public/ekyc/customer/check-kyc-status` | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#request-body-example "Request Body Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "brokerMainAccountId": "942177800", "brokerSubAccountId": "45712345678999212345"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#response-example "Response Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "statusInfo": { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycUserId": "4575836000526931200", "userType": "USER", "kycType": "USER", "businessType": null, "status": null, "expectTime": null, "expectTimeText": null, "kycStatus": "REJECT", "failReason": "This ID number has been used. Log in to your original account to complete the transaction.", "basicStatus": "PASS", "basicExpectTime": null, "basicExpectTimeText": null, "basicFailReason": "", "basicSubStatus": null, "documentStatus": null, "documentExpectTime": null, "documentExpectTimeText": null, "documentFailReason": null, "identityStatus": "REJECT", "identityExpectTime": null, "identityExpectTimeText": null, "identityFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "identityFailCode": null, "faceStatus": "REJECT", "faceExpectTime": null, "faceExpectTimeText": null, "faceFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "faceEmailStatus": null, "faceEmailMask": null, "wckStatus": "INITIAL", "wckExpectTime": null, "wckExpectTimeText": null, "wckFailReason": null, "firstName": null, "middleName": null, "lastName": null, "poaStatus": null, "poaExpectTime": null, "poaExpectTimeText": null, "poaFailReason": null, "eddStatus": null, "eddExpectTime": null, "eddExpectTimeText": null, "eddFailReason": null, "dbCreateTime": 1750699479373, "dbModifyTime": 1750699512711, "questionStatus": null, "questionFailReason": null, "completeTime": null, "basicCompleteTime": null, "documentCompleteTime": null, "identityCompleteTime": 1750699512647, "faceCompleteTime": 1750699512651, "wckCompleteTime": null, "poaCompleteTime": null, "eddCompleteTime": null, "questionCompleteTime": null, "kycSubType": null, "kycSubStatus": null, "credentialStatus": null, "credentialFailReason": null, "fiatPtStatus": null, "fiatPtFailReason": null, "memberStatus": null, "remediationStatus": null, "remediationExpectTime": null, "riskRateLevel": "MEDIUM", "riskRateScore": 31.00 }, "levelInfo": { "currentLevel": { "levelName": "INTERMEDIATE", "levelDesc": "INTERMEDIATE", "kycStatus": "REFUSED", "kycLevelSubStatus": null, "limit": { "fiatCurrency": "USD", "depositFiatDailyLimit": null, "withdrawFiatDailyLimit": 20000, "totalFiatDailyLimit": null, "depositFiatMonthlyLimit": null, "withdrawFiatMonthlyLimit": null, "totalFiatMonthlyLimit": null, "depositFiatYearlyLimit": null, "withdrawFiatYearlyLimit": null, "totalFiatYearlyLimit": null, "depositFiatLifeTimeLimit": null, "withdrawFiatLifeTimeLimit": null, "totalFiatLifeTimeLimit": null, "cryptoCurrency": "BTC", "depositCryptoDailyLimit": -1, "withdrawCryptoDailyLimit": 100, "totalCryptoDailyLimit": null } }, "completedLevel": null, "passedLevel": null, "definedKycPassLevel": null, "kycPass": false, "hasMultipleLevels": false, "passedLevels": [] }, "remainingSteps": null, "nonExisted": null, "oauthUserInfo": null, "version": 1750699512711 }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#response-fields) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-brokerSubAccountId#response-example) --- # Query Linked Accounts | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#__docusaurus_skipToContent_fallback) 本页总览 Query Linked Accounts Info ========================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#api-description "API Description的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- Query Linked Accounts Info HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#http-request "HTTP Request的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/query-linked-accounts` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#request-header "Request Header的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id, that is, the user id of the access entity site. Not Required for Oauth Link | | brokerMainAccountId | STRING | YES | Broker main account id | | openId | STRING | NO | Required for Oauth Link | | oauthClientId | STRING | NO | Required for Oauth Link | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#response-fields "Response Fields的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | | | data | LinkedBrokerAccountsResponse | NO | | ### LinkedBrokerAccountsResponse[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#linkedbrokeraccountsresponse "LinkedBrokerAccountsResponse的直接链接") | Name | Type | Description | | --- | --- | --- | | accountList | List | Linked accounts info | ### BrokerAccountInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#brokeraccountinfovo "BrokerAccountInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | brokerMainAccountId | STRING | Broker main account id | | brokerSubAccountId | STRING | Broker sub account id | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#request-body-example "Request Body Example的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "requestNo": "123456"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#response-example "Response Example的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "accountList": [ { "brokerMainAccountId": "123456789", "brokerSubAccountId": "45712345678999212345" } ] }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#response-fields) * [LinkedBrokerAccountsResponse](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#linkedbrokeraccountsresponse) * [BrokerAccountInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#brokeraccountinfovo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Linked-Accounts#response-example) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#__docusaurus_skipToContent_fallback) 本页总览 Rest 基本信息[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#rest-%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "Rest 基本信息的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- * 現貨接口的baseurl: **[https://api.binance.com](https://api.binance.com/) ** * 合約接口的baseurl: **[https://fapi.binance.com](https://fapi.binance.com/) ** * 所有接口的响应都是JSON格式 * 响应中如有数组,数组元素以时间升序排列,越早的数据越提前。 * 所有时间、时间戳均为UNIX时间,单位为毫秒 * HTTP `4XX` 错误码用于指示错误的请求内容、行为、格式。 * HTTP `403` 错误码表示违反WAF限制(Web应用程序防火墙)。 * HTTP `429` 错误码表示警告访问频次超限,即将被封IP * HTTP `418` 表示收到429后继续访问,于是被封了。 * HTTP `5XX` 错误码用于指示Binance服务侧的问题。 * HTTP `504` 表示API服务端已经向业务核心提交了请求但未能获取响应,特别需要注意的是`504`代码不代表请求失败,而是未知。很可能已经得到了执行,也有可能执行失败,需要做进一步确认。 * 每个接口都有可能抛出异常,异常响应格式如下: { "code": -1121, "msg": "Invalid symbol."} * `GET`方法的接口, 参数必须在`query string`中发送. * `POST`, `PUT`, 和 `DELETE` 方法的接口, 参数可以在 `query string`中发送,也可以在 `request body`中发送(content type `application/x-www-form-urlencoded`)。允许混合这两种方式发送参数。但如果同一个参数名在query string和request body中都有,query string中的会被优先采用。 * 对参数的顺序不做要求。 IP 访问限制[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#ip-%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "IP 访问限制的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------- * 每个请求将包含一个`X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)`的头,其中包含当前IP所有请求的已使用权重。 * 每个路由都有一个“权重”,该权重确定每个接口计数的请求数。较重的接口和对多个交易对进行操作的接口将具有较重的“权重”。 * 收到429时,您有责任作为API退回而不向其发送更多的请求。 * **如果屡次违反速率限制和/或在收到429后未能退回,将导致API的IP被禁(http状态418)。** * 频繁违反限制,封禁时间会逐渐延长 ,**对于重复违反者,将会被封从2分钟到3天**。 * **访问限制是基于IP的,而不是API Key** 接口鉴权类型[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#%E6%8E%A5%E5%8F%A3%E9%89%B4%E6%9D%83%E7%B1%BB%E5%9E%8B "接口鉴权类型的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ * 每个接口都有自己的鉴权类型,鉴权类型决定了访问时应当进行何种鉴权。 * 如果需要 API-keys,应当在HTTP头中以 `X-MBX-APIKEY`字段传递。 * API-keys 与 secret-keys **是大小写敏感的**。 * API-keys可以被配置为只拥有访问一些接口的权限。 例如, 一个 API-key 仅可用于发送交易指令, 而另一个 API-key 则可访问除交易指令外的所有路径。 * 默认 API-keys 可访问所有鉴权路径. | 鉴权类型 | 描述 | | --- | --- | | TRADE | 需要有效的 API-Key 和签名 | | USER\_DATA | 需要有效的 API-Key 和签名 | 备注说明[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#%E5%A4%87%E6%B3%A8%E8%AF%B4%E6%98%8E "备注说明的直接链接") -------------------------------------------------------------------------------------------------------------------------------- ### 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") #### Email地址[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#email%E5%9C%B0%E5%9D%80 "Email地址的直接链接") * Email地址作为请求参数,需要转译(encode)。比如 [alice@test.com](mailto:alice@test.com) 转换成 alice%40test.com * Email地址作为请求参数,应为小写。 * [Rest 基本信息](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#rest-%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF) * [IP 访问限制](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#ip-%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6) * [接口鉴权类型](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#%E6%8E%A5%E5%8F%A3%E9%89%B4%E6%9D%83%E7%B1%BB%E5%9E%8B) * [备注说明](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#%E5%A4%87%E6%B3%A8%E8%AF%B4%E6%98%8E) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) --- # Get User’s Customize Id | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-User-Customize-Id#__docusaurus_skipToContent_fallback) 本页总览 查询用户定制 Id (USER DATA) ===================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-User-Customize-Id#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/apiReferral/userCustomization` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-User-Customize-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | apiAgentCode | STRING | YES | brokerId | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 必须唯一 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-User-Customize-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- { "customerId": "abc123"} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-User-Customize-Id#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-User-Customize-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-User-Customize-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Rebate Recent Record (For Client) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Client#__docusaurus_skipToContent_fallback) 本页总览 获取反佣详情历史记录 (仅支持交易者使用) ===================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Client#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/apiReferral/kickback/recentRecord` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Client#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | startTime | LONG | NO | | | endTime | LONG | NO | | | limit | INT | NO | 默认 500,最大 1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * 只返回过去最近7天数据 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Client#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "income": "0.02063898", "asset":"BTC", "symbol": "ETHBTC", "time":1544433328000 }, { "income": "1.2063898", "asset":"USDT", "symbol": "BTCUSDT", "time":1581580800000 }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Client#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Client#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Client#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Client If New User | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Client-If-New-User#__docusaurus_skipToContent_fallback) 本页总览 查询是否属于新用户(USER DATA) ==================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Client-If-New-User#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/apiReferral/ifNewUser` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Client-If-New-User#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | apiAgentCode | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Client-If-New-User#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- { "apiAgentCode": "ABCD1234", "rebateWorking": false, //true or false,是否满足API返佣条件(不判断新老用户是否返佣) "ifNewUser": true, //对该推荐码是否为新客 true 新客,false 老客 "referrerId": 39472261} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Client-If-New-User#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Client-If-New-User#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Client-If-New-User#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Rebate Recent Record (For Partner) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Partner#__docusaurus_skipToContent_fallback) 本页总览 获取反佣详情历史记录 (USER DATA)(仅支持brokerId拥有者) ====================================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Partner#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v1/apiReferral/rebate/recentRecord` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Partner#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | NO | | | startTime | LONG | YES | | | endTime | LONG | YES | | | limit | INT | NO | 最大 500 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * startTime 与 endTime 必须同时传或同时不传 * 若都不传,则返回最近7天 * 若都传,期间必须在7天内 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Partner#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "customerId": "", // 仅当配置后可见 "email": "om***@***.com", "income": "0.00240635", "asset": "USDC", "symbol": "BNBUSDC", "time": 1764000370000, "orderId": 54321678, "tradeId": 12349876, "distributeTime": 1764004848000, // 仅在返佣发放后可见 "commissionAsset": "BNB", "commission": "0.00000284", // 应用比例后的手续费 "convertPrice": "847.30952410" }, { "customerId": "abd433", "email": "abcd*****@gmail.com", "income": "0.02230096", "asset":"USDT", "symbol": "BTCUSDT", "time":1581580800000, "orderId": 12345678, "tradeId": 87654321, "distributeTime": 1764004848000, "commissionAsset": "USDT", "commission": "0.02230000", "convertPrice": "1.00004321" }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Partner#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Partner#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Query-Rebate-Recent-Record-For-Partner#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Client If New User | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#__docusaurus_skipToContent_fallback) 本页总览 * * * id: Query-Client-If-New-User sidebar\_label: 查询是否属于新用户 (USER DATA)[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#id-query-client-if-new-usersidebar_label-%E6%9F%A5%E8%AF%A2%E6%98%AF%E5%90%A6%E5%B1%9E%EF%BF%BD%EF%BF%BD%E4%BA%8E%E6%96%B0%E7%94%A8%E6%88%B7-user-data "id: Query-Client-If-New-User sidebar_label: 查询是否属于新用户 (USER DATA)的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询是否属于新用户 (USER DATA) ===================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/apiReferral/ifNewUser` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | brokerId | STRING | YES | | | type | INT | NO | 1:U本位合约 2: 币本位合约; 默认:1:U本位合约 | | revWindow | LONG | NO | | | timestamp | LONG | YES | | * 如用户启用统一帐户,请使用对应的 `/papi` 接口 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "brokerId": "ABCD1234", "rebateWorking":false, //true or false,是否满足API返佣条件(不判断新老用户是否返佣) "ifNewUser": "true" //true 新用户标准,false 老用户标准} * [id: Query-Client-If-New-User sidebar\_label: 查询是否属于新用户 (USER DATA)](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#id-query-client-if-new-usersidebar_label-%E6%9F%A5%E8%AF%A2%E6%98%AF%E5%90%A6%E5%B1%9E%E4%BA%8E%E6%96%B0%E7%94%A8%E6%88%B7-user-data) * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # RFI Record Submission | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#__docusaurus_skipToContent_fallback) 本页总览 Kyc RFI Record Submit API ========================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#api-description "API Description的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Kyc RFI Record Submit API RFI Upload API is in async mode. Upon completion, the system will notify the process result via notify webhook with eventType = USER-RFI-SUBMIT-RESULT User can also use POST `/bapi/ekyc/v2/public/ekyc/customer/query-submit-rfi-result` to query the RFI status/result. HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/submit-rfi-record` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#request-header "Request Header的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id, that is, the user id of the access entity site. | | kycType | STRING | YES | kyc type,USER | | recordId | STRING | YES | Rfi Record Id, got from “RFI Records Query API” respons | | fileDataList | List | YES | File data info list, KycFileGroupInfoVo | ### KycFileGroupInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#kycfilegroupinfovo "KycFileGroupInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | type | STRING | Rfi Record required file type, got from “RFI Records Query API” response | | files | List | File url info list. Supported file extensions:jpg, jpeg, png, pdf, mp4, mov;File Size limit: <= 10M | ### KycFileItemVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#kycfileitemvo "KycFileItemVo的直接链接") | Name | Type | Description | | --- | --- | --- | | fileUrl | STRING | file download url | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#response-fields "Response Fields的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | | | data | OuterKycRFISubmitResponse | NO | | OuterKycRFISubmitResponse | Name | Type | Description | | --- | --- | --- | | requestNo | String | request biz No, used for query result later | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#request-body-example "Request Body Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycType": "USER", "recordId": "12345", "fileDataList": [{ "type":"SOF", "files": [ {"fileUrl": "https://image.cnbcfm.com/api/v1/image/104853635-GettyImages-870113330.jpg?v=1709055832&w=740&h=416&ffmt=webp&vtcrop=y"} ] } ]} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#response-example "Response Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "requestNo": "6286de2c976243a38ce4da8bebc403cf" }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#request-parameters) * [KycFileGroupInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#kycfilegroupinfovo) * [KycFileItemVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#kycfileitemvo) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#response-fields) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Record-Submission#response-example) --- # RFI Records Query | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#__docusaurus_skipToContent_fallback) 本页总览 Kyc RFI Records Query API ========================= API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#api-description "API Description的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- Kyc RFI Record Submit API HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#http-request "HTTP Request的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/page-query-rfi-records` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#request-header "Request Header的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | NO | customer id, that is, the user id of the access entity site. | | kycType | STRING | NO | kyc type,USER | | recordId | STRING | NO | Rfi Record Id | | status | STRING | NO | Rfi record status:
PROCESS(under process)
UPLOADING(uploading files)
REVIEW(under review)
PASS(file review pass)
REFUSED(file refused)
EXPIRED(file expired)
CLOSE(close file flow) | | startTime | STRING | NO | min create time, yyyy-MM-dd | | endTime | STRING | NO | max create time, yyyy-MM-dd | | page | INT | YES | page number, start from 1 | | rows | INT | YES | rows | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#response-fields "Response Fields的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | | | data | SearchResult | NO | | ### SearchResult[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#searchresult "SearchResult的直接链接") | Name | Type | Description | | --- | --- | --- | | total | LONG | total records count | | rows | List | | ### SimpleKycRfiRecordVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#simplekycrfirecordvo "SimpleKycRfiRecordVo的直接链接") | Name | Type | Description | | --- | --- | --- | | recordId | STRING | Rfi record id | | bizEntityKey | STRING | business entity key | | entityCustomerId | STRING | Customer id | | kycType | STRING | KYC type | | status | STRING | Rfi record status:PROCESS,UPLOADING,REVIEW,PASS,REFUSED,EXPIRED,CLOSE | | fileTypes | List | Rfi record required file types | | expireTime | DATE | Expired time | | recordType | STRING | Rfi record type:IDENTITY,WCK | | auditor | STRING | auditor | | auditTime | DATE | Audit time | | dbCreateTime | DATE | Rfi record create time | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#request-body-example "Request Body Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycType": "USER"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#response-example "Response Example的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "total": 1, "rows": [ { "recordId": "12345", "bizEntityKey": "BROKERKEY", "kycUserId": "4276875665261234567", "entityCustomerId": "45712345678999212345", "kycType": "USER", "status": "PROCESS", "subStatus": "INIT", "fileTypes": [ "SOF" ], "fileData": null, "expireTime": 1752105600000, "requestComment": "test", "recordType": "IDENTITY", "reason": null, "remark": null, "creator": "test@example.com", "submitter": null, "auditor": null, "auditTime": null, "completeTime": null, "dbCreateTime": 1750927524935, "dbModifyTime": 1750927524935 } ] }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#response-fields) * [SearchResult](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#searchresult) * [SimpleKycRfiRecordVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#simplekycrfirecordvo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi#response-example) --- # OAuth 2.0 Scopes (Permissions) for Binance APIs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-open-api/scopes#__docusaurus_skipToContent_fallback) | Scopes | Description | | --- | --- | --- # Customize Id For Client (For Partner) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#__docusaurus_skipToContent_fallback) 本页总览 为用户定制 Id(USER DATA)(仅支持brokerId拥有者) =================================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ POST `/fapi/v1/apiReferral/customization` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | YES | | | email | STRING | YES | | | revWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 必须唯一 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "customerId": "abc123", "email": "test12345@126.com"} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Customize-Id-For-Client-For-Partner#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get User Trade Volume | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#__docusaurus_skipToContent_fallback) 本页总览 获取用户每天交易量 (USER DATA) ===================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/apiReferral/tradeVol` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#%E6%9D%83%E9%87%8D "权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | type | INT | NO | 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures | | startTime | LONG | NO | | | endTime | LONG | NO | | | limit | INT | NO | 默认 500, 最大 1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "unit": "USDT", "tradeVol": "53.60756000", "time": 1586736000000 }, { "unit": "USDT", "tradeVol": "43.60756000", "time": 1588723200000 }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Trade-Volume#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#__docusaurus_skipToContent_fallback) 本页总览 Rest 基本信息[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#rest-%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "Rest 基本信息的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ * 現貨接口的baseurl: **[https://api.binance.com](https://api.binance.com/) ** * 合約接口的baseurl: **[https://fapi.binance.com](https://fapi.binance.com/) ** * 所有接口的响应都是JSON格式 * 响应中如有数组,数组元素以时间升序排列,越早的数据越提前。 * 所有时间、时间戳均为UNIX时间,单位为毫秒 * HTTP `4XX` 错误码用于指示错误的请求内容、行为、格式。 * HTTP `403` 错误码表示违反WAF限制(Web应用程序防火墙)。 * HTTP `429` 错误码表示警告访问频次超限,即将被封IP * HTTP `418` 表示收到429后继续访问,于是被封了。 * HTTP `5XX` 错误码用于指示Binance服务侧的问题。 * HTTP `504` 表示API服务端已经向业务核心提交了请求但未能获取响应,特别需要注意的是`504`代码不代表请求失败,而是未知。很可能已经得到了执行,也有可能执行失败,需要做进一步确认。 * 每个接口都有可能抛出异常,异常响应格式如下: { "code": -1121, "msg": "Invalid symbol."} * `GET`方法的接口, 参数必须在`query string`中发送. * `POST`, `PUT`, 和 `DELETE` 方法的接口, 参数可以在 `query string`中发送,也可以在 `request body`中发送(content type `application/x-www-form-urlencoded`)。允许混合这两种方式发送参数。但如果同一个参数名在query string和request body中都有,query string中的会被优先采用。 * 对参数的顺序不做要求。 IP 访问限制[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#ip-%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "IP 访问限制的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ * 每个请求将包含一个`X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)`的头,其中包含当前IP所有请求的已使用权重。 * 每个路由都有一个“权重”,该权重确定每个接口计数的请求数。较重的接口和对多个交易对进行操作的接口将具有较重的“权重”。 * 收到429时,您有责任作为API退回而不向其发送更多的请求。 * **如果屡次违反速率限制和/或在收到429后未能退回,将导致API的IP被禁(http状态418)。** * 频繁违反限制,封禁时间会逐渐延长 ,**对于重复违反者,将会被封从2分钟到3天**。 * **访问限制是基于IP的,而不是API Key** 接口鉴权类型[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#%E6%8E%A5%E5%8F%A3%E9%89%B4%E6%9D%83%E7%B1%BB%E5%9E%8B "接口鉴权类型的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 每个接口都有自己的鉴权类型,鉴权类型决定了访问时应当进行何种鉴权。 * 如果需要 API-keys,应当在HTTP头中以 `X-MBX-APIKEY`字段传递。 * API-keys 与 secret-keys **是大小写敏感的**。 * API-keys可以被配置为只拥有访问一些接口的权限。 例如, 一个 API-key 仅可用于发送交易指令, 而另一个 API-key 则可访问除交易指令外的所有路径。 * 默认 API-keys 可访问所有鉴权路径. | 鉴权类型 | 描述 | | --- | --- | | TRADE | 需要有效的 API-Key 和签名 | | USER\_DATA | 需要有效的 API-Key 和签名 | 备注说明[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#%E5%A4%87%E6%B3%A8%E8%AF%B4%E6%98%8E "备注说明的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- ### 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") #### Email地址[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#email%E5%9C%B0%E5%9D%80 "Email地址的直接链接") * Email地址作为请求参数,需要转译(encode)。比如 [alice@test.com](mailto:alice@test.com) 转换成 alice%40test.com * Email地址作为请求参数,应为小写。 * [Rest 基本信息](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#rest-%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF) * [IP 访问限制](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#ip-%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6) * [接口鉴权类型](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#%E6%8E%A5%E5%8F%A3%E9%89%B4%E6%9D%83%E7%B1%BB%E5%9E%8B) * [备注说明](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#%E5%A4%87%E6%B3%A8%E8%AF%B4%E6%98%8E) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/Introduction#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) --- # Get User’s Customize Id | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#__docusaurus_skipToContent_fallback) 本页总览 * * * id: Get-User’s-Customize-Id sidebar\_label: 查询用户定制 Id(USER DATA)[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#id-get-users-customize-idsidebar_label-%E6%9F%A5%E8%AF%A2%E7%94%A8%E6%88%B7%E5%AE%9A%E5%88%B6-iduser-data "id: Get-User’s-Customize-Id sidebar_label: 查询用户定制 Id(USER DATA)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询用户定制 Id(USER DATA) ==================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/apiReferral/userCustomization` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#%E6%9D%83%E9%87%8D "权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | brokerId | STRING | YES | | | revWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 必须唯一 * 如用户启用统一帐户,请使用对应的 `/papi` 接口 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- { "brokerId": "ABCD1234", "customerId": "abc123"} * [id: Get-User’s-Customize-Id sidebar\_label: 查询用户定制 Id(USER DATA)](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#id-get-users-customize-idsidebar_label-%E6%9F%A5%E8%AF%A2%E7%94%A8%E6%88%B7%E5%AE%9A%E5%88%B6-iduser-data) * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # RFI Submission Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#__docusaurus_skipToContent_fallback) 本页总览 Query Kyc RFI Record Submit Result API ====================================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#api-description "API Description的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Query Kyc RFI Record Submit Result API HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/query-submit-rfi-result` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#request-header "Request Header的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id, that is, the user id of the access entity site. | | kycType | STRING | YES | kyc type,USER | | recordId | STRING | YES | Rfi Record Id | | requestNo | STRING | YES | Rfi submit record request no, got from " RFI Record Submit API" response | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#response-fields "Response Fields的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | | | data | QueryRfiSubmitResultResponse | NO | | ### QueryRfiSubmitResultResponse[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#queryrfisubmitresultresponse "QueryRfiSubmitResultResponse的直接链接") | Name | Type | Description | | --- | --- | --- | | result | STRING | Rfi record upload result: PROCESS,SUCCESS,FAILED | | failReason | STRING | fail Reason | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#request-body-example "Request Body Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycType": "USER", "recordId": "12345", "requestNo": "6286de2c976243a38ce4da8bebc403cf"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#response-example "Response Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "result": "SUCCESS", "failReason": null }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#response-fields) * [QueryRfiSubmitResultResponse](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#queryrfisubmitresultresponse) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/request-for-information-rfi/Rfi-Submission-Status#response-example) --- # Create Order (Deprecated) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#__docusaurus_skipToContent_fallback) 本页总览 **The API is deprecated, please migrate to [Create Order V2](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2) ASAP** Create order API used for merchant/partner to initiate acquiring order. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#endpoint "EndPoint的直接链接") ------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/order Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **subMerchantId** | string | N | maximum length 19 | The sub merchant account id, issued when sub merchant been created at Binance, The parameter subMerchantId is required when configuring show subMerchant info. | | **merchantTradeNo** | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The order id, Unique identifier for the request | | **tradeType** | string | Y | "WEB", "APP", "WAP", "MINI\_PROGRAM", "PAYMENT\_LINK", "OTHERS" | operate entrance | | **totalFee** | decimal | Y | Amount Range: 0.01 - 20000; Max Unit Range: 8 decimal places | order amount | | **currency** | string | Y | only "BUSD","USDT","MBOX" can be accepted, fiat NOT supported. | order currency | | **productType** | string | N | maximum length 16 | product type | | **productName** | string | N | maximum length 256 | product name | | **productDetail** | string | N | maximum length 256 | product detail | | **returnUrl** | string | N | maximum length 256 | The URL to redirect to when the payment is successful | | **cancelUrl** | string | N | maximum length 256 | The URL to redirect to when payment is failed | | **orderExpireTime** | long | N | maximum order time is 1 hour | OrderExpireTime is the time at which order will expire. Please input orderExpireTime in Epoch timestamp in milliseconds. If not specified, order time will be 1 hour | | **supportPayCurrency** | string | N | maximum length 1024. Input to be separated by commas, e.g. "BUSD,BNB" | SupportPayCurrency determines the currencies that a customer is allowed to use to pay for the order. If not specified, all Binance Pay supported currencies will be allowed. | | **universalUrlAttach** | string | N | maximum length 120. e.g. "countryCode=1&phone=1234567" | the attachment parameter for the response field "universalUrl" | | **passThroughInfo** | string | N | maximum length 512 | pass through info, returned as-is in query order API and payment webhook notification | | **webhookUrl** | string | N | maximum length 256. Can only start with http or https. | The URL for order notification. If the webhookUrl is passed in the parameter, the webhook url configured on the merchant platform will not take effect, and the currently passed url will be called back first. | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#sample-request-body "Sample Request Body的直接链接") { "subMerchantId": "98765987", "merchantTradeNo": "9825382937292", "totalFee": 25.17, "productDetail": "Greentea ice cream cone", "currency": "USDT", "returnUrl": "", "cancelUrl": "", "tradeType": "APP", "productType": "Food", "productName": "Ice Cream"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#response-parameters "Response Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#result-code) | | **data** | OrderResult | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#order-result) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#child-attribute "Child Attribute的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- ### OrderResult[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#orderresult "OrderResult的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **prepayId** | string | Y | maximum length 19 | unique id generated by binance | | **tradeType** | string | Y | "WEB", "APP", "WAP", "MINI\_PROGRAM", "PAYMENT\_LINK", "OTHERS" | operate entrance | | **expireTime** | long | Y | \- | expire time in milli seconds | | **qrcodeLink** | string | Y | maximum length 256 | qr code img link | | **qrContent** | string | Y | maximum length 256 | qr content info | | **checkoutUrl** | string | Y | maximum length 256 | binance hosted checkout page url | | **deeplink** | string | Y | maximum length 256 | deeplink to open binance app to finish payment | | **universalUrl** | string | Y | maximum length 512 | universal url to finish the payment | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "prepayId": "29383937493038367292", "tradeType": "APP", "expireTime": 121123232223, "qrcodeLink": "https://qrservice.dev.com/en/qr/dplkb005181944f84b84aba2430e1177012b.jpg", "qrContent": "https://qrservice.dev.com/en/qr/dplk12121112b", "checkoutUrl": "https://pay.binance.com/checkout/dplk12121112b", "deeplink": "bnc://app.binance.com/payment/secpay/xxxxxx", "universalUrl": "https://app.binance.com/payment/secpay?_dp=xxx=&linkToken=xxx" }, "errorMessage": ""} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#result-code "Result Code的直接链接") ---------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | | INVALID\_MERCHANT\_TRADE\_NO | 400201 | merchantTradeNo is invalid or duplicated | | | INVALID\_ACCOUNT\_STATUS | 400203 | Not support for this account, please check account status. | | | SUB\_MERCHANT\_INVALID | 400206 | The sub merchant does not exist or is in an unavailable state. | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#child-attribute) * [OrderResult](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#orderresult) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create#result-code) --- # Create Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#__docusaurus_skipToContent_fallback) 本页总览 Create order API Version 2 used for merchant/partner to initiate acquiring order. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#endpoint "EndPoint的直接链接") ---------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/v2/order Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes
(1st Level)** | **Attributes
(2nd Level)** | **Attributes
(3rd Level)** | **Type** | **Required** | **Description** | | --- | --- | --- | --- | --- | --- | | **merchant** | | | object | N | | | | **subMerchantId** | | string(19\] | N | The sub merchant account id, issued when sub merchant been created at Binance. | | **env** | | | object | Y | | | | **terminalType** | | string | Y | Terminal type of which the merchant service applies to. Valid values are:
**APP**:
The client-side terminal type is a mobile application.

**WEB**:
The client-side terminal type is a website that is opened via a PC browser.

**WAP**:
The client-side terminal type is an HTML page that is opened via a mobile browser.

**MINI\_PROGRAM**:
The terminal type of the merchant side is a mini program on the mobile phone.

**OTHERS**:
other undefined type | | | **osType** | | string | N | OS type. Valid values are:
**IOS**: indicates the operation system is Apple's iOS.
**ANDROID**: indicates the operation system is Google's Android. | | | **orderClientIp** | | string | N | IP of the client device when submit the order | | | **cookieId** | | string | N | The cookie ID of the buyer | | **merchantTradeNo** | | | string(32\] | Y | The order id, Unique identifier for the request letter or digit, no other symbol allowed, maximum length 32 | | **orderAmount** | | | decimal(.8) | N | When currency is not null. Minimum amount: 0.00000001 | | **currency** | | | string | N | Currency and fiatCurrency cannot be both null. order currency in upper case. only "BUSD","USDT","MBOX" can be accepted, fiat NOT supported. | | **fiatAmount** | | | decimal(.8) | N | Minimum amount: 0.00000001 ,We will convert this fiat amount to order amount based on market currency rate. | | **fiatCurrency** | | | string | N | Currency and fiatCurrency cannot be both null. fiat currency in upper case. ex: "HKD". Order currency will be set to "USDT" if this filed has value. Click [here](https://www.binance.com/bapi/asset/v1/public/asset-service/product/currency)
to view supported fiat currencies | | **goods** | | | object | Y | | | | **goodsType** | | string | Y | the type of the goods for the order:
**01**: Tangible Goods
**02**: Virtual Goods | | | **goodsCategory** | | string | Y | **0000**: Electronics & Computers
**1000**: Books, Music & Movies
**2000**: Home, Garden & Tools
**3000**: Clothes, Shoes & Bags
**4000**: Toys, Kids & Baby
**5000**: Automotive & Accessories
**6000**: Game & Recharge
**7000**: Entertainament & Collection
**8000**: Jewelry
**9000**: Domestic service
**A000**: Beauty care
**B000**: Pharmacy
**C000**: Sports & Outdoors
**D000**: Food, Grocery & Health products
**E000**: Pet supplies
**F000**: Industry & Science
**Z000**: Others | | | **referenceGoodsId** | | string | Y | The unique ID to identify the goods. | | | **goodsName** | | string(256\] | Y | Goods name.
Special character is prohibited Example: \\ " or emoji | | | **goodsDetail** | | string(256\] | N | | | | **goodsUnitAmount** | | object | N | Price of goods | | | | **currency** | string | Y | | | | | **amount** | decimal | Y | | | | **goodsQuantity** | | string | N | Quantity of goods | | **shipping** | | | object | N | | | | **shippingName** | | object | N | The recipient name | | | | **firstName** | string | Y | | | | | **middleName** | string | N | | | | | **lastName** | string | Y | | | | **shippingAddress** | | object | N | Shipping address | | | | **region** | string | Y | The 2-letter country/region code. For more information, see ISO 3166 Country Codes standard. | | | | **state** | string | N | The state, country, or province name. | | | | **city** | string | N | The city, district, suburb, town, or village name. | | | | **address** | string | N | Address, for example, the stress address/PO box/company name | | | | **zipCode** | string | N | ZIP or postal code | | | | **shippingAddressType** | string | N | shipping to
**01**: office
**02**: home
**03**: public box
**04**: others | | | **shippingPhoneNo** | | string | N | The phone number of a recipient (including extension) | | **buyer** | | | object | N | | | | **referenceBuyerId** | | string | N | Restrict specific Binance Pay ID to make payment. Need whitelist to use this feature | | | **buyerName** | | object | N | Name of buyer full name from merchants | | | | **firstName** | string | Y | | | | | **middleName** | string | N | | | | | **lastName** | string | Y | | | | **buyerPhoneCountryCode** | | string | N | | | | **buyerPhoneNo** | | string | N | Mobile phone number of the buyer from merchants | | | **buyerEmail** | | string | N | Email of the buyer from merchants | | | **buyerRegistrationTime** | | long | N | Buyer registration time on merchant side, epoch time milliseconds | | | **buyerBrowserLanguage** | | string | N | The language of the merchant's platform shows the buyer | | **returnUrl** | | | string(256\] | N | The URL to redirect to when the payment is successful.
Url must begin with HTTP. Only one parameter is allowed per URL, for e.g.
[https://example.com/search?q=apples](https://example.com/search?q=apples)
(✓)
[https://example.com/search?q=apples&p=orange](https://example.com/search?q=apples&p=orange)
(✖) | | **cancelUrl** | | | string(256\] | N | The URL to redirect to when payment is failed.
Url must begin with HTTP. Only one parameter is allowed per URL, for e.g.
[https://example.com/search?q=apples](https://example.com/search?q=apples)
(✓)
[https://example.com/search?q=apples&p=orange](https://example.com/search?q=apples&p=orange)
(✖) | | **orderExpireTime** | | | long | N | orderExpireTime determines how long an order is valid for. If not specified, orderExpireTime will be 1 hour;
maximum orderExpireTime is 15 days. Please input in milliseconds. | | **supportPayCurrency** | | | string(1024\] | N | SupportPayCurrency determines the currencies that a customer is allowed to use to pay for the order. If not specified, all Binance Pay supported currencies will be allowed.
Input to be separated by commas, e.g. "BUSD,BNB" | | **appId** | | | string | N | The unique ID that is assigned by Binance to identify the mini program app. Note: This field is required when terminalType is **MINI\_PROGRAM**. | | **universalUrlAttach** | | | string(120) | N | the attachment parameter for the response field "universalUrl", e.g. "countryCode=1&phone=1234567" | | **passThroughInfo** | | | string(512\] | N | pass through info, returned as-is in query order API and payment webhook notification | | **webhookUrl** | | | string(256\] | N | The URL for order notification, can only start with http or https.
If the webhookUrl is passed in the parameter, the webhook url configured on the merchant platform will not take effect, and the currently passed url will be called back first. | | **directDebitContract** | | | object | N | If not empty, it means to create an order and direct debit contract. Use this function order currency can only accept "BUSD","USDT".

**This function is only available for whitelisted merchants.** | | | **merchantContractCode** | | string(32\] | Y | The unique ID assigned by the merchant to identify a direct debit contract request. letter or digit, no other symbol allowed. | | | **serviceName** | | string(32\] | Y | Service name | | | **scenarioCode** | | string | Y | Scenario code, please [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#scenario-code) | | | **singleUpperLimit** | | decimal(.8) | Y | Upper limit related to scenarioCode, for more please [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#scenario-code) | | | **periodic** | | boolean | Y | This contract support periodic debit or not | | | **cycleDebitFixed** | | boolean | N | Mandatory if periodic = true. true = fixed amount, false = variable amount | | | **cycleType** | | string | N | Mandatory if periodic = true. Values: MONTH or DAY | | | **cycleValue** | | integer | N | Mandatory if periodic = true. Values: if cycleType=MONTH: 1~24, cycleType=DAY: interval days >7

Combining with another parameter cycleType to determine the deduction period, for example, cycleType is DAY, cycleValue=30, then the deduction period is 30 days; cycleType is MONTH, cycleValue=3, then the deduction period is 3 natural months. | | | **firstDeductTime** | | long | N | Mandatory if periodic = true. first deduct time, must be a future time in milli seconds. if cycleType=MONTH, the firstDeductTime is not allowed to pass the date after the 28th UTC (can pass the 28th) | | | **merchantAccountNo** | | string(64\] | N | The userID/user account in merchant side e.g. [xxx@gmail.com](mailto:xxx@gmail.com) | | | **contractEndTime** | | long | N | If not specified, contractEndTime will be the time after 1095 days (about 3 years). maximum is 1095 days in milliseconds. | | **orderTags** | | | object | N | Object to tag order for specific features such as profit sharing. | | | **ifProfitSharing** | | boolean | N | if specified and true, order will be tagged as profit sharing. | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#sample-request-body "Sample Request Body的直接链接") | | | | --- | --- | | Create Order in Crypto

{ "env": { "terminalType": "APP" }, "orderTags": { "ifProfitSharing": true }, "merchantTradeNo": "9825382937292", "orderAmount": 25.17, "currency": "USDT", "goods": { "goodsType": "01", "goodsCategory": "D000", "referenceGoodsId": "7876763A3B", "goodsName": "Ice Cream", "goodsDetail": "Greentea ice cream cone" }} | Create Order in Fiat

{ "env": { "terminalType": "APP" }, "orderTags": { "ifProfitSharing": true }, "merchantTradeNo": "9825382937292", "fiatAmount": 100, "fiatCurrency": "HKD", "goods": { "goodsType": "01", "goodsCategory": "D000", "referenceGoodsId": "7876763A3B", "goodsName": "Ice Cream", "goodsDetail": "Greentea ice cream cone" }} | ### Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#response-parameters "Response Parameters的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#result-code) | | **data** | OrderResult | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#order-result) | | **errorMessage** | string(256\] | N | \- | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- ### OrderResult[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#orderresult "OrderResult的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **prepayId** | string(19\] | Y | \- | unique id generated by binance | | **terminalType** | string(20\] | Y | | same as terminalType in request data | | **expireTime** | long | Y | \- | expire time in milli seconds | | **qrcodeLink** | string(256\] | Y | \- | qr code img link | | **qrContent** | string(256\] | Y | \- | qr content info | | **checkoutUrl** | string(256\] | Y | \- | binance hosted checkout page url | | **deeplink** | string(256\] | Y | \- | deeplink to open binance app to finish payment | | **universalUrl** | string | Y | maximum length 512 | universal url to finish the payment | | **currency** | string | Y | | order currency | | **totalFee** | decimal(.8) | Y | | order total amount | | **fiatCurrency** | string | N | | order fiat currency ,only return when create in fiat | | **fiatAmount** | decimal(.8) | N | | order fiat amount ,only return when create in fiat | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#sample-response "Sample Response的直接链接") | | | | --- | --- | | Create Order in Crypto

{ "status": "SUCCESS", "code": "000000", "data": { "prepayId": "29383937493038367292", "terminalType": "APP", "expireTime": 121123232223, "qrcodeLink": "https://qrservice.dev.com/en/qr/dplkb005181944f84b84aba2430e1177012b.jpg", "qrContent": "https://qrservice.dev.com/en/qr/dplk12121112b", "checkoutUrl": "https://pay.binance.com/checkout/dplk12121112b", "deeplink": "bnc://app.binance.com/payment/secpay/xxxxxx", "universalUrl": "https://app.binance.com/payment/secpay?_dp=xxx=&linkToken=xxx", "totalFee": "25.17", "currency": "USDT" }, "errorMessage": ""} | Create Order in Fiat

{ "status": "SUCCESS", "code": "000000", "data": { "currency": "USDT", "totalFee": "12.77377391", "fiatCurrency": "HKD", "fiatAmount": "100", "prepayId": "230898625140047872", "terminalType": "WEB", "expireTime": 1685360951988, "qrcodeLink": "https://public.bnbstatic.com/static/payment/20230529/26b9d4ed-0a1d-47ab-802f-d23beecad1ff.jpg", "qrContent": "https://app.binance.com/qr/dplk677510ff75084d428657718ca71c23e6", "checkoutUrl": "https://pay.binance.com/en/checkout/362d8131e3c349a08c77455001f2f32b", "deeplink": "bnc://app.binance.com/payment/secpay?tempToken=1NgAZN9X3VRJWbQkh4viNWWpGYReMuNs", "universalUrl": "https://app.binance.com/payment/secpay?_dp=xxx=&linkToken=xxx" }} | Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#result-code "Result Code的直接链接") ------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | | INVALID\_MERCHANT\_TRADE\_NO | 400201 | merchantTradeNo is invalid or duplicated | | | INVALID\_ACCOUNT\_STATUS | 400203 | Not support for this account, please check account status. | | | SUB\_MERCHANT\_INVALID | 400206 | The sub merchant does not exist or is in an unavailable state. | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#child-attribute) * [OrderResult](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#orderresult) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-create-v2#result-code) --- # Query KYC Status by entityCustomerId | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#__docusaurus_skipToContent_fallback) 本页总览 Query KYC status By EntityCustomerId ==================================== API Description[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#api-description "API Description的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Query KYC Detail INFO Query API HTTP Request[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/bapi/ekyc/v2/public/ekyc/customer/query-kyc-info` Request Header[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#request-header "Request Header的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | X-SHA2-Signature | STRING | YES | Request Signature | Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | bizEntityKey | STRING | YES | business entity key, each access entity has its own bizEntityKey | | entityCustomerId | STRING | YES | customer id,that is, the user id of the access entity site | | kycType | STRING | YES | kyc type,USER | Response Fields[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#response-fields "Response Fields的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | STRING | YES | error code,000000000 is success | | data | KycInfoVo | NO | | ### KycInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycinfovo "KycInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | statusInfo | KycVerifyStatusInfoVo | | | basicInfo | KycBasicInfoVo | | | identityInfo | KycIdentityInfoVo | | | riskScore | UserRiskScoreVo | | | levelInfo | KycLevelInfoVo | ref to check-kyc-status | | wckInfo | KycWckInfoVo | | ### KycVerifyStatusInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycverifystatusinfovo "KycVerifyStatusInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | failReason | STRING | fail reason | | basicStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | identityStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | faceStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT,SKIP | | wckStatus | STRING | INITIAL,PROCESS,REVIEW,PASS,REJECT | | kycUserId | STRING | kyc user id in SAAS | ### KycBasicInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycbasicinfovo "KycBasicInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | firstName | STRING | First name | | middleName | STRING | Middle name | | lastName | STRING | Last Name | | dob | STRING | Birthday, yyyy-MM-dd | | residentialCountry | STRING | Country of residence | | country | STRING | nationality | ### KycIdentityInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycidentityinfovo "KycIdentityInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | bizNo | STRING | Biz no | | firstName | STRING | First name | | middleName | STRING | Middle name | | lastName | STRING | Last name | | dob | STRING | birthday yyyy-MM-dd | | idCountry | STRING | Document issuing country 2-alpha code | | nationalityCountry | STRING | Nationality country 2-alpha code | | idType | STRING | IdentityDocumentType. for example: ID\_CARD, PASSPORT, DRIVING\_LICENSE,RESIDENCE\_PERMIT | | idSubType | STRING | id doc sub type | | idNumber | STRING | id Number | | idExpiry | STRING | yyyy-MM-dd | | personalNumber | STRING | | | gender | STRING | | | issuingAuthority | STRING | | | issuingDate | STRING | yyyy-MM-dd | | issuingPlace | STRING | | | registrationNumber | STRING | | | city | STRING | | | stateCode | STRING | | | postalCode | STRING | | | address | STRING | | | frontFileUrl | STRING | id front image download url | | backFileUrl | STRING | id back image download url | | faceFileUrl | STRING | face image download url | | faceDetectFileUrl | STRING | | | vendorsCode | STRING | Channel code: SUMSUB\_SDK,ONFIDO\_SDK | ### UserRiskScoreVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#userriskscorevo "UserRiskScoreVo的直接链接") | Name | Type | Description | | --- | --- | --- | | riskScore | INT | Risk score | | riskLevel | STRING | Risk level: LOWER,LOW,MEDIUM,HIGH,HIGHER,EXTREME | | dob | STRING | birthday yyyy-MM-dd | | pep | INT | Is pep | | sanctionHit | INT | Is sanction hit | | nationality | STRING | | | residenceCountry | STRING | | ### KycLevelInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kyclevelinfovo "KycLevelInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | currentLevel | KycLevelItemVo | Current level status | | passedLevel | KycLevelItemVo | Current passing KYC status level info | | kycPass | Boolean | If the current user pass the kyc | ### KycWckInfoVo[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycwckinfovo "KycWckInfoVo的直接链接") | Name | Type | Description | | --- | --- | --- | | bizNo | STRING | Biz no | | status | STRING | Status: PENDING,AUDIT\_FIRST,AUTO\_REJECT,AUTO\_PASS,AUDIT\_REJECT,AUDIT\_PASS | | type | STRING | Type: INDIVIDUAL | | name | STRING | Check name | | birthDate | STRING | yyyy-MM-dd | | residenceCountry | STRING | | | rejectReason | STRING | | | completeTime | DATE | | Request Body Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#request-body-example "Request Body Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycType": "USER"} Response Example[​](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#response-example "Response Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": null, "messageDetail": null, "data": { "statusInfo": { "bizEntityKey": "BROKERKEY", "entityCustomerId": "45712345678999212345", "kycUserId": "4575836000526931200", "userType": "USER", "kycType": "USER", "businessType": null, "status": null, "expectTime": null, "expectTimeText": null, "kycStatus": "REJECT", "failReason": "This ID number has been used. Log in to your original account to complete the transaction.", "basicStatus": "PASS", "basicExpectTime": null, "basicExpectTimeText": null, "basicFailReason": "", "basicSubStatus": null, "documentStatus": null, "documentExpectTime": null, "documentExpectTimeText": null, "documentFailReason": null, "identityStatus": "REJECT", "identityExpectTime": null, "identityExpectTimeText": null, "identityFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "identityFailCode": null, "faceStatus": "REJECT", "faceExpectTime": null, "faceExpectTimeText": null, "faceFailReason": "This ID number has been used. Log in to your original account to complete the transaction.", "faceEmailStatus": null, "faceEmailMask": null, "wckStatus": "INITIAL", "wckExpectTime": null, "wckExpectTimeText": null, "wckFailReason": null, "firstName": null, "middleName": null, "lastName": null, "poaStatus": null, "poaExpectTime": null, "poaExpectTimeText": null, "poaFailReason": null, "eddStatus": null, "eddExpectTime": null, "eddExpectTimeText": null, "eddFailReason": null, "dbCreateTime": 1750699479373, "dbModifyTime": 1750699512711, "questionStatus": null, "questionFailReason": null, "completeTime": null, "basicCompleteTime": null, "documentCompleteTime": null, "identityCompleteTime": 1750699512647, "faceCompleteTime": 1750699512651, "wckCompleteTime": null, "poaCompleteTime": null, "eddCompleteTime": null, "questionCompleteTime": null, "kycSubType": null, "kycSubStatus": null, "credentialStatus": null, "credentialFailReason": null, "fiatPtStatus": null, "fiatPtFailReason": null, "memberStatus": null, "remediationStatus": null, "remediationExpectTime": null, "riskRateLevel": "MEDIUM", "riskRateScore": 31.00 }, "basicInfo": { "id": 4575836001114133760, "bizEntityKey": "BROKERKEY", "bizKey": "BROKERKEY", "kycUserId": "4575836000526931200", "basicType": "USER", "basicStatus": "PASS", "basicFailReason": null, "auditor": null, "auditorTime": null, "firstName": "BO", "middleName": "testMiddleName", "lastName": "LI", "residentialCountry": "AE", "dob": "1986-08-14", "postalCode": "123456", "city": "bbb", "address": "aaa", "emailAddress": null, "authFileKey": null, "authFilePath": null, "companyName": null, "companyRegistrationNumber": null, "companyIncorporationDate": null, "contactMobileCode": null, "contactMobile": null, "corporateEmail": null, "companyRegisteredCountry": null, "companyRegisteredPostalCode": null, "companyRegisteredCity": null, "companyRegisteredAddress": null, "companyOperatingCountry": null, "companyOperatingPostalCode": null, "companyOperatingCity": null, "companyOperatingAddress": null, "sourceOfFunds": null, "sourceOfWealth": null, "submitIp": "192.168.1.1", "submitClient": null, "submitSource": null, "submitDevice": null, "dbCreateTime": 1750699479396, "dbModifyTime": 1750699479396, "gender": null, "country": "AE", "idType": null, "idCardNumber": null, "regionState": null, "tin": null, "suburb": null, "issuer": null, "countryOfIssue": null, "npwp": null, "phoneNumber": null, "placeOfBirth": null, "panId": null, "requestTime": 1750699479396, "requestIp": "192.168.1.1", "website": null, "applyReason": null, "memberType": null, "ext": null, "entityUserId": null }, "identityInfo": { "bizEntityKey": "BROKERKEY", "bizKey": "BROKERKEY", "kycUserId": "4575836000526931200", "bizNo": "88ed88b9ec854503abfe905548211b56", "vendorsCode": "", "documentType": "ID_CARD", "selectCountry": "SG", "frontFileKey": "ae6dd72112ec41d9b74be3d965d499d8", "frontFilePath": "/SAAS/BROKERKEY/USER_UPLOAD/20250623/4575836000526931200_identity_front_172439955986.jpg", "frontFileUrl": "https://www.somepage.com", "backFileKey": "a0090a3067fc4dffaebed9d0fbecb341", "backFilePath": "/SAAS/BROKERKEY/USER_UPLOAD/20250623/4575836000526931200_identity_back_172439508427.jpeg", "backFileUrl": "https://www.somepage.com", "faceFileKey": "8c05214b836946e89fc8a10443d522d1", "faceFilePath": "/SAAS/BROKERKEY/USER_UPLOAD/20250623/4575836000526931200_identity_face_172439508685.jpeg", "faceFileUrl": "https://www.somepage.com", "faceDetectFileKey": null, "faceDetectFilePath": null, "faceDetectFileUrl": null, "applyStatus": "REJECT", "failReason": "This ID number has been used. Log in to your original account to complete the transaction.", "vendorsStatus": null, "vendorsReason": null, "auditor": null, "auditorTime": null, "completeTime": null, "submitIp": "192.168.1.1", "submitClient": null, "submitSource": null, "submitDevice": null, "firstName": "testFirstName", "middleName": "testMiddleNameboli", "lastName": "testLastNameLItest01", "dob": "1986-08-14", "idType": "ID_CARD", "idSubType": "INTERNATIONAL_PASSPORT", "idCountry": "AE", "nationalityCountry": "AE", "idNumber": "testSaasBrokers0144288491", "idExpiry": "2030-08-15", "idUsState": "testIdUsState", "personalNumber": "personalNumber6462313972", "gender": "M", "nationality": null, "issuingAuthority": "firstName", "issuingDate": "2000-08-16", "issuingPlace": "AE", "registrationNumber": "registrationNumber4039460415", "city": "testCity", "stateCode": "QWER", "postalCode": "123456", "address": "testAddressData", "remarks": "IMPORT", "language": null, "solarisReportPath": null, "solarisReportUrl": null, "idExpirySubStatus": null, "idGracePeriodRedoSubStatus": null, "sourceType": "IMPORT", "identityApplyExtraInfo": null, "ocrDocumentType": null }, "poaInfo": null, "eddInfo": null, "eddInfos": null, "eddTriggersAndInfos": null, "questionInfo": [], "riskScore": { "id": 4575836012002463489, "bizEntityKey": "BROKERKEY", "bizKey": "BROKERKEY", "kycUserId": "4575836000526931200", "riskScore": 31, "riskLevel": "MEDIUM", "dob": "1986-08-14", "pep": null, "sanctionHit": null, "documentHit": null, "nationality": "AE", "residenceCountry": "AE", "kycLevelName": "INTERMEDIATE", "operator": null, "remark": null, "fiatCurrency": null, "depositFiatDailyLimit": null, "depositFiatMonthlyLimit": null, "depositFiatYearlyLimit": null, "depositFiatLifeTimeLimit": null, "withdrawFiatDailyLimit": null, "withdrawFiatMonthlyLimit": null, "withdrawFiatYearlyLimit": null, "withdrawFiatLifeTimeLimit": null, "riskTemplate": "DEFAULT", "dbCreateTime": 1750699480048, "dbModifyTime": 1750699480048, "riskScoreDetail": null, "adminVo": null, "sourceType": "NORMAL", "sanctionHitEternal": null, "adverseMediaEternal": null, "dryRun": false }, "levelInfo": { "currentLevel": { "levelName": "INTERMEDIATE", "levelDesc": "INTERMEDIATE", "kycStatus": "REFUSED", "kycLevelSubStatus": null, "limit": { "fiatCurrency": "USD", "depositFiatDailyLimit": null, "withdrawFiatDailyLimit": 20000, "totalFiatDailyLimit": null, "depositFiatMonthlyLimit": null, "withdrawFiatMonthlyLimit": null, "totalFiatMonthlyLimit": null, "depositFiatYearlyLimit": null, "withdrawFiatYearlyLimit": null, "totalFiatYearlyLimit": null, "depositFiatLifeTimeLimit": null, "withdrawFiatLifeTimeLimit": null, "totalFiatLifeTimeLimit": null, "cryptoCurrency": "BTC", "depositCryptoDailyLimit": -1, "withdrawCryptoDailyLimit": 100, "totalCryptoDailyLimit": null } }, "completedLevel": null, "passedLevel": null, "definedKycPassLevel": { "levelName": "INTERMEDIATE", "levelDesc": "INTERMEDIATE", "kycStatus": "REFUSED", "kycLevelSubStatus": null, "limit": { "fiatCurrency": "USD", "depositFiatDailyLimit": null, "withdrawFiatDailyLimit": 20000, "totalFiatDailyLimit": null, "depositFiatMonthlyLimit": null, "withdrawFiatMonthlyLimit": null, "totalFiatMonthlyLimit": null, "depositFiatYearlyLimit": null, "withdrawFiatYearlyLimit": null, "totalFiatYearlyLimit": null, "depositFiatLifeTimeLimit": null, "withdrawFiatLifeTimeLimit": null, "totalFiatLifeTimeLimit": null, "cryptoCurrency": "BTC", "depositCryptoDailyLimit": -1, "withdrawCryptoDailyLimit": 100, "totalCryptoDailyLimit": null } }, "kycPass": false, "hasMultipleLevels": false, "passedLevels": [] }, "nonExisted": null, "wckInfo": null }, "success": true} * [API Description](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#api-description) * [HTTP Request](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#http-request) * [Request Header](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#request-header) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#request-parameters) * [Response Fields](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#response-fields) * [KycInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycinfovo) * [KycVerifyStatusInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycverifystatusinfovo) * [KycBasicInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycbasicinfovo) * [KycIdentityInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycidentityinfovo) * [UserRiskScoreVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#userriskscorevo) * [KycLevelInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kyclevelinfovo) * [KycWckInfoVo](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#kycwckinfovo) * [Request Body Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#request-body-example) * [Response Example](https://developers.binance.com/docs/zh-CN/binance_link/kyc-saas/kyc-querying/Query-Kyc-Status-By-EntityCustomerId#response-example) --- # Get Client Email Customized Id | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-Client-Email-Customized-Id#__docusaurus_skipToContent_fallback) 本页总览 查询用户email和定制化 Id (USER DATA)(仅支持brokerId拥有者) ============================================ HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-Client-Email-Customized-Id#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/apiReferral/customization` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-Client-Email-Customized-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | NO | | | email | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 和 email 不能同时发,返回 apiAgent 自定义的 customization 关系 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-Client-Email-Customized-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "customerId":"abc123", "email":"test12345@126.com" }, { "customerId":"abc345", "email":"testABCD@gmail.com" }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-Client-Email-Customized-Id#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-Client-Email-Customized-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Get-Client-Email-Customized-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Customize Id For Client (For Client) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Client#__docusaurus_skipToContent_fallback) 本页总览 用户为自己所在的api返佣推荐码定制 Id (USER DATA)(仅支持交易者使用) =========================================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Client#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/apiReferral/userCustomization` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Client#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | YES | | | apiAgentCode | STRING | YES | brokerId | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 对于每一个apiAgent必须唯一 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Client#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "customerId": "abc123"} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Client#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Client#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Client#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get User‘s Customize Id (PAPI) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#__docusaurus_skipToContent_fallback) 本页总览 * * * id: Get-User’s-Customize-Id-PAPI sidebar\_label: 查询用户定制 Id (USER DATA)(PAPI)[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#id-get-users-customize-id-papisidebar_label-%E6%9F%A5%E8%AF%A2%E7%94%A8%E6%88%B7%E5%AE%9A%E5%88%B6-id-user-datapapi "id: Get-User’s-Customize-Id-PAPI sidebar_label: 查询用户定制 Id (USER DATA)(PAPI)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询用户定制 Id (USER DATA)(PAPI) =========================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/papi/v1/apiReferral/userCustomization` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#%E6%9D%83%E9%87%8D "权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | brokerId | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- { “brokerId”: “ABCD1234”, "customerId": "abc123"} * [id: Get-User’s-Customize-Id-PAPI sidebar\_label: 查询用户定制 Id (USER DATA)(PAPI)](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#id-get-users-customize-id-papisidebar_label-%E6%9F%A5%E8%AF%A2%E7%94%A8%E6%88%B7%E5%AE%9A%E5%88%B6-id-user-datapapi) * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Get-User-Customize-Id-PAPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Customize Id For Client(For Partner) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Partner#__docusaurus_skipToContent_fallback) 本页总览 为用户定制 Id (USER DATA)(仅支持brokerId拥有者) ==================================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Partner#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v1/apiReferral/customization` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Partner#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | customerId | STRING | YES | | | email | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * customerId 必须唯一 * 针对相同email再次设置customerId即做更新 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Partner#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "customerId": "abc123", "email": "test12345@126.com"} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Partner#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Partner#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot/Customize-Id-For-Client-For-Partner#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Client If New User(PAPI) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#__docusaurus_skipToContent_fallback) 本页总览 查询是否属于新用户 (USER DATA)(PAPI) =========================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/papi/v1/apiReferral/ifNewUser` 权重[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#%E6%9D%83%E9%87%8D "权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ **100** 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | brokerId | STRING | YES | | | type | INT | NO | 1:USDT-margined Futures, 2: Coin-margined Futures ; Default:1:USDT-margined Futures | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "brokerId": "ABCD1234", "rebateWorking":false, "ifNewUser": true } * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#http%E8%AF%B7%E6%B1%82) * [权重](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/futures/Query-Client-If-New-User-PAPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Client If New User | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot#__docusaurus_skipToContent_fallback) 本页总览 查询是否属于新用户(USER DATA) ==================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/apiReferral/ifNewUser` 请求参数[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | apiAgentCode | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- { "apiAgentCode": "ABCD1234", "rebateWorking": false, //true or false,是否满足API返佣条件(不判断新老用户是否返佣) "ifNewUser": true, //对该推荐码是否为新客 true 新客,false 老客 "referrerId": 39472261} * [HTTP请求](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/binance_link/link-and-trade/spot#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Binance Pay API: Release Note V1.0.1 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/release-note-v1-0-1#__docusaurus_skipToContent_fallback) --- # Query Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#__docusaurus_skipToContent_fallback) 本页总览 Query order API used for merchant/partner to query order status EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#endpoint "EndPoint的直接链接") ------------------------------------------------------------------------------------------------------------ POST /binancepay/openapi/order/query Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **merchantTradeNo** | string | N | maximum length 32,letter or digit, no other symbol allowed, can not be empty if prepayId is empty | The order id, Unique identifier for the request | | **prepayId** | string | N | maximum length 19,letter or digit, no other symbol allowed, can not be empty if merchantTradeNo is empty | Binance unique order id | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#sample-request-body "Sample Request Body的直接链接") Query order result by merchantTradeNo: { "merchantTradeNo": "9825382937292", "prepayId": null} Query order result by prepayId: { "merchantTradeNo": null, "prepayId": "9825382937292"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#response-parameters "Response Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#result-code) | | **data** | QueryOrderResult | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#order-result) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#child-attribute "Child Attribute的直接链接") --------------------------------------------------------------------------------------------------------------------------------- ### QueryOrderResult[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#queryorderresult "QueryOrderResult的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **merchantId** | long | Y | \- | The merchant account id, issued when merchant been created at Binance. | | **prepayId** | string | Y | maximum length 19 | unique id generated by binance | | **transactionId** | string | N | maximum length 32 | issued once the payment is successful | | **merchantTradeNo** | string | Y | maximum length 32 | merchant trade number | | **tradeType** | string | Y | "WEB", "APP", "WAP", "MINI\_PROGRAM", "PAYMENT\_LINK", "OTHERS" | operate entrance | | **status** | string | Y | "INITIAL", "PENDING", "PAID", "CANCELED", "ERROR", "REFUNDING", "REFUNDED", "EXPIRED" | order status | | **currency** | string | Y | \- | order currency | | **totalFee** | decimal | Y | limitation refer to Create Order API order amount | order amount | | **productName** | string | N | maximum length 256 | product name | | **productDetail** | string | N | maximum length 256 | product detail | | **openUserId** | string | N | maximum length 19 | Consumer unique id | | **passThroughInfo** | string | N | maximum length 512 | pass through info, from the create order api | | **transactTime** | long | N | \- | UnixTimestamp in milliseconds when transaction happened | | **createTime** | long | Y | \- | UnixTimestamp in milliseconds when order was created | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "merchantId": 98729382672, "prepayId": "383729303729303", "transactionId": "23729202729220282", "merchantTradeNo": "9825382937292", "tradeType": "APP", "status": "PAID", "currency": "USDT", "totalFee": 10.88, "productName": "Ice Cream", "productDetail": "Greentea ice cream cone", "openUserId": "", "passThroughInfo": "", "transactTime": 1425744000123, "createTime": 1425744000000 }, "errorMessage": ""} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#result-code "Result Code的直接链接") --------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | | ORDER\_NOT\_FOUND | 400202 | Order not found. | | | INVALID\_ACCOUNT\_STATUS | 400203 | Not support for this account, please check account status. | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#child-attribute) * [QueryOrderResult](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#queryorderresult) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-order-query#result-code) --- # Binance Pay API: Changelog | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay#__docusaurus_skipToContent_fallback) 本页总览 Last Updated: 2025-06 2025-06[​](https://developers.binance.com/docs/zh-CN/binance-pay#2025-06 "2025-06的直接链接") ----------------------------------------------------------------------------------------- Release of new Webhook Notification: Merchant QR Code 2025-02[​](https://developers.binance.com/docs/zh-CN/binance-pay#2025-02 "2025-02的直接链接") ----------------------------------------------------------------------------------------- Modification to existing endpoints: * A new parameter subMerchantId in Payout API for CP payout order management. * POST /binancepay/openapi/payout/transfer * EUR is no longer supported as order currency, MICA user may use USDC * POST /binancepay/openapi/v3/order * POST /binancepay/openapi/direct-debit/contract 2024-08[​](https://developers.binance.com/docs/zh-CN/binance-pay#2024-08 "2024-08的直接链接") ----------------------------------------------------------------------------------------- Modification to existing endpoints: * Parameter subMerchantId is now mandatory for CP * POST /binancepay/openapi/v3/order * Release of new API to modify submerchant information * POST /binancepay/openapi/submerchant/modify 2024-05[​](https://developers.binance.com/docs/zh-CN/binance-pay#2024-05 "2024-05的直接链接") ----------------------------------------------------------------------------------------- EUR is supported as order currency for MICA user per MICA rules * POST /binancepay/openapi/v3/order * POST /binancepay/openapi/direct-debit/contract 2023-06[​](https://developers.binance.com/docs/zh-CN/binance-pay#2023-06 "2023-06的直接链接") ----------------------------------------------------------------------------------------- Release of new Create Order API version, v3 endpoint * New mandatory parameter description * POST /binancepay/openapi/v3/order 2023-01[​](https://developers.binance.com/docs/zh-CN/binance-pay#2023-01 "2023-01的直接链接") ----------------------------------------------------------------------------------------- Release of new Direct debit API for recurring and pre-authorize payment * POST /binancepay/openapi/direct-debit/contract * POST /binancepay/openapi/direct-debit/contract/query * POST /binancepay/openapi/direct-debit/contract/termination * POST /binancepay/openapi/pay/notify * POST /binancepay/openapi/pay/apply 2022-08[​](https://developers.binance.com/docs/zh-CN/binance-pay#2022-08 "2022-08的直接链接") ----------------------------------------------------------------------------------------- Modification to existing endpoints: * New option parameter passThroughInfo can be used in the Create Order API for merchant to pass any other information of the order * POST /binancepay/openapi/v2/order * New optional parameter webhookUrl can be used in Create Order API for merchant to receive webhook notification in another endpoint * POST /binancepay/openapi/v2/order * [2025-06](https://developers.binance.com/docs/zh-CN/binance-pay#2025-06) * [2025-02](https://developers.binance.com/docs/zh-CN/binance-pay#2025-02) * [2024-08](https://developers.binance.com/docs/zh-CN/binance-pay#2024-08) * [2024-05](https://developers.binance.com/docs/zh-CN/binance-pay#2024-05) * [2023-06](https://developers.binance.com/docs/zh-CN/binance-pay#2023-06) * [2023-01](https://developers.binance.com/docs/zh-CN/binance-pay#2023-01) * [2022-08](https://developers.binance.com/docs/zh-CN/binance-pay#2022-08) --- # Quick Start | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#__docusaurus_skipToContent_fallback) 本页总览 Getting Started =============== ### Basics[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#basics "Basics的直接链接") * [Common API request headers](https://developers.binance.com/docs/zh-CN/binance_connect/basics/1.common-request-headers) * [Common API response](https://developers.binance.com/docs/zh-CN/binance_connect/basics/2.common-response) * [API request signing](https://developers.binance.com/docs/zh-CN/binance_connect/basics/3.request-signing) * [Environments and API base URLs](https://developers.binance.com/docs/zh-CN/binance_connect/basics/4.base-urls) * [Error code](https://developers.binance.com/docs/zh-CN/binance_connect/basics/5.error-code) * [Apply partner developer account](https://developers.binance.com/docs/zh-CN/binance_connect/basics/6.apply-developer-account) * [Order status](https://developers.binance.com/docs/zh-CN/binance_connect/basics/7.order-status) * [Landing page and redirection](https://developers.binance.com/docs/zh-CN/binance_connect/basics/8.landing-page-and-redirection) * [Customization](https://developers.binance.com/docs/zh-CN/binance_connect/basics/9.customization) ### On-ramp (Buy) APIs[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#on-ramp-buy-apis "On-ramp (Buy) APIs的直接链接") * [Typical flow](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/0.typical-flow) * [Get supported trading pairs](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/1.get-trading-pairs) * [Get supported crypto networks](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/2.get-crypto-networks) * [Get payment method list](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/3.get-payment-method-list) * [Get estimated quote](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/4.get-estimated-quote) * [Pre order](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/5.pre-order) * [Query order details](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/6.query-order-details) * [Get payment method list v2](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/7.get-payment-method-list-v2) ### Convert[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#convert "Convert的直接链接") * [Convert feature](https://developers.binance.com/docs/zh-CN/binance_connect/convert/1.convert) ### Buy any token (Swap)[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#buy-any-token-swap "Buy any token (Swap)的直接链接") * [Buy any token (Swap)](https://developers.binance.com/docs/zh-CN/binance_connect/buy-any-token/1.buy-any-token) * [Get payment method list](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/3.get-payment-method-list) * [Get estimated quote](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/4.get-estimated-quote) * [Pre order](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/5.pre-order) * [Query order details](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/6.query-order-details) ### Send primary mode[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#send-primary-mode "Send primary mode的直接链接") * [Send primary mode](https://developers.binance.com/docs/zh-CN/binance_connect/send-primary-mode/send-primary-mode) ### Off-ramp (Sell) APIs[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#off-ramp-sell-apis "Off-ramp (Sell) APIs的直接链接") * [Get supported trading pairs](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis/1.get-trading-pairs) * [Get supported crypto networks](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/2.get-crypto-networks) * [Get payment method list](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis/2.get-payment-method-list) * [Get estimated quote](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis/3.get-estimated-quote) * [Pre order](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis/4.pre-order) * [Query order details](https://developers.binance.com/docs/zh-CN/binance_connect/on-ramp-buy-apis/6.query-order-details) * [Get payment method list v2](https://developers.binance.com/docs/zh-CN/binance_connect/off-ramp-sell-apis/5.get-payment-method-list-v2) ### **Webhook**[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#webhook "webhook的直接链接") * [Webhook](https://developers.binance.com/docs/zh-CN/binance_connect/webhook/webhook) ### Sandbox[​](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#sandbox "Sandbox的直接链接") * [Overview](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox/0.overview) * [Place order](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox/1.place-order) * [Place convert feature order](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox/2.place-convert-feature-order) * [Place buy any token order](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox/3.place-buy-any-token-order) * [Order status transition](https://developers.binance.com/docs/zh-CN/binance_connect/sandbox/4.order-status-transition) * [Basics](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#basics) * [On-ramp (Buy) APIs](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#on-ramp-buy-apis) * [Convert](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#convert) * [Buy any token (Swap)](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#buy-any-token-swap) * [Send primary mode](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#send-primary-mode) * [Off-ramp (Sell) APIs](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#off-ramp-sell-apis) * [**Webhook**](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#webhook) * [Sandbox](https://developers.binance.com/docs/zh-CN/binance_connect/quick-start#sandbox) --- # API Specification Common Rules | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#__docusaurus_skipToContent_fallback) 本页总览 For Security Purpose, Binance and IPs will both ensure https-based call back endpoints. And signature checks for APIs. Protocol Rules[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#protocol-rules "Protocol Rules的直接链接") ------------------------------------------------------------------------------------------------------------------------- The following specifies the rules for calling the API when accessing Binance payment. | **Rule** | **Description** | | --- | --- | | **Transfer Mode** | Use HTTPS for secure transactions. | | **Submit Mode** | POST/GET, depends on the API. | | **Data Format (content-type)** | Data submitted and response are both in **application/json** format. | | **Char Encoding** | Use UTF-8 character encoding. | | **Signature Algorithm** | HMAC-SHA512. | | **Signature Requirement** | Signature-checking is required for requesting and receiving data. | | **Logic Judgment** | Determine protocol field, service field and transaction status. | Request Header[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#request-header "Request Header的直接链接") ------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **content-type** | string | Y | application/json | content type | | **BinancePay-Timestamp** | long | Y | Binance pay only process request within 1s | UnixTimestamp in milliseconds that the requests send, guarantee the machine time is sync with the network | | **BinancePay-Nonce** | string | Y | must be 32 digits | A random string with 32 bytes, e.g. random ascii decimal within a-z and A-Z and loop 32 times to form a random string | | **BinancePay-Certificate-SN** | string | Y | \- | API identity key issued by Binance payment system | | **BinancePay-Signature** | string | Y | this should use SHA512, and be in upper case | signature, [signature generation](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#signature) | Signature[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#signature "Signature的直接链接") ---------------------------------------------------------------------------------------------------------- ### Build the content[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#build-the-content "Build the content的直接链接") String payload = timestamp + "\n" + nonce + "\n" + body + "\n"; ### Sign the content[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#sign-the-content "Sign the content的直接链接") String signature = hex(hmac("sha512", payload, secretKey)).toUpperCase() * * * **NOTE** * ‘\\n’ is LF, ASCII value is '0x0A' * Parameter names are case-sensitive; * When checking returned data or a push notification signature, the transferred sign parameter is excluded in this signature as it is compared with the created signature. * When post the Json body, carefully check the quote, **'** is not same as **"** * * * Hosts[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#hosts "Hosts的直接链接") ---------------------------------------------------------------------------------------------- https://bpay.binanceapi.com Common Business Errors[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#common-business-errors "Common Business Errors的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOW\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported | Use POST http method | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported | Add header Content-Type: application/json | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object | Check the request body format | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | | INVALID\_MERCHANT\_TRADE\_NO | 400201 | merchantTradeNo is invalid or duplicated | | | ORDER\_NOT\_FOUND | 400202 | Order not found. | | | INVALID\_ACCOUNT\_STATUS | 400203 | Not support for this account, please check account status. | | * [Protocol Rules](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#protocol-rules) * [Request Header](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#request-header) * [Signature](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#signature) * [Build the content](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#build-the-content) * [Sign the content](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#sign-the-content) * [Hosts](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#hosts) * [Common Business Errors](https://developers.binance.com/docs/zh-CN/binance-pay/api-common#common-business-errors) --- # Query Collection Result | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#__docusaurus_skipToContent_fallback) 本页总览 Query collection result API used for 3rd party application to collection order status EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#endpoint "EndPoint的直接链接") ------------------------------------------------------------------------------------------------------------------------ POST https://bpay.binanceapi.com/binancepay/openapi/collection/query Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ | Attributes | Type | Required | Description | | --- | --- | --- | --- | | orderId | String | NO | collection order id in binance pay system, either trade no or collection order id should be provided | | clientTradeNo | String | NO | maximum length 32, trade no in client system, either trade no or collection order id should be provided | Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#response "Response的直接链接") ------------------------------------------------------------------------------------------------------------------------ | Name | Type | Required | Description | | --- | --- | --- | --- | | status | String | YES | status of the API request, "SUCCESS" or "FAIL" | | code | String | YES | request result code, refer to [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#result-code) | | data | QueryCollectionOrderResp | YES | response body, refer to [QueryCollectionOrderResp](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#querycollectionorderresp) | | errorMessage | string | YES | | ### QueryCollectionOrderResp:[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#querycollectionorderresp "QueryCollectionOrderResp:的直接链接") | Attributes | Type | Required | Description | | --- | --- | --- | --- | | orderId | String | YES | | | clientTradeNo | String | YES | maximum length 32 | | status | String | YES | "INITIAL", "PENDING", "PAID" | Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#result-code "Result Code的直接链接") --------------------------------------------------------------------------------------------------------------------------------- Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#result-code-1 "Result Code的直接链接") ----------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | PAYMENT\_C2C\_COLLECTION\_ORDER\_NOT\_FOUND | 400207 | collection order not found | Check request property value | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#request-parameters) * [Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#response) * [QueryCollectionOrderResp:](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#querycollectionorderresp) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#result-code) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-collection-result-query#result-code-1) --- # Binance Pay API: Changelog | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#__docusaurus_skipToContent_fallback) 本页总览 Last Updated: 2025-06 2025-06[​](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2025-06 "2025-06的直接链接") --------------------------------------------------------------------------------------------------- Release of new Webhook Notification: Merchant QR Code 2025-02[​](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2025-02 "2025-02的直接链接") --------------------------------------------------------------------------------------------------- Modification to existing endpoints: * A new parameter subMerchantId in Payout API for CP payout order management. * POST /binancepay/openapi/payout/transfer * EUR is no longer supported as order currency, MICA user may use USDC * POST /binancepay/openapi/v3/order * POST /binancepay/openapi/direct-debit/contract 2024-08[​](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2024-08 "2024-08的直接链接") --------------------------------------------------------------------------------------------------- Modification to existing endpoints: * Parameter subMerchantId is now mandatory for CP * POST /binancepay/openapi/v3/order * Release of new API to modify submerchant information * POST /binancepay/openapi/submerchant/modify 2024-05[​](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2024-05 "2024-05的直接链接") --------------------------------------------------------------------------------------------------- EUR is supported as order currency for MICA user per MICA rules * POST /binancepay/openapi/v3/order * POST /binancepay/openapi/direct-debit/contract 2023-06[​](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2023-06 "2023-06的直接链接") --------------------------------------------------------------------------------------------------- Release of new Create Order API version, v3 endpoint * New mandatory parameter description * POST /binancepay/openapi/v3/order 2023-01[​](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2023-01 "2023-01的直接链接") --------------------------------------------------------------------------------------------------- Release of new Direct debit API for recurring and pre-authorize payment * POST /binancepay/openapi/direct-debit/contract * POST /binancepay/openapi/direct-debit/contract/query * POST /binancepay/openapi/direct-debit/contract/termination * POST /binancepay/openapi/pay/notify * POST /binancepay/openapi/pay/apply 2022-08[​](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2022-08 "2022-08的直接链接") --------------------------------------------------------------------------------------------------- Modification to existing endpoints: * New option parameter passThroughInfo can be used in the Create Order API for merchant to pass any other information of the order * POST /binancepay/openapi/v2/order * New optional parameter webhookUrl can be used in Create Order API for merchant to receive webhook notification in another endpoint * POST /binancepay/openapi/v2/order * [2025-06](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2025-06) * [2025-02](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2025-02) * [2024-08](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2024-08) * [2024-05](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2024-05) * [2023-06](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2023-06) * [2023-01](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2023-01) * [2022-08](https://developers.binance.com/docs/zh-CN/binance-pay/changelog#2022-08) --- # Binance Web3 Wallet | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-w3w#__docusaurus_skipToContent_fallback) 本页总览 Introduction[​](https://developers.binance.com/docs/zh-CN/binance-w3w#introduction "Introduction的直接链接") -------------------------------------------------------------------------------------------------------- Welcome to the Binance Web3 Wallet developer documentation. This guide helps third-party Decentralized Applications (DApps) integrate with the Binance Web3 Wallet using industry-standard protocols — no proprietary SDK required. Binance Web3 Wallet supports standard connection methods including **WalletConnect v2** and **EIP-1193 injected provider**. If your DApp already supports WalletConnect or injected wallets, it works with Binance Web3 Wallet out of the box. The Binance Web3 Wallet is built on the latest multi-party computation (MPC) cryptographic standard, providing unmatched security. With this technique, private keys remain secure and confidential, as each party only has access to its own key fragment. In addition to exceptional security, the Binance Web3 Wallet offers a comprehensive suite of advanced features, including biometric authentication, WalletConnect v2 support, and SoulBound Tokens (SBT). Features[​](https://developers.binance.com/docs/zh-CN/binance-w3w#features "Features的直接链接") -------------------------------------------------------------------------------------------- * **WalletConnect v2 compatible** — Binance Web3 Wallet is registered on WalletConnect Cloud. Any DApp that integrates WalletConnect v2 will automatically show Binance Wallet in the wallet list. * **Standard injected provider** — Inside the Binance App's DApp browser, `window.binancew3w.ethereum` is available as an EIP-1193 compatible provider. * **Multi-chain support** — EVM, Bitcoin, Solana, Sui, Cosmos, Aptos, TON, Tron, and more. * **Secure and easy integration** — Support for standard functions such as connecting, signing messages, and sending transactions. * **Continuously evolving capabilities** — Unique features like fund transfers between the user's Binance account and Web3 wallet. Support & Resources[​](https://developers.binance.com/docs/zh-CN/binance-w3w#support--resources "Support & Resources的直接链接") ---------------------------------------------------------------------------------------------------------------------------- If you encounter any issues or have any questions, please reach out to our support team for assistance. Support appeal: [https://forms.gle/yWGZHfqmhZfT1E5XA](https://forms.gle/yWGZHfqmhZfT1E5XA) Provide feedback on this document: [https://forms.gle/zpBnQWCqoFMmby698](https://forms.gle/zpBnQWCqoFMmby698) * [Introduction](https://developers.binance.com/docs/zh-CN/binance-w3w#introduction) * [Features](https://developers.binance.com/docs/zh-CN/binance-w3w#features) * [Support & Resources](https://developers.binance.com/docs/zh-CN/binance-w3w#support--resources) --- # Merchant API References | Binance Pay | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/introduction#__docusaurus_skipToContent_fallback) 本页总览 What is the Binance Pay ======================= Binance Pay is a contactless, borderless and secure cryptocurrency payment technology designed by Binance. Binance Pay allows Binance customer to pay and get paid in crypto from your friends and family worldwide. Scenarios ========= Merchant Acquiring (C2B) - Payment by QR code[​](https://developers.binance.com/docs/zh-CN/binance-pay/introduction#merchant-acquiring-c2b---payment-by-qr-code "Merchant Acquiring (C2B) - Payment by QR code的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In this scenario, users are able to make payments by scanning QR Codes provided by Binance and shown by merchants. 1. Merchants cooperate with Binance to get different QR Codes for different products. Merchants display QR Codes for users to scan. 2. Users open Binance APP and scan QR Codes. 3. Users confirm payments by entering passcode or by clicking “confirm” button 4. Binance notify Merchants and users the status of payments. ![img](https://developers.binance.com/docs/zh-CN/assets/images/BinancePay-Pay-QRCodeV2-c36f5c72e5745d2754be772ee7390aec.png) Transfer or Send Cryptos (C2C)[​](https://developers.binance.com/docs/zh-CN/binance-pay/introduction#transfer-or-send-cryptos-c2c "Transfer or Send Cryptos (C2C)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In this scenario, users are able to request crypto from others which called "Collection" in 3rd party application. 1. Binance user grants a 3rd party application the permission to initiate transfer with his/her Binance Pay 2. Binance user makes collection request from others in 3rd party application. 3. Users(Payer) open Binance APP and confirm the collection. 4. Binance notifies 3rd party application the status of the collection. ![img](https://developers.binance.com/docs/zh-CN/assets/images/BinancePay-Collection-Flow-0c949f622883c7b5afd6392d2908be32.png) > * 3rd party application uses oauth authentication to initiate the collection request, please contact Binance Merchant Operation ([https://merchant.binance.com/en/help](https://merchant.binance.com/en/help) > ) to set up proper permissions of oauth client and refer to [Binance OAuth2 Integration](https://developers.binance.com/docs/zh-CN/docs/login/web-integration) > for oauth integration. > * Please refer to [Webhook Common Rules](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common) > for authentication of collection result notification. > * In case 3rd party application needs to query the collection result, please contact Binance Merchant Operation ([https://merchant.binance.com/en/help](https://merchant.binance.com/en/help) > ) to set up authentication credential and refer to [API Common Rules](https://developers.binance.com/docs/zh-CN/binance-pay/api-common) > for usage of API identity key and secret key. * [Merchant Acquiring (C2B) - Payment by QR code](https://developers.binance.com/docs/zh-CN/binance-pay/introduction#merchant-acquiring-c2b---payment-by-qr-code) * [Transfer or Send Cryptos (C2C)](https://developers.binance.com/docs/zh-CN/binance-pay/introduction#transfer-or-send-cryptos-c2c) --- # Collection Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/collection-notification#__docusaurus_skipToContent_fallback) 本页总览 Once the collection has been paid, Binance Pay will send notification through the endpoint url provided when creating collection. Request Parameters ================== | Attributes | Type | Required | Description | | --- | --- | --- | --- | | orderId | Long | YES | | | clientTradeNo | String | YES | | | status | String | YES | "PAID" | Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/collection-notification#response-parameters "Response Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **returnCode** | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry | | **returnMessage** | string | N | \- | return message | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/collection-notification#sample-response "Sample Response的直接链接") {"returnCode":"SUCCESS","returnMessage":null} * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/collection-notification#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/collection-notification#sample-response) --- # Webhook Common Rules | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#__docusaurus_skipToContent_fallback) 本页总览 For Security Purpose, Binance will add signature for webhook notification. Partner needs to verify the signature using the public key issued from Binance Pay. Protocol Rules[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#protocol-rules "Protocol Rules的直接链接") ----------------------------------------------------------------------------------------------------------------------------- The following specifies the rules for calling the Webhook Notification from Binance payment. | **Rule** | **Description** | | --- | --- | | **Transfer Mode** | Use HTTPS for secure transactions. | | **Submit Mode** | POST/GET, depends on the API. | | **Data Format** | Data submitted and response are both in application/json format. | | **Char Encoding** | Use UTF-8 character encoding. | | **Signature Algorithm** | RSA, asymmetric cryptographic algorithm | | **Signature Requirement** | Signature-checking is required for requesting and receiving data. | | **Logic Judgment** | Determine protocol field, service field and transaction status. | Request Header[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#request-header "Request Header的直接链接") ----------------------------------------------------------------------------------------------------------------------------- Binance Pay Webhook notification will contain the following in the header, which is used to verify the notification authenticity. | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **BinancePay-Certificate-SN** | long | Y | \- | MD5 hash value of public key | | **BinancePay-Nonce** | string | Y | must be 32 digits | A random string with 32 bytes, e.g. random ascii decimal within a-z and A-Z and loop 32 times to form a random string | | **BinancePay-Timestamp** | string | Y | \- | UnixTimestamp in milliseconds | | **BinancePay-Signature** | string | Y | \- | signature, generated by Binance Pay | Verify the Signature[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#verify-the-signature "Verify the Signature的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- ### Build the payload[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#build-the-payload "Build the payload的直接链接") Java String payload = timestamp + "\n" + nonce + "\n" + body + "\n"; PHP $payload = $headers['Binancepay-Timestamp'] . "\n" . $headers['Binancepay-Nonce'] . "\n" . $entityBody . "\n"; Note: * ‘\\n’ is LF, ASCII value is '0x0A' ### Decode the Signature with Base64[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#decode-the-signature-with-base64 "Decode the Signature with Base64的直接链接") Java byte[] decodedSignature = Base64.getDecoder().decode(signature); PHP $decodedSignature = base64_decode ( $headers['Binancepay-Signature'] ); ### Verify the content with public key[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#verify-the-content-with-public-key "Verify the content with public key的直接链接") Public key to verify the content can be queried from [Query Certificate API](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-query-certificate) - "certPublic" Note: * Hash algorithm should use SHA256 Sample Java code is here, together with org.bouncycastle toolkit. // input: pubKeyStr, decodedSignature, payload PEMParser pubParser = new PEMParser(new StringReader(pubKeyStr)) SubjectPublicKeyInfo pubKeyObj = (SubjectPublicKeyInfo) pubParser.readObject(); AsymmetricKeyParameter pubKey = PublicKeyFactory.createKey(pubKeyObj); byte[] payloadBytes = payload.getBytes(StandardCharsets.UTF_8); RSADigestSigner verifier = new RSADigestSigner(new SHA256Digest()); verifier.init(false, pubKey); verifier.update(payloadBytes, 0, payloadBytes.length); return verifier.verifySignature(decodedSignature); PHP openssl_verify($payload, $decodedSignature, $publicKey, OPENSSL_ALGO_SHA256 ); * [Protocol Rules](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#protocol-rules) * [Request Header](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#request-header) * [Verify the Signature](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#verify-the-signature) * [Build the payload](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#build-the-payload) * [Decode the Signature with Base64](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#decode-the-signature-with-base64) * [Verify the content with public key](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-common#verify-the-content-with-public-key) --- # FAQ | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/faq#__docusaurus_skipToContent_fallback) 本页总览 Frequently Asked Questions 403 ERROR.[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#403-error "403 ERROR.的直接链接") ----------------------------------------------------------------------------------------------------- Exception Details: The request could not be satisfied.Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. Solution: Please carefully check your request path is following document, for example: create order: https://bpay.binanceapi.com/binancepay/openapi/v3/order Error code "100001001".[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-100001001 "Error code "100001001".的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ Exception Details: {"status":"ERROR","type":"SYS","code":"100001001","errorData":"System abnormality"} Solution: * Please check if you used GET, **POST** method should be used. * Please check if you didn't put **content-type: application/json** in request header * Please check if you didn't post body in request Error code "400002"[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400002 "Error code "400002"的直接链接") ------------------------------------------------------------------------------------------------------------------------------- Exception Details: {"code":"400002","msg":"Signature for this request is not valid."} ### Solution A[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-a "Solution A的直接链接") Please check if your sign logic is incorrect. You can test with below parameters: Timestamp: 1611232922428 Nonce: 5RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA Notification body: {"merchantId":"98765987","subMerchantId":"98765987","merchantTradeNo":"9825382937292","totalFee":25.17,"productDetail":"Greentea ice cream cone","currency":"USDT","returnUrl":"","tradeType":"APP","productType":"Food","productName":"Ice Cream"} The generated payload must be (there MUST be one new line at the end): 16112329224285RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA{"merchantId":"98765987","subMerchantId":"98765987","merchantTradeNo":"9825382937292","totalFee":25.17,"productDetail":"Greentea ice cream cone","currency":"USDT","returnUrl":"","tradeType":"APP","productType":"Food","productName":"Ice Cream"} API Secret Key: uahr4nhailyq55yubuhuncnprfac73bcbz2qfafsevic1jruwunioxtoaozy122f Signature Should be: 253B9241C7331C0F02A0F5417BDDD4CD88124D3E188C0BA0E3EF121D36844B7F4D1A69AD8A1C3C7FF34901115E35A2530B672CF7430902E9862D69867689FD9F ### Solution B[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-b "Solution B的直接链接") Please check if your json request body used **'**, should use **"** ### Solution C[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-c "Solution C的直接链接") Please check if your code changed the request json body after signing. Some may reformat the json. ### Solution D[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-d "Solution D的直接链接") Please check if you made the signature to upper case ### Solution E[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-e "Solution E的直接链接") Please check the API Secret used. Ensure the API secret is generated from the merchant dashboard and saved immediately. A hashed API will be displayed after refresh, the hashed secret cannot be used. Error code "400003"[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400003 "Error code "400003"的直接链接") ------------------------------------------------------------------------------------------------------------------------------- Exception Details: {"code":"400003","msg":"Timestamp for this request is outside of the recvWindow."} Solution: * Please check the request header field 'BinancePay-Timestamp', it should be UnixTimestamp in milliseconds, not in seconds. * Please check if the request timestamp was within 1s to Binance Server. Error code "400606"[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400606 "Error code "400606"的直接链接") ------------------------------------------------------------------------------------------------------------------------------- Exception Details: {"code":"400606","errorMessage": "Account has no accessibility to this function"."} 400606 error typically occurs when there’s an issue with your merchant account or API keys used. Solution: * Check the API key and secret used are generated from the merchant dashboard and are saved immediately. As hashed keys will be displayed shortly, these hashed keys cannot be used. * The necessary access for the API keys has been enabled, such as Process Payment. * Check if there’s any outstanding action required from your end to activate your merchant account. Error code “400004”[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400004 "Error code “400004”的直接链接") ------------------------------------------------------------------------------------------------------------------------------- Exception Details: {"code":"400004" "errorMessage": "Invalid API-key, IP, or permissions for action, request ip: 44.xx.xx"} 400004 error typically occurs when there’s an issue with the API keys used or on your whitelisted IP address. Solution: * Check the API key and secret used is generated from the merchant dashboard and saved immediately. As hashed keys will be displayed shortly, these hashed keys cannot be used. * Please check if there’s any IP input in the "IP Access Restrictions" field on the merchant dashboard. Ensure that API call is from the IP input. Webhook[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#webhook "Webhook的直接链接") --------------------------------------------------------------------------------------------- ### Unable to verify signature[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#unable-to-verify-signature "Unable to verify signature的直接链接") Failed to verify the signature in webhook notification #### Solution A[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-a-1 "Solution A的直接链接") Please check if your sign logic is incorrect. Test your code logic with these parameters, if it's not successful, then you need to double check your code logic. ### Order notification showing different BizId[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#order-notification-showing-different-bizid "Order notification showing different BizId的直接链接") Timestamp: 1611232922428 Nonce: 5RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA Notification body: {"bizType":"PAY","data":"{\"merchantTradeNo\":\"9825382937292\",\"totalFee\":0.88000000,\"transactTime\":1619508939664,\"currency\":\"EUR\",\"commission\":0,\"openUserId\":\"1211HS10K81f4273ac031\",\"productType\":\"Food\",\"productName\":\"Ice Cream\",\"tradeType\":\"WEB\",\"transactionId\":\"M_R_282737362839373\"}","bizId":29383937493038367292,"bizStatus":"PAY_SUCCESS"} The generated payload must be (there MUST be one new line at the end): 16112329224285RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA{"bizType":"PAY","data":"{\"merchantTradeNo\":\"9825382937292\",\"totalFee\":0.88000000,\"transactTime\":1619508939664,\"currency\":\"EUR\",\"commission\":0,\"openUserId\":\"1211HS10K81f4273ac031\",\"productType\":\"Food\",\"productName\":\"Ice Cream\",\"tradeType\":\"WEB\",\"transactionId\":\"M_R_282737362839373\"}","bizId":29383937493038367292,"bizStatus":"PAY_SUCCESS"} Public key: -----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVAMXVTMIuttHcP1kvSk9V39S7BqDbY+LC9JfwMzyoubo3fdsqBf4EmB1PfBUigcOL5YBqMKGEE6xmVw6SXCTH4JwXdqJ4IRiXf76YMt6PB0dMzu/qCmhaGFGkqT6vJM0hHyEbtS/P3FR9ZU+eaOvynLWbFvXTzIoctZM1IvDrCwIDAQAB-----END PUBLIC KEY----- Verification must be passed against this original signature in header: VtniwOFAi4oBKFnvHhY6UZ+wPARf7+yWVbE61Hc7JVdRgqKJ40Yk9k5Gb2Y0S0VLUYOOOhUNUsD7R8GDEr6WH84sAEf8bXa1xYMiyjgeGleTg1MxRJCtrHcxMeMCEXPWmKTeLhn6O+cdvDGq4ZpcTTiQnEvk5xHPcxFrBT637zg= ### Solution B[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-b-1 "Solution B的直接链接") If above testing is working fine, please check if you formatted the notification body and used the formatted body for signature check Pay Order Webhook notification showing different BizIds.[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#pay-order-webhook-notification-showing-different-bizids "Pay Order Webhook notification showing different BizIds.的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a common error if you are using nodejs. What we sent over are actually the same BizIds, however there is a problem with nodejs parsing and processing large numbers, hence resulting in this error. ### Solution A[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-a-2 "Solution A的直接链接") Treating the whole body as string instead. ### Solution B[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-b-2 "Solution B的直接链接") Please turn off any body parser middleware if you are using it. ### Solution C[​](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-c-1 "Solution C的直接链接") Turn off any body parser middleware and treat the whole body as string. * [403 ERROR.](https://developers.binance.com/docs/zh-CN/binance-pay/faq#403-error) * [Error code "100001001".](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-100001001) * [Error code "400002"](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400002) * [Solution A](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-a) * [Solution B](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-b) * [Solution C](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-c) * [Solution D](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-d) * [Solution E](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-e) * [Error code "400003"](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400003) * [Error code "400606"](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400606) * [Error code “400004”](https://developers.binance.com/docs/zh-CN/binance-pay/faq#error-code-400004) * [Webhook](https://developers.binance.com/docs/zh-CN/binance-pay/faq#webhook) * [Unable to verify signature](https://developers.binance.com/docs/zh-CN/binance-pay/faq#unable-to-verify-signature) * [Order notification showing different BizId](https://developers.binance.com/docs/zh-CN/binance-pay/faq#order-notification-showing-different-bizid) * [Solution B](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-b-1) * [Pay Order Webhook notification showing different BizIds.](https://developers.binance.com/docs/zh-CN/binance-pay/faq#pay-order-webhook-notification-showing-different-bizids) * [Solution A](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-a-2) * [Solution B](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-b-2) * [Solution C](https://developers.binance.com/docs/zh-CN/binance-pay/faq#solution-c-1) --- # OAuth API : Create Collection | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#__docusaurus_skipToContent_fallback) 本页总览 Query c2c supported currencies. > * The host of OAuth API is [https://accounts.binance.com](https://accounts.binance.com/) > > * The request parameter of OAuth API is transferred as query string of requested url. > * No need to add signature and API identity key to request header of OAuth API. POST https://accounts.binance.com/oauth-api/v1/pay/c2c/collection/create Parameters(Query String of Requested URL):[​](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#parametersquery-string-of-requested-url "Parameters(Query String of Requested URL):的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | access\_token | String | YES | | | amount | BigDecimal | YES | collection order amount | | currency | String | YES | collection order currency | | description | String(50) | NO | collection order note | | clientTradeNo | String(32) | YES | trade no in client system, used as idempotent check | | clientUserId | String(32) | NO | user id in client system | | clientUserMobile | String(32) | NO | user mobile in client system | | notificationUrl | String | NO | url for collection order status notification | Response:[​](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#response "Response:的直接链接") -------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | String | YES | when success=false, the value is the result code | | message | String | NO | when success=false, the value is error description | | data | CreateCollectionOrderResp | NO | when success=true, the value is the create collection result, refer to [CreateCollectionOrderResp](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#createcollectionorderresp) | | success | boolean | YES | | ### CreateCollectionOrderResp:[​](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#createcollectionorderresp "CreateCollectionOrderResp:的直接链接") | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | orderId | String | YES | | | clientTradeNo | String | YES | | | type | String | YES | collection order type, it always equals to pain text 'COLLECTION' | { "code": "000000", "message": null, "data": { "orderId": "12345", "clientTradeNo": "re3432", "type" : "COLLECTION" }, "success": true} ### Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#result-code "Result Code的直接链接") | Name | Code | Reason | | --- | --- | --- | | PAYMENT\_INVALID\_CURRENCY | 403031 | Requested currency is not supported | | PAYMENT\_ILLEGAL\_AMOUNT | 403040 | The amount is illegal, too small | | PAYMENT\_C2C\_TRADE\_NO\_DUPLICATED | 403211 | clientTradeNo is duplicated | | PAYMENT\_RECEIVER\_EXCEED\_RECEIVE\_LIMIT | 403706 | Recipient has exceeded fund receiving limit. | * [Parameters(Query String of Requested URL):](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#parametersquery-string-of-requested-url) * [Response:](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#response) * [CreateCollectionOrderResp:](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#createcollectionorderresp) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-collection-create#result-code) --- # How To Enroll Mini Program KYB | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/dc-kyb#__docusaurus_skipToContent_fallback) 本页总览 How To Enroll Mini Program KYB ============================== Before you try to Binance mini program platform, you need to enroll the kyb. Two kyb are required for mini program. * Entity KYB * Mini prgoram KYB Steps[​](https://developers.binance.com/docs/zh-CN/dc-kyb#steps "Steps的直接链接") ------------------------------------------------------------------------------ ### 1\. Submit the Entity KYB[​](https://developers.binance.com/docs/zh-CN/dc-kyb#1-submit-the-entity-kyb "1. Submit the Entity KYB的直接链接") To submit the Entity KYB, your account must be an enterpise account. If you don't have an enterprise account, please get the enterprise account [here](https://accounts.binance.com/en/register-business?loginChannel=homepage&return_to=aHR0cHM6Ly93d3cuYmluYW5jZS5jb20vZW4vbXkvZGFzaGJvYXJk) Login with the enterpise account, go to [kyb list page](https://developers.binance.com/en/kyb/list) . Click the enroll button of Entity KYB. Fill the info and submit it. ![kyb list](https://bin.bnbstatic.com/static/images/developer-center/mp-kyb.png) ### 2\. Submit the Mini Program KYB[​](https://developers.binance.com/docs/zh-CN/dc-kyb#2-submit-the-mini-program-kyb "2. Submit the Mini Program KYB的直接链接") After submit the Entity KYB, you are now able to submit the Mini Program KYB. Go to [kyb list page](https://developers.binance.com/en/kyb/list) , Click the enroll button of Mini Program KYB. Fill the info and submit it. ### 3\. Add the members into Entity[​](https://developers.binance.com/docs/zh-CN/dc-kyb#3-add-the-members-into-entity "3. Add the members into Entity的直接链接") Go to entity member management page ![entity member management](https://bin.bnbstatic.com/static/images/developer-center/member-management-entry.png) Add your team users into this entity. There are two Roles of Entity currently: * Entity Admin * Entity User | | Entity Admin | Entity User | | --- | --- | --- | | KYB Management | √ | | | Entity Member Management | √ | | | View Console Panel | √ | √ | * [Steps](https://developers.binance.com/docs/zh-CN/dc-kyb#steps) * [1\. Submit the Entity KYB](https://developers.binance.com/docs/zh-CN/dc-kyb#1-submit-the-entity-kyb) * [2\. Submit the Mini Program KYB](https://developers.binance.com/docs/zh-CN/dc-kyb#2-submit-the-mini-program-kyb) * [3\. Add the members into Entity](https://developers.binance.com/docs/zh-CN/dc-kyb#3-add-the-members-into-entity) --- # Webhook query certificate | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-query-certificate#__docusaurus_skipToContent_fallback) 本页总览 For Security Purpose, Binance will add signature for webhook notification. Partner need to verify the signature using the public key issued from Binance Pay. Public key can be queried from this API EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-query-certificate#endpoint "EndPoint的直接链接") ---------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/certificates Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-query-certificate#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **certSerial** | string | Y | \- | public key hash value | | **certPublic** | string | Y | \- | public key | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-query-certificate#endpoint) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-query-certificate#response-parameters) --- # OAuth API : Query Supported Currency | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#__docusaurus_skipToContent_fallback) 本页总览 Query c2c supported currencies. > * The host of OAuth API is [https://accounts.binance.com](https://accounts.binance.com/) > > * The request parameter of OAuth API is transferred as query string of requested url. > * No need to add signature and API identity key to request header of OAuth API. GET https://accounts.binance.com/oauth-api/v1/pay/c2c/querySupportCurrency Parameters(Query String of Requested URL):[​](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#parametersquery-string-of-requested-url "Parameters(Query String of Requested URL):的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | access\_token | String | YES | | Response:[​](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#response "Response:的直接链接") --------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | code | String | YES | when success=false, the value is the result code | | message | String | NO | when success=false, the value is error description | | data | List | NO | when success=true, the value is the query currency result, refer to [QuerySupportCurrencyResp](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#querysupportcurrencyresp) | | success | boolean | YES | | ### QuerySupportCurrencyResp:[​](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#querysupportcurrencyresp "QuerySupportCurrencyResp:的直接链接") | Attributes | Type | Mandatory | Description | | --- | --- | --- | --- | | assetCode | String | YES | | | assetName | String | YES | | | logoUrl | String | YES | Icon of the asset, please contact us in order to display it properly | { "code": "000000", "message": null, "data": [ {"assetCode": "BTC","assetName": "Bitcoin","logoUrl": "https://bin.bnbstatic.com/image/admin_mgs_image_upload/20201110/87496d50-2408-43e1-ad4c-78b47b448a6a.png"}, {"assetCode": "BNB","assetName": "BNB","logoUrl": "https://bin.bnbstatic.com/image/admin_mgs_image_upload/20201110/550eda20-1b9a-4bc7-9a65-e4a329e8bb57.png"} ], "success": true} * [Parameters(Query String of Requested URL):](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#parametersquery-string-of-requested-url) * [Response:](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#response) * [QuerySupportCurrencyResp:](https://developers.binance.com/docs/zh-CN/binance-pay/oauth-api-c2c-currency-query#querysupportcurrencyresp) --- # Binance Pay API: Authentication | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/authentication#__docusaurus_skipToContent_fallback) 本页总览 The Binance Pay API uses API keys to authenticate requests. You can view and manage your API keys in the [Binance Merchant Admin Portal](https://merchant.binance.com/en) . Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail. Apply API identity key and API secret key[​](https://developers.binance.com/docs/zh-CN/binance-pay/authentication#apply-api-identity-key-and-api-secret-key "Apply API identity key and API secret key的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. Register Merchant Account at Binance 2. Login merchant account and create new API identity key/API secret key [Binance Merchant Admin Portal](https://merchant.binance.com/en) . Decryption instructions for merchant data sharing[​](https://developers.binance.com/docs/zh-CN/binance-pay/authentication#decryption-instructions-for-merchant-data-sharing "Decryption instructions for merchant data sharing的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Decryption Steps: 1. **Convert the Secret Key to an AES Key**: Use the secret key used for order creation via OPEN API to generate an AES key. This is done by hashing the secret key with the SHA-256 algorithm. 2. **Extract IV and Encrypted Data**: Base64 decode the shared data string (like payerDetail) to get a byte array. The first 12 bytes represent the initialization vector (IV) and the remaining bytes represent the encrypted data. 3. **Decrypt the Data**: Initialize a decryption cipher using the AES key and IV. Decrypt the encrypted data and convert the resulting byte array into a UTF-8 encoded string. Sample java code import javax.crypto.Cipher;import javax.crypto.spec.GCMParameterSpec;import javax.crypto.spec.SecretKeySpec;import java.nio.charset.StandardCharsets;import org.apache.commons.codec.binary.Base64;import org.apache.commons.codec.digest.DigestUtils;class Scratch { public static void main(String[] args) throws Exception { String secretKey = ""; // Replace with the secretKey used during the order creation via OPEN API String sharedData = ""; // Replace with your shared data string String decryptedContent = decrypt(sharedData, secretKey); System.out.println(decryptedContent); } public static String decrypt(String sharedData, String secretKey) throws Exception { // Convert the secretKey from the order creation via OPEN API to an AES key using SHA-256 byte[] aesKeyBytes = DigestUtils.sha256(secretKey.getBytes(StandardCharsets.UTF_8)); // Decode Base64 shared data and extract IV and encrypted data byte[] decodedContent = Base64.decodeBase64(sharedData); byte[] iv = new byte[12]; byte[] encryptedData = new byte[decodedContent.length - 12]; System.arraycopy(decodedContent, 0, iv, 0, 12); System.arraycopy(decodedContent, 12, encryptedData, 0, encryptedData.length); // Decrypt data using the AES key and IV SecretKeySpec secretKeySpec = new SecretKeySpec(aesKeyBytes, "AES"); Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, new GCMParameterSpec(128, iv)); byte[] decryptedBytes = cipher.doFinal(encryptedData); // Convert decrypted byte array back to string return new String(decryptedBytes, StandardCharsets.UTF_8); }} Sample Input String secretKey = "eqzxjex2apzoei900ubweocnlkfuhxhox0fgbmrjjbwr6qc1qdgou7uj50nmfujr";String sharedData = "qlbXoEGDxFVMo2+emWFmS2Unesyi7fMnSV0XTIS0J7ErxGjWZ/3yWAJ/NKalJwTzyXFXJpINNFEoMLGlteRlyqR4V330WIuaJmMAMUyXwdrFaNWHw+wPvs3eGm+radsdNnIJ56xqbH57ya4h/nSzyOw="; Sample Output {"firstName":"Chris","lastName":"Paul","dateOfBirth":"1994-02-04","nationality":"BR","countryOfResidence":"BR"} * [Apply API identity key and API secret key](https://developers.binance.com/docs/zh-CN/binance-pay/authentication#apply-api-identity-key-and-api-secret-key) * [Decryption instructions for merchant data sharing](https://developers.binance.com/docs/zh-CN/binance-pay/authentication#decryption-instructions-for-merchant-data-sharing) --- # Avail Provider | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#__docusaurus_skipToContent_fallback) 本页总览 Avail Provider API[​](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#avail-provider-api "Avail Provider API的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------- Binance Web3 Wallet's Avail API is fully compliant with the [polkadot extension](https://polkadot.js.org/docs/extension/) . Dapps can use it to integrate with Binance Web3 Wallet. ### Provider Detection[​](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#provider-detection "Provider Detection的直接链接") We will inject the `window.injectedWeb3` object into the global scope. The object contains the `binancew3w` object, which is the bridge object for the Avail protocol. window.injectedWeb3 = { 'binancew3w': { // semver for the package version: '1.0.0', // this is called to enable the injection, and returns an injected // object containing the accounts, signer and provider interfaces // (or it will reject if not authorized) enable (originName: string): Promise }} You can get the provider object by calling `window.injectedWeb3['binancew3w'].enable('my dapp')`. and then use the `accounts` and `signer` interfaces to interact with the injected account. const provider = await window.injectedWeb3['subwallet-js'].enable('my dapp')const allAccounts = provider.accounts.get()const AVAIL_GENESIS_HASH = isTest ? '0xd3d2f3a3495dc597434a99d7d449ebad6616db45e4e4f178f31cc6fa14378b70' : '0xb91746b45e0346cc2f815a520b9c6cb4d5c0902af848db0a80f85932d2e8276a'if (allAccounts.length > 0) { console.log('Injected accounts:', allAccounts) for (let i = 0; i < allAccounts.length; i++) { if (allAccounts[i].genesisHash === AVAIL_GENESIS_HASH) { console.log('Injected avail account:', allAccounts[i]) } }} You can also use the `@polkadot/extension-dapp` package to detect the provider: const AVAIL_GENESIS_HASH = isTest ? '0xd3d2f3a3495dc597434a99d7d449ebad6616db45e4e4f178f31cc6fa14378b70' : '0xb91746b45e0346cc2f815a520b9c6cb4d5c0902af848db0a80f85932d2e8276a'const allAccounts = await web3Accounts()if (allAccounts.length > 0) { console.log('Injected accounts:', allAccounts) for (let i = 0; i < allAccounts.length; i++) { if (allAccounts[i].genesisHash === AVAIL_GENESIS_HASH) { console.log('Injected avail account:', allAccounts[i]) } }} Injection information[​](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#injection-information "Injection information的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- And here is the related interfaces: interface Injected { // the interface for Accounts, as detailed below readonly accounts: Accounts; // the standard Signer interface for the API, as detailed below readonly signer: Signer;}interface Account = { // ss-58 encoded address readonly address: string; // the genesisHash for this account (empty if applicable to all) readonly genesisHash?: string; // (optional) name for display readonly name?: string;};// exposes accountsinterface Accounts { // retrieves the list of accounts for right now get: () => Promise; // (optional) subscribe to all accounts, updating as they change subscribe?: (cb: (accounts: Account[]) => any) => () => void}// a signer that communicates with the extension via sendMessageinterface Signer { /** * @description signs an extrinsic payload from a serialized form */ signPayload?: (payload: SignerPayloadJSON) => Promise; /** * @description signs a raw payload, only the bytes data as supplied */ signRaw?: (raw: SignerPayloadRaw) => Promise;} Provide metadata[​](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#provide-metadata "Provide metadata的直接链接") ----------------------------------------------------------------------------------------------------------------------------------- You may need to provide metadata for the wallet, such as the chain name, chain type, color, genesis hash, icon, and meta calls. // the address we use to use for signing, as injectedconst SENDER = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';// finds an injector for an addressconst injector = await web3FromAddress(SENDER);injector.metadata.provide({ chain: 'Avail DA Mainnet', chainType: 'substrate', color: '#1B1E26', genesisHash: '0xb91746b45e0346cc2f815a520b9c6cb4d5c0902af848db0a80f85932d2e8276a', icon: 'substrate', metaCalls: ...}) signAndSend[​](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#signandsend "signAndSend的直接链接") -------------------------------------------------------------------------------------------------------------------- You can use the `signAndSend` method to sign and send a transaction. import { web3Accounts, web3Enable, web3FromAddress } from '@polkadot/extension-dapp';// returns an array of all the injected sources// (this needs to be called first, before other requests)const allInjected = await web3Enable('my cool dapp');// returns an array of { address, meta: { name, source } }// meta.source contains the name of the extension that provides this accountconst allAccounts = await web3Accounts();// the address we use to use for signing, as injectedconst SENDER = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';// finds an injector for an addressconst injector = await web3FromAddress(SENDER);// sign and send our transaction - notice here that the address of the account// (as retrieved injected) is passed through as the param to the `signAndSend`,// the API then calls the extension to present to the user and get it signed.// Once complete, the api sends the tx + signature via the normal processapi.tx.balances .transfer('5C5555yEXUcmEJ5kkcCMvdZjUo7NGJiQJMS7vZXEeoMhj3VQ', 123456) .signAndSend(SENDER, { signer: injector.signer }, (status) => { ... }); * [Avail Provider API](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#avail-provider-api) * [Provider Detection](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#provider-detection) * [Injection information](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#injection-information) * [Provide metadata](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#provide-metadata) * [signAndSend](https://developers.binance.com/docs/zh-CN/binance-w3w/avail-provider#signandsend) --- # How To Enroll Mini Program KYB | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#__docusaurus_skipToContent_fallback) 本页总览 How To Enroll Mini Program KYB ============================== Before you try to Binance mini program platform, you need to enroll the kyb. Two kyb are required for mini program. * Entity KYB * Mini prgoram KYB Steps[​](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#steps "Steps的直接链接") ------------------------------------------------------------------------------------- ### 1\. Submit the Entity KYB[​](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#1-submit-the-entity-kyb "1. Submit the Entity KYB的直接链接") To submit the Entity KYB, your account must be an enterpise account. If you don't have an enterprise account, please get the enterprise account [here](https://accounts.binance.com/en/register-business?loginChannel=homepage&return_to=aHR0cHM6Ly93d3cuYmluYW5jZS5jb20vZW4vbXkvZGFzaGJvYXJk) Login with the enterpise account, go to [kyb list page](https://developers.binance.com/en/kyb/list) . Click the enroll button of Entity KYB. Fill the info and submit it. ![kyb list](https://bin.bnbstatic.com/static/images/developer-center/mp-kyb.png) ### 2\. Submit the Mini Program KYB[​](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#2-submit-the-mini-program-kyb "2. Submit the Mini Program KYB的直接链接") After submit the Entity KYB, you are now able to submit the Mini Program KYB. Go to [kyb list page](https://developers.binance.com/en/kyb/list) , Click the enroll button of Mini Program KYB. Fill the info and submit it. ### 3\. Add the members into Entity[​](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#3-add-the-members-into-entity "3. Add the members into Entity的直接链接") Go to entity member management page ![entity member management](https://bin.bnbstatic.com/static/images/developer-center/member-management-entry.png) Add your team users into this entity. There are two Roles of Entity currently: * Entity Admin * Entity User | | Entity Admin | Entity User | | --- | --- | --- | | KYB Management | √ | | | Entity Member Management | √ | | | View Console Panel | √ | √ | * [Steps](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#steps) * [1\. Submit the Entity KYB](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#1-submit-the-entity-kyb) * [2\. Submit the Mini Program KYB](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#2-submit-the-mini-program-kyb) * [3\. Add the members into Entity](https://developers.binance.com/docs/zh-CN/dc-kyb/mp-kyb#3-add-the-members-into-entity) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/cms/cms-log#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-07-21[​](https://developers.binance.com/docs/zh-CN/cms/cms-log#2025-07-21 "2025-07-21的直接链接") -------------------------------------------------------------------------------------------------- * 新增公告订阅功能 * [2025-07-21](https://developers.binance.com/docs/zh-CN/cms/cms-log#2025-07-21) --- # Wallet Balance Query V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#__docusaurus_skipToContent_fallback) 本页总览 API used to query one or more wallet balance. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#endpoint "EndPoint的直接链接") ----------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/v2/balance Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **wallet** | string | Y | Enum string | Binance wallet to query, currently supported enum valus:

**FUNDING\_WALLET**
**SPOT\_WALLET** | | **currency** | string | N | Valid currency, must be in uppercase | Currency to query, for e.g, "USDC","USDT" & "BNB". If no currency was sent, return all assets. | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#sample-request-body "Sample Request Body的直接链接") { "wallet": "SPOT_WALLET", "currency": "USDT"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#response-parameters "Response Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#result-code) | | **data** | AssetQueryRespV2 | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#balance-response) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#child-attribute "Child Attribute的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- ### AssetQueryRespV2[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#assetqueryrespv2 "AssetQueryRespV2的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **balance** | AssetQueryData | N | | Currency data, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#balance-response-data) | | **wallet** | string | Y | | Wallet that contains the currencies | | **updateTime** | string | Y | | Update time of the data | | **fiat** | string | Y | | Fiat name, for fiat valuation | ### AssetQueryData[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#assetquerydata "AssetQueryData的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **available** | decimal | Y | Amount Range: 0.00000001 - 999999999999999.99999999; Max Unit Range: 8 decimal places | Current balance free to use | | **freeze** | decimal | Y | Amount Range: 0.00000001 - 999999999999999.99999999; Max Unit Range: 8 decimal places | Current balance frozen | | **asset** | string | Y | | Asset/currency name | | **availableFiatValuation** | decimal | Y | Amount Range: 0.00000001 - 999999999999999.99999999; Max Unit Range: 8 decimal places | Available fiat valuation | | **availableBtcValuation** | decimal | Y | Amount Range: 0.00000001 - 999999999999999.99999999; Max Unit Range: 8 decimal places | Available BTC valuation | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "balance": [ { "available": 990000.00000000, "freeze": 0E-8, "asset": "USDT", "availableFiatValuation": 989991.90516600, "availableBtcValuation": 22.98780000 } ], "wallet": "FUNDING_WALLET", "updateTime": 1666937353019, "fiat": "USD" }} { "status": "FAIL", "code": "400003", "errorMessage": "Timestamp for this request is outside of the recvWindow."} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#result-code "Result Code的直接链接") -------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#child-attribute) * [AssetQueryRespV2](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#assetqueryrespv2) * [AssetQueryData](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#assetquerydata) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query-v2#result-code) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/cms#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-07-21[​](https://developers.binance.com/docs/zh-CN/cms#2025-07-21 "2025-07-21的直接链接") ------------------------------------------------------------------------------------------ * 新增公告订阅功能 * [2025-07-21](https://developers.binance.com/docs/zh-CN/cms#2025-07-21) --- # Wallet Balance Query | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#__docusaurus_skipToContent_fallback) 本页总览 API used to query wallet balance. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#endpoint "EndPoint的直接链接") -------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/balance Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **wallet** | string | Y | Enum string | Binance wallet to query, currently supported enum valus:

**FUNDING\_WALLET**
**SPOT\_WALLET** | | **currency** | string | Y | Valid currency, must be in uppercase | Currency to query, for e.g, "USDC","USDT" & "BNB" | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#sample-request-body "Sample Request Body的直接链接") { "wallet": "SPOT_WALLET", "currency": "USDT"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#response-parameters "Response Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#result-code) | | **data** | AssetQueryResp | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#balance-response) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#child-attribute "Child Attribute的直接链接") ----------------------------------------------------------------------------------------------------------------------------------- ### AssetQueryResp[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#assetqueryresp "AssetQueryResp的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **balance** | decimal | Y | Amount Range: 0.00000001 - 999999999999999.99999999; Max Unit Range: 8 decimal places | Current balance free to use | | **asset** | string | Y | | Asset/currency name | | **fiat** | string | Y | | Fiat name, for fiat valuation | | **availableFiatValuation** | decimal | Y | Amount Range: 0.00000001 - 999999999999999.99999999; Max Unit Range: 8 decimal places | Available fiat valuation | | **availableBtcValuation** | decimal | Y | Amount Range: 0.00000001 - 999999999999999.99999999; Max Unit Range: 8 decimal places | Available BTC valuation | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "balance": 990000.00000000, "asset": "USDT", "fiat": "USD", "availableFiatValuation": 989991.90516600, "availableBtcValuation": 22.98780000 }} { "status": "FAIL", "code": "400003", "errorMessage": "Timestamp for this request is outside of the recvWindow."} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#result-code "Result Code的直接链接") ----------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#child-attribute) * [AssetQueryResp](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#assetqueryresp) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-balance-query#result-code) --- # 公告 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/cms/announcement#__docusaurus_skipToContent_fallback) 本页总览 公告 == * 当 Binance 发布英文公告(语言代码:`en`)时,系统会向已订阅的用户推送公告信息。 主题[​](https://developers.binance.com/docs/zh-CN/cms/announcement#%E4%B8%BB%E9%A2%98 "主题的直接链接") ----------------------------------------------------------------------------------------------- * `com_announcement_en` 返回内容[​](https://developers.binance.com/docs/zh-CN/cms/announcement#%E8%BF%94%E5%9B%9E%E5%86%85%E5%AE%B9 "返回内容的直接链接") --------------------------------------------------------------------------------------------------------------------- * 例子中由于公告内容较长,用`...`代表省略的内容。 #### 返回示例[​](https://developers.binance.com/docs/zh-CN/cms/announcement#%E8%BF%94%E5%9B%9E%E7%A4%BA%E4%BE%8B "返回示例的直接链接") { "type": "DATA", "topic": "com_announcement_en", "data": "{\"catalogId\":161,\"catalogName\":\"Delisting\",\"publishDate\":1753257631403,\"title\":\"Notice of...\",\"body\":\"This is...\",\"disclaimer\":\"Trade on-the-go...\"}"} #### 公告内容说明[​](https://developers.binance.com/docs/zh-CN/cms/announcement#%E5%85%AC%E5%91%8A%E5%86%85%E5%AE%B9%E8%AF%B4%E6%98%8E "公告内容说明的直接链接") * 公告具体内容包含在 `data` 字段中,去除字符串转义后,结构如下: { "catalogId": 161, --栏目ID "catalogName": "Delisting", --栏目名称 "publishDate": 1753257631403, --发布时间戳 "title": "Notice of...", --公告标题 "body": "This is...", --公告内容 "disclaimer": "Trade on-the-go..." --免责申明} * [主题](https://developers.binance.com/docs/zh-CN/cms/announcement#%E4%B8%BB%E9%A2%98) * [返回内容](https://developers.binance.com/docs/zh-CN/cms/announcement#%E8%BF%94%E5%9B%9E%E5%86%85%E5%AE%B9) --- # Integrate Binance Pay with your App | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#__docusaurus_skipToContent_fallback) 本页总览 Binance Pay is a contactless, borderless and secure cryptocurrency payment technology designed by Binance. Binance Pay allows Binance customer to pay and get paid in crypto from your friends and family worldwide. To begin, register your application with Binance Accounts, and get the `SDK` . For now, please contact us. ### Signature Rule (For server engineer)[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#signature-rule-for-server-engineer "Signature Rule (For server engineer)的直接链接") Binance Pay backend will check the signature against pay param, including "certSn", "merchantId", "noncestr", "prepayId" and "timeStamp". | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **certSn** | string | Y | \- | API identity key issued by Binance payment system | | **merchantId** | long | Y | \- | The merchant account id, issued when merchant been created at Binance. | | **noncestr** | string | Y | must be 32 digits | A random string with 32 bytes, e.g. random ascii decimal within a-z and A-Z and loop 32 times to form a random string | | **prepayId** | string | Y | \- | unique id generated by binance | | **timeStamp** | long | Y | Binance pay only process request within 1s | UnixTimestamp in millis that the requests send, guarantee the machine time is sync with the network | Signature generation logic is as below, please follow the parameters order. Use "=" connect field and value, use "&" to separate fields. String payload = "certSn=317c110ebf7baf641e8f49ab6851331737dbe98541947c53b9dbba27f8c8414f" + "&" + "merchantId=98765987" + "&" + "noncestr=5K8264ILTKCH16CQ2502SI8ZNMTM67VS" + "&" + "prepayId=98765987" + "&"+ "timeStamp=1618302830073";String signature = hex(hmac("sha512", payload, secretKey)).toUpperCase(); ### Integrate SDK for Android[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#integrate-sdk-for-android "Integrate SDK for Android的直接链接") #### Requirements[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#requirements "Requirements的直接链接") * Android 4.1+ * Support AndroidX #### Import SDK[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#import-sdk "Import SDK的直接链接") 1. Download [binance\_pay\_sdk\_v1.0.0.aar](https://ftp.binance.com/sdk/binance-pay/binance_pay_sdk_v1.1.0.aar) 2. Add `binance_pay_sdk_v1.0.0.aar` into libs directory 3. Add dependence for app module, just like this: android{ repositories { flatDir { dirs 'libs' } }}dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation (name: 'binance_pay_sdk_v1.0.0', ext: 'aar') 4. Sync project #### Usage[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#usage "Usage的直接链接") ##### 1\. Create `BinancePayListener`[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#1-create-binancepaylistener "1-create-binancepaylistener的直接链接") class PayListener : BinancePayListener { override fun onSuccess() { // When the payment is successful, this will be called } override fun onCancel() { // When the payment is canceled, this will be called } override fun onError(exception: BinancePayException) { // When there is an error in the payment process,this will be called }}val listener = PayListener() ##### 2\. To Pay[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#2-to-pay "2. To Pay的直接链接") **2.1 Crypto payments(C2B)** val param = BinancePayParam(merchantId, prepayId, timeStamp, nonceStr, certSn, sign)val binancePay = BinancePayFactory.getBinancePay(context)binancePay.pay(param, listener) **2.2 Transfer or send cryptos(C2C)** val binancePay = BinancePayFactory.getBinancePay(context)binancePay.pay(orderId, type, listener) > Error Types: > Maybe you will encounter several situations: * UnInstall Error:This means that you have not installed the Binance app, and then a pop-up window will be displayed to guide you to download * UnSupported Error:This means that your Binance app version is too low, and then a pop-up window will be displayed to guide you to get the latest Binance app * Other Error:Will be called back to you via BinancePayListener ### Integrate SDK for iOS[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#integrate-sdk-for-ios "Integrate SDK for iOS的直接链接") #### Requirements[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#requirements-1 "Requirements的直接链接") * iOS 10+ * Swift 5.1+ #### Installation[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#installation "Installation的直接链接") ##### Munual[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#munual "Munual的直接链接") 1. Download [BinancePaySDK.xcframework](https://ftp.binance.com/sdk/binance-pay/BinancePaySDK.xcframework.zip) 2. Add `BinancePaySDK.xcframework` into `Frameworks, Libraries and Embeded Content` of your target 3. Embed Type should be `Embed & Sign` #### Usage[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#usage-1 "Usage的直接链接") ##### Pay[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#pay "Pay的直接链接") 1. Create `Request Parameters`: // Crypto payments(C2B) parameterspublic struct OrderInitParameters { let merchantId: String let prepayId: String let timestamp: Int64 let noncestr: String let certSn: String let sign: String let redirectScheme: String}// Transfer or send cryptos(C2C) parameterspublic struct C2CInitParameters { let id: String let type: String let redirectScheme: String} 2. Call api: BinancePay.shared.pay(with: parameters, containerView: self.view) { (result) in switch result { case .success: print("success") case .failure(let error): print("failure \(error)") }} > BinancePaySDK will show up an alert if user doesn't install Binance app on his/her device. The alert will show on the `containerView`. 3. Error Types: Here are the errors you may get from `BinancePaySDK`: public enum PayError: Error { case invalidParameters(OrderInitParametersError) case binanceAppNotInstalled case binanceAppNotSupported case openAppFailed case fromBinanceApp(code: Int, message: String)}public enum OrderInitParametersError: Error { case invalidMerchantId case invalidPrepayId case invalidTimestamp case invalidNonceStr case invalidCertSn case invalidSign case invalidRedirectScheme} #### Language[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#language "Language的直接链接") public enum languageMode { case automatic // SDK automatically use the same language as iOS system case manual(Language: Language) // You can specify the language}BinancePay.shared.languageMode = .automatic #### FAQ[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#faq "FAQ的直接链接") ##### Unable to trigger the Binance App[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#unable-to-trigger-the-binance-app "Unable to trigger the Binance App的直接链接") Include Binance Pay in the plist file to trigger Binance app LSApplicationQueriesSchemescom.binance.app.binancecom.binance.pay.support ##### Unable to redirect from Binance App back to your App[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#unable-to-redirect-from-binance-app-back-to-your-app "Unable to redirect from Binance App back to your App的直接链接") 1. Add your url scheme in Info Url Types 2. Set this url-scheme as redirectScheme when using BinancePaySDK ![img](https://developers.binance.com/docs/zh-CN/assets/images/ios_integration_FAQ_1-41a21d924b5a27def05d5eff67c1c8c4.png) ##### Did not receive callback[​](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#did-not-receive-callback "Did not receive callback的直接链接") Under AppDelegate: include the BinancePay.shared.handle function to receive callback. func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any[ = [:]) -> Bool { BinancePay.shared.handle(openURL: url) }\ \ * [Signature Rule (For server engineer)](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#signature-rule-for-server-engineer)\ \ * [Integrate SDK for Android](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#integrate-sdk-for-android)\ \ * [Integrate SDK for iOS](https://developers.binance.com/docs/zh-CN/binance-pay/app-integration#integrate-sdk-for-ios) --- # Introduction | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/connect_prime/introduction#__docusaurus_skipToContent_fallback) Build with Binance Connect Prime ================================ Binance Connect Prime is a turnkey solution that enables banks, fintechs, and platforms to offer crypto services directly inside their own apps — without building complex infrastructure from scratch. What It Does: 1. Lets your customers buy and sell crypto seamlessly within your app. 2. Provides real-time quotes, execution, balances, and transaction history through a simple API integration. 3. Handles the liquidity, order execution, and crypto infrastructure on Binance’s side, while you keep control over your fiat operations and customer relationship. --- # Contact us | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/cms/contact-us#__docusaurus_skipToContent_fallback) 联系我们 ==== * [币安API电报群](https://t.me/Binance_api_Chinese) * 咨询关于API或者Websockets性能方面的问题. * 咨询文档中没有提及的API问题. * [币安开发者社区](https://dev.binance.vision/) * 咨询关于API/Websockets代码实现,或者任何API/Websockets的问题. * [币安客服](https://www.binance.com/cn/support-center) * 咨询关于账户,钱包,2FA等. --- # 快速开始 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/c2c/quick-start#__docusaurus_skipToContent_fallback) 本页总览 快速开始 ==== API Key 权限设置[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE "API Key 权限设置的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- * 新创建的API的默认权限是 `只读`。 * 如果需要通过API提款, 需要在UI修改权限, 选中 `允许提现`。 账户[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#%E8%B4%A6%E6%88%B7 "账户的直接链接") ---------------------------------------------------------------------------------------------- ### 现货账户[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7 "现货账户的直接链接") 新注册的币安账号都会有一个现货(`SPOT`)账号。 ### 杠杆账户[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7 "杠杆账户的直接链接") 为了开设杠杆(`MARGIN`)账户, 可以参考[Binance杠杆交易账户设置指南](https://www.binance.vision/zh/tutorials/binance-margin-trading-guide) API 代码库[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93 "API 代码库的直接链接") --------------------------------------------------------------------------------------------------------------------- ### Connectors[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#connectors "Connectors的直接链接") 以下有一些轻量级的代码库,使不同语言的用户能够直接调用现货的 Binance 公共 API: * Python [https://github.com/binance/binance-connector-python](https://github.com/binance/binance-connector-python) * JavaScript [https://github.com/binance/binance-connector-js](https://github.com/binance/binance-connector-js) * Ruby [https://github.com/binance/binance-connector-ruby](https://github.com/binance/binance-connector-ruby) * DotNET C# [https://github.com/binance/binance-connector-dotnet](https://github.com/binance/binance-connector-dotnet) * Java [https://github.com/binance/binance-connector-java](https://github.com/binance/binance-connector-java) * Rust [https://github.com/binance/binance-spot-connector-rust](https://github.com/binance/binance-spot-connector-rust) * PHP [https://github.com/binance/binance-connector-php](https://github.com/binance/binance-connector-php) * Go [https://github.com/binance/binance-connector-go](https://github.com/binance/binance-connector-go) ### Postman Collections[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#postman-collections "Postman Collections的直接链接") Postman 集合现已推出。推荐给寻求快速和轻松地开始使用 API 的新用户。 [https://github.com/binance/binance-api-postman](https://github.com/binance/binance-api-postman) ### Swagger[​](https://developers.binance.com/docs/zh-CN/c2c/quick-start#swagger "Swagger的直接链接") 以下有提供包含 RESTful API 的 OpenAPI 规范的 YAML 文件,以及可供参考的 Swagger UI 页面。 [https://github.com/binance/binance-api-swagger](https://github.com/binance/binance-api-swagger) * [API Key 权限设置](https://developers.binance.com/docs/zh-CN/c2c/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE) * [账户](https://developers.binance.com/docs/zh-CN/c2c/quick-start#%E8%B4%A6%E6%88%B7) * [现货账户](https://developers.binance.com/docs/zh-CN/c2c/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7) * [杠杆账户](https://developers.binance.com/docs/zh-CN/c2c/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7) * [API 代码库](https://developers.binance.com/docs/zh-CN/c2c/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93) * [Connectors](https://developers.binance.com/docs/zh-CN/c2c/quick-start#connectors) * [Postman Collections](https://developers.binance.com/docs/zh-CN/c2c/quick-start#postman-collections) * [Swagger](https://developers.binance.com/docs/zh-CN/c2c/quick-start#swagger) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/c2c#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/c2c#2025-12-26 "2025-12-26的直接链接") ------------------------------------------------------------------------------------------ ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/c2c#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/c2c/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/c2c#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/c2c/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2021-08-05[​](https://developers.binance.com/docs/zh-CN/c2c#2021-08-05 "2021-08-05的直接链接") ------------------------------------------------------------------------------------------ * 新增C2C接口: * `GET /sapi/v1/c2c/orderMatch/listUserOrderHistory` 以查询用户C2C交易历史记录 * [2025-12-26](https://developers.binance.com/docs/zh-CN/c2c#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/c2c#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/c2c#rest-api) * [2021-08-05](https://developers.binance.com/docs/zh-CN/c2c#2021-08-05) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/c2c/change-log#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/c2c/change-log#2025-12-26 "2025-12-26的直接链接") ----------------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/c2c/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/c2c/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/c2c/change-log#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/c2c/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2021-08-05[​](https://developers.binance.com/docs/zh-CN/c2c/change-log#2021-08-05 "2021-08-05的直接链接") ----------------------------------------------------------------------------------------------------- * 新增C2C接口: * `GET /sapi/v1/c2c/orderMatch/listUserOrderHistory` 以查询用户C2C交易历史记录 * [2025-12-26](https://developers.binance.com/docs/zh-CN/c2c/change-log#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/c2c/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/c2c/change-log#rest-api) * [2021-08-05](https://developers.binance.com/docs/zh-CN/c2c/change-log#2021-08-05) --- # Contact us | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/c2c/contact-us#__docusaurus_skipToContent_fallback) 联系我们 ==== * [币安API电报群](https://t.me/Binance_api_Chinese) * 咨询关于API或者Websockets性能方面的问题. * 咨询文档中没有提及的API问题. * [币安开发者社区](https://dev.binance.vision/) * 咨询关于API/Websockets代码实现,或者任何API/Websockets的问题. * [币安客服](https://www.binance.com/cn/support-center) * 咨询关于账户,钱包,2FA等. --- # Contact us | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/convert/contact-us#__docusaurus_skipToContent_fallback) 联系我们 ==== * [币安API电报群](https://t.me/Binance_api_Chinese) * 咨询关于API或者Websockets性能方面的问题. * 咨询文档中没有提及的API问题. * [币安开发者社区](https://dev.binance.vision/) * 咨询关于API/Websockets代码实现,或者任何API/Websockets的问题. * [币安客服](https://www.binance.com/cn/support-center) * 咨询关于账户,钱包,2FA等. --- # Change Log | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#__docusaurus_skipToContent_fallback) 本页总览 Change Log ========== ### Mar 27, 2026[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#mar-27-2026 "Mar 27, 2026的直接链接") * Added new API endpoint `Get Symbol Detail` for retrieving cryptocurrency details (market cap, volume, rank, circulating supply, etc.). * Added new API endpoint `Get Kline Data` for retrieving K-line/candlestick data with support for 3m, 1h, 1d intervals. * Added new API endpoint `Get Discover Price` for retrieving cryptocurrency quotation prices and 24-hour changes. ### Nov 07, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#nov-07-2025 "Nov 07, 2025的直接链接") * Updated typical buy/sell sequence diagrams and flow descriptions. * Added new merchant side API requirements. * Added curl examples for all APIs. ### Nov 03, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#nov-03-2025 "Nov 03, 2025的直接链接") * Updated the get-fiat-crypto-limits API to include new fields for more accurate limits. ### Oct 20, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#oct-20-2025 "Oct 20, 2025的直接链接") * Added new field `webhookEventType` in the webhook payload. ### Oct 15, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#oct-15-2025 "Oct 15, 2025的直接链接") * Support 1024-bits RSA keys for enhanced security. ### Sep 30, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#sep-30-2025 "Sep 30, 2025的直接链接") * Added new API endpoint for getting fiat and crypto amount limits. * Updated typical buy/sell sequence diagrams and flow descriptions. * Removed fiat/crypto amount limit details from get-trading-pair API. ### Sep 22, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#sep-22-2025 "Sep 22, 2025的直接链接") * Added typical buy/sell sequence diagrams and flow descriptions. * Update the get-quote API to replace the request field `spreadLevel` with `customSpread`. ### Sep 05, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#sep-05-2025 "Sep 05, 2025的直接链接") * Initial release of Connect Prime with core features and functionalities. * [Mar 27, 2026](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#mar-27-2026) * [Nov 07, 2025](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#nov-07-2025) * [Nov 03, 2025](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#nov-03-2025) * [Oct 20, 2025](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#oct-20-2025) * [Oct 15, 2025](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#oct-15-2025) * [Sep 30, 2025](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#sep-30-2025) * [Sep 22, 2025](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#sep-22-2025) * [Sep 05, 2025](https://developers.binance.com/docs/zh-CN/connect_prime/change-log#sep-05-2025) --- # Get Flexible Loan LTV Adjustment History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#__docusaurus_skipToContent_fallback) 本页总览 查询活期借币质押率调整历史 ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询活期借币质押率调整历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/sapi/v2/loan/flexible/ltv/adjustment/history` GET `/sapi/v1/loan/flexible/ltv/adjustment/history` 可用于查看2024-02-27 08:00之前的数据 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | loanCoin | STRING | NO | | | collateralCoin | STRING | NO | | | startTime | LONG | NO | | | endTime | LONG | NO | | | current | LONG | NO | Current querying page. Start from 1; default: 1; max: 1000 | | limit | LONG | NO | Default: 10; max: 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果没有发送 startTime 和 endTime,默认返回最近 90 天的数据。 > * startTime 和 endTime 的最大间隔为 180 天。 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "rows": [ { "loanCoin": "BUSD", "collateralCoin": "BNB", "direction": "ADDITIONAL", "collateralAmount": "5.235", "preLTV": "0.78", "afterLTV": "0.56", "adjustTime": 1575018510000 } ], "total": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # New Future Account Transfer | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/rest-api/New-Future-Account-Transfer#__docusaurus_skipToContent_fallback) 划转 == 执行现货账户与合约账户之间的划转, [详情请见这里](https://developers.binance.com/docs/zh-CN/wallet/asset/user-universal-transfer) . --- # Execute Quote | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#__docusaurus_skipToContent_fallback) 本页总览 API used to execute convert quote. \*This API is only available for whitelisted merchants. If you need any help, you can contact us: [merchant@binance.com](mailto:merchant@binance.com) EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#endpoint "EndPoint的直接链接") ---------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/otc-portal/execute-quote Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **quoteId** | string | Y | | Quote ID for execute quote | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#sample-request-body "Sample Request Body的直接链接") { "quoteId": "e53bb5ea9a384277b4ed971235816a9f"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#result-code) | | **data** | AcceptQuoteResp | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#accept-quote-response) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- ### AcceptQuoteResp[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#acceptquoteresp "AcceptQuoteResp的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **orderId** | string | Y | | Order ID of the executed convert order. | | **createTime** | decimal | Y | | Timestamp order created | | **orderStatus** | string | Y | SUCCESS/FAIL/PROCESS | Order status | | **quotePrice** | decimal | Y | | From:To quote price | | **inversePrice** | decimal | Y | | To:From quote price | | **fromCoin** | string | Y | | From Asset | | **fromCoinAmount** | decimal | Y | | Amount debited | | **toCoin** | string | Y | | To Asset | | **toCoinAmount** | decimal | Y | | Amount credited | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "orderId": "1309477640981204290", "createTime": 1667179261865, "orderStatus": "PROCESS", "quotePrice": 0.00445577, "inversePrice": 224.428, "fromCoin": "USDT", "fromCoinAmount": 179.54201695, "toCoin": "BNB", "toCoinAmount": 0.8 }} { "status": "FAIL", "code": "345231", "errorMessage": "System failed to execute the quote, which has expired. Please request for quote again."} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#result-code "Result Code的直接链接") ------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | TIME\_OUT | 345231 | System failed to execute the quote, which has expired. Please request for quote again | | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#child-attribute) * [AcceptQuoteResp](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#acceptquoteresp) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-execute-quote#result-code) --- # Query Quote | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#__docusaurus_skipToContent_fallback) 本页总览 API used to query a convert order. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#endpoint "EndPoint的直接链接") -------------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/otc-portal/query-trade-order Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#request-parameters "Request Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **orderId** | string | Y | | Order ID for order query | ### Sample Request Parameter[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#sample-request-parameter "Sample Request Parameter的直接链接") { "orderId": 1309477640981204290} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#response-parameters "Response Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#result-code) | | **data** | OrderStatusResp | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#get-order-response) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#child-attribute "Child Attribute的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- ### OrderStatusResp[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#orderstatusresp "OrderStatusResp的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **orderId** | string | Y | | Order ID of the executed convert order. | | **orderStatus** | string | Y | SUCCESS/FAIL/PROCESS | Order status | | **fromAsset** | string | Y | | From Asset | | **fromAmount** | decimal | Y | | Amount debited | | **toAsset** | string | Y | | To Asset | | **toAmount** | decimal | Y | | Amount credited | | **ratio** | decimal | Y | | From:To quote price | | **inverseRatio** | decimal | Y | | To:From quote price | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "orderId": "1309477640981204290", "orderStatus": "SUCCESS", "fromAsset": "USDT", "fromAmount": 179.54201695, "toAsset": "BNB", "toAmount": 0.8, "ratio": 0.00445577, "inverseRatio": 224.428 }} { "status": "FAIL", "code": "400003", "errorMessage": "Timestamp for this request is outside of the recvWindow."} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#result-code "Result Code的直接链接") ----------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#request-parameters) * [Sample Request Parameter](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#sample-request-parameter) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#child-attribute) * [OrderStatusResp](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#orderstatusresp) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-query-trade-order#result-code) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/c2c/Introduction#__docusaurus_skipToContent_fallback) 币安法币接口。 --- # Get C2C Trade History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/c2c/rest-api#__docusaurus_skipToContent_fallback) 本页总览 获取C2C交易历史记录(USER\_DATA) ======================= 接口描述[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------- 获取C2C交易历史记录 HTTP请求[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------- GET `/sapi/v1/c2c/orderMatch/listUserOrderHistory` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") --------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | tradeType | STRING | NO | BUY, SELL | | startTimestamp | LONG | NO | | | endTimestamp | LONG | NO | | | page | INT | NO | default 1 | | rows | INT | NO | default 100, max 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 若startTimestamp和endTimestamp均未发送,只返回最近30天数据。 > * startTimestamp和endTimestamp的最大时间间隔为30天。 > * 只能查询最近 6 个月的数据。如果需要产看全部C2C订单,你可以前往 [https://c2c.binance.com/zh-CN/fiatOrder](https://c2c.binance.com/zh-CN/fiatOrder) > 响应示例[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "success", "data": [ { "orderNumber":"20219644646554779648", "advNo": "11218246497340923904", "tradeType": "SELL", "asset": "BUSD", "fiat": "CNY", "fiatSymbol": "¥", "amount": "5000.00000000", // Quantity (in Crypto) "totalPrice": "33400.00000000", "unitPrice": "6.68", // Unit Price (in Fiat) "orderStatus": "COMPLETED", // PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM "createTime": 1619361369000, "commission": "0", // Transaction Fee (in Crypto) "counterPartNickName": "阿涛❤***", "advertisementRole": "TAKER" } ], "total": 1, "success": true} * [接口描述](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/c2c/rest-api#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/c2c/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Change Log | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/connect_prime#__docusaurus_skipToContent_fallback) 本页总览 Change Log ========== ### Mar 27, 2026[​](https://developers.binance.com/docs/zh-CN/connect_prime#mar-27-2026 "Mar 27, 2026的直接链接") * Added new API endpoint `Get Symbol Detail` for retrieving cryptocurrency details (market cap, volume, rank, circulating supply, etc.). * Added new API endpoint `Get Kline Data` for retrieving K-line/candlestick data with support for 3m, 1h, 1d intervals. * Added new API endpoint `Get Discover Price` for retrieving cryptocurrency quotation prices and 24-hour changes. ### Nov 07, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime#nov-07-2025 "Nov 07, 2025的直接链接") * Updated typical buy/sell sequence diagrams and flow descriptions. * Added new merchant side API requirements. * Added curl examples for all APIs. ### Nov 03, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime#nov-03-2025 "Nov 03, 2025的直接链接") * Updated the get-fiat-crypto-limits API to include new fields for more accurate limits. ### Oct 20, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime#oct-20-2025 "Oct 20, 2025的直接链接") * Added new field `webhookEventType` in the webhook payload. ### Oct 15, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime#oct-15-2025 "Oct 15, 2025的直接链接") * Support 1024-bits RSA keys for enhanced security. ### Sep 30, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime#sep-30-2025 "Sep 30, 2025的直接链接") * Added new API endpoint for getting fiat and crypto amount limits. * Updated typical buy/sell sequence diagrams and flow descriptions. * Removed fiat/crypto amount limit details from get-trading-pair API. ### Sep 22, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime#sep-22-2025 "Sep 22, 2025的直接链接") * Added typical buy/sell sequence diagrams and flow descriptions. * Update the get-quote API to replace the request field `spreadLevel` with `customSpread`. ### Sep 05, 2025[​](https://developers.binance.com/docs/zh-CN/connect_prime#sep-05-2025 "Sep 05, 2025的直接链接") * Initial release of Connect Prime with core features and functionalities. * [Mar 27, 2026](https://developers.binance.com/docs/zh-CN/connect_prime#mar-27-2026) * [Nov 07, 2025](https://developers.binance.com/docs/zh-CN/connect_prime#nov-07-2025) * [Nov 03, 2025](https://developers.binance.com/docs/zh-CN/connect_prime#nov-03-2025) * [Oct 20, 2025](https://developers.binance.com/docs/zh-CN/connect_prime#oct-20-2025) * [Oct 15, 2025](https://developers.binance.com/docs/zh-CN/connect_prime#oct-15-2025) * [Sep 30, 2025](https://developers.binance.com/docs/zh-CN/connect_prime#sep-30-2025) * [Sep 22, 2025](https://developers.binance.com/docs/zh-CN/connect_prime#sep-22-2025) * [Sep 05, 2025](https://developers.binance.com/docs/zh-CN/connect_prime#sep-05-2025) --- # Direct Debit/Pre Authorization Create Contract | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#__docusaurus_skipToContent_fallback) 本页总览 This API is for merchant/partner to create direct debit/ pre authorization contract for user authorization. * This API is only available for whitelisted merchants. You may apply for direct debit on the [merchant dashboard](https://merchant.binance.com/en/dashboard/debit-management) under Products > Debit Management. Alternatively, you may contact us at [merchant@binance.com](mailto:merchant@binance.com) , along with your Merchant ID, background and use case. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#endpoint "EndPoint的�直接链接") ----------------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/direct-debit/contract Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **subMerchantId** | string | N | maximum length 19 | The sub merchant account id, issued when sub merchant been created at Binance. | | **merchantContractCode** | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The unique ID assigned by the merchant to identify a direct debit contract request. | | **serviceName** | string | Y | maximum length 32 | service name | | **scenarioCode** | string | Y | eg. General\_Travel, for more please [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#scenario-code) | | | **singleUpperLimit** | decimal | Y | Max Unit Range: 8 decimal places | upper limit related to scenarioCode, for more please [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#scenario-code) | | **currency** | string | Y | only "USDT" or "USDC" is accepted and "USDC" for mica user, fiat not supported | Order currency also the settlement currency | | **periodic** | boolean | Y | true/false | this contract support periodic debit or not | | **cycleDebitFixed** | boolean | N | true/false | mandatory if periodic = true. true = fixed amount, false = variable amount | | **cycleType** | string | N | MONTH or DAY | mandatory if periodic = true. Values: MONTH or DAY | | **cycleValue** | integer | N | \- | mandatory if periodic = true. Values: if cycleType=MONTH: 1~24, cycleType=DAY: interval days >7

Combining with another parameter cycleType to determine the deduction period, for example, cycleType is DAY, cycleValue=30, then the deduction period is 30 days; cycleType is MONTH, cycleValue=3, then the deduction period is 3 natural months. | | **firstDeductTime** | long | N | \- | mandatory if periodic = true. first deduct time, must be a future time in milli seconds. if cycleType=MONTH, the firstDeductTime is not allowed to pass the date after the 28th UTC (can pass the 28th) | | **merchantAccountNo** | string | N | maximum length 64 | the userID/user account in merchant side e.g. [xxx@gmail.com](mailto:xxx@gmail.com) | | **requestExpireTime** | long | N | \- | If not specified, requestExpireTime will be 1 hour. maximum is 1 hour in milliseconds. | | **contractEndTime** | long | N | \- | If not specified, contractEndTime will be the time after 1095 days (about 3 years). maximum is 1095 days in milliseconds. | | **returnUrl** | string | N | maximum length 256 | The URL to redirect to when the contract is signed successfully. **Only available to whitelisted merchant.** | | **cancelUrl** | string | N | maximum length 256 | The URL to redirect to when the contract signing fails. **Only available to whitelisted merchant.** | | ### scenario-code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#scenario-code "scenario-code的直接链接") | **Scenario Code** | **Default Upper limit** | | --- | --- | | General\_Ecommerce\_Platform | 50 USD equivalent | | General\_Travel | 50 USD equivalent | | Car\_Rental | 50 USD equivalent | | Car\_Parking | 50 USD equivalent | | Lease | 50 USD equivalent | | Catering | 50 USD equivalent | | Digital\_Media | 50 USD equivalent | | Membership | 50 USD equivalent | | Utility | 50 USD equivalent | | Repayment | 50 USD equivalent | | Investment | 50 USD equivalent | | Ticket | 50 USD equivalent | | Mobile\_Communication | 50 USD equivalent | | Virtual\_Goods | 50 USD equivalent | | Others | 50 USD equivalent | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#sample-request-body "Sample Request Body的直接链接") { "merchantContractCode": "c0ecfb465e454560a5d8e307bbc407c5", "serviceName": "Tra Direct Debit", "scenarioCode":"Membership", "currency": "USDT", "singleUpperLimit": "30", "periodic": true, "cycleDebitFixed":true, "cycleType": "DAY", "cycleValue": 8, "firstDeductTime": 1677628800000, "merchantAccountNo": "sss@gmail.com"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#result-code) | | **data** | DataObject | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#data-object) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- ### DataObject[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#dataobject "DataObject的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **merchantId** | Long | Y | number | merchant Id in binance | | **preContractId** | string | Y | maximum length 19 | unique id generated by binance | | **contractEndTime** | long | Y | \- | contract will be expired at this time | | **requestExpireTime** | long | Y | \- | user can not sign contract after this time | | **qrContent** | string | Y | maximum length 256 | qr content info | | **qrcodeLink** | string | Y | maximum length 256 | qr code img link | | **deeplink** | string | Y | maximum length 256 | deeplink to open binance app to sign contract | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#sample-response "Sample Response的直接链接") #### applied success[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#applied-success "applied success的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "merchantId": 1000855410, "preContractId": "203616506788478976", "requestExpireTime": 1672656724308, "contractEndTime": 1767261124308, "qrContent": "https://app.binance.com/qr/xxx", "qrcodeLink": "https://public.bnbstatic.com/static/payment/20230405/xxx.jpg", "deeplink": "bnc://app.binance.com/mp/app?appId=V6tETccUyFTfoyMsGYH6aK&startPagePath=cGFnZXMvY29udHJhY3Qtc2lnbi9pbmRleA&startPageQuery=cHJlQ29udHJhY3RJZD0yMDM2MTY1MDY3ODg0Nzg5NzY=" }} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#result-code "Result Code的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | PAYMENT\_INVALID\_PARAM | 400702 | Invalid request parameter | | | MERCHANT\_ACCESS\_FORBIDDEN | 400606 | Account has no accessibility to this function | | | INVALID\_REQUEST\_CURRENCY\_NOT\_SUPPORTED | 400105 | Invalid request, currency is not supported | | | PAYMENT\_DIRECT\_DEBIT\_EXCEED\_LIMIT | 406200 | The singleUpperLimit exceed direct debit limit | | | PAYMENT\_DIRECT\_DEBIT\_CONTRACT\_CODE\_INVALID | 406201 | merchantContractCode is invalid or duplicated | | | PAYMENT\_DIRECT\_DEBIT\_AMOUNT\_PRECISION\_INVALID | 406202 | The singleUpperLimit precision is not valid | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#request-parameters) * [scenario-code](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#scenario-code) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#child-attribute) * [DataObject](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#dataobject) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-create-contract#result-code) --- # List All Convert Pairs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#__docusaurus_skipToContent_fallback) 本页总览 API used to list all convert pairs. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#endpoint "EndPoint的直接链接") ------------------------------------------------------------------------------------------------------------------------ POST /binancepay/openapi/otc-portal/get-to-selector Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **fromAsset** | string | Y | Valid currency, must be in uppercase | Currency to query, for e.g, USDT | ### Sample Request Parameter[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#sample-request-parameter "Sample Request Parameter的直接链接") { "fromAsset": USDT} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#response-parameters "Response Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#result-code) | | **data** | ConvertPairResp | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#quote-response) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#child-attribute "Child Attribute的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- ### ConvertPairResp[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#convertpairresp "ConvertPairResp的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **toList** | ConvertPairData | Y | | Convert data, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#quote-response-data) | | **coin** | string | Y | | Currency from the request parameter | ### ConvertPairData[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#convertpairdata "ConvertPairData的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **coin** | string | Y | | To asset | | **fromMin** | decimal | Y | | From asset minimum amount | | **fromMax** | decimal | Y | | From asset maximum amount | | **toMin** | decimal | Y | | To asset minimum amount | | **toMax** | decimal | Y | | To asset maximum amount | | **reverse** | boolean | Y | | Reverse convert available | | **base** | boolean | Y | | Is base | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "coin": "USDT", "toList": [ { "coin": "BTC", "fromMin": 2E+1, "fromMax": 7E+5, "toMin": 0.0008, "toMax": 35.1, "reverse": true, "base": true } ] }} { "status": "FAIL", "code": "400003", "errorMessage": "Timestamp for this request is outside of the recvWindow."} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#result-code "Result Code的直接链接") --------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#request-parameters) * [Sample Request Parameter](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#sample-request-parameter) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#child-attribute) * [ConvertPairResp](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#convertpairresp) * [ConvertPairData](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#convertpairdata) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-convert-get-to-selector#result-code) --- # Direct Debit/Pre Authorization Payment | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#__docusaurus_skipToContent_fallback) 本页总览 This API is used for Merchant/Partner to apply for payment (like periodic and non-periodic debit), requests will be processed asynchronously and result will be notified via webhook. \*This API is only available for whitelisted merchants. If you need any help, you can contact us: [merchant@binance.com](mailto:merchant@binance.com) EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#endpoint "EndPoint的直接链接") ---------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/pay/apply Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **subMerchantId** | string | N | maximum length 19 | The sub merchant account id, issued when sub merchant been created at Binance, The parameter subMerchantId is required when configuring show subMerchant info. | | **merchantRequestId** | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The order id, Unique identifier for the request, idempotent result will be returned for same requestId | | **tradeMode** | string | Y | "DIRECT\_DEBIT" | | | **bizId** | Long | Y | number | business orderId like contractId | | **preBizId** | Long | N | number | prerequisite orderId like pay notification orderId for periodic debit scenario | | **amount** | decimal | Y | Max Unit Range: 8 decimal places | Amount to be deducted, please ensure the amount do not exceed the singleUpperLimit of the contract. | | **productType** | string | N | maximum length 16 | product type | | **productName** | string | Y | maximum length 256 | product name | | **productDetail** | string | N | maximum length 256 | product detail | | **webhookUrl** | string | N | maximum length 256. Can only start with http or https. | The URL for order notification. If the webhookUrl is passed in the parameter, the webhook url configured on the merchant platform will not take effect, and the currently passed url will be called back first. | | **orderTags** | Object | N | | order tags [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#order-tags) | ### orderTags[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#ordertags "orderTags的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **ifProfitSharing** | boolean | N | | if specified and true, order will be tagged as profitsharing. | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#sample-request-body "Sample Request Body的直接链接") { "subMerchantId": 123, "merchantRequestId": "abcd", "tradeMode": "DIRECT_DEBIT", "bizId":123, "productName": "test payment", "amount": 6, "webhookUrl": "https://abc.com"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#result-code) | | **data** | DataObject | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#data-object) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- ### DataObject[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#dataobject "DataObject的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **orderId** | string | Y | maximum length 19 | unique id generated by binance | | **prepayId** | string | Y | maximum length 19 | prepay id, the same as returned by the create order API, tracking order status, refund, etc. | | **merchantRequestId** | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The order id, Unique identifier for the request | | **appliedTime** | long | Y | \- | transaction time in milli seconds | | **status** | string | Y | "SUCCESS" or "FAILED" or "INIT" or "PROCESSING" | status of the order | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#sample-response "Sample Response的直接链接") #### applied success[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#applied-success "applied success的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "merchantRequestId": "abcd", "orderId": "1111", "prepayId": "1112", "appliedTime": 1672755315849, "status": "INIT" }} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#result-code "Result Code的直接链接") ------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | MERCHANT\_TRANSFER\_MERCHANT\_TYPE\_INVALID | 406107 | Merchant type not valid not support individual merchant | | | MERCHANT\_TRANSFER\_MERCHANT\_TOO\_FREQUENT | 406108 | Fail rate is high, please try again later | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#request-parameters) * [orderTags](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#ordertags) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#child-attribute) * [DataObject](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#dataobject) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-apply#result-code) --- # Direct Debit Payment Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#__docusaurus_skipToContent_fallback) 本页总览 This API is used for Merchant/Partner to notify the upcoming direct debit payment. Please do note that there will be a 24H frozen period to apply the payment. This API is not needed for non-periodic payment. For periodic payment, please call the API 2-5 days prior to inform user of the deduction. \*This API is only available for whitelisted merchants. If you need any help, you can contact us: [merchant@binance.com](mailto:merchant@binance.com) EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#endpoint "EndPoint的直接链接") ----------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/pay/notify Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **subMerchantId** | string | N | maximum length 19 | The sub merchant account id, issued when sub merchant been created at Binance, The parameter subMerchantId is required when configuring show subMerchant info. | | **merchantRequestId** | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The order id, Unique identifier for the request, idempotent result will be returned for same requestId | | **tradeMode** | string | Y | "DIRECT\_DEBIT" | | | **bizId** | Long | Y | number | business orderId like contractId | | **estimatedAmount** | decimal | Y | Max Unit Range: 8 decimal places | Amount to be deducted, please ensure the amount do not exceed the singleUpperLimit of the contract. | | **currency** | string | Y | only "USDT" can be accepted, fiat NOT supported. | order currency | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#sample-request-body "Sample Request Body的直接链接") { "subMerchantId": 123, "merchantRequestId": "abcd", "tradeMode": "DIRECT_DEBIT", "bizId":123, "estimatedAmount": 6, "currency":"USDT"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#response-parameters "Response Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#result-code) | | **data** | DataObject | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#data-object) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#child-attribute "Child Attribute的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- ### DataObject[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#dataobject "DataObject的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **orderId** | string | Y | maximum length 19 | unique id generated by binance | | **merchantRequestId** | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The order id, Unique identifier for the request | | **transactionTime** | long | Y | \- | transaction time in milli seconds | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#sample-response "Sample Response的直接链接") #### applied success[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#applied-success "applied success的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "merchantRequestId": "a0e29ab291fe6eeec5f13031b38ae284", "orderId": "203740009645850624", "transactionTime": 1672710635911 }} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#result-code "Result Code的直接链接") -------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | MERCHANT\_TRANSFER\_MERCHANT\_TYPE\_INVALID | 406107 | Merchant type not valid not support individual merchant | | | MERCHANT\_TRANSFER\_MERCHANT\_TOO\_FREQUENT | 406108 | Fail rate is high, please try again later | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#child-attribute) * [DataObject](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#dataobject) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-directdebit-pay-notify#result-code) --- # Webhook | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#__docusaurus_skipToContent_fallback) 本页总览 Webhook ======= Whenever a key event (currently only "order status change") occurs, Binance Connect will send a webhook message, and the partner (client) can receive this message at the webhook callback url and react accordingly, such as updating order data and frontend UI. ### Request Headers[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#request-headers "Request Headers的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | X-BN-Connect-Timestamp | timestamp | timestamp | | X-BN-Connect-Signature | string | SHA256withRSA(**requestBody** + **X-Connect-Timestamp**) | | X-BN-Connect-For | string | Same with your client id (X-Tesla-ClientId) | ### Request Body[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#request-body "Request Body的直接链接") | Field | Type | Remarks | | --- | --- | --- | | webhookEventType | string | fixed value: prime\_order\_event | | orderId | string | Binance order ID | | clientOrderId | string | Client side order ID | | direction | string | BUY or SELL | | fiatCurrency | string | Fiat currency | | cryptoCurrency | string | Crypto currency | | fiatAmount | decimal | Fiat amount | | cryptoAmount | decimal | Crypto Amount | | price | decimal | Price. 1 crypto currency = {price} fiat currency | | status | string | FILLED/FAILED | | createTime | timestamp | Order creation time (UTC) | | settleTime | timestamp | Settlement time (UTC) | ### Response Body[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#response-body "Response Body的直接链接") * HTTP status code is 200 * Response body is in JSON format. | **Field** | **Type** | **Remarks** | | --- | --- | --- | | returnCode | string | SUCCESS or other code you wish to return to Binance Connect | | returnMessage | string | the message you wish to return to Binance Connect | ### How signature works[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#how-signature-works "How signature works的直接链接") The encryption/decryption and verification process of webhook is exactly the opposite/mirrored of API request process. The sender and receiver of the two are opposite, but they are both processes that signed by the sender with a private key and verified by the receiver with a public key. For API requests, the partner (client) generates a pair of keys. The private key is kept securely and privately by the partner (client). Then the partner (client) uses the private key to sign when initiating API requests. The public key is shared to Bianance Connect, with which Binance will verify the signature of the API request to ensure that the request is indeed initiated by the partner (client). For webhook, it's an opposite/mirrored process. Binance Connect generates a pair of keys. The private key is kept securely and privately by Binance Connect. Then Binance Connect uses the private key to sign when initiating the webhook message. The public key is shared to the partner (client), with which the partner (client) can verify the signature of the webhook message to ensure that the message is indeed initiated by Binance. #### The webhook signature flow is as follows:[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#the-webhook-signature-flow-is-as-follows "The webhook signature flow is as follows:的直接链接") ![signature-Webhook.png](https://developers.binance.com/docs/zh-CN/assets/images/signature-Webhook-prime-14434a2391af0cfa81d8ed040b1e2334.png) ### Verify signature[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#verify-signature "Verify signature的直接链接") As mentioned above, Binance Connect initiates a webhook request to the webhook callback url provided by the partner ( client). And the partner (client) should verify the identity of the request initiator based on the public key provided by Binance Connect. The example code below shows how to verify signature with public key: public static boolean verify(String srcData, PublicKey publicKey, String sign) throws Exception { Signature signature = Signature.getInstance("SHA256withRSA"); signature.initVerify(publicKey); signature.update(srcData.getBytes()); return signature.verify(Base64.decodeBase64(sign.getBytes()));} ### Example[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#example "Example的直接链接") Request Body: { "webhookEventType": "prime_order_event", "orderId": "1234567890", "clientOrderId": "myOrder001", "direction": "BUY", "fiatCurrency": "EUR", "cryptoCurrency": "BTC", "fiatAmount": 100, "cryptoAmount": 0.00102181, "price": 97849.27, "status": "FILLED", "createTime": 1692951399, "settleTime": 1692954999} * [Request Headers](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#request-headers) * [Request Body](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#request-body) * [Response Body](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#response-body) * [How signature works](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#how-signature-works) * [Verify signature](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#verify-signature) * [Example](https://developers.binance.com/docs/zh-CN/connect_prime/webhook#example) --- # Check Server Time | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#__docusaurus_skipToContent_fallback) 本页总览 获取服务器时间 ======= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取服务器时间 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/time` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NONE 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "serverTime": 1499827319559 // 当前的系统时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Delist Schedule | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Delist-Schedule#__docusaurus_skipToContent_fallback) 本页总览 下架时间 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Delist-Schedule#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 合约团队会在下架公告后发布后更新`Get /dapi/v1/exchangeInfo`中`deliverydate`为下架时间,请查询[获取交易规则和交易对](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information) 提前获取合约交易对下架信息。 * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Delist-Schedule#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) --- # Get Funding Info | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info#__docusaurus_skipToContent_fallback) 本页总览 查询资金费率信息 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询资金费率信息,接口仅返回FundingRateCap/FundingRateFloor/fundingIntervalHours被特殊调整过的交易对 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/dapi/v1/fundingInfo` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BTCUSD_PERP", "adjustedFundingRateCap": "0.02500000", "adjustedFundingRateFloor": "-0.02500000", "fundingIntervalHours": 8, "disclaimer": false // ignore }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info#http%E8%AF%B7%E6%B1%82) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get C2C Trade History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#__docusaurus_skipToContent_fallback) 本页总览 获取C2C交易历史记录(USER\_DATA) ======================= 接口描述[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- 获取C2C交易历史记录 HTTP请求[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/c2c/orderMatch/listUserOrderHistory` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | tradeType | STRING | NO | BUY, SELL | | startTimestamp | LONG | NO | | | endTimestamp | LONG | NO | | | page | INT | NO | default 1 | | rows | INT | NO | default 100, max 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 若startTimestamp和endTimestamp均未发送,只返回最近30天数据。 > * startTimestamp和endTimestamp的最大时间间隔为30天。 > * 只能查询最近 6 个月的数据。如果需要产看全部C2C订单,你可以前往 [https://c2c.binance.com/zh-CN/fiatOrder](https://c2c.binance.com/zh-CN/fiatOrder) > 响应示例[​](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "success", "data": [ { "orderNumber":"20219644646554779648", "advNo": "11218246497340923904", "tradeType": "SELL", "asset": "BUSD", "fiat": "CNY", "fiatSymbol": "¥", "amount": "5000.00000000", // Quantity (in Crypto) "totalPrice": "33400.00000000", "unitPrice": "6.68", // Unit Price (in Fiat) "orderStatus": "COMPLETED", // PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM "createTime": 1619361369000, "commission": "0", // Transaction Fee (in Crypto) "counterPartNickName": "阿涛❤***", "advertisementRole": "TAKER" } ], "total": 1, "success": true} * [接口描述](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/c2c/rest-api/Get-C2C-Trade-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Binance Web3 Wallet | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-w3w/introduction#__docusaurus_skipToContent_fallback) 本页总览 Introduction[​](https://developers.binance.com/docs/zh-CN/binance-w3w/introduction#introduction "Introduction的直接链接") --------------------------------------------------------------------------------------------------------------------- Welcome to the Binance Web3 Wallet developer documentation. This guide helps third-party Decentralized Applications (DApps) integrate with the Binance Web3 Wallet using industry-standard protocols — no proprietary SDK required. Binance Web3 Wallet supports standard connection methods including **WalletConnect v2** and **EIP-1193 injected provider**. If your DApp already supports WalletConnect or injected wallets, it works with Binance Web3 Wallet out of the box. The Binance Web3 Wallet is built on the latest multi-party computation (MPC) cryptographic standard, providing unmatched security. With this technique, private keys remain secure and confidential, as each party only has access to its own key fragment. In addition to exceptional security, the Binance Web3 Wallet offers a comprehensive suite of advanced features, including biometric authentication, WalletConnect v2 support, and SoulBound Tokens (SBT). Features[​](https://developers.binance.com/docs/zh-CN/binance-w3w/introduction#features "Features的直接链接") --------------------------------------------------------------------------------------------------------- * **WalletConnect v2 compatible** — Binance Web3 Wallet is registered on WalletConnect Cloud. Any DApp that integrates WalletConnect v2 will automatically show Binance Wallet in the wallet list. * **Standard injected provider** — Inside the Binance App's DApp browser, `window.binancew3w.ethereum` is available as an EIP-1193 compatible provider. * **Multi-chain support** — EVM, Bitcoin, Solana, Sui, Cosmos, Aptos, TON, Tron, and more. * **Secure and easy integration** — Support for standard functions such as connecting, signing messages, and sending transactions. * **Continuously evolving capabilities** — Unique features like fund transfers between the user's Binance account and Web3 wallet. Support & Resources[​](https://developers.binance.com/docs/zh-CN/binance-w3w/introduction#support--resources "Support & Resources的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------- If you encounter any issues or have any questions, please reach out to our support team for assistance. Support appeal: [https://forms.gle/yWGZHfqmhZfT1E5XA](https://forms.gle/yWGZHfqmhZfT1E5XA) Provide feedback on this document: [https://forms.gle/zpBnQWCqoFMmby698](https://forms.gle/zpBnQWCqoFMmby698) * [Introduction](https://developers.binance.com/docs/zh-CN/binance-w3w/introduction#introduction) * [Features](https://developers.binance.com/docs/zh-CN/binance-w3w/introduction#features) * [Support & Resources](https://developers.binance.com/docs/zh-CN/binance-w3w/introduction#support--resources) --- # Query Balance Report | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#__docusaurus_skipToContent_fallback) 本页总览 Query Balance Report API used to query the downloaded report status and get the file path of the report. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#endpoint "EndPoint的直接链接") ------------------------------------------------------------------------------------------------------------------------------ POST /binancepay/openapi/balance-report/query Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **downloadId** | string | Y | \- | the data retuned at download balance report API | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#sample-request-body "Sample Request Body的直接链接") { "downloadId": "1232213"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#response-parameters "Response Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **exist** | boolean | Y | \- | exist or not | | **status** | string | Y | \- | PROCESSING FAILED EXPIRED SUCCESS | | **downloadUrl** | string | N | \- | the doanload url | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#child-attribute "Child Attribute的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------- ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#sample-response "Sample Response的直接链接") { "exist": true, "downloadUrl": "", "status": "PROCESSING"} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#result-code "Result Code的直接链接") --------------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | | INVALID\_MERCHANT\_TRADE\_NO | 400201 | merchantTradeNo is invalid or duplicated | | | ORDER\_NOT\_FOUND | 400202 | Order not found. | | | INVALID\_ACCOUNT\_STATUS | 400203 | Not support for this account, please check account status. | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#child-attribute) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report-query#result-code) --- # Query Transfer Result | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#__docusaurus_skipToContent_fallback) 本页总览 Query Transfer Result API used for merchant/partner to query transfer result. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#endpoint "EndPoint的直接链接") ---------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/wallet/transfer/query Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **tranId** | string | Y | \- | the value of requestId of provoking Transfer Fund API | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#sample-request-body "Sample Request Body的直接链接") { "tranId": "100002021071407140001"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#result-code) | | **data** | TransferResult | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#transfer-result) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- ### TransferResult[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#transferresult "TransferResult的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **tranId** | string | Y | \- | Used to query the transfer status, query the necessary fields for the transfer status | | **status** | string | Y | SUCCESS OR FAILURE OR PROCESS | SUCCESS (indicating that the transfer is completely successful), FAILURE (indicating that the transfer has failed, it may be that the transferor has a problem with the transferee), PROCESS (the transfer is in progress) | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "tranId": "100002021071407140001", "status": "SUCCESS" }, "errorMessage": ""} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#result-code "Result Code的直接链接") ------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | | INVALID\_ACCOUNT\_STATUS | 400203 | Not support for this account, please check account status. | | | TRANSFER\_TRAN\_ID\_NOT\_FOUND | 400401 | can not find the transfer | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#child-attribute) * [TransferResult](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#transferresult) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-wallet-transfer-query#result-code) --- # Binance Pay: Refund Order Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#__docusaurus_skipToContent_fallback) 本页总览 Webhook Endpoints[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#webhook-endpoints "Webhook Endpoints�的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- Binance Pay will send refund order events with final status only when partner use refund open api to partner for notification. * Successful close result for the close refund order request will be notified through this webhook bizStatus is "REFUND\_SUCCESS" or "REFUND\_REJECTED" Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **bizType** | string | Y | \- | "PAY\_REFUND" | | **bizId** | string | Y | maximum length 19 | prepay id ,unique id generated by binance | | **bizIdStr** | string | Y | \- | biz id as string | | **bizStatus** | string | Y | \- | "REFUND\_SUCCESS","REFUND\_REJECTED" | | **data** | string | Y | \- | JSON string, data details [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#notification-data) | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- ### Notification Data[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#notification-data "Notification Data的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **merchantTradeNo** | string | Y | letter or digit, no other symbol allowed | The order id, Unique identifier for the request | | **productType** | string | Y | maximum length 16 | product type | | **productName** | string | Y | maximum length 256 | product name | | **tradeType** | string | Y | "WEB", "APP", "WAP", "MINI\_PROGRAM", "PAYMENT\_LINK", "OTHERS" | operate entrance | | **totalFee** | decimal | Y | limitation refer to Create Order API order amount | order amount | | **currency** | string | Y | \- | order currency | | **openUserId** | string | N | maximum length 19 | Consumer unique id | | **refundInfo** | string | N | only merchant got approved by Binance Operation's approval will receive this payerInfo | payer information, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#ayerinfo-data) | ### RefundInfo Data[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#refundinfo-data "RefundInfo Data的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **refundRequestId** | string | Y | maximum length 64 | The unique ID assigned by the merchant to identify a refund request. | | **prepayId** | string | Y | maximum length 19 | The unique ID assigned by Binance for the original order to be refunded. | | **orderAmount** | string | Y | limitation refer to Create Order API order amount | The total amount of prepay order. | | **refundedAmount** | string | Y | limitation refer to Create Order API order amount | The total refunded amount included this refund request. | | **refundAmount** | string | Y | limitation refer to Create Order API order amount | The refund amount of this refund request. | | **refundedCommission** | string | Y | \- | The total refunded transaction fees included this refund request. | | **refundCommission** | string | Y | \- | The refund transaction fees of this refund request. | | **remainingAttempts** | int | Y | \- | The remaining attempts of this original order. If this value becomes 1, then your next refund request amount will be ignored. We will refund all the remaing amount of this original order. | | **payerOpenId** | string | Y | maximum length 32 | The payer open id of this refund which is the merchant open id. | | **duplicateRequest** | string | Y | \- | The flag to mark this request refundRequestId is duplicate or not. It will be 'Y' or 'N' | ### Sample Payload[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#sample-payload "Sample Payload的直接链接") { "bizType": "PAY_REFUND", "data": "{\"merchantTradeNo\":\"6177e6ae81ce6f001b4a6233\",\"totalFee\":0.01,\"transactTime\":1635248421335,\"refundInfo\":{\"orderAmount\":\"0.01000000\",\"duplicateRequest\":\"N\",\"payerOpenId\":\"9aa0a8bb21cf5fbf049aad7db35dc3d3\",\"prepayId\":\"123289163323899904\",\"refundRequestId\":\"68711039982968853\",\"refundedAmount\":\"0.01000000\",\"remainingAttempts\":9,\"refundAmount\":\"0.01000000\"},\"currency\":\"USDT\",\"commission\":0,\"openUserId\":\"b5ec36baaa5ab9a5cfb1c29c2057bd81\",\"productType\":\"LIVE_STREAM\",\"productName\":\"LIVE_STREAM\",\"tradeType\":\"APP\"}", "bizIdStr": "123289163323899904", "bizId": 123289163323899904, "bizStatus": "REFUND_SUCCESS"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **returnCode** | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry | | **returnMessage** | string | N | \- | return message | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#sample-response "Sample Response的直接链接") **After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.** {"returnCode":"SUCCESS","returnMessage":null} * [Webhook Endpoints](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#webhook-endpoints) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#request-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#child-attribute) * [Notification Data](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#notification-data) * [RefundInfo Data](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#refundinfo-data) * [Sample Payload](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#sample-payload) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/refund-order-notification#sample-response) --- # Batch Payout Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#__docusaurus_skipToContent_fallback) 本页总览 Binance Pay will send the status of Payout order event to partner/merchant webhook endpoint configure on the Merchant Management Platform. In situations where an event notification receives sending failure, the webhook will retry up to 6 times to resend the event. This is applicable to if the merchant/partner did not return HTTP 200 SUCCESS to the webhook as well. Webhook Endpoints[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#webhook-endpoints "Webhook Endpoints的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **bizType** | string | Y | \- | **PAYOUT** | | **bizId** | long | Y | \- | Payout ID | | **bizIdStr** | string | Y | \- | biz id as string | | **bizStatus** | string | Y | \- | Same as Payout Query batchStatus | | **data** | TransferQueryResult | Y | \- | JSON string | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#child-attribute "Child Attribute的直接链接") -------------------------------------------------------------------------------------------------------------------------------- ### TransferQueryResult[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#transferqueryresult "TransferQueryResult的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **requestId** | string | Y | Maximum length 32 | The passed-in request ID | | **batchStatus** | string | Y | Enum string | **ACCEPTED**: accepted the request, will process it soon.
**PROCESSING**: batch under processing
**SUCCESS**: All payout performed successfully, user have received fund in Binance funding wallet
**PART\_SUCCESS**: transfers partially succeeded.
Reasons:
1.Insufficient funds: there’s insufficient fund in your account
2.Awaiting recipient: pending user to create Binance account and perform KYC
3.Partial refund: user failed to complete KYC in 72 hours, fund will be funded to merchant account
**FAILED**: all transfers failed
**CANCELED**: Transfer request canceled by Binance due to unknown system errors after retry limit, will not retry further | | **merchantId** | long | Y | | | | **currency** | string | Y | Valid crypto currency | The request currency. | | **totalAmount** | decimal | Y | | Total transfer amount in this batch. | | **totalNumber** | int | Y | Maximum length 1000 | Total number of transfers in the batch. | ### Sample Payload[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#sample-payload "Sample Payload的直接链接") { "bizType": "PAYOUT", "data": "{\"batchStatus\":\"SUCCESS\",\"currency\":\"USDT\",\"merchantId\":100100006288,\"requestId\":\"gg8127129\",\"totalAmount\":2.00000000,\"totalNumber\":2}", "bizIdStr": "29383937493038367292", "bizId": 29383937493038367292, "bizStatus": "SUCCESS"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#response-parameters "Response Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **returnCode** | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry | | **returnMessage** | string | N | \- | return message | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#sample-response "Sample Response的直接链接") **After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.** {"returnCode":"SUCCESS","returnMessage":null} * [Webhook Endpoints](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#webhook-endpoints) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#request-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#child-attribute) * [TransferQueryResult](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#transferqueryresult) * [Sample Payload](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#sample-payload) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout#sample-response) --- # Payout Non-binance user Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#__docusaurus_skipToContent_fallback) 本页总览 Binance Pay will send the final status of Payout order event to non-Binance email to partner/merchant webhook endpoint configure on the Merchant Management Platform. The final event to non-Binance email refers to * Email created Binance account and perform KYC within 72 hours to receive fund * Email holder did not create account nor complete KYC within 72 hours resulting in fund being refunded back to merchant/partner account In situations where an event notification receives sending failure, the webhook will retry up to 6 times to resend the event. This is applicable to if the merchant/partner did not return HTTP 200 SUCCESS to the webhook as well. Webhook Endpoints[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#webhook-endpoints "Webhook Endpoints的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------- Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#request-parameters "Request Parameters的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **bizType** | string | Y | \- | **PAYOUT\_NON\_BN** | | **bizId** | long | Y | \- | Payout ID | | **bizIdStr** | string | Y | \- | biz id as string | | **bizStatus** | string | Y | \- | Same as Payout Query detail order status | | **data** | PayoutOrderDetail | Y | \- | JSON string | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#child-attribute "Child Attribute的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------- ### PayoutOrderDetail[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#payoutorderdetail "PayoutOrderDetail的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **merchantSendId** | string | Y | \- | Unique identifier for the merchant sending the payout. | | **orderId** | string | Y | \- | Unique identifier for the order associated with this payout. | | **batchId** | string | Y | \- | Batch identifier grouping multiple payouts. | | **status** | string | Y | \- | Same as Payout Query detail order status | | **currency** | string | Y | \- | The currency in which the payout is made. | | **amount** | decimal | Y | \- | The total amount of the payout. | | **receiveType** | string | Y | Enum value | Receiver's ID type only will be Email
**EMAIL**: Binance user email address, support payout to non-binance users | | **receiver** | string | Y | \- | The email of this receiver | ### Sample Payload[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#sample-payload "Sample Payload的直接链接") { "bizType": "PAYOUT", "data": "{\"merchantSendId\":\"XXXIDXXX\",\"orderId\":\"284838578405933060\",\"batchId\":\"284838578405933040\",\"status\":\"SUCCESS\",\"currency\":\"USDT\",\"amount\":\"1\",\"receiveType\":\"EMAIL\",\"receiver\":\"xxxxx@gmail.com\"}", "bizIdStr": "29383937493038367292", "bizId": 29383937493038367292, "bizStatus": "SUCCESS"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#response-parameters "Response Parameters的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **returnCode** | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry | | **returnMessage** | string | N | \- | return message | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#sample-response "Sample Response的直接链接") **After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.** {"returnCode":"SUCCESS","returnMessage":null} * [Webhook Endpoints](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#webhook-endpoints) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#request-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#child-attribute) * [PayoutOrderDetail](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#payoutorderdetail) * [Sample Payload](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#sample-payload) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-payout-non-binance#sample-response) --- # Direct Debit/Pre Authorization Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#__docusaurus_skipToContent_fallback) 本页总览 Webhook Endpoints[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#webhook-endpoints "Webhook Endpoints的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- Binance Pay will send direct debit/pre authorization contract events to partner for notification. You will be able to configure webhook endpoints via the [Binance Merchant Admin Portal](https://merchant.binance.com/en/dashboard) . \*This is only available for whitelisted merchants. If you need any help, you can contact us: [merchant@binance.com](mailto:merchant@binance.com) In situation where event was signed to terminated, the webhook will retry up to 6 times to resend the event. Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **bizType** | string | Y | \- | "DIRECT\_DEBIT\_CT" | | **bizId** | long | Y | \- | contract id | | **bizIdStr** | string | Y | \- | biz id as string | | **bizStatus** | string | Y | \- | "CONTRACT\_SIGNED","CONTRACT\_TERMINATED","CONTRACT\_EXPIRED" | | **data** | string | Y | \- | JSON string, data details [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#notification-data) | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#child-attribute "Child Attribute的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- ### Notification Data[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#notification-data "Notification Data的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **merchantContractCode** | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The unique ID assigned by the merchant to identify a direct debit contract request. | | **contractId** | Long | Y | maximum length 19 | contract id | | **serviceName** | string | Y | maximum length 32 | service name | | **openUserId** | string | N | \- | payer unique id | | **merchantAccountNo** | string | N | maximum length 64 | the userID/user account in merchant side e.g. [xxx@gmail.com](mailto:xxx@gmail.com) | | **singleUpperLimit** | decimal | Y | Max Unit Range: 8 decimal places | upper limit | | **currency** | string | Y | \- | currency | | **contractTerminationWay** | int | N | \- | 0-by user, 1-auto expire, 2-by operation team. only "CONTRACT\_TERMINATED" status | | **contractTerminationTime** | Long | N | \- | only "CONTRACT\_TERMINATED" status | ### Sample Payload[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#sample-payload "Sample Payload的直接链接") #### CONTRACT SIGNED[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#contract-signed "CONTRACT SIGNED的直接链接") { "bizType": "DIRECT_DEBIT_CT", "data": "{\"merchantContractCode\":\"a9d1deffaecba9f592aa682b5c997042\",\"contractId\":205638372306477056,\"serviceName\":\"Tra Direct Debit\",\"openUserId\":\"04fdfaf5c88d746168e3cc0a582b65d4\",\"merchantAccountNo\":\"sss@gmail.com\",\"currency\":\"USDT\",\"singleUpperLimit\":50.00000000}", "bizIdStr": "205638372306477056", "bizId": 205638372306477056, "bizStatus": "CONTRACT_SIGNED"} #### CONTRACT TERMINATED[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#contract-terminated "CONTRACT TERMINATED的直接链接") { "bizType": "DIRECT_DEBIT_CT", "data": "{\"merchantContractCode\":\"a9d1deffaecba9f592aa682b5c997042\",\"contractId\":205638372306477056,\"serviceName\":\"Tra Direct Debit\",\"openUserId\":\"04fdfaf5c88d746168e3cc0a582b65d4\",\"merchantAccountNo\":\"sss@gmail.com\",\"currency\":\"USDT\",\"singleUpperLimit\":50.00000000,\"contractTerminationWay\":0,\"contractTerminationTime\":1673594769902}", "bizIdStr": "205638372306477056", "bizId": 205638372306477056, "bizStatus": "CONTRACT_TERMINATED"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#response-parameters "Response Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **returnCode** | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry | | **returnMessage** | string | N | \- | return message | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#sample-response "Sample Response的直接链接") **After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.** {"returnCode":"SUCCESS","returnMessage":null} * [Webhook Endpoints](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#webhook-endpoints) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#request-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#child-attribute) * [Notification Data](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#notification-data) * [Sample Payload](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#sample-payload) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-directdebit-contract#sample-response) --- # 枚举定义 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#__docusaurus_skipToContent_fallback) 本页总览 枚举定义 ==== 这将适用于 REST API 和 WebSocket API。 交易对的状态(status)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E4%BA%A4%E6%98%93%E5%AF%B9%E7%9A%84%E7%8A%B6%E6%80%81status "交易对的状态(status)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * `TRADING` - 正常交易中 * `END_OF_DAY` - 收盘 * `HALT` - 交易终止(该交易对已下线) * `BREAK` - 交易暂停 账户与交易对权限(permissions)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%B4%A6%E6%88%B7%E4%B8%8E%E4%BA%A4%E6%98%93%E5%AF%B9%E6%9D%83%E9%99%90permissions "账户与交易对权限(permissions)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * `SPOT` - 现货 * `MARGIN` - 杠杆 * `LEVERAGED` - 杠杆代币 * `TRD_GRP_002` - 交易组 002 * `TRD_GRP_003` - 交易组 003 * `TRD_GRP_004` - 交易组 004 * `TRD_GRP_005` - 交易组 005 * `TRD_GRP_006` - 交易组 006 * `TRD_GRP_007` - 交易组 007 * `TRD_GRP_008` - 交易组 008 * `TRD_GRP_009` - 交易组 009 * `TRD_GRP_010` - 交易组 010 * `TRD_GRP_011` - 交易组 011 * `TRD_GRP_012` - 交易组 012 * `TRD_GRP_013` - 交易组 013 * `TRD_GRP_014` - 交易组 014 * `TRD_GRP_015` - 交易组 015 * `TRD_GRP_016` - 交易组 016 * `TRD_GRP_017` - 交易组 017 * `TRD_GRP_018` - 交易组 018 * `TRD_GRP_019` - 交易组 019 * `TRD_GRP_020` - 交易组 020 * `TRD_GRP_021` - 交易组 021 * `TRD_GRP_022` - 交易组 022 * `TRD_GRP_023` - 交易组 023 * `TRD_GRP_024` - 交易组 024 * `TRD_GRP_025` - 交易组 025 订单状态(status)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%8A%B6%E6%80%81status "订单状态(status)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ | 状态 | 描述 | | --- | --- | | `NEW` | 该订单被交易引擎接受。 | | `PENDING_NEW` | 该订单处于待处理 (`PENDING`) 阶段,直到其所属订单组(order list) 中的 `working order` 完全成交。 | | `PARTIALLY_FILLED` | 部分订单已被成交。 | | `FILLED` | 订单已完全成交。 | | `CANCELED` | 用户撤销了订单。 | | `PENDING_CANCEL` | 撤销中(目前并未使用) | | `REJECTED` | 订单没有被交易引擎接受,也没被处理。 | | `EXPIRED` | 该订单根据订单类型的规则被取消(例如,没有成交的 LIMIT FOK 订单, LIMIT IOC 或部分成交的 MARKET 订单)
或者被交易引擎取消(例如,在强平期间被取消的订单,在交易所维护期间被取消的订单) | | `EXPIRED_IN_MATCH` | 表示订单由于 STP 而过期。(例如,带有 `EXPIRE_TAKER` 的订单与账簿上同属相同帐户或相同 `tradeGroupId` 的现有订单匹配) | 订单组(order list)状态 (状态类型集 listStatusType)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%BB%84order-list%E7%8A%B6%E6%80%81-%E7%8A%B6%E6%80%81%E7%B1%BB%E5%9E%8B%E9%9B%86-liststatustype "订单组(order list)状态 (状态类型集 listStatusType)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 状态 | 描述 | | --- | --- | | `RESPONSE` | 在 ListStatus 用于响应失败的操作时会被使用。(例如,下订单组或取消订单组) | | `EXEC_STARTED` | 订单组已被下达或订单组状态有更新。 | | `UPDATED` | 订单组里的某个订单的 clientOrderId 被改变。 | | `ALL_DONE` | 订单组执行结束,因此不再处于活动状态。 | 订单组(order list)中的订单状态 (订单状态集 listOrderStatus)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%BB%84order-list%E4%B8%AD%E7%9A%84%E8%AE%A2%E5%8D%95%E7%8A%B6%E6%80%81-%E8%AE%A2%E5%8D%95%E7%8A%B6%E6%80%81%E9%9B%86-listorderstatus "订单组(order list)中的订单状态 (订单状态集 listOrderStatus)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 状态 | 描述 | | --- | --- | | `EXECUTING` | 订单组已被下达或订单组状态有更新。 | | `ALL_DONE` | 订单组执行结束,因此不再处于活动状态。 | | `REJECT` | 在 ListStatus 用于响应在下单阶段或取消订单组期间的失败操作时会被使用, | 订单组的类型[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%BB%84%E7%9A%84%E7%B1%BB%E5%9E%8B "订单组的类型的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ * `OCO` * `OTO` 分配类型[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E5%88%86%E9%85%8D%E7%B1%BB%E5%9E%8B "分配类型的直接链接") -------------------------------------------------------------------------------------------------------------------------------- * `SOR` 订单类型(orderTypes, type)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%B1%BB%E5%9E%8Bordertypes-type "订单类型(orderTypes, type)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * `LIMIT` - 限价单 * `MARKET` - 市价单 * `STOP_LOSS` - 止损单 * `STOP_LOSS_LIMIT` - 限价止损单 * `TAKE_PROFIT` - 止盈单 * `TAKE_PROFIT_LIMIT` - 限价止盈单 * `LIMIT_MAKER` - 限价做市单 订单返回类型 (newOrderRespType)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E8%BF%94%E5%9B%9E%E7%B1%BB%E5%9E%8B-neworderresptype "订单返回类型 (newOrderRespType)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * `ACK` * `RESULT` * `FULL` 工作平台[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E5%B7%A5%E4%BD%9C%E5%B9%B3%E5%8F%B0 "工作平台的直接链接") -------------------------------------------------------------------------------------------------------------------------------- * `EXCHANGE` - 常规交易 * `SOR` - 智能订单路由 订单方向 (side)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E6%96%B9%E5%90%91-side "订单方向 (side)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------- * `BUY` - 买入 * `SELL` - 卖出 生效时间 (timeInForce)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E7%94%9F%E6%95%88%E6%97%B6%E9%97%B4-timeinforce "生效时间 (timeInForce)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 这里定义了订单在失效前的有效时间。 | 状态 | 描述 | | --- | --- | | `GTC` | 成交为止
订单会一直有效,直到被成交或者取消。 | | `IOC` | 无法立即成交的部分就撤销
订单在失效前会尽量多的成交。 | | `FOK` | 无法全部立即成交就撤销
如果无法全部成交,订单会失效。 | 速率限制种类(rateLimitType)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6%E7%A7%8D%E7%B1%BBratelimittype "速率限制种类(rateLimitType)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * REQUEST\_WEIGHT - 单位时间请求权重之和上限 { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 6000} * ORDERS - 单位时间下单次数上限 { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 1, "limit": 10} * RAW\_REQUESTS - 单位时间请求次数上限 { "rateLimitType": "RAW_REQUESTS", "interval": "MINUTE", "intervalNum": 5, "limit": 61000} 速率限制间隔 (interval)[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6%E9%97%B4%E9%9A%94-interval "速率限制间隔 (interval)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * SECOND * MINUTE * DAY STP 模式[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#stp-%E6%A8%A1%E5%BC%8F "STP 模式的直接链接") ---------------------------------------------------------------------------------------------------------------------- 请参阅 [自我交易预防 (Self Trade Prevention - STP) 常见问题](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/faqs/stp_faq) 。 * `NONE` * `EXPIRE_MAKER` * `EXPIRE_TAKER` * `EXPIRE_BOTH` * `DECREMENT` * `TRANSFER` 可能的执行类型:[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E5%8F%AF%E8%83%BD%E7%9A%84%E6%89%A7%E8%A1%8C%E7%B1%BB%E5%9E%8B "可能的执行类型:的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 状态 | 描述 | | --- | --- | | `NEW` | 新订单已被引擎接受。 | | `CANCELED` | 订单被用户取消。 | | `REPLACED` | 订单已被修改。 | | `REJECTED` | 新订单被拒绝 (e.g. 在撤消挂单再下单时,其中新订单被拒绝但撤消挂单请求成功)。 | | `TRADE` | 订单有新成交。 | | `EXPIRED` | 订单已根据 Time In Force 参数的规则取消(e.g. 没有成交的 LIMIT FOK 订单或部分成交的 LIMIT IOC 订单)或者被交易所取消(e.g. 强平或维护期间取消的订单)。 | | `TRADE_PREVENTION` | 订单因 STP 触发而过期。 | 执行规则[​](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E6%89%A7%E8%A1%8C%E8%A7%84%E5%88%99 "执行规则的直接链接") -------------------------------------------------------------------------------------------------------------------------------- * `PRICE_RANGE` * [交易对的状态(status)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E4%BA%A4%E6%98%93%E5%AF%B9%E7%9A%84%E7%8A%B6%E6%80%81status) * [账户与交易对权限(permissions)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%B4%A6%E6%88%B7%E4%B8%8E%E4%BA%A4%E6%98%93%E5%AF%B9%E6%9D%83%E9%99%90permissions) * [订单状态(status)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%8A%B6%E6%80%81status) * [订单组(order list)状态 (状态类型集 listStatusType)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%BB%84order-list%E7%8A%B6%E6%80%81-%E7%8A%B6%E6%80%81%E7%B1%BB%E5%9E%8B%E9%9B%86-liststatustype) * [订单组(order list)中的订单状态 (订单状态集 listOrderStatus)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%BB%84order-list%E4%B8%AD%E7%9A%84%E8%AE%A2%E5%8D%95%E7%8A%B6%E6%80%81-%E8%AE%A2%E5%8D%95%E7%8A%B6%E6%80%81%E9%9B%86-listorderstatus) * [订单组的类型](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%BB%84%E7%9A%84%E7%B1%BB%E5%9E%8B) * [分配类型](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E5%88%86%E9%85%8D%E7%B1%BB%E5%9E%8B) * [订单类型(orderTypes, type)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E7%B1%BB%E5%9E%8Bordertypes-type) * [订单返回类型 (newOrderRespType)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E8%BF%94%E5%9B%9E%E7%B1%BB%E5%9E%8B-neworderresptype) * [工作平台](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E5%B7%A5%E4%BD%9C%E5%B9%B3%E5%8F%B0) * [订单方向 (side)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E8%AE%A2%E5%8D%95%E6%96%B9%E5%90%91-side) * [生效时间 (timeInForce)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E7%94%9F%E6%95%88%E6%97%B6%E9%97%B4-timeinforce) * [速率限制种类(rateLimitType)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6%E7%A7%8D%E7%B1%BBratelimittype) * [速率限制间隔 (interval)](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6%E9%97%B4%E9%9A%94-interval) * [STP 模式](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#stp-%E6%A8%A1%E5%BC%8F) * [可能的执行类型:](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E5%8F%AF%E8%83%BD%E7%9A%84%E6%89%A7%E8%A1%8C%E7%B1%BB%E5%9E%8B) * [执行规则](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/enums#%E6%89%A7%E8%A1%8C%E8%A7%84%E5%88%99) --- # Webhook | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#__docusaurus_skipToContent_fallback) 本页总览 Webhook ======= Whenever a key event (currently only "order status change") occurs, Binance Connect will send a webhook message, and the partner (client) can receive this message at the webhook callback url and react accordingly, such as updating order data and frontend UI. ### Request Headers[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#request-headers "Request Headers的直接链接") | **Field** | **Type** | **Remarks** | | --- | --- | --- | | X-BN-Connect-Timestamp | timestamp | timestamp | | X-BN-Connect-Signature | string | SHA256withRSA(**requestBody** + **X-Connect-Timestamp**) | | X-BN-Connect-For | string | Same with your client id (X-Tesla-ClientId) | ### Request Body[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#request-body "Request Body的直接链接") | Field | Type | Remarks | | --- | --- | --- | | webhookEventType | string | fixed value: prime\_order\_event | | orderId | string | Binance order ID | | clientOrderId | string | Client side order ID | | direction | string | BUY or SELL | | fiatCurrency | string | Fiat currency | | cryptoCurrency | string | Crypto currency | | fiatAmount | decimal | Fiat amount | | cryptoAmount | decimal | Crypto Amount | | price | decimal | Price. 1 crypto currency = {price} fiat currency | | status | string | FILLED/FAILED | | createTime | timestamp | Order creation time (UTC) | | settleTime | timestamp | Settlement time (UTC) | ### Response Body[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#response-body "Response Body的直接链接") * HTTP status code is 200 * Response body is in JSON format. | **Field** | **Type** | **Remarks** | | --- | --- | --- | | returnCode | string | SUCCESS or other code you wish to return to Binance Connect | | returnMessage | string | the message you wish to return to Binance Connect | ### How signature works[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#how-signature-works "How signature works的直接链接") The encryption/decryption and verification process of webhook is exactly the opposite/mirrored of API request process. The sender and receiver of the two are opposite, but they are both processes that signed by the sender with a private key and verified by the receiver with a public key. For API requests, the partner (client) generates a pair of keys. The private key is kept securely and privately by the partner (client). Then the partner (client) uses the private key to sign when initiating API requests. The public key is shared to Bianance Connect, with which Binance will verify the signature of the API request to ensure that the request is indeed initiated by the partner (client). For webhook, it's an opposite/mirrored process. Binance Connect generates a pair of keys. The private key is kept securely and privately by Binance Connect. Then Binance Connect uses the private key to sign when initiating the webhook message. The public key is shared to the partner (client), with which the partner (client) can verify the signature of the webhook message to ensure that the message is indeed initiated by Binance. #### The webhook signature flow is as follows:[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#the-webhook-signature-flow-is-as-follows "The webhook signature flow is as follows:的直接链接") ![signature-Webhook.png](https://developers.binance.com/docs/zh-CN/assets/images/signature-Webhook-prime-14434a2391af0cfa81d8ed040b1e2334.png) ### Verify signature[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#verify-signature "Verify signature的直接链接") As mentioned above, Binance Connect initiates a webhook request to the webhook callback url provided by the partner ( client). And the partner (client) should verify the identity of the request initiator based on the public key provided by Binance Connect. The example code below shows how to verify signature with public key: public static boolean verify(String srcData, PublicKey publicKey, String sign) throws Exception { Signature signature = Signature.getInstance("SHA256withRSA"); signature.initVerify(publicKey); signature.update(srcData.getBytes()); return signature.verify(Base64.decodeBase64(sign.getBytes()));} ### Example[​](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#example "Example的直接链接") Request Body: { "webhookEventType": "prime_order_event", "orderId": "1234567890", "clientOrderId": "myOrder001", "direction": "BUY", "fiatCurrency": "EUR", "cryptoCurrency": "BTC", "fiatAmount": 100, "cryptoAmount": 0.00102181, "price": 97849.27, "status": "FILLED", "createTime": 1692951399, "settleTime": 1692954999} * [Request Headers](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#request-headers) * [Request Body](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#request-body) * [Response Body](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#response-body) * [How signature works](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#how-signature-works) * [Verify signature](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#verify-signature) * [Example](https://developers.binance.com/docs/zh-CN/connect_prime/webhook/webhook#example) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/copy_trading#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2024-06-06[​](https://developers.binance.com/docs/zh-CN/copy_trading#2024-06-06 "2024-06-06的直接链接") --------------------------------------------------------------------------------------------------- * 新增跟单交易接口: * `GET /sapi/v1/copyTrading/futures/userStatus`: 查询是否为带单员身份 * `GET /sapi/v1/copyTrading/futures/leadSymbol`: 查询带单币种白名单 * [2024-06-06](https://developers.binance.com/docs/zh-CN/copy_trading#2024-06-06) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/copy_trading/change-log#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2024-06-06[​](https://developers.binance.com/docs/zh-CN/copy_trading/change-log#2024-06-06 "2024-06-06的直接链接") -------------------------------------------------------------------------------------------------------------- * 新增跟单交易接口: * `GET /sapi/v1/copyTrading/futures/userStatus`: 查询是否为带单员身份 * `GET /sapi/v1/copyTrading/futures/leadSymbol`: 查询带单币种白名单 * [2024-06-06](https://developers.binance.com/docs/zh-CN/copy_trading/change-log#2024-06-06) --- # Contact us | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/copy_trading/contact-us#__docusaurus_skipToContent_fallback) 联系我们 ==== * [币安API电报群](https://t.me/Binance_api_Chinese) * 咨询关于API或者Websockets性能方面的问题. * 咨询文档中没有提及的API问题. * [币安开发者社区](https://dev.binance.vision/) * 咨询关于API/Websockets代码实现,或者任何API/Websockets的问题. * [币安客服](https://www.binance.com/cn/support-center) * 咨询关于账户,钱包,2FA等. --- # Flexible Loan Borrow (TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#__docusaurus_skipToContent_fallback) 本页总览 活期借币借贷 (TRADE) ============== HTTP Request[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#http-request "HTTP Request的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v2/loan/flexible/borrow` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- **6000** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | loanCoin | STRING | YES | | | loanAmount | DECIMAL | NO | 当 collateralAmount 为空时,需必填 | | collateralCoin | STRING | YES | | | collateralAmount | DECIMAL | NO | 当 loanAmount 为空时,需必填 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * 主账户和子账户均可使用此API接口 * 您可以通过输入loanAmount和collateralAmount来自定义LTV 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- { "loanCoin": "BUSD", "loanAmount": "100.5", "collateralCoin": "BNB", "collateralAmount": "50.5", "status": "Succeeds" //Succeeds, Failed, Processing} * [HTTP Request](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#http-request) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Test Connectivity | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#__docusaurus_skipToContent_fallback) 本页总览 测试服务器连通性 PING ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- 测试能否联通 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/ping` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- {} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D-1 "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- NONE * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D-1) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 24hr Ticker Price Change Statistics | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#__docusaurus_skipToContent_fallback) 本页总览 24hr价格变动情况 ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 请注意,不携带symbol参数会返回全部交易对数据,不仅数据庞大,而且权重极高 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/ticker/24hr` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 带symbol为**1**,不带为**40** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | pair | STRING | NO | 标的交易对 | > * symbol 和 pair 不接受同时发送 > * 发送 pair的,返回pair对应所有正在交易的symbol数据 > * symbol,pair 都没有发送的,返回所有symbol数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BTCUSD_200925", "pair": "BTCUSD", "priceChange": "136.6", //24小时价格变动 "priceChangePercent": "1.436", //24小时价格变动百分比 "weightedAvgPrice": "9547.3", //24小时加权平均价 "lastPrice": "9651.6", //最近一次成交价 "lastQty": "1", //最近一次成交量 "openPrice": "9515.0", //24小时内第一次成交的价格 "highPrice": "9687.0", //24小时最高价 "lowPrice": "9499.5", //24小时最低价 "volume": "494109", //24小时成交量 "baseVolume": "5192.94797687", //24小时成交额(标的数量) "openTime": 1591170300000, //24小时内,第一笔交易的发生时间 "closeTime": 1591256718418, //24小时内,最后一笔交易的发生时间 "firstId": 600507, // 首笔成交id "lastId": 697803, // 末笔成交id "count": 97297 // 成交笔数 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Compressed Aggregate Trades List | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#__docusaurus_skipToContent_fallback) 本页总览 近期成交(归集) ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 归集交易与逐笔交易的区别在于,同一价格、同一方向、同一时间(100ms 计算)的订单簿trade 会被聚合为一条 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/aggTrades` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **20** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | fromId | LONG | NO | 从包含 fromID 的成交开始返回结果 | | startTime | LONG | NO | 从该时刻之后的成交记录开始返回结果 | | endTime | LONG | NO | 返回该时刻为止的成交记录 | | limit | INT | NO | 默认 500; 最大 1000. | > * 接口仅支持查询最近1年的交易数据 > * 如果同时发送`startTime`和`endTime`,间隔必须小于一小时 > * 如果没有发送任何筛选参数(`fromId`, `startTime`, `endTime`),默认返回最近的成交记录 > * 保险基金和自动减仓(ADL)成交不属于订单簿成交,故不会被归并聚合 > * 同时发送`startTime`/`endTime`和`fromId`可能导致请求超时,建议仅发送`fromId`或仅发送`startTime`和`endTime` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { a: 416690, // 归集成交ID p: "9642.4", // 成交价 q: "3", // 成交量 f: 595259, // 被归集的首个成交ID l: 595259, // 被归集的末个成交ID T: 1591250548649, // 成交时间 m: true, // 是否为主动卖出单 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Continuous Contract Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 连续合约K线数据 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 每根K线的开盘时间可视为唯一ID HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/continuousKlines` > * 合约类型: > * PERPETUAL 永续合约 > * CURRENT\_QUARTER 当季交割合约 > * NEXT\_QUARTER 次季交割合约 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ \ > 1000 | 10\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | pair | STRING | YES | 标的交易对 |\ | contractType | ENUM | YES | 合约类型 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * startTime 与 endTime 之间最多只可以相差200天\ > * 默认返回 startTime 与 endTime 之间最接近 endTime的 limit 条数据:\ > * startTime, endTime 均未提供的, 将会使用当前时间为 endTime, 200天前为 startTime\ > * 仅提供 startTime 的, 将会使用 startTime 之后200天作为默认 endTime (至多为当前时间)\ > * 仅提供 endTime 的, 将会使用endTime 之前200天作为默认 startTime\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1591258320000, // 开盘时间 "9640.7", // 开盘价 "9642.4", // 最高价 "9640.6", // 最低价 "9642.0", // 收盘价(当前K线未结束的即为最新价) "206", // 成交量 1591258379999, // 收盘时间 "2.13660389", // 成交额(标的数量) 48, // 成交笔数 "119", // 主动买入成交量 "1.23424865", // 主动买入成交额(标的数量) "0" // 请忽略该参数 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Funding Rate History Of Perpetual Futures | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#__docusaurus_skipToContent_fallback) 本页总览 查询永续合约资金费率历史 ============ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询永续合约资金费率历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/fundingRate` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间 | | limit | INT | NO | 默认值:100 最大值:1000 | > * 对非永续合约,将返回空列表 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BTCUSD_PERP", // 交易对 "fundingTime": 1596038400000, // 资金费时间 "fundingRate": "-0.00300000" // 资金费率 }, { "symbol": "BTCUSD_PERP", "fundingTime": 1596067200000, "fundingRate": "-0.00300000" }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Open Interest | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#__docusaurus_skipToContent_fallback) 本页总览 获取未平仓合约数 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 合约持仓量 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/openInterest` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "symbol": "BTCUSD_200626", "pair": "BTCUSD", "openInterest": "15004", "contractType": "CURRENT_QUARTER", "time": 1591261042378} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 模拟交易使用条款 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/demo-mode/DEMO-TERMS-OF-USE#__docusaurus_skipToContent_fallback) SPOT 模拟交易 使用条款 ============== 使用币安产品和服务须遵守 [产品使用条款](https://www.binance.com/en/about-legal/terms-demo-trading) 。 请在使用前仔细阅读条款。 --- # Download Report | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#__docusaurus_skipToContent_fallback) 本页总览 API used to download transaction and settlement report. * This API is only available for whitelisted merchants. If you need help, please contact us at [merchant@binance.com](mailto:merchant@binance.com) along with your Merchant ID and background EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#endpoint "EndPoint的直接链接") ---------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/report/get-file Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#request-parameters "Request Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **reportType** | enum string | Y | "Transaction" "Settlement" | Report type can be either "Settlement" or "Transaction". Please note the parameter is cap sensitive. | | **transactionType** | enum string | N | "Payment" "Payout" | transactionType refers to the transaction information you wish to generate.Please note the parameter is cap sensitive.If the reportType is "Settlement", this can be null If the reportType is "Transaction" field is required, either "Payment" or Payout" | | **startDate** | string | Y | dd/MM/yyyy | Start date | | **endDate** | string | Y | dd/MM/yyyy | End date. from startDate to endDate can only support querying data within 3 months | ### Sample Request Parameter[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#sample-request-parameter "Sample Request Parameter的直接链接") { "reportType": "Settlement", "transactionType": "", "startDate": "01/10/2022", "endDate": "29/10/2022"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#result-code) | | **data** | list\[MerchantDailyReportData\] | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#report-data) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- ### MerchantDailyReportData[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#merchantdailyreportdata "MerchantDailyReportData的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **reportType** | string | Y | | Report type | | **transactionType** | string | Y | | Transaction or Settlement | | **transactionDate** | string | Y | | When reportType is Transaction, then the transactionType is Payment or Payout(the list contains one type File depends on the request param, when reportType is Settlement, then the transactionType is Payment or Refund (the list contains two type File) | | **fileName** | string | Y | T\_Payment\_yyyyMMdd.xls / T\_Payout\_yyyyMMdd.xls / S\_Payment\_yyyyMMdd.xls / S\_Refund\_yyyyMMdd.xls | Report file name | | **downloadUrl** | string | Y | | Download URL | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": [ { "reportType": "Settlement", "transactionType": "Refund", "transactionDate": "29/10/2022", "fileName": "S_Refund_29102022.xlsx", "downloadUrl": "https://static.qa1fdg.net.s3.ap-northeast-1.amazonaws.com/dailyReport/352520168/S_Refund_29102022.xlsx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20221031T025922Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=AKIAWXLNSFLSZ6WTQGWG%2F20221031%2Fap-northeast-1%2Fs3%2Faws4_request&X-Amz-Signature=664e2982370dd5c635f24132bd1ba89c6d98c703064ceeef300160baa956eabc" }, { "reportType": "Settlement", "transactionType": "Payment", "transactionDate": "29/10/2022", "fileName": "S_Payment_29102022.xlsx", "downloadUrl": "https://static.qa1fdg.net.s3.ap-northeast-1.amazonaws.com/dailyReport/352520168/S_Payment_29102022.xlsx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20221031T025922Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIAWXLNSFLSZ6WTQGWG%2F20221031%2Fap-northeast-1%2Fs3%2Faws4_request&X-Amz-Signature=51bac37e4838fa503f3887cf879fa5f00602d9244c84e43489d5c7f1c2182731" } ]} { "status": "FAIL", "code": "400003", "errorMessage": "Timestamp for this request is outside of the recvWindow."} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#result-code "Result Code的直接链接") ------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#request-parameters) * [Sample Request Parameter](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#sample-request-parameter) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#child-attribute) * [MerchantDailyReportData](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#merchantdailyreportdata) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-report#result-code) --- # Payout Validate Receiver | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#__docusaurus_skipToContent_fallback) 本页总览 Payout Receiver API is for Merchant/Partner to validate and match receiver's registration information (email/phone no) and openUserID. Not supported for individual merchants to invoke this API. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#endpoint "EndPoint的直接链接") ------------------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/payout/receiver/check Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **receiveType** | string | Y | Enum value | Receiver's ID type

**BINANCE\_ID**: Binance user ID. | | **receiverId** | string | Y | | Receiver's BINANCE\_ID depends on the receiver type. | | **registrationEmail** | String | N | | Receiver's registration email address | | **registrationMobileNumber** | String | N | | Receiver's mobile number | | **registrationMobileCode** | String | N | | Receiver's mobile code eg:971 for UAE | | **openUserId** | String | N | | Receiver’s openUserId received in webhook notification | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#sample-request-body "Sample Request Body的直接链接") { "receiveType":"BINANCE_ID", "receiverId":"354205155", "registrationEmail":"xxx@gmail.com", "registrationMobileNumber":"322342111", "registrationMobileCode":"971",} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#response-parameters "Response Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#result-code) | | **data** | Boolean | N | \- | true means matched, false means not matched | | **errorMessage** | string | N | maximum length 256 | | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": true} { "status": "FAIL", "code": "406108", "errorMessage": "Fail rate is high, please try again later"} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#result-code "Result Code的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | MERCHANT\_TRANSFER\_MERCHANT\_TYPE\_INVALID | 406107 | Merchant type not valid not support individual merchant | | | MERCHANT\_TRANSFER\_MERCHANT\_TOO\_FREQUENT | 406108 | Fail rate is high, please try again later | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-validate-receiver#result-code) --- # Payout Query | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#__docusaurus_skipToContent_fallback) 本页总览 Payout query API used for Merchant/Partner to query transfer status. EndPoint[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#endpoint "EndPoint的直接链接") ------------------------------------------------------------------------------------------------------------- POST /binancepay/openapi/payout/query Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **requestId** | string | Y | Maximum length 32 | The unique ID assigned by the merchant to identify a payout request. | | **detailStatus** | list\[string\] | N | Enum string list | **ALL**: return all transfer details, default value.
**PROCESSING**: only return transfers in processing.
**SUCCESS**: only return successful transfers.
**FAIL**: only return failed transfers. | ### Sample Request Body[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#sample-request-body "Sample Request Body的直接链接") { "requestId":"payouttransfer19998"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#response-parameters "Response Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **status** | string | Y | "SUCCESS" or "FAIL" | status of the API request | | **code** | string | Y | \- | request result code, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#result-code) | | **data** | TransferQueryResult | N | \- | response body, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#payout-query-response) | | **errorMessage** | string | N | maximum length 256 | | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#child-attribute "Child Attribute的直接链接") ---------------------------------------------------------------------------------------------------------------------------------- ### TransferQueryResult[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#transferqueryresult "TransferQueryResult的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **requestId** | string | Y | Maximum length 32 | The passed-in request ID | | **batchStatus** | string | Y | Enum string | **ACCEPTED**: accepted the request, will process it soon.
**PROCESSING**: batch under processing
**SUCCESS**: All payout performed successfully, user have received fund in Binance funding wallet
**PART\_SUCCESS**: transfers partially succeeded.
Reasons:
1.Insufficient funds: there’s insufficient fund in your account
2.Awaiting recipient: pending user to create Binance account and perform KYC
3.Partial refund: user failed to complete KYC in 72 hours, fund will be funded to merchant account
**FAILED**: all transfers failed
**CANCELED**: Transfer request canceled by Binance due to unknown system errors after retry limit, will not retry further | | **merchantId** | long | Y | | | | **currency** | string | Y | Valid crypto currency | The request currency. | | **totalAmount** | decimal | Y | limitation refer to Create Order API order amount | Total transfer amount in this batch. | | **totalPaidAmount** | decimal | Y | limitation refer to Create Order API order amount | Total paid amount in this batch. | | **totalPayoutFee** | decimal | Y | limitation refer to Create Order API order amount | Total payout fee amount in this batch. | | **totalNumber** | int | Y | Maximum length 1000 | Total number of transfers in the batch. | | **transferDetailList** | TransferDetailResult | Y | Max size 1000 | Detail transfer result. | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#child-attribute-1 "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ ### TransferDetailResult[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#transferdetailresult "TransferDetailResult的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **orderId** | long | Y | Maximum length 32 | The passed-in request ID. | | **merchantSendId** | string | Y | Maximum length 32 | The passed-in merchantSendId. | | **payerId** | Long | Y | | Payer's payment account ID. | | **amount** | string | Y | limitation refer to Create Order API order amount | Amount transferred. | | **payoutFee** | string | Y | limitation refer to Create Order API order amount | Amount paid. | | **totalPaidAmount** | string | Y | limitation refer to Create Order API order amount | Payout Fee Amount . | | **receiveType** | string | Y | Enum string | **PAY\_ID**
**BINANCE\_ID** | | **receiver** | string | Y | Maximum length 19 | Receiver ID from the request. | | **payeeId** | long | Y | | Receiver's payment account ID. | | **transferMethod** | string | Y | Enum string | **SPOT\_WALLET**
**FUNDING\_WALLET**
**FUNDING\_AND\_SPOT\_WALLET** | | **status** | string | Y | Enum string | **SUCCESS:** money has been transferred successfully
**FAIL**:transaction failed may case by there’s insufficient fund in your account
**AWAITING\_RECEIPT** pending new user create an binance account and pass KYC to receive money
**REFUNDED:** new user hasn’t pass KYC in 72 hours | | **remark** | string | N | | Maximum length 128 | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#sample-response "Sample Response的直接链接") { "status": "SUCCESS", "code": "000000", "data": { "requestId": "2222222111222", "batchStatus": "SUCCESS", "merchantId": 11111111, "currency": "USDC", "totalAmount": "114.00000000", "totalNumber": 1, "totalPaidAmount": "114.91200000", "totalPayoutFee": "0.912", "transferDetailList": [ { "orderId": 349275283293014145, "merchantSendId": "22123", "payerId": 783447107, "amount": "114.00000000", "payoutFee": "0.912", "totalPaidAmount": "114.91200000", "receiveType": "BINANCE_ID", "receiver": "1111111", "payeeId": 11111111, "transferMethod": "SPOT_WALLET", "status": "SUCCESS", "remark": null } ] }} { "status": "FAIL", "code": "403015", "errorMessage": "pay order not found"} Result Code[​](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#result-code "Result Code的直接链接") ---------------------------------------------------------------------------------------------------------------------- | **Name** | **Code** | **Reason** | **Solution** | | --- | --- | --- | --- | | UNKNOWN\_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | | INVALID\_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | | INVALID\_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | | INVALID\_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | | INVALID\_API\_KEY\_OR\_IP | 400004 | API identity key not found or invalid. | Check API identity key | | BAD\_API\_KEY\_FMT | 400005 | API identity key format invalid. | Check API identity key. | | BAD\_HTTP\_METHOD | 400006 | Request method not supported. | Check Request method. | | MEDIA\_TYPE\_NOT\_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | | INVALID\_REQUEST\_BODY | 400008 | Request body is not a valid json object. | Check Request body | | MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | | | INVALID\_PARAM\_WRONG\_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | | | INVALID\_PARAM\_WRONG\_VALUE | 400102 | A parameter was not valid, the value is out of range. | | | INVALID\_PARAM\_ILLEGAL\_CHAR | 400103 | A parameter was not valid, contains illegal characters | | | INVALID\_REQUEST\_TOO\_LARGE | 400104 | Invalid request, content length too large | | | PAYMENT\_PAY\_ORDER\_NOT\_FOUND | 400602 | Pay order not found | | * [EndPoint](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#endpoint) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#request-parameters) * [Sample Request Body](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#sample-request-body) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#response-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#child-attribute) * [TransferQueryResult](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#transferqueryresult) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#child-attribute-1) * [TransferDetailResult](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#transferdetailresult) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#sample-response) * [Result Code](https://developers.binance.com/docs/zh-CN/binance-pay/api-payout-query#result-code) --- # Binance Pay: Order Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#__docusaurus_skipToContent_fallback) 本页总览 Webhook Endpoints[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#webhook-endpoints "Webhook Endpoints的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ Binance Pay will send order events with final status to partner for notification. You will be able to configure webhook endpoints via the [Binance Merchant Admin Portal](https://merchant.binance.com/en/dashboard) . Result of the orders that are close will be notified to you through this webhook with bizStatus = "PAY\_CLOSED".\* \*If you don't want to receive "PAY\_CLOSED" notifications anymore, you can login MMP and select Developer menu -> Notification to turn it off. In situation where event was failed to send, the webhook will retry up to 6 times to resend the event. Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#request-parameters "Request Parameters的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **bizType** | string | Y | \- | "PAY" | | **bizId** | long | Y | \- | Prepay order id | | **bizIdStr** | string | Y | \- | biz id as string | | **bizStatus** | string | Y | \- | "PAY\_SUCCESS","PAY\_CLOSED" | | **data** | string | Y | \- | JSON string, data details [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#notification-data) | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#child-attribute "Child Attribute的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ ### Notification Data[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#notification-data "Notification Data的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **merchantTradeNo** | string | Y | letter or digit, no other symbol allowed | The order id, Unique identifier for the request | | **productType** | string | Y | maximum length 16 | product type | | **productName** | string | Y | maximum length 256 | product name | | **transactTime** | long | Y | \- | transaction time | | **tradeType** | string | Y | "WEB", "APP", "WAP", "MINI\_PROGRAM", "PAYMENT\_LINK", "OTHERS" | operate entrance | | **totalFee** | decimal | Y | \- | order amount | | **currency** | string | Y | \- | order currency | | **transactionId** | string | N | \- | debit transaction id | | **openUserId** | string | N | \- | payer unique id | | **passThroughInfo** | string | N | \- | pass through info, from the create order api | | **commission** | decimal | Y | \- | Transaction fees charged. Please refer to your contract for more info | | **paymentInfo** | object | N | \- | payment information, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#paymentInfo-data) | ### PaymentInfo Data[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#paymentinfo-data "PaymentInfo Data的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **payMethod** | string | Y | \- | pay method | | **paymentInstructions** | list\[PaymentInstruction\] | Y | \- | payment instruction list, [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#paymentInstruction-data) | | **channel** | string | N | \- | channel | | **subChannel** | string | N | \- | sub channel | | **payerDetail** | string | N | \- | encrypted payer identity information for merchant compliance purposes without compromising privacy and security. Decryption instructions please [refer to](https://developers.binance.com/docs/zh-CN/binance-pay/authentication#decryption-instructions-for-merchant-data-sharing)
.
**This function is only available for whitelisted merchants.** | ### PaymentInstruction Data[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#paymentinstruction-data "PaymentInstruction Data的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **currency** | string | Y | \- | payment currency | | **amount** | decimal | Y | \- | currency amount | | **price** | decimal | Y | \- | currency price | ### Sample Payload[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#sample-payload "Sample Payload的直接链接") #### PAY SUCCESS[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#pay-success "PAY SUCCESS的直接链接") { "bizType": "PAY", "data": "{\"merchantTradeNo\":\"xr6wYe8ATWE6thS5Sc7ezMihMFGKn6\",\"productType\":\"Food\",\"productName\":\"Ice Cream\",\"transactTime\":1619508939664,\"tradeType\":\"APP\",\"totalFee\":0.88000000,\"currency\":\"USDT\",\"transactionId\":\"M_R_282737362839373\",\"openUserId\":\"1211HS10K81f4273ac031\",\"commission\":0.0088,\"paymentInfo\":{\"payMethod\":\"funding\",\"paymentInstructions\":[{\"currency\":\"USDT\",\"amount\":0.88000000,\"price\":1}],\"channel\":\"DEFAULT\"}}", "bizIdStr": "29383937493038367292", "bizId": 29383937493038367292, "bizStatus": "PAY_SUCCESS"} #### PAY FAIL[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#pay-fail "PAY FAIL的直接链接") PAY\_FAIL order status is only applicable to Direct Debit order. Normal C2B orders will only receive PAY\_SUCCESS or PAY\_CLOSE status. { "bizType": "PAY", "data": "{\"merchantTradeNo\":\"9825382937292\",\"totalFee\":0.88000000,\"transactTime\":1619508939664,\"currency\":\"USDT\",\"openUserId\":\"1211HS10K81f4273ac031\",\"productType\":\"Food\",\"productName\":\"Ice Cream\",\"tradeType\":\"WEB\"}", "bizIdStr": "29383937493038367292", "bizId": 29383937493038367292, "bizStatus": "PAY_FAIL"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#response-parameters "Response Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **returnCode** | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry | | **returnMessage** | string | N | \- | return message | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#sample-response "Sample Response的直接链接") **After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.** {"returnCode":"SUCCESS","returnMessage":null} * [Webhook Endpoints](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#webhook-endpoints) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#request-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#child-attribute) * [Notification Data](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#notification-data) * [PaymentInfo Data](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#paymentinfo-data) * [PaymentInstruction Data](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#paymentinstruction-data) * [Sample Payload](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#sample-payload) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/order-notification#sample-response) --- # Binance Pay: Balance Report Notification | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#__docusaurus_skipToContent_fallback) 本页总览 Webhook Endpoints[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#webhook-endpoints "Webhook Endpoints的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- Binance Pay will send balance report events with final status only when partner use balance report open api for report generation. For submitting download request, [refer here](https://developers.binance.com/docs/zh-CN/binance-pay/api-download-balance-report) . Request Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#request-parameters "Request Parameters的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **bizType** | string | Y | \- | **BALANCE** | | **bizId** | long | Y | \- | Download ID | | **bizIdStr** | string | Y | \- | biz id as string | | **bizStatus** | string | Y | \- | **BALANCE\_SUCCESS** | | **data** | BalanceReportData | Y | \- | JSON string | Child Attribute[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#child-attribute "Child Attribute的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------- ### BalanceReportData[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#balancereportdata "BalanceReportData的直接链接") | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **downloadType** | string | Y | | merchant\_balance\_download\_task | | **downloadId** | long | Y | | Download ID, for any issue use this ID to query. | | **userId** | long | Y | | Spot user ID | | **status** | string | Y | | 2 = success | | **downloadLink** | string | Y | | Download URL. | | **expirationTimestamp** | long | Y | | Expiration timestamp of download link. | | **createTime** | string | Y | | Created time of the download document. | ### Sample Payload[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#sample-payload "Sample Payload的直接链接") { "bizType": "BALANCE", "data":"{\"downloadType\":\"merchant_balance_download_task\",\"downloadId\":197620356272996352,\"userId\":100102465376,\"status\":2,\"downloadLink\":\"https://sampleurl.com/file1\",\"expirationTimestamp\":1669947455000,\"createTime\":\"2022-12-01 02:15:50\",\"callbackUrl\":\"https://callbackurl.com\"}", "bizIdStr": "197620356272996352", "bizId": 197620356272996352, "bizStatus": "BALANCE_SUCCESS"} Response Parameters[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#response-parameters "Response Parameters的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- | **Attributes** | **Type** | **Required** | **Limitation** | **Description** | | --- | --- | --- | --- | --- | | **returnCode** | string | Y | "SUCCESS" or "FAIL" | result code of notification processing, if process fail, Binance Pay will retry | | **returnMessage** | string | N | \- | return message | ### Sample Response[​](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#sample-response "Sample Response的直接链接") **After receiving a webhook with your endpoint, please respond with an HTTP 200 OK.** {"returnCode":"SUCCESS","returnMessage":null} * [Webhook Endpoints](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#webhook-endpoints) * [Request Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#request-parameters) * [Child Attribute](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#child-attribute) * [BalanceReportData](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#balancereportdata) * [Sample Payload](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#sample-payload) * [Response Parameters](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#response-parameters) * [Sample Response](https://developers.binance.com/docs/zh-CN/binance-pay/webhook-balance-report#sample-response) --- # 产品使用条款 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/PROD-TERMS-OF-USE#__docusaurus_skipToContent_fallback) SPOT 交易所使用条款 ============ 使用币安产品和服务须遵守 [产品使用条款](https://www.binance.com/zh-CN/terms) 。 在继续之前,请仔细阅读。 --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/convert#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/convert#2025-12-26 "2025-12-26的直接链接") ---------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/convert#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/convert/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/convert#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/convert/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2024-01-24[​](https://developers.binance.com/docs/zh-CN/convert#2024-01-24 "2024-01-24的直接链接") ---------------------------------------------------------------------------------------------- * 新增闪兑接口: * `POST /sapi/v1/convert/limit/placeOrder`:创建闪兑限价单 * `POST /sapi/v1/convert/limit/cancelOrder`:取消闪兑限价单 * `GET /sapi/v1/convert/limit/queryOpenOrders`:查询闪兑限价单 * * * 2022-11-22[​](https://developers.binance.com/docs/zh-CN/convert#2022-11-22 "2022-11-22的直接链接") ---------------------------------------------------------------------------------------------- * 新增闪兑接口: * `GET /sapi/v1/convert/exchangeInfo`: 查询可交易的币对的信息,以及它们分别所支持交易金额的上下限。 * `GET /sapi/v1/convert/assetInfo`: 查询每个可交易币种的精度信息。 * `POST /sapi/v1/convert/getQuote`: 对所需的币对发送获取报价请求。 * `POST /sapi/v1/convert/acceptQuote`: 通过 quote ID 来接受报价。 * `GET /sapi/v1/convert/orderStatus`: 通过 order ID 来查询订单状态。 * * * 2022-08-18[​](https://developers.binance.com/docs/zh-CN/convert#2022-08-18 "2022-08-18的直接链接") ---------------------------------------------------------------------------------------------- * 更新闪兑接口: * `GET /sapi/v1/convert/tradeFlow`: 权重自 Weight(IP) 3000 改至 Weight(UID) 3000。 * * * 2022-07-01[​](https://developers.binance.com/docs/zh-CN/convert#2022-07-01 "2022-07-01的直接链接") ---------------------------------------------------------------------------------------------- * 更新闪兑接口: * `GET /sapi/v1/convert/tradeFlow`:权重自 3000 改至 100。 * * * 2021-11-30[​](https://developers.binance.com/docs/zh-CN/convert#2021-11-30 "2021-11-30的直接链接") ---------------------------------------------------------------------------------------------- * 新增闪兑接口: * 新增接口 `GET /sapi/v1/convert/tradeFlow` 以支持用户查询闪兑交易历史记录 * [2025-12-26](https://developers.binance.com/docs/zh-CN/convert#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/convert#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/convert#rest-api) * [2024-01-24](https://developers.binance.com/docs/zh-CN/convert#2024-01-24) * [2022-11-22](https://developers.binance.com/docs/zh-CN/convert#2022-11-22) * [2022-08-18](https://developers.binance.com/docs/zh-CN/convert#2022-08-18) * [2022-07-01](https://developers.binance.com/docs/zh-CN/convert#2022-07-01) * [2021-11-30](https://developers.binance.com/docs/zh-CN/convert#2021-11-30) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/copy_trading/Introduction#__docusaurus_skipToContent_fallback) 币安合约跟单交易是自动化交易系统。您可以成为带单员,让其他交易者跟单您的投资组合,或作为跟单员跟单带单员的投资组合。 在决定您的投资金额后,系统会自动跟单您追踪的带单员交易。 --- # Contact us | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/contact-us#__docusaurus_skipToContent_fallback) 联系我们 ==== * [币安API电报群](https://t.me/Binance_api_Chinese) * 咨询关于API或者Websockets性能方面的问题. * 咨询文档中没有提及的API问题. * [币安开发者社区](https://dev.binance.vision/) * 咨询关于API/Websockets代码实现,或者任何API/Websockets的问题. * [币安客服](https://www.binance.com/cn/support-center) * 咨询关于账户,钱包,2FA等. --- # Get Flexible Loan Collateral Assets Data (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#__docusaurus_skipToContent_fallback) 本页总览 查询活期借币抵押币种数据 (USER\_DATA) ========================= 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取活期借币抵押币种质押率信息和质押限额。质押限额以美元价值显示。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v2/loan/flexible/collateral/data` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | collateralCoin | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "rows": [ { "collateralCoin": "BNB", "initialLTV": "0.65", "marginCallLTV": "0.75", "liquidationLTV": "0.83", "maxLimit": "1000000" } ], "total": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 基本信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/cms/general-info#__docusaurus_skipToContent_fallback) 本页总览 WebSocket API基本信息 ================= * 接口需要用户的 API Key,如何创建API-KEY请参考[这里](https://www.binance.com/cn/support/articles/360002502072) * Base url为:**wss://api.binance.com/sapi/wss** * 每个到 base URL 的链接有效期不超过24小时,请妥善处理断线重连。 * WebSocket 客户端建议每30秒主动发送 PING 消息。 * 如果 WebSocket 服务器没有在一分钟之内收到 PING 消息,连接会被断开。 * 对于这些 PING 消息,建议payload为空。 * 必须通过获取除签名之外的所有请求参数并按字母顺序按名称排序来生成签名payload * 除非另有说明,否则所有时间戳均以 UTC 中的毫秒为单位。 * 除非另有说明,否则所有字段名称和值均区分大小写。 WEB SOCKET 连接限制[​](https://developers.binance.com/docs/zh-CN/cms/general-info#web-socket-%E8%BF%9E%E6%8E%A5%E9%99%90%E5%88%B6 "WEB SOCKET 连接限制的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ * Websocket服务器每秒最多接受5个消息。消息包括: * PING帧 * PONG帧 * JSON格式的消息, 比如订阅, 断开订阅. * 如果用户发送的消息超过限制,连接会被断开连接。反复被断开连接的IP有可能被服务器屏蔽。 WebSocket API 请求方式[​](https://developers.binance.com/docs/zh-CN/cms/general-info#websocket-api-%E8%AF%B7%E6%B1%82%E6%96%B9%E5%BC%8F "WebSocket API 请求方式的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- 接入地址: **wss://api.binance.com/sapi/wss?random={{random}}&topic={{topic}}&recvWindow={{recvWindow}}×tamp={{timestamp}}&signature={{signature}}** 其中变量{{xxx}}请替换成相应的值。 * 格式示例: * `wss://api.binance.com/sapi/wss?random=56724ac693184379ae23ffe5e910063c&topic=topic1&recvWindow=30000×tamp=1753244327210&signature=341098eff29e3ef395ed4ea85035bd7fe9e9356d2b0d4f1f97655c74516a2d65` * 参数说明: * `random`:随机数或字符串,建议长度不超过32,用于保证签名的随机性和有效性。 * 例如:`random=56724ac693184379ae23ffe5e910063` * `topic`:支持订阅一个或多个主题,多个主题用竖线 | 分隔。 * 例如:`topic=topic1|topic2` * `recvWindow`:允许的时间延迟,单位为毫秒,最大不能超过60000。 * 例如:`recvWindow=30000` * `timestamp`:当前时间戳,单位为毫秒。 * 例如:`timestamp=1753244327210` * `signature`: 当前请求的签名。 ### WebSocket API 身份验证[​](https://developers.binance.com/docs/zh-CN/cms/general-info#websocket-api-%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81 "WebSocket API 身份验证的直接链接") 建立链接时需要用到用户的 API Key进行身份验证, 需要在wss请求头中以 `X-MBX-APIKEY`字段传递。 ### 时间同步安全[​](https://developers.binance.com/docs/zh-CN/cms/general-info#%E6%97%B6%E9%97%B4%E5%90%8C%E6%AD%A5%E5%AE%89%E5%85%A8 "时间同步安全的直接链接") * 签名接口均需要传递 `timestamp`参数,其值应当是请求发送时刻的unix时间戳(毫秒)。 * 服务器收到请求时会判断请求中的时间戳,如果是5000毫秒之前发出的,则请求会被认为无效。这个时间空窗值可以通过发送可选参数 `recvWindow`来定义。 ### 签名[​](https://developers.binance.com/docs/zh-CN/cms/general-info#%E7%AD%BE%E5%90%8D "签名的直接链接") 以下是在 linux bash 环境下使用 echo openssl 和 curl 工具实现的一个生成签名的示例 apikey、secret仅供示范 | Key | Value | | --- | --- | | apiKey | vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A | | secretKey | NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j | 需要对接入地址的所有参数计算签名: random={{random}}&topic={{topic}}&recvWindow={{recvWindow}}×tamp={{timestamp}} **示例** > **HMAC SHA256 signature:** $ echo -n "random=56724ac693184379ae23ffe5e910063c&topic=topic1&recvWindow=30000×tamp=1753244327210" | openssl dgst -sha256 -hmac "Avqz4IQjoZSJOowMFSo3QZEd4ovfwLH7Kie8ZliTtP8ktDnqcX8bpCP7WluFtrfn" SHA2-256(stdin)= 8346d214e0da7165a0093043395f67e08c63f61b5d6e25779d513c11450e691b 实时订阅/取消订阅[​](https://developers.binance.com/docs/zh-CN/cms/general-info#%E5%AE%9E%E6%97%B6%E8%AE%A2%E9%98%85%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85 "实时订阅/取消订阅的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 在连接之后, 可以继续通过websocket发送以实现订阅或取消订阅频道(支持同时操作多个频道, 以|分隔)。示例如下。 ### 订阅[​](https://developers.binance.com/docs/zh-CN/cms/general-info#%E8%AE%A2%E9%98%85 "订阅的直接链接") > **请求** { "command": "SUBSCRIBE", "value": "topic1"} > **响应** { "type": "COMMAND", "data": "SUCCESS", "subType": "SUBSCRIBE", "code": "00000000"} ### 取消订阅[​](https://developers.binance.com/docs/zh-CN/cms/general-info#%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85 "取消订阅的直接链接") > **请求** { "command": "UNSUBSCRIBE", "value": "topic1"} > **响应** { "type": "COMMAND", "data": "SUCCESS", "subType": "UNSUBSCRIBE", "code": "00000000"} 接入代码示例[​](https://developers.binance.com/docs/zh-CN/cms/general-info#%E6%8E%A5%E5%85%A5%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B "接入代码示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- > **JS 脚本** const WebSocket = require('ws');const CryptoJS = require('crypto-js');const uri = 'wss://api.binance.com/sapi/wss?random=56724ac693184379ae23ffe5e910063c&topic=topic1&recvWindow=30000×tamp=${timestamp}&signature=${signature}';const binance_api_key = "替换成您的 API Key";const binance_api_secret = "加载您的 Secret Key"; // 加载 private key。private key 建议使用强密码以提高安全性。const ts = Date.now();let paramsObject = {};const queryString = uri.substring(uri.indexOf('?') + 1);const parameters = queryString.split('&') .filter(param => param.includes('=')) .map(param => { const [key, value] = param.split('='); return {key, value}; });parameters.map((param) => { if (param.key !== 'signature' && param.key !== 'timestamp') { paramsObject[param.key] = param.value; }})Object.assign(paramsObject, {'timestamp': ts});const tmp = Object.keys(paramsObject).map((key) => { return `${key}=${paramsObject[key]}`;}).join('&');const signature = CryptoJS.HmacSHA256(tmp, binance_api_secret).toString();Object.assign(paramsObject, {'signature': signature});const result = Object.keys(paramsObject).map((key) => { return `${key}=${paramsObject[key]}`;}).join('&');const baseUri = uri.substring(0, uri.indexOf("?"))console.log("final uri: " + baseUri + '?' + result)const ws = new WebSocket(baseUri + '?' + result, [], { headers: { "X-MBX-APIKEY": binance_api_key }});ws.on('open', function open() { console.log('Connected to the server');});ws.on('message', function incoming(data) { console.log(`Data from server: ${data}`);});ws.on('close', function close() { console.log('Disconnected from server');});ws.on('error', function error(err) { console.error(`Error: ${err.message}`);});// TODO setup your ping and reconnect logic * [WEB SOCKET 连接限制](https://developers.binance.com/docs/zh-CN/cms/general-info#web-socket-%E8%BF%9E%E6%8E%A5%E9%99%90%E5%88%B6) * [WebSocket API 请求方式](https://developers.binance.com/docs/zh-CN/cms/general-info#websocket-api-%E8%AF%B7%E6%B1%82%E6%96%B9%E5%BC%8F) * [WebSocket API 身份验证](https://developers.binance.com/docs/zh-CN/cms/general-info#websocket-api-%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81) * [时间同步安全](https://developers.binance.com/docs/zh-CN/cms/general-info#%E6%97%B6%E9%97%B4%E5%90%8C%E6%AD%A5%E5%AE%89%E5%85%A8) * [签名](https://developers.binance.com/docs/zh-CN/cms/general-info#%E7%AD%BE%E5%90%8D) * [实时订阅/取消订阅](https://developers.binance.com/docs/zh-CN/cms/general-info#%E5%AE%9E%E6%97%B6%E8%AE%A2%E9%98%85%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85) * [订阅](https://developers.binance.com/docs/zh-CN/cms/general-info#%E8%AE%A2%E9%98%85) * [取消订阅](https://developers.binance.com/docs/zh-CN/cms/general-info#%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85) * [接入代码示例](https://developers.binance.com/docs/zh-CN/cms/general-info#%E6%8E%A5%E5%85%A5%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/convert/change-log#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/convert/change-log#2025-12-26 "2025-12-26的直接链接") --------------------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/convert/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/convert/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/convert/change-log#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/convert/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 * * * 2024-01-24[​](https://developers.binance.com/docs/zh-CN/convert/change-log#2024-01-24 "2024-01-24的直接链接") --------------------------------------------------------------------------------------------------------- * 新增闪兑接口: * `POST /sapi/v1/convert/limit/placeOrder`:创建闪兑限价单 * `POST /sapi/v1/convert/limit/cancelOrder`:取消闪兑限价单 * `GET /sapi/v1/convert/limit/queryOpenOrders`:查询闪兑限价单 * * * 2022-11-22[​](https://developers.binance.com/docs/zh-CN/convert/change-log#2022-11-22 "2022-11-22的直接链接") --------------------------------------------------------------------------------------------------------- * 新增闪兑接口: * `GET /sapi/v1/convert/exchangeInfo`: 查询可交易的币对的信息,以及它们分别所支持交易金额的上下限。 * `GET /sapi/v1/convert/assetInfo`: 查询每个可交易币种的精度信息。 * `POST /sapi/v1/convert/getQuote`: 对所需的币对发送获取报价请求。 * `POST /sapi/v1/convert/acceptQuote`: 通过 quote ID 来接受报价。 * `GET /sapi/v1/convert/orderStatus`: 通过 order ID 来查询订单状态。 * * * 2022-08-18[​](https://developers.binance.com/docs/zh-CN/convert/change-log#2022-08-18 "2022-08-18的直接链接") --------------------------------------------------------------------------------------------------------- * 更新闪兑接口: * `GET /sapi/v1/convert/tradeFlow`: 权重自 Weight(IP) 3000 改至 Weight(UID) 3000。 * * * 2022-07-01[​](https://developers.binance.com/docs/zh-CN/convert/change-log#2022-07-01 "2022-07-01的直接链接") --------------------------------------------------------------------------------------------------------- * 更新闪兑接口: * `GET /sapi/v1/convert/tradeFlow`:权重自 3000 改至 100。 * * * 2021-11-30[​](https://developers.binance.com/docs/zh-CN/convert/change-log#2021-11-30 "2021-11-30的直接链接") --------------------------------------------------------------------------------------------------------- * 新增闪兑接口: * 新增接口 `GET /sapi/v1/convert/tradeFlow` 以支持用户查询闪兑交易历史记录 * [2025-12-26](https://developers.binance.com/docs/zh-CN/convert/change-log#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/convert/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/convert/change-log#rest-api) * [2024-01-24](https://developers.binance.com/docs/zh-CN/convert/change-log#2024-01-24) * [2022-11-22](https://developers.binance.com/docs/zh-CN/convert/change-log#2022-11-22) * [2022-08-18](https://developers.binance.com/docs/zh-CN/convert/change-log#2022-08-18) * [2022-07-01](https://developers.binance.com/docs/zh-CN/convert/change-log#2022-07-01) * [2021-11-30](https://developers.binance.com/docs/zh-CN/convert/change-log#2021-11-30) --- # 快速开始 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/convert/quick-start#__docusaurus_skipToContent_fallback) 本页总览 快速开始 ==== API Key 权限设置[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE "API Key 权限设置的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ * 新创建的API的默认权限是 `只读`。 * 如果需要通过API提款, 需要在UI修改权限, 选中 `允许提现`。 账户[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#%E8%B4%A6%E6%88%B7 "账户的直接链接") -------------------------------------------------------------------------------------------------- ### 现货账户[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7 "现货账户的直接链接") 新注册的币安账号都会有一个现货(`SPOT`)账号。 ### 杠杆账户[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7 "杠杆账户的直接链接") 为了开设杠杆(`MARGIN`)账户, 可以参考[Binance杠杆交易账户设置指南](https://www.binance.vision/zh/tutorials/binance-margin-trading-guide) API 代码库[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93 "API 代码库的直接链接") ------------------------------------------------------------------------------------------------------------------------- ### Connectors[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#connectors "Connectors的直接链接") 以下有一些轻量级的代码库,使不同语言的用户能够直接调用现货的 Binance 公共 API: * Python [https://github.com/binance/binance-connector-python](https://github.com/binance/binance-connector-python) * JavaScript [https://github.com/binance/binance-connector-js](https://github.com/binance/binance-connector-js) * Ruby [https://github.com/binance/binance-connector-ruby](https://github.com/binance/binance-connector-ruby) * DotNET C# [https://github.com/binance/binance-connector-dotnet](https://github.com/binance/binance-connector-dotnet) * Java [https://github.com/binance/binance-connector-java](https://github.com/binance/binance-connector-java) * Rust [https://github.com/binance/binance-spot-connector-rust](https://github.com/binance/binance-spot-connector-rust) * PHP [https://github.com/binance/binance-connector-php](https://github.com/binance/binance-connector-php) * Go [https://github.com/binance/binance-connector-go](https://github.com/binance/binance-connector-go) ### Postman Collections[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#postman-collections "Postman Collections的直接链接") Postman 集合现已推出。推荐给寻求快速和轻松地开始使用 API 的新用户。 [https://github.com/binance/binance-api-postman](https://github.com/binance/binance-api-postman) ### Swagger[​](https://developers.binance.com/docs/zh-CN/convert/quick-start#swagger "Swagger的直接链接") 以下有提供包含 RESTful API 的 OpenAPI 规范的 YAML 文件,以及可供参考的 Swagger UI 页面。 [https://github.com/binance/binance-api-swagger](https://github.com/binance/binance-api-swagger) * [API Key 权限设置](https://developers.binance.com/docs/zh-CN/convert/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE) * [账户](https://developers.binance.com/docs/zh-CN/convert/quick-start#%E8%B4%A6%E6%88%B7) * [现货账户](https://developers.binance.com/docs/zh-CN/convert/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7) * [杠杆账户](https://developers.binance.com/docs/zh-CN/convert/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7) * [API 代码库](https://developers.binance.com/docs/zh-CN/convert/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93) * [Connectors](https://developers.binance.com/docs/zh-CN/convert/quick-start#connectors) * [Postman Collections](https://developers.binance.com/docs/zh-CN/convert/quick-start#postman-collections) * [Swagger](https://developers.binance.com/docs/zh-CN/convert/quick-start#swagger) --- # Futures Account Balance | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#__docusaurus_skipToContent_fallback) 本页总览 账户余额 (USER\_DATA) ================= 查询账户余额 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E6%96%B9%E5%BC%8F "方式的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- `account.balance` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82 "请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "9328e612-1560-4108-979e-283bf85b5acb", "method": "account.balance", "params": { "apiKey": "", "timestamp": 1727810404936, "signature": "0f04368b2d22aafd0ggc8809ea34297eff602272917b5f01267db4efbc1c9422"  }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "id": "9328e612-1560-4108-979e-283bf85b5acb", "status": 200, "result": [ { "accountAlias": "fWAuTiuXoCuXmY", "asset": "WLD", "balance": "0.00000000", "withdrawAvailable": "0.00000000", "crossWalletBalance": "0.00000000", "crossUnPnl": "0.00000000", "availableBalance": "0.00000000", "updateTime": 0 }, // ... ... ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 10 } ]} * [方式](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/account/websocket-api/Futures-Account-Balance#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Flexible Loan Borrow History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#__docusaurus_skipToContent_fallback) 本页总览 查询活期借币历史记录(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询活期借币历史记录 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v2/loan/flexible/borrow/history` GET `/sapi/v1/loan/flexible/borrow/history` 可查询2024-02-27 08:00之前数据 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | loanCoin | STRING | NO | | | collateralCoin | STRING | NO | | | startTime | LONG | NO | | | endTime | LONG | NO | | | current | LONG | NO | 当前查询页数,从 1 开始。默认值:1;最大:1000。 | | limit | LONG | NO | 默认值:10;最大:100。 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果没有发送 startTime 和 endTime,默认返回最近 90 天的数据。 > * startTime 和 endTime 的最大间隔为 180 天。 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "rows": [ { "loanCoin": "BUSD", "initialLoanAmount": "10000", "collateralCoin": "BNB", "initialCollateralAmount": "49.27565492", "borrowTime": 1575018510000, "status": "SUCCESS" //SUCCESS, FAILED, PENDING } ], "total": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Flexible Loan Liquidation History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#__docusaurus_skipToContent_fallback) 本页总览 查询活期借币清算历史记录 (USER\_DATA) ========================= HTTP 请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#http-%E8%AF%B7%E6%B1%82 "HTTP 请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `GET /sapi/v2/loan/flexible/liquidation/history` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | loanCoin | STRING | NO | | | collateralCoin | STRING | NO | | | startTime | LONG | NO | | | endTime | LONG | NO | | | current | LONG | NO | 当前查询页面。从1开始;默认: 1;最大: 1000 | | limit | LONG | NO | 默认: 10;最大: 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * 如果没有发送startTime和endTime,默认返回最近90天的数据。 * startTime和endTime的最大间隔为180天。 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "rows": [ { "loanCoin": "BUSD", "liquidationDebt": "10000", "collateralCoin": "BNB", "liquidationCollateralAmount": "123", "returnCollateralAmount": "0.2", "liquidationFee": "1.2", "liquidationStartingPrice": "49.27565492", "liquidationStartingTime": 1575018510000, "status": "Liquidated" // Liquidating } ], "total": 1} liquidationStartingPrice 是指清算开始时的抵押币/借贷币汇率。最终汇率将取决于代币的流动性和市场状况。 * [HTTP 请求](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#http-%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # List all convert pairs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#__docusaurus_skipToContent_fallback) 本页总览 查询可交易币对信息 ========= 接口描述[​](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- 查询可交易的币对的信息,以及它们分别所支持交易金额的上下限。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/convert/exchangeInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- **3000(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | fromAsset | STRING | EITHER OR BOTH | 用户售出币种 | | toAsset | STRING | EITHER OR BOTH | 用户买入币种 | > * 用户应当fromAsset和toAsset参数至少填一个。 > * 如果fromAsset和toAsset只填写了一个参数,将会返回部分币对信息。 响应示例[​](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------- [ { "fromAsset":"BTC", "toAsset":"USDT", "fromAssetMinAmount":"0.0004", "fromAssetMaxAmount":"50", "toAssetMinAmount":"20", "toAssetMaxAmount":"9E+24" // 9E+24 表示该符号的上限非常大,接近无穷大 }] * [接口描述](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/convert/market-data/List-all-convert-pairs#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/convert/Introduction#__docusaurus_skipToContent_fallback) 币安闪兑API允许用户在币安闪兑上自动进行交易。用户可以通过闪兑API集成自动化交易工作流,并以编程方式执行闪兑交易。 **请注意:该服务的所有用户均受到币安使用条款的约束。API服务不适用于含套利、高频交易或价格剥削在内的使用目的。币安可随时出于任何原因自行决定限制或终止币安API连接,且没有义务提前告知任何此类限制或终止。** --- # 概览 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/Introduction#__docusaurus_skipToContent_fallback) 质押借币接口用于与借币产品交互。更多细节, 请参考[币安质押借币](https://www.binance.com/zh-CN/loan) 页面。 --- # Get Crypto Loans Income History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#__docusaurus_skipToContent_fallback) 本页总览 获取质押借币资金流水(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 获取质押借币资金流水 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/loan/income` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **6000** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | asset | STRING | NO | | | type | STRING | NO | 默认返回所有类型 枚举值:借入 `borrowIn`,抵押金使用`collateralSpent`, 还款金额`repayAmount`, 抵押物返还`collateralReturn`, 增加抵押物`addCollateral`, 减少抵押物`removeCollateral`, 强平后返还抵押物`collateralReturnAfterLiquidation` | | startTime | LONG | NO | | | endTime | LONG | NO | | | limit | INT | NO | 默认 20, 最大 100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > 若 startTime 和 endTime 均未发送,只返回最近 7 天数据 startTime 和 endTime 的最大时间间隔为 30 天 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { asset: "BUSD", type: "borrowIn", amount: "100", timestamp: 1633771139847, tranId: "80423589583", }, { asset: "BUSD", type: "borrowIn", amount: "100", timestamp: 1634638371496, tranId: "81685123491", },] * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Loan Borrow History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#__docusaurus_skipToContent_fallback) 本页总览 查询质押借币历史记录(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询质押借币历史记录 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/loan/borrow/history` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | orderId | LONG | NO | `POST /sapi/v1/loan/borrow` 中的 orderId | | loanCoin | STRING | NO | | | collateralCoin | STRING | NO | | | startTime | LONG | NO | | | endTime | LONG | NO | | | current | LONG | NO | 当前查询页数,从 1 开始。默认值:1;最大:1000。 | | limit | LONG | NO | 默认值:10;最大:100。 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果没有发送 startTime 和 endTime,默认返回最近 90 天的数据。 > * startTime 和 endTime 的最大间隔为 180 天。 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "rows": [ { "orderId": 100000001, "loanCoin": "BUSD", "initialLoanAmount": "10000", "hourlyInterestRate": "0.000057" "loanTerm": "7" "collateralCoin": "BNB", "initialCollateralAmount": "49.27565492" "borrowTime": 1575018510000 "status": "Repaid" // Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed } ], "total": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Connect | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/user-data-streams/Connect#__docusaurus_skipToContent_fallback) 账户信息流连接 ======= * 本篇所列出REST接口的baseurl **[https://dapi.binance.com](https://dapi.binance.com/) ** * 用于订阅账户数据的 `listenKey` 从创建时刻起有效期为60分钟 * 可以通过`PUT`一个`listenKey`延长60分钟有效期,如收到`-1125`报错提示此`listenKey`不存在,建议重新使用`POST /dapi/v1/listenKey`生成`listenKey` * 可以通过`DELETE`一个 `listenKey` 立即关闭当前数据流,并使该`listenKey` 无效 * 在具有有效`listenKey`的帐户上执行`POST`将返回当前有效的`listenKey`并将其有效期延长60分钟 * 本篇所列出的websocket接口,共有如下两种连接方式: * 连接方式一: * Base Url: **wss://dstream.binance.com** * 订阅账户数据流的stream名称为 **/ws/\`\`** * 连接样例: * `wss://dstream.binance.com/ws/XaEAKTsQSRLZAGH9tuIu37plSRsdjmlAVBoNYPUITlTAko1WI22PgmBMpI1rS8Yh` * 连接方式二: * Base Url: **wss://dstream-auth.binance.com** * 订阅账户数据流的stream名称为 **/ws/\`\`?listenKey=** * **在建立连接时,必须为一个有效的listenKey** * 连接样例: * `wss://dstream-auth.binance.com/ws/XaEAKTsQSRLZAGH9tuIu37plSRsdjmlAVBoNYPUITlTAko1WI22PgmBMpI1rS8Yh?listenKey=XaEAKTsQSRLZAGH9tuIu37plSRsdjmlAVBoNYPUITlTAko1WI22PgmBMpI1rS8Yh` * 每个链接有效期不超过24小时,请妥善处理断线重连。 * 单一账户,单一连接的推送数据流消息可以保证时间序; **强烈建议您使用 E 字段进行排序** * 考虑到剧烈行情下, RESTful接口可能存在查询延迟,我们强烈建议您优先从Websocket user data stream推送的消息来获取订单,仓位等信息。 --- # Connect | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/websocket-market-streams/Connect#__docusaurus_skipToContent_fallback) 市场数据连接 ====== * 本篇所列出的所有wss接口,共有如下两种连接方式: * 连接方式: * Base Url:**wss://dstream.binance.com** * 订阅单一stream格式为 **/ws/** * 组合streams的URL格式为 **/stream?streams=//** * 连接样例: * `wss://dstream.binance.com/ws/bnbusdt@aggTrade` * `wss://dstream.binance.com/stream?streams=bnbusdt@aggTrade/btcusdt@markPrice` * 订阅组合streams时,事件payload会以这样的格式封装 **{"stream":"","data":}** * stream名称中所有交易对均为**小写**。 * 每个链接有效期不超过24小时,请妥善处理断线重连。 * 服务端每3分钟会发送ping帧,客户端应当在10分钟内回复pong帧,否则服务端会主动断开链接。允许客户端发送不成对的pong帧(即客户端可以以高于10分钟每次的频率发送pong帧保持链接)。 * Websocket服务器每秒最多接受10个订阅消息。 * 如果用户发送的消息超过限制,连接会被断开连接。反复被断开连接的IP有可能被服务器屏蔽。 * 单个连接最多可以订阅 **1024** 个Streams。 --- # Exchange Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#__docusaurus_skipToContent_fallback) 本页总览 获取交易规则和交易对 ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取交易规则和交易对 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/exchangeInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NONE 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "exchangeFilters": [], "rateLimits": [ // API访问的限制 { "interval": "MINUTE", // 按照分钟计算 "intervalNum": 1, // 按照1分钟计算 "limit": 2400, // 上限次数 "rateLimitType": "REQUEST_WEIGHT" // 按照访问权重来计算 }, { "interval": "MINUTE", "intervalNum": 1, "limit": 1200, "rateLimitType": "ORDERS" // 按照订单数量来计算 } ], "serverTime": 1565613908500, // 请忽略。如果需要获取系统时间,请查询接口 “GET /dapi/v1/time” "symbols": [ // 交易对信息 { "filters": [ { "filterType": "PRICE_FILTER", // 价格限制 "maxPrice": "100000", // 价格上限, 最大价格 "minPrice": "0.1", // 价格下限, 最小价格 "tickSize": "0.1" // 下单最小价格间隔 }, { "filterType": "LOT_SIZE", // 数量限制 "maxQty": "100000", // 数量上限, 最大数量 "minQty": "1", // 数量下限, 最小数量 "stepSize": "1" // 下单最小数量间隔 }, { "filterType": "MARKET_LOT_SIZE", // 市价订单数量限制 "maxQty": "100000", // 数量上限, 最大数量 "minQty": "1", // 数量下限, 最小数量 "stepSize": "1" // 允许的步进值 }, { "filterType": "MAX_NUM_ORDERS", // 最多挂单数限制 "limit": 200 }, { "filterType": "PERCENT_PRICE", // 价格比限制 "multiplierUp": "1.0500", // 价格上限百分比 "multiplierDown": "0.9500", // 价格下限百分比 "multiplierDecimal": "4" } ], "orderTypes": [ // 订单类型 "LIMIT", // 限价单 "MARKET", // 市价单 "STOP", // 止损单 "TAKE_PROFIT", // 止盈单 "TRAILING_STOP_MARKET" // 跟踪止损单 ], "timeInForce": [ // 有效方式 "GTC", // 成交为止, 一直有效 "IOC", // 无法立即成交(吃单)的部分就撤销 "FOK", // 无法全部立即成交就撤销 "GTX" // 无法成为挂单方就撤销 ], "liquidationFee": "0.010000", // 强平费率 "marketTakeBound": "0.30", // 市价吃单(相对于标记价格)允许可造成的最大价格偏离比例 "symbol": "BTCUSD_200925", // 交易对 "pair": "BTCUSD", // 标的交易对 "contractType": "CURRENT_QUARTER", // 合约类型 "deliveryDate": 1601020800000, "onboardDate": 1590739200000, "contractStatus": "TRADING", // 交易对状态 "contractSize": 100, // "quoteAsset": "USD", // 报价币种 "baseAsset": "BTC", // 标的物 "marginAsset": "BTC", // 保证金币种 "pricePrecision": 1, // 价格小数点位数(仅作为系统精度使用,注意同tickSize 区分) "quantityPrecision": 0, // 数量小数点位数(仅作为系统精度使用,注意同stepSize 区分) "baseAssetPrecision": 8, "quotePrecision": 8, "equalQtyPrecision": 4, // 请忽略 "triggerProtect": "0.0500", // 开启"priceProtect"的条件订单的触发阈值 "maintMarginPercent": "2.5000", // 请忽略 "requiredMarginPercent": "5.0000", // 请忽略 "underlyingType": "COIN", // 标的类型 "underlyingSubType": [] // 标的物子类型 } ], "timezone": "UTC" // 服务器所用的时间区域} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information#%E5%93%8D%EF%BF%BD%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Index Price And Mark Price | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#__docusaurus_skipToContent_fallback) 本页总览 最新现货指数价格和Mark Price =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询最新现货指数价格和Mark Price HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/premiumIndex` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | pair | STRING | NO | 标的交易对 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BTCUSD_PERP", // 交易对 "pair": "BTCUSD", // 基础标的 "markPrice": "11029.69574559", // 标记价格 "indexPrice": "10979.14437500", // 指数价格 "estimatedSettlePrice": "10981.74168236", // 预估结算价,仅在交割开始前最后一小时有意义 "lastFundingRate": "0.00071003", // 最近更新的资金费率,只对永续合约有效,其他合约返回"" "interestRate": "0.00010000", // 标的资产基础利率,只对永续合约有效,其他合约返回"" "nextFundingTime": 1596096000000, // 下次资金费时间,只对永续合约有效,其他合约返回0 "time": 1596094042000 // 更新时间 }, { "symbol": "BTCUSD_200925", "pair": "BTCUSD", "markPrice": "12077.01343750", "indexPrice": "10979.10312500", "estimatedSettlePrice": "10981.74168236", "lastFundingRate": "", "interestRate": "", "nextFundingTime": 0, "time": 1596094042000 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Index Price Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 价格指数K线数据 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询价格指数K线 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/dapi/v1/indexPriceKlines` 每根K线的开盘时间可视为唯一ID 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ \ > 1000 | 10\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | pair | STRING | YES | 标的交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * startTime 与 endTime 之间最多只可以相差200天\ > * 默认返回 startTime 与 endTime 之间最接近 endTime的 limit 条数据:\ > * startTime, endTime 均未提供的, 将会使用当前时间为 endTime, 200天前为 startTime\ > * 仅提供 startTime 的, 将会使用 startTime 之后200天作为默认 endTime (至多为当前时间)\ > * 仅提供 endTime 的, 将会使用endTime 之前200天作为默认 startTime\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1591256400000, // 开盘时间 "9653.69440000", // 开盘价 "9653.69640000", // 最高价 "9651.38600000", // 最低价 "9651.55200000", // 收盘价(当前K线未结束的即为最新价) "0 ", // 请忽略 1591256459999, // 收盘时间 "0", // 请忽略 60, // 构成记录数 "0", // 请忽略 "0", // 请忽略 "0" // 请忽略 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 K线数据 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 每根K线的开盘时间可视为唯一ID HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/dapi/v1/klines` * 订阅Kline需要提供间隔参数,最短为分钟线,最长为月线。支持以下间隔: m -> 分钟; h -> 小时; d -> 天; w -> 周; M -> 月 * 1m * 3m * 5m * 15m * 30m * 1h * 2h * 4h * 6h * 8h * 12h * 1d * 3d * 1w * 1M HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82-1 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ [ 1591258320000, // 开盘时间 "9640.7", // 开盘价 "9642.4", // 最高价 "9640.6", // 最低价 "9642.0", // 收盘价(当前K线未结束的即为最新价) "206", // 成交量 1591258379999, // 收盘时间 "2.13660389", // 成交额(标的数量) 48, // 成交笔数 "119", // 主动买入成交量 "1.23424865", // 主动买入成交额(标的数量) "0" // 请忽略该参数 ]] 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ \ > 1000 | 10\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | symbol | STRING | YES | 交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * startTime 与 endTime 之间最多只可以相差200天\ > * 默认返回 startTime 与 endTime 之间最接近 endTime的 limit 条数据:\ > * startTime, endTime 均未提供的, 将会使用当前时间为 endTime, 200天前为 startTime\ > * 仅提供 startTime 的, 将会使用 startTime 之后200天作为默认 endTime (至多为当前时间)\ > * 仅提供 endTime 的, 将会使用endTime 之前200天作为默认 startTime\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82-1)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) --- # Long Short Ratio | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#__docusaurus_skipToContent_fallback) 本页总览 多空持仓人数比 ======= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 多空持仓人数比 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/futures/data/globalLongShortAccountRatio` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | pair | STRING | YES | BTCUSD | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | Default 30,Max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近30天的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "pair": "BTCUSD", "longShortRatio": "0.1960", "longAccount": "0.6622", //66.22% "shortAccount": "0.3378", //33.78% "timestamp": 1583139600000 }, { "pair": "BTCUSD", "longShortRatio": "1.9559", "longAccount": "0.6617", "shortAccount": "0.3382", "timestamp": 1583139900000 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Mark Price Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 标记价格K线数据 ======== 每根K线的开盘时间可视为唯一ID HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/markPriceKlines` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ \ > 1000 | 10\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | symbol | STRING | YES | 交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * startTime 与 endTime 之间最多只可以相差200天\ > * 默认返回 startTime 与 endTime 之间最接近 endTime的 limit 条数据:\ > * startTime, endTime 均未提供的, 将会使用当前时间为 endTime, 200天前为 startTime\ > * 仅提供 startTime 的, 将会使用 startTime 之后200天作为默认 endTime (至多为当前时间)\ > * 仅提供 endTime 的, 将会使用endTime 之前200天作为默认 startTime\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1591256400000, // 开盘时间 "9653.69440000", // 开盘价 "9653.69640000", // 最高价 "9651.38600000", // 最低价 "9651.55200000", // 收盘价(当前K线未结束的即为最新价) "0 ", // 请忽略 1591256459999, // 收盘时间 "0", // 请忽略 60, // 构成记录数 "0", // 请忽略 "0", // 请忽略 "0" // 请忽略 ]]\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Old Trades Lookup | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#__docusaurus_skipToContent_fallback) 本页总览 查询历史成交 (MARKET\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询订单簿历史成交 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/historicalTrades` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **20** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认值:100 最大值:500. | | fromId | LONG | NO | 从哪一条成交id开始返回. 缺省返回最近的成交记录 | > * 仅返回订单簿成交,即不会返回保险基金和自动减仓(ADL)成交 > * 仅支持返回最近1个月的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "id": 595103, // 成交ID "price": "9642.2", // 成交价格 "qty": "1", // 成交量(张数) "baseQty": "0.01037108", // 成交额(标的物数量) "time": 1499865549590, // 时间 "isBuyerMaker": true // 买方是否为挂单方 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Order Book | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#__docusaurus_skipToContent_fallback) 本页总览 深度信息 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询交易对深度 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/dapi/v1/depth` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | limit | 权重 | | --- | --- | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认 500; 可选值:\[5, 10, 20, 50, 100, 500, 1000\] | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "lastUpdateId": 16769853, "symbol": "BTCUSD_PERP", // 交易对 "pair": "BTCUSD", // 标的交易对 "E": 1591250106370, // 消息时间 "T": 1591250106368, // 撮合时间 "bids": [ // 买单 [ "9638.0", // 价格 "431" // 数量 ] ], "asks": [ // 卖单 [ "9638.2", // 价格 "12" // 数量 ] ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Order-Book#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Open Interest Statistics | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#__docusaurus_skipToContent_fallback) 本页总览 合约持仓量 ===== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 合约持仓量 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/futures/data/openInterestHist` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | pair | STRING | YES | BTCUSD | | contractType | ENUM | YES | ALL, CURRENT\_QUARTER, NEXT\_QUARTER, PERPETUAL | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | Default 30,Max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近30天的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "sumOpenInterest": "20403", //unit: cont "sumOpenInterestValue": "176196512.23400000", //unit: base asset "timestamp": 1591261042378 }, { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "sumOpenInterest": "20401", "sumOpenInterestValue": "176178704.98700000", "timestamp": 1583128200000 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Recent Trades List | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#__docusaurus_skipToContent_fallback) 本页总览 近期成交(归集) ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 获取近期订单簿成交 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- `GET /dapi/v1/trades` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认 500; 最大 1000. | > * 仅返回订单簿成交,即不会返回保险基金和自动减仓(ADL)成交 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { id: 28457, // 成交ID price: "9635.0", // 成交价格 qty: "1", // 成交量(张数) baseQty: "0.01037883", // 成交额(标的数量) time: 1591250192508, // 时间 isBuyerMaker: true, // 买方是否为挂单方 },] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Premium Index Kline Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#__docusaurus_skipToContent_fallback) 本页总览 溢价指数K线数据 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 合约溢价指数K线。每根K线的开盘时间可视为唯一ID。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/premiumIndexKlines` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ | \> 1000 | 10 |\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | symbol | STRING | YES | 交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * 缺省返回最近的数据\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1691603820000, // 开盘时间 "-0.00042931", // 开盘价 "-0.00023641", // 最高价 "-0.00059406", // 最低价 "-0.00043659", // 收盘价 "0", // 请忽略 1691603879999, // 收盘时间 "0", // 请忽略 12, // 请忽略 "0", // 请忽略 "0", // 请忽略 "0" // 请忽略 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Symbol Order Book Ticker | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#__docusaurus_skipToContent_fallback) 本页总览 当前最优挂单 ====== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 返回当前最优的挂单(最高买单,最低卖单) HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/ticker/bookTicker` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 单交易对**2**,无交易对**5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | pair | STRING | NO | 标的交易对 | > * symbol 和 pair 不接受同时发送 > * 发送 pair的,返回pair对应所有正在交易的symbol数据 > * symbol,pair 都没有发送的,返回所有symbol数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "lastUpdateId": 1027024, "symbol": "BTCUSD_200626", // 交易对 "pair": "BTCUSD", // 标的交易对 "bidPrice": "9650.1", //最优买单价 "bidQty": "16", //最优买单挂单量 "askPrice": "9650.3", //最优卖单价 "askQty": "7", //最优卖单挂单量 "time": 1591257300345 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Top Trader Long Short Account Ratio | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#__docusaurus_skipToContent_fallback) 本页总览 大户账户数多空比 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 持仓大户的净持仓多头和空头账户数占比,大户指保证金余额排名前20%的用户。一个账户记一次。 多仓账户数比例 = 持多仓大户数 / 总持仓大户数 空仓账户数比例 = 持空仓大户数 / 总持仓大户数 多空账户数比值 = 多仓账户数比例 / 空仓账户数比例 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/futures/data/topLongShortAccountRatio` 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | default 30, max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近30天的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "pair": "BTCUSD", "longShortRatio": "1.8105", "longAccount": "0.6442", //64.42% "shortAccount": "0.3558", //35.58% "timestamp": 1591261042378 }, { "pair": "BTCUSD", "longShortRatio": "1.1110", "longAccount": "0.5263", "shortAccount": "0.4737", "timestamp": 1592870400000 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Flexible Loan Repay (TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#__docusaurus_skipToContent_fallback) 本页总览 活期借币还款(TRADE) ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- 活期借币还款 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- POST `/sapi/v2/loan/flexible/repay` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- **6000** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | loanCoin | STRING | YES | | | collateralCoin | STRING | YES | | | repayAmount | DECIMAL | YES | | | collateralReturn | BOOLEAN | NO | 默认: TRUE. TRUE: 多余的抵押金退回现货钱包;FALSE: 多余的抵押金保留在原订单里,降低 LTV | | fullRepayment | BOOLEAN | NO | 默认: FALSE. TRUE: 全部偿还; FALSE: 按照 loanAmount 金额部分偿还 | | repaymentType | INT | NO | 默认: 1. 1: 借贷资产还款; 2: 抵押物还款 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * repayAmount 是必填项,即便 fullRepayment = FALSE 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- { "loanCoin": "BUSD", "collateralCoin": "BNB", "remainingDebt": "100.5", "remainingCollateral": "5.253", "fullRepayment": false, "currentLTV": "0.25", "repayStatus": "REPAID" // REPAID, REPAYING, FAILED} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Check Collateral Repay Rate (TRADE) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#__docusaurus_skipToContent_fallback) 本页总览 查询抵押还款汇率(USER\_DATA) ==================== HTTP 请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#http-%E8%AF%B7%E6%B1%82 "HTTP 请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- `GET /sapi/v2/loan/flexible/repay/rate` 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取使用抵押还款时的抵押币/借币最新汇率。 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **6000** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | loanCoin | STRING | YES | | | collateralCoin | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "loanCoin": "BUSD", "collateralCoin": "BNB", "rate": "300.36781234" // rate of collateral coin/loan coin} * [HTTP 请求](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#http-%E8%AF%B7%E6%B1%82) * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Flexible Loan Repayment History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#__docusaurus_skipToContent_fallback) 本页总览 查询活期借币还款记录历史(USER\_DATA) ======================== 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询活期借币还款记录历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v2/loan/flexible/repay/history` GET `/sapi/v1/loan/flexible/repay/history` 可查询2024-02-27 08:00之前数据 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必须 | 描述 | | --- | --- | --- | --- | | loanCoin | STRING | NO | | | collateralCoin | STRING | NO | | | startTime | LONG | NO | | | endTime | LONG | NO | | | current | LONG | NO | 当前查询页数,从 1 开始。默认值:1;最大:1000。 | | limit | LONG | NO | 默认值:10;最大:100。 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果没有发送 startTime 和 endTime,默认返回最近 90 天的数据。 > * startTime 和 endTime 的最大间隔为 180 天。 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "rows": [ { "loanCoin": "BUSD", "repayAmount": "10000", "collateralCoin": "BNB", "collateralReturn": "49.27565492", "repayStatus": "REPAID" // REPAID, REPAYING, FAILED "repayTime": 1575018510000 } ], "total": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Futures Lead Trader Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#__docusaurus_skipToContent_fallback) 本页总览 查询是否为带单员身份(TRADE) ================= 接口描述[​](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询是否为带单员身份 HTTP请求[​](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/copyTrading/futures/userStatus` 请求权重(UID)[​](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid "请求权重(UID)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **20** 请求参数[​](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": "000000", "message": "success", "data": { "isLeadTrader": true, "time": 1717382310843 }, "success": true} * [接口描述](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#http%E8%AF%B7%E6%B1%82) * [请求权重(UID)](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Duid) * [请求参数](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 快速开始 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#__docusaurus_skipToContent_fallback) 本页总览 快速开始 ==== API Key 权限设置[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE "API Key 权限设置的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- * 新创建的API的默认权限是 `只读`。 * 如果需要通过API提款, 需要在UI修改权限, 选中 `允许提现`。 账户[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#%E8%B4%A6%E6%88%B7 "账户的直接链接") ------------------------------------------------------------------------------------------------------- ### 现货账户[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7 "现货账户的直接链接") 新注册的币安账号都会有一个现货(`SPOT`)账号。 ### 杠杆账户[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7 "杠杆账户的直接链接") 为了开设杠杆(`MARGIN`)账户, 可以参考[Binance杠杆交易账户设置指南](https://www.binance.vision/zh/tutorials/binance-margin-trading-guide) API 代码库[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93 "API 代码库的直接链接") ------------------------------------------------------------------------------------------------------------------------------ ### Connectors[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#connectors "Connectors的直接链接") 以下有一些轻量级的代码库,使不同语言的用户能够直接调用现货的 Binance 公共 API: * Python [https://github.com/binance/binance-connector-python](https://github.com/binance/binance-connector-python) * JavaScript [https://github.com/binance/binance-connector-js](https://github.com/binance/binance-connector-js) * Ruby [https://github.com/binance/binance-connector-ruby](https://github.com/binance/binance-connector-ruby) * DotNET C# [https://github.com/binance/binance-connector-dotnet](https://github.com/binance/binance-connector-dotnet) * Java [https://github.com/binance/binance-connector-java](https://github.com/binance/binance-connector-java) * Rust [https://github.com/binance/binance-spot-connector-rust](https://github.com/binance/binance-spot-connector-rust) * PHP [https://github.com/binance/binance-connector-php](https://github.com/binance/binance-connector-php) * Go [https://github.com/binance/binance-connector-go](https://github.com/binance/binance-connector-go) ### Postman Collections[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#postman-collections "Postman Collections的直接链接") Postman 集合现已推出。推荐给寻求快速和轻松地开始使用 API 的新用户。 [https://github.com/binance/binance-api-postman](https://github.com/binance/binance-api-postman) ### Swagger[​](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#swagger "Swagger的直接链接") 以下有提供包含 RESTful API 的 OpenAPI 规范的 YAML 文件,以及可供参考的 Swagger UI 页面。 [https://github.com/binance/binance-api-swagger](https://github.com/binance/binance-api-swagger) * [API Key 权限设置](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE) * [账户](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#%E8%B4%A6%E6%88%B7) * [现货账户](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7) * [杠杆账户](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#%E6%9D%A0%E6%9D%86%E8%B4%A6%E6%88%B7) * [API 代码库](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93) * [Connectors](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#connectors) * [Postman Collections](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#postman-collections) * [Swagger](https://developers.binance.com/docs/zh-CN/copy_trading/quick-start#swagger) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2025-12-26 "2025-12-26的直接链接") -------------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/crypto_loan#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/crypto_loan/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/crypto_loan#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/crypto_loan/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 2024-12-20[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2024-12-20 "2024-12-20的直接链接") -------------------------------------------------------------------------------------------------- * 活期借币新增接口:活期借币支持抵押物还款 * `POST/sapi/v2/loan/flexible/repay/collateral` * `GET /sapi/v2/loan/flexible/repay/rate` * `GET /sapi/v2/loan/flexible/liquidation/history` 2024-11-05[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2024-11-05 "2024-11-05的直接链接") -------------------------------------------------------------------------------------------------- * 根据币安借币(固定利率)的最新升级,币安借币已经下架了如下固定利率借贷对应的SAPI接口(VIP借币定期利率订单不受本次服务更新影响 ): * `GET /sapi/v1/loan/loanable/data` * `GET /sapi/v1/loan/collateral/data` * `POST /sapi/v1/loan/borrow` * `POST /sapi/v1/loan/repay` * `POST /sapi/v1/loan/adjust/ltv` * `POST /sapi/v1/loan/customize/margin_call` * `GET /sapi/v1/loan/ongoing/orders` * 于此同时,币安借币会继续维护如下固定利率借贷的历史订单查询SAPI接口: * `GET /sapi/v1/loan/income` * `GET /sapi/v1/loan/borrow/history` * `GET /sapi/v1/loan/ltv/adjustment/history` * `GET /sapi/v1/loan/repay/history` 2024-02-27[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2024-02-27 "2024-02-27的直接链接") -------------------------------------------------------------------------------------------------- * 根据币安借币(浮动利率)的[最新升级](https://www.binance.com/zh-CN/support/announcement/%E5%B8%81%E5%AE%89%E5%8D%87%E7%BA%A7%E8%B4%A8%E6%8A%BC%E5%80%9F%E5%B8%81-%E6%B4%BB%E6%9C%9F%E5%88%A9%E7%8E%87-%E4%BA%A7%E5%93%81-2024-02-27-d35942110b53480581773fc62a3e6eae) , * 币安借币已于 2024-02-27 08:00 (UTC) 添加以下 /v2 SAPI 接口。用户可以使用 v2 SAPI 接口来下单、还款和管理 2024-02-27 08:00 (UTC) 之后创建的 币安借币(浮动利率 新版)订单。 * `POST /sapi/v2/loan/flexible/borrow` * `GET /sapi/v2/loan/flexible/ongoing/orders` * `GET /sapi/v2/loan/flexible/borrow/history` * `POST /sapi/v2/loan/flexible/repay` * `GET /sapi/v2/loan/flexible/repay/history` * `POST /sapi/v2/loan/flexible/adjust/ltv` * `GET /sapi/v2/loan/flexible/ltv/adjustment/history` * `GET /sapi/v2/loan/flexible/loanable/data` * `GET /sapi/v2/loan/flexible/collateral/data` * 此外,币安借币将在以下时间停止维护 /v1 SAPI 接口: * 在 2024-02-27 08:00 (UTC): * `POST /sapi/v1/loan/flexible/borrow` * `GET /sapi/v1/loan/flexible/loanable/data` * `GET /sapi/v1/loan/flexible/collateral/data` * 在 2024-04-24 03:00 (UTC): * `GET /sapi/v1/loan/flexible/ongoing/orders` * `POST /sapi/v1/loan/flexible/repay` * `POST /sapi/v1/loan/flexible/adjust/ltv` * 币安借币还将继续维护以下 /v1 SAPI 接口,以便用户查看在 2024-02-27 08:00 (UTC) 之前浮动利率的订单历史。 * `GET /sapi/v1/loan/flexible/borrow/history` * `GET /sapi/v1/loan/flexible/repay/history` * `GET /sapi/v1/loan/flexible/ltv/adjustment/history` * * * 2023-08-26[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2023-08-26 "2023-08-26的直接链接") -------------------------------------------------------------------------------------------------- * 新增质押借币接口: * `POST /sapi/v1/loan/flexible/borrow`: 活期借币借贷 * `GET /sapi/v1/loan/flexible/ongoing/orders`: 查询活期借款中订单列表 * `GET /sapi/v1/loan/flexible/borrow/history`: 查询活期借币历史记录 * `POST /sapi/v1/loan/flexible/repay`: 活期借币还款 * `POST /sapi/v1/loan/flexible/repay/history`: 查询活期借币还款记录历史 * `POST /sapi/v1/loan/flexible/adjust/ltv`: 调整活期借币质押率 * `GET /sapi/v1/loan/flexible/ltv/adjustment/history`: 查询活期借币质押率调整历史 * `GET /sapi/v1/loan/flexible/loanable/data`: 查询活期借币可借币种数据 * `GET /sapi/v1/loan/flexible/collateral/data`: 查询活期借币抵押币种数据 * * * 2023-02-21[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2023-02-21 "2023-02-21的直接链接") -------------------------------------------------------------------------------------------------- * 修改质押借币接口: * `POST /sapi/v1/loan/borrow`: 参数`loanTerm`仅可传 7 或 30 * * * 2022-11-01[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2022-11-01 "2022-11-01的直接链接") -------------------------------------------------------------------------------------------------- * 添加质押借币接口: * `GET /sapi/v1/loan/loanable/data`: 获取可借币种的利率和借贷限额。借入限额以美元价值显示。 * `GET /sapi/v1/loan/collateral/data`: 获取抵押币种质押率信息和质押限额。质押限额以美元价值显示。 * `GET /sapi/v1/loan/repay/collateral/rate`: 获取抵押物还款时,抵押/借贷币种的汇率价格。汇率价格有效时间为 8 秒。 * `POST /sapi/v1/loan/customize/margin_call`: 质押借币自定义补仓质押率,仅可针对进行中订单,自定义补仓质押率。 * * * 2022-09-15[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2022-09-15 "2022-09-15的直接链接") -------------------------------------------------------------------------------------------------- * 添加质押借币接口: * `POST /sapi/v1/loan/borrow`:借币 - 质押借币借贷 * `GET /sapi/v1/loan/borrow/history`:借币 - 查询质押借币历史记录 * `GET/sapi/v1/loan/ongoing/orders`:借币 - 查询借款中订单列表 * `POST/sapi/v1/loan/repay`:还款 - 质押借币还款 * `GET/sapi/v1/loan/repay/history`:还款 - 查询还款记录历史 * `POST/sapi/v1/loan/adjust/ltv`:调整质押率 - 质押借币调整质押率 * `GET/sapi/v1/loan/ltv/adjustment/history`:调整质押率 - 查询质押率调整历史 * * * 2021-11-08[​](https://developers.binance.com/docs/zh-CN/crypto_loan#2021-11-08 "2021-11-08的直接链接") -------------------------------------------------------------------------------------------------- * 新增质押借币接口: * 新增查询质押借币资金流水接口`GET /sapi/v1/loan/income`以支持用户查询质押借币资金流水历史 * [2025-12-26](https://developers.binance.com/docs/zh-CN/crypto_loan#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/crypto_loan#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/crypto_loan#rest-api) * [2024-12-20](https://developers.binance.com/docs/zh-CN/crypto_loan#2024-12-20) * [2024-11-05](https://developers.binance.com/docs/zh-CN/crypto_loan#2024-11-05) * [2024-02-27](https://developers.binance.com/docs/zh-CN/crypto_loan#2024-02-27) * [2023-08-26](https://developers.binance.com/docs/zh-CN/crypto_loan#2023-08-26) * [2023-02-21](https://developers.binance.com/docs/zh-CN/crypto_loan#2023-02-21) * [2022-11-01](https://developers.binance.com/docs/zh-CN/crypto_loan#2022-11-01) * [2022-09-15](https://developers.binance.com/docs/zh-CN/crypto_loan#2022-09-15) * [2021-11-08](https://developers.binance.com/docs/zh-CN/crypto_loan#2021-11-08) --- # 更新日志 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#__docusaurus_skipToContent_fallback) 本页总览 更新日志 ==== 2025-12-26[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2025-12-26 "2025-12-26的直接链接") ------------------------------------------------------------------------------------------------------------- ### 时效性通知[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5 "时效性通知的直接链接") * **以下有关于REST API变更将在 2026-01-15 07:OO UTC 发生:** 调用需要签名的接口时,请在计算签名之前对 payload 进行百分比编码(percent-encode)。不符合此顺序的请求将被拒绝,并返回错误代码 [`-1022 签名不正确`](https://developers.binance.com/docs/zh-CN/crypto_loan/error-code#-1022-invalid_signature) 。请检查并相应地更新您代码中的签名逻辑部分。 ### REST API[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#rest-api "REST API的直接链接") * 更新了 REST API 文档中有关于 [签名请求示例](https://developers.binance.com/docs/zh-CN/crypto_loan/general-info#post-apiv3order-%E7%9A%84%E7%AD%BE%E5%90%8D%E7%A4%BA%E4%BE%8B) 的部分。 2024-12-20[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2024-12-20 "2024-12-20的直接链接") ------------------------------------------------------------------------------------------------------------- * 活期借币新增接口:活期借币支持抵押物还款 * `POST/sapi/v2/loan/flexible/repay/collateral` * `GET /sapi/v2/loan/flexible/repay/rate` * `GET /sapi/v2/loan/flexible/liquidation/history` 2024-11-05[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2024-11-05 "2024-11-05的直接链接") ------------------------------------------------------------------------------------------------------------- * 根据币安借币(固定利率)的最新升级,币安借币已经下架了如下固定利率借贷对应的SAPI接口(VIP借币定期利率订单不受本次服务更新影响 ): * `GET /sapi/v1/loan/loanable/data` * `GET /sapi/v1/loan/collateral/data` * `POST /sapi/v1/loan/borrow` * `POST /sapi/v1/loan/repay` * `POST /sapi/v1/loan/adjust/ltv` * `POST /sapi/v1/loan/customize/margin_call` * `GET /sapi/v1/loan/ongoing/orders` * 于此同时,币安借币会继续维护如下固定利率借贷的历史订单查询SAPI接口: * `GET /sapi/v1/loan/income` * `GET /sapi/v1/loan/borrow/history` * `GET /sapi/v1/loan/ltv/adjustment/history` * `GET /sapi/v1/loan/repay/history` 2024-02-27[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2024-02-27 "2024-02-27的直接链接") ------------------------------------------------------------------------------------------------------------- * 根据币安借币(浮动利率)的[最新升级](https://www.binance.com/zh-CN/support/announcement/%E5%B8%81%E5%AE%89%E5%8D%87%E7%BA%A7%E8%B4%A8%E6%8A%BC%E5%80%9F%E5%B8%81-%E6%B4%BB%E6%9C%9F%E5%88%A9%E7%8E%87-%E4%BA%A7%E5%93%81-2024-02-27-d35942110b53480581773fc62a3e6eae) , * 币安借币已于 2024-02-27 08:00 (UTC) 添加以下 /v2 SAPI 接口。用户可以使用 v2 SAPI 接口来下单、还款和管理 2024-02-27 08:00 (UTC) 之后创建的 币安借币(浮动利率 新版)订单。 * `POST /sapi/v2/loan/flexible/borrow` * `GET /sapi/v2/loan/flexible/ongoing/orders` * `GET /sapi/v2/loan/flexible/borrow/history` * `POST /sapi/v2/loan/flexible/repay` * `GET /sapi/v2/loan/flexible/repay/history` * `POST /sapi/v2/loan/flexible/adjust/ltv` * `GET /sapi/v2/loan/flexible/ltv/adjustment/history` * `GET /sapi/v2/loan/flexible/loanable/data` * `GET /sapi/v2/loan/flexible/collateral/data` * 此外,币安借币将在以下时间停止维护 /v1 SAPI 接口: * 在 2024-02-27 08:00 (UTC): * `POST /sapi/v1/loan/flexible/borrow` * `GET /sapi/v1/loan/flexible/loanable/data` * `GET /sapi/v1/loan/flexible/collateral/data` * 在 2024-04-24 03:00 (UTC): * `GET /sapi/v1/loan/flexible/ongoing/orders` * `POST /sapi/v1/loan/flexible/repay` * `POST /sapi/v1/loan/flexible/adjust/ltv` * 币安借币还将继续维护以下 /v1 SAPI 接口,以便用户查看在 2024-02-27 08:00 (UTC) 之前浮动利率的订单历史。 * `GET /sapi/v1/loan/flexible/borrow/history` * `GET /sapi/v1/loan/flexible/repay/history` * `GET /sapi/v1/loan/flexible/ltv/adjustment/history` * * * 2023-08-26[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2023-08-26 "2023-08-26的直接链接") ------------------------------------------------------------------------------------------------------------- * 新增质押借币接口: * `POST /sapi/v1/loan/flexible/borrow`: 活期借币借贷 * `GET /sapi/v1/loan/flexible/ongoing/orders`: 查询活期借款中订单列表 * `GET /sapi/v1/loan/flexible/borrow/history`: 查询活期借币历史记录 * `POST /sapi/v1/loan/flexible/repay`: 活期借币还款 * `POST /sapi/v1/loan/flexible/repay/history`: 查询活期借币还款记录历史 * `POST /sapi/v1/loan/flexible/adjust/ltv`: 调整活期借币质押率 * `GET /sapi/v1/loan/flexible/ltv/adjustment/history`: 查询活期借币质押率调整历史 * `GET /sapi/v1/loan/flexible/loanable/data`: 查询活期借币可借币种数据 * `GET /sapi/v1/loan/flexible/collateral/data`: 查询活期借币抵押币种数据 * * * 2023-02-21[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2023-02-21 "2023-02-21的直接链接") ------------------------------------------------------------------------------------------------------------- * 修改质押借币接口: * `POST /sapi/v1/loan/borrow`: 参数`loanTerm`仅可传 7 或 30 * * * 2022-11-01[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2022-11-01 "2022-11-01的直接链接") ------------------------------------------------------------------------------------------------------------- * 添加质押借币接口: * `GET /sapi/v1/loan/loanable/data`: 获取可借币种的利率和借贷限额。借入限额以美元价值显示。 * `GET /sapi/v1/loan/collateral/data`: 获取抵押币种质押率信息和质押限额。质押限额以美元价值显示。 * `GET /sapi/v1/loan/repay/collateral/rate`: 获取抵押物还款时,抵押/借贷币种的汇率价格。汇率价格有效时间为 8 秒。 * `POST /sapi/v1/loan/customize/margin_call`: 质押借币自定义补仓质押率,仅可针对进行中订单,自定义补仓质押率。 * * * 2022-09-15[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2022-09-15 "2022-09-15的直接链接") ------------------------------------------------------------------------------------------------------------- * 添加质押借币接口: * `POST /sapi/v1/loan/borrow`:借币 - 质押借币借贷 * `GET /sapi/v1/loan/borrow/history`:借币 - 查询质押借币历史记录 * `GET/sapi/v1/loan/ongoing/orders`:借币 - 查询借款中订单列表 * `POST/sapi/v1/loan/repay`:还款 - 质押借币还款 * `GET/sapi/v1/loan/repay/history`:还款 - 查询还款记录历史 * `POST/sapi/v1/loan/adjust/ltv`:调整质押率 - 质押借币调整质押率 * `GET/sapi/v1/loan/ltv/adjustment/history`:调整质押率 - 查询质押率调整历史 * * * 2021-11-08[​](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2021-11-08 "2021-11-08的直接链接") ------------------------------------------------------------------------------------------------------------- * 新增质押借币接口: * 新增查询质押借币资金流水接口`GET /sapi/v1/loan/income`以支持用户查询质押借币资金流水历史 * [2025-12-26](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2025-12-26) * [时效性通知](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#%E6%97%B6%E6%95%88%E6%80%A7%E9%80%9A%E7%9F%A5) * [REST API](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#rest-api) * [2024-12-20](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2024-12-20) * [2024-11-05](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2024-11-05) * [2024-02-27](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2024-02-27) * [2023-08-26](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2023-08-26) * [2023-02-21](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2023-02-21) * [2022-11-01](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2022-11-01) * [2022-09-15](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2022-09-15) * [2021-11-08](https://developers.binance.com/docs/zh-CN/crypto_loan/change-log#2021-11-08) --- # Get Loan LTV Adjustment History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#__docusaurus_skipToContent_fallback) 本页总览 查询质押率调整历史(USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询质押率调整历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- `GET /sapi/v1/loan/ltv/adjustment/history` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | orderId | LONG | NO | | | loanCoin | STRING | NO | | | collateralCoin | STRING | NO | | | startTime | LONG | NO | | | endTime | LONG | NO | | | current | LONG | NO | 当前查询页数,从 1 开始。默认值:1;最大:1000。 | | limit | LONG | NO | 默认值:10;最大:100。 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果没有发送 startTime 和 endTime,默认返回最近 90 天的数据。 > * startTime 和 endTime 的最大间隔为 180 天。 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "rows": [ { "loanCoin": "BUSD", "collateralCoin": "BNB", "direction": "ADDITIONAL", "amount": "5.235", "preLTV": "0.78", "afterLTV": "0.56", "adjustTime": 1575018510000, "orderId": 756783308056935434 } ], "total": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Loan Repayment History (USER_DATA) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#__docusaurus_skipToContent_fallback) 本页总览 查询还款记录历史(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 查询还款记录历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/sapi/v1/loan/repay/history` 请求权重(IP)[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip "请求权重(IP)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **400** 请求参数[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | orderId | LONG | NO | | | loanCoin | STRING | NO | | | collateralCoin | STRING | NO | | | startTime | LONG | NO | | | endTime | LONG | NO | | | current | LONG | NO | 当前查询页数,从 1 开始。默认值:1;最大:1000。 | | limit | LONG | NO | 默认值:10;最大:100。 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果没有发送 startTime 和 endTime,默认返回最近 90 天的数据。 > * startTime 和 endTime 的最大间隔为 180 天。 响应示例[​](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "rows": [ { "loanCoin": "BUSD", "repayAmount": "10000", "collateralCoin": "BNB", "collateralUsed": "0" "collateralReturn": "49.27565492" "repayType": "1" // 1 for "repay with borrowed coin", 2 for "repay with collateral" "repayStatus": "Repaid" // Repaid, Repaying, Failed "repayTime": 1575018510000 "orderId": 756783308056935434 } ], "total": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E6%8E%A5%E5%8F%A3%EF%BF%BD%EF%BF%BD%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#http%E8%AF%B7%E6%B1%82) * [请求权重(IP)](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8Dip) * [请求参数](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Test Connectivity | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#__docusaurus_skipToContent_fallback) 本页总览 测试服务器连通性 PING ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 测试能否联通 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/dapi/v1/ping` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D-1 "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NONE * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D-1) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/coin-margined-futures/market-data/rest-api/Test-Connectivity#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Connect | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Connect#__docusaurus_skipToContent_fallback) 账户信息流连接 ======= * 本篇所列出REST接口的baseurl **[https://papi.binance.com](https://papi.binance.com/) ** * 用于订阅账户数据的 `listenKey` 从创建时刻起有效期为60分钟 * 可以通过`PUT`一个`listenKey`延长60分钟有效期,如收到`-1125`报错提示此`listenKey`不存在,建议重新使用`POST /papi/v1/listenKey`生成`listenKey` * 可以通过`DELETE`一个 `listenKey` 立即关闭当前数据流,并使该`listenKey` 无效 * 在具有有效`listenKey`的帐户上执行`POST`将返回当前有效的`listenKey`并将其有效期延长60分钟 * Websocket连接方式: * 连接方式一: * Base Url: **wss://fstream.binance.com/pm** * 订阅账户数据流的stream名称为 **/ws/\`\`** * 连接样例: * `wss://fstream.binance.com/pm/ws/pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1` * 每个链接有效期不超过24小时,请妥善处理断线重连。 * 单一账户,单一连接的推送数据流消息可以保证时间序; **强烈建议您使用 E 字段进行排序** * 考虑到剧烈行情下, RESTful接口可能存在查询延迟,我们强烈建议您优先从Websocket user data stream推送的消息来获取订单,仓位等信息。 --- # New Future Account Transfer | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/New-Future-Account-Transfer#__docusaurus_skipToContent_fallback) 划转 == 执行现货账户与合约账户之间的划转, [详情请见这里](https://developers.binance.com/docs/zh-CN/wallet/asset/user-universal-transfer) . --- # Accept Quote | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#__docusaurus_skipToContent_fallback) 本页总览 接受报价(TRADE) =========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- 通过 quote ID 来接受报价。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/convert/acceptQuote` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- **200(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | quoteId | STRING | YES | | | recvWindow | LONG | NO | 此值不能大于 60000 | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- { "orderId":"933256278426274426", "createTime":1623381330472, "orderStatus":"PROCESS" //PROCESS/ACCEPT_SUCCESS/SUCCESS/FAIL} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Accept-Quote#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Order Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#__docusaurus_skipToContent_fallback) 本页总览 查询订单状态(USER\_DATA) ================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- 通过 order ID 来查询订单状态。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/convert/orderStatus` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- **50(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | orderId | STRING | NO | orderId 和quoteId需要填其中一个 | | quoteId | STRING | NO | orderId 和quoteId需要填其中一个 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- { "orderId":933256278426274426, "orderStatus":"SUCCESS", "fromAsset":"BTC", "fromAmount":"0.00054414", "toAsset":"USDT", "toAmount":"20", "ratio":"36755", "inverseRatio":"0.00002721", "createTime":1623381330472} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Order-Status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # List all convert pairs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#__docusaurus_skipToContent_fallback) 本页总览 查询可交易币对信息 ========= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询可交易的币对的信息,以及它们分别所支持交易金额的上下限。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/convert/exchangeInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- **20(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | fromAsset | STRING | EITHER OR BOTH | 用户售出币种 | | toAsset | STRING | EITHER OR BOTH | 用户买入币种 | > * 用户应当fromAsset和toAsset参数至少填一个。 > * 如果fromAsset和toAsset只填写了一个参数,将会返回部分币对信息。 > * BNFCR资产仅对MICA地区用户有效 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "fromAsset":"BTC", "toAsset":"USDT", "fromAssetMinAmount":"0.0004", "fromAssetMaxAmount":"50", "toAssetMinAmount":"20", "toAssetMaxAmount":"2500000" }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/List-all-convert-pairs#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Send quote request | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#__docusaurus_skipToContent_fallback) 本页总览 发送获取报价请求(USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 对所需的币对发送获取报价请求 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/convert/getQuote` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- **50(IP)** **每小时360次,每天500次** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | fromAsset | STRING | YES | | | toAsset | STRING | YES | | | fromAmount | DECIMAL | EITHER | 这是成交后将被扣除的金额 | | toAmount | DECIMAL | EITHER | 这是成交后将会获得的金额 | | validTime | ENUM | NO | 可以支持10s,默认值为10s | | recvWindow | LONG | NO | 此值不能大于 60000 | | timestamp | LONG | YES | | > * 参数fromAmount或者toAmount只需要提供其中一个。 > * `quoteId`仅在账户余额充足时返回。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "quoteId":"12415572564", "ratio":"38163.7", "inverseRatio":"0.0000262", "validTimestamp":1623319461670, "toAmount":"3816.37", "fromAmount":"0.1"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert/Send-quote-request#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Connect | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Connect#__docusaurus_skipToContent_fallback) 账户信息流连接 ======= * 本篇所列出REST接口的baseurl **[https://fapi.binance.com](https://fapi.binance.com/) ** * 用于订阅账户数据的 `listenKey` 从创建时刻起有效期为60分钟 * 可以通过`PUT`一个`listenKey`延长60分钟有效期,如收到`-1125`报错提示此`listenKey`不存在,建议重新使用`POST /fapi/v1/listenKey`生成`listenKey` * 可以通过`DELETE`一个 `listenKey` 立即关闭当前数据流,并使该`listenKey` 无效 * 在具有有效`listenKey`的帐户上执行`POST`将返回当前有效的`listenKey`并将其有效期延长60分钟 * 本篇所列出的websocket接口,连接方式如下: * Base Url: **wss://fstream.binance.com** * 订阅账户数据流的stream名称为 **/ws/\`\`** * 连接样例: * `wss://fstream.binance.com/ws/XaEAKTsQSRLZAGH9tuIu37plSRsdjmlAVBoNYPUITlTAko1WI22PgmBMpI1rS8Yh` * 每个链接有效期不超过24小时,请妥善处理断线重连。 * 单一账户,单一连接的推送数据流消息可以保证时间序; **强烈建议您使用 E 字段进行排序** * 考虑到剧烈行情下, RESTful接口可能存在查询延迟,我们强烈建议您优先从Websocket user data stream推送的消息来获取订单,仓位等信息。 --- # Test Connectivity | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#__docusaurus_skipToContent_fallback) 本页总览 测试服务器连通性 PING ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 测试能否联通 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/ping` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NONE 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Order Book | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#__docusaurus_skipToContent_fallback) 本页总览 深度信息 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取有限档订单薄信息 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E6%96%B9%E5%BC%8F "方式的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- `depth` **注意:** 响应消息不包含RPI订单,其不可见。 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E8%AF%B7%E6%B1%82 "请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "51e2affb-0aba-4821-ba75-f2625006eb43", "method": "depth", "params": { "symbol": "BTCUSDT" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | limit | 权重 | | --- | --- | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认 500; 可选值:\[5, 10, 20, 50, 100, 500, 1000\] | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "51e2affb-0aba-4821-ba75-f2625006eb43", "status": 200, "result": { "lastUpdateId": 1027024, "E": 1589436922972, // 消息时间 "T": 1589436922959, // 撮合引擎时间 "bids": [ // 买单 [ "4.00000000", // 价格 "431.00000000" // 数量 ] ], "asks": [ // 卖单 [ "4.00000200", // 价格 "12.00000000" // 数量 ] ] }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 5 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # New Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#__docusaurus_skipToContent_fallback) 本页总览 下单 (TRADE) ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- 下单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/order` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- 10s order rate limit(X-MBX-ORDER-COUNT-10S)为1; 1min order rate limit(X-MBX-ORDER-COUNT-1M)为1; IP rate limit(x-mbx-used-weight-1m)为0 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | type | ENUM | YES | 订单类型 `LIMIT`, `MARKET`, `STOP`, `TAKE_PROFIT`, `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` | | timeInForce | ENUM | NO | | | reduceOnly | STRING | NO | `true`, `false`; 非双开模式下默认`false`;双开模式下不接受此参数 | | quantity | DECIMAL | NO | | | price | DECIMAL | NO | 委托价格 | | newClientOrderId | STRING | NO | 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 `^[\.A-Z\:/a-z0-9_-]{1,36}$` | | newOrderRespType | ENUM | NO | "ACK", "RESULT", 默认 "ACK" | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | selfTradePreventionMode | ENUM | NO | `EXPIRE_TAKER`/ `EXPIRE_MAKER`/ `EXPIRE_BOTH`; 默认`EXPIRE_MAKER` | | goodTillDate | LONG | NO | TIF为GTD时订单的自动取消时间, 当`timeInforce`为`GTD`时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 根据 order `type`的不同,某些参数强制要求,具体如下: | Type | 强制要求的参数 | | --- | --- | | `LIMIT` | `timeInForce`, `quantity`, `price` | | `MARKET` | `quantity` | > * `newOrderRespType` 如果传 `RESULT`: > * `MARKET` 订单将直接返回成交结果; > * 配合使用特殊 `timeInForce` 的 `LIMIT` 订单将直接返回成交或过期拒绝结果。 > * `selfTradePreventionMode` 仅在 `timeInForce`为`IOC`或`GTC`或`GTD`时生效. > * 极端行情时,`timeInForce`为`GTD`的订单自动取消可能有一定延迟 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- { "clientOrderId": "testOrder", // 用户自定义的订单号 "cumQty": "0", "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 22542179, // 系统订单号 "avgPrice": "0.00000", // 平均成交价 "origQty": "10", // 原始委托数量 "price": "0", // 委托价格 "reduceOnly": false, // 仅减仓 "side": "SELL", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "0", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "timeInForce": "GTD", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "updateTime": 1566818724722, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 1693207680000 //订单TIF为GTD时的自动取消时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Futures Account Balance V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#__docusaurus_skipToContent_fallback) 本页总览 账户余额V2 (USER\_DATA) =================== 查询账户余额 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E6%96%B9%E5%BC%8F "方式的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- `v2/account.balance` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E8%AF%B7%E6%B1%82 "请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "method": "v2/account.balance", "params": { "apiKey": "xTaDyrmvA9XT2oBHHjy39zyPzKCvMdtH3b9q4xadkAg2dNSJXQGCxzui26L823W2", "timestamp": 1702561978458, "signature": "208bb94a26f99aa122b1319490ca9cb2798fccc81d9b6449521a26268d53217a" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": [ { "accountAlias": "SgsR", // 账户唯一识别码 "asset": "USDT", // 资产 "balance": "122607.35137903", // 总余额 "crossWalletBalance": "23.72469206", // 全仓余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "23.72469206", // 下单可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "marginAvailable": true, // 是否可用作联合保证金 "updateTime": 1617939110373 } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 快速开始 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#__docusaurus_skipToContent_fallback) 本页总览 快速开始 ==== API Key 权限设置[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE "API Key 权限设置的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------- * 新创建的API的默认权限是 `只读`。 * 如果需要通过API提款, 需要在UI修改权限, 选中 `允许提现`。 * 如果需要通过API交易, 需要在UI修改权限, 选中对应交易权限 账户[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E8%B4%A6%E6%88%B7 "账户的直接链接") ------------------------------------------------------------------------------------------------------ ### 现货账户[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7 "现货账户的直接链接") 新注册的币安账号都会有一个现货(`SPOT`)账号。 ### 期货账户[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E6%9C%9F%E8%B4%A7%E8%B4%A6%E6%88%B7 "期货账户的直接链��接") 为了开设期货(`FUTURES`)账户, 可以参考[币安期权介绍](https://www.binance.com/zh-CN/support/faq/%E6%95%B0%E5%AD%97%E8%B4%A7%E5%B8%81%E8%A1%8D%E7%94%9F%E5%93%81?c=4&navId=4#18-36) ### 期货测试网[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E6%9C%9F%E8%B4%A7%E6%B5%8B%E8%AF%95%E7%BD%91 "期货测试网的直接链接") 用户可以使用期货的测试网来体验`FUTURES`交易. 现在只能通过API来交易。 更多信息请参考[期货测试网](https://testnet.binancefuture.com/en/futures/BTCUSDT) 。 ### 期权账户[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E6%9C%9F%E6%9D%83%E8%B4%A6%E6%88%B7 "期权账户的直接链接") 为了开设期权(`OPTION`)账户, 可以参考[Binance期权概览](https://www.binance.com/zh-CN/support/faq/%E5%B9%A3%E5%AE%89%E6%9C%9F%E6%AC%8A%E6%A6%82%E8%A6%BD-374321c9317c473480243365298b8706) API 代码库[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93 "API 代码库的直接链接") ----------------------------------------------------------------------------------------------------------------------------- ### Python connector[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#python-connector "Python connector的直接链接") 一个轻量级的Python代码库,提供让用户直接调用API的方法。支持所有合约的接口。 [https://github.com/binance/binance-connector-python](https://github.com/binance/binance-connector-python) ### Java connector[​](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#java-connector "Java connector的直接链接") 一个轻量级的代码库,提供Java用户直接调用API的方法。支持所有合约的接口。 [https://github.com/binance/binance-connector-java](https://github.com/binance/binance-connector-java) * [API Key 权限设置](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#api-key-%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE) * [账户](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E8%B4%A6%E6%88%B7) * [现货账户](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E7%8E%B0%E8%B4%A7%E8%B4%A6%E6%88%B7) * [期货账户](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E6%9C%9F%E8%B4%A7%E8%B4%A6%E6%88%B7) * [期货测试网](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E6%9C%9F%E8%B4%A7%E6%B5%8B%E8%AF%95%E7%BD%91) * [期权账户](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#%E6%9C%9F%E6%9D%83%E8%B4%A6%E6%88%B7) * [API 代码库](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#api-%E4%BB%A3%E7%A0%81%E5%BA%93) * [Python connector](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#python-connector) * [Java connector](https://developers.binance.com/docs/zh-CN/derivatives/quick-start#java-connector) --- # New Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#__docusaurus_skipToContent_fallback) 本页总览 下单 (TRADE) ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 下单 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E6%96%B9%E5%BC%8F "方式的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- `order.place` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E8%AF%B7%E6%B1%82 "请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- `order.place` { "id": "3f7df6e3-2df4-44b9-9919-d2f38f90a99a", "method": "order.place", "params": { "apiKey": "HMOchcfii9ZRZnhjp2XjGXhsOBd6msAhKz9joQaWwZ7arcJTlD2hGPHQj1lGdTjR", "positionSide": "BOTH", "price": 43187.00, "quantity": 0.1, "side": "BUY", "symbol": "BTCUSDT", "timeInForce": "GTC", "timestamp": 1702555533821, "type": "LIMIT", "signature": "0f04368b2d22aafd0ggc8809ea34297eff602272917b5f01267db4efbc1c9422" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | type | ENUM | YES | 订单类型 `LIMIT`, `MARKET`, `STOP`, `TAKE_PROFIT`, `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` | | reduceOnly | STRING | NO | `true`, `false`; 非双开模式下默认`false`;双开模式下不接受此参数; 使用`closePosition`不支持此参数。 | | quantity | DECIMAL | NO | 下单数量,使用`closePosition`不支持此参数。 | | price | DECIMAL | NO | 委托价格 | | newClientOrderId | STRING | NO | 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 `^[\.A-Z\:/a-z0-9_-]{1,36}$` | | stopPrice | DECIMAL | NO | 触发价, 仅 `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 需要此参数 | | closePosition | STRING | NO | `true`, `false`;触发后全部平仓,仅支持`STOP_MARKET`和`TAKE_PROFIT_MARKET`;不与`quantity`合用;自带只平仓效果,不与`reduceOnly` 合用 | | activationPrice | DECIMAL | NO | 追踪止损激活价格,仅`TRAILING_STOP_MARKET` 需要此参数, 默认为下单当前市场价格(支持不同`workingType`) | | callbackRate | DECIMAL | NO | 追踪止损回调比例,可取值范围\[0.1, 10\],其中 1代表1% ,仅`TRAILING_STOP_MARKET` 需要此参数 | | timeInForce | ENUM | NO | 有效方法 | | workingType | ENUM | NO | stopPrice 触发类型: `MARK_PRICE`(标记价格), `CONTRACT_PRICE`(合约最新价). 默认 `CONTRACT_PRICE` | | priceProtect | STRING | NO | 条件单触发保护:"TRUE","FALSE", 默认"FALSE". 仅 `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 需要此参数 | | newOrderRespType | ENUM | NO | "ACK", "RESULT", 默认 "ACK" | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | selfTradePreventionMode | ENUM | NO | `NONE` / `EXPIRE_TAKER`/ `EXPIRE_MAKER`/ `EXPIRE_BOTH`; 默认`NONE` | | goodTillDate | LONG | NO | TIF为GTD时订单的自动取消时间, 当`timeInforce`为`GTD`时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 根据 order `type`的不同,某些参数强制要求,具体如下: | Type | 强制要求的参数 | | --- | --- | | `LIMIT` | `timeInForce`, `quantity`, `price`或`priceMatch` | | `MARKET` | `quantity` | | `STOP`, `TAKE_PROFIT` | `quantity`, `stopPrice` | | `STOP_MARKET`, `TAKE_PROFIT_MARKET` | `stopPrice`, `price`或`priceMatch` | | `TRAILING_STOP_MARKET` | `callbackRate` | > * 条件单的触发必须: > > * 如果订单参数`priceProtect`为true: > * 达到触发价时,`MARK_PRICE`(标记价格)与`CONTRACT_PRICE`(合约最新价)之间的价差不能超过改symbol触发保护阈值 > * 触发保护阈值请参考接口`GET /fapi/v1/exchangeInfo` 返回内容相应symbol中"triggerProtect"字段 > * `STOP`, `STOP_MARKET` 止损单: > * 买入: 最新合约价格/标记价格高于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格低于等于触发价`stopPrice` > * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 止盈单: > * 买入: 最新合约价格/标记价格低于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格高于等于触发价`stopPrice` > * `TRAILING_STOP_MARKET` 跟踪止损单: > * 买入: 当合约价格/标记价格区间最低价格低于激活价格`activationPrice`,且最新合约价格/标记价高于等于最低价设定回调幅度。 > * 卖出: 当合约价格/标记价格区间最高价格高于激活价格`activationPrice`,且最新合约价格/标记价低于等于最高价设定回调幅度。 > * `TRAILING_STOP_MARKET` 跟踪止损单如果遇到报错 `{"code": -2021, "msg": "Order would immediately trigger."}` > 表示订单不满足以下条件: > > * 买入: 指定的`activationPrice` 必须小于 latest price > * 卖出: 指定的`activationPrice` 必须大于 latest price > * `newOrderRespType` 如果传 `RESULT`: > > * `MARKET` 订单将直接返回成交结果; > * 配合使用特殊 `timeInForce` 的 `LIMIT` 订单将直接返回成交或过期拒绝结果。 > * `STOP_MARKET`, `TAKE_PROFIT_MARKET` 配合 `closePosition`\=`true`: > > * 条件单触发依照上述条件单触发逻辑 > * 条件触发后,平掉当时持有所有多头仓位(若为卖单)或当时持有所有空头仓位(若为买单) > * 不支持 `quantity` 参数 > * 自带只平仓属性,不支持`reduceOnly`参数 > * 双开模式下,`LONG`方向上不支持`BUY`; `SHORT` 方向上不支持`SELL` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "3f7df6e3-2df4-44b9-9919-d2f38f90a99a", "status": 200, "result": { "orderId": 325078477, "symbol": "BTCUSDT", "status": "NEW", "clientOrderId": "iCXL1BywlBaf2sesNUrVl3", "price": "43187.00", "avgPrice": "0.00", "origQty": "0.100", "executedQty": "0.000", "cumQty": "0.000", "cumQuote": "0.00000", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0.00", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "goodTillDate": 0, "updateTime": 1702555534435 }, "rateLimits": [ { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 300, "count": 1 }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200, "count": 1 }, { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 1 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get BNB Burn Status | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#__docusaurus_skipToContent_fallback) 本页总览 获取BNB抵扣开关状态(USER\_DATA) ======================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询用户 _**所有 symbol**_ 合约交易BNB抵扣开关状态(手续费抵扣开或关) HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/feeBurn` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **30** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "feeBurn": true // "true": 手续费抵扣开; "false": 手续费抵扣关} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Current Multi Assets Mode | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#__docusaurus_skipToContent_fallback) 本页总览 查询联合保证金模式(USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询用户目前在 _**所有symbol**_ 合约上的联合保证金模式。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/multiAssetsMargin` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 30 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "multiAssetsMargin": true // "true": 联合保证金模式开启;"false": 联合保证金模式关闭} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Current Position Mode | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#__docusaurus_skipToContent_fallback) 本页总览 查询持仓模式(USER\_DATA) ================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询用户目前在 _**所有symbol**_ 合约上的持仓模式:双向持仓或单向持仓。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/positionSide/dual` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 30 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "dualSidePosition": true // "true": 双向持仓模式;"false": 单向持仓模式} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Download Id For Futures Order History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#__docusaurus_skipToContent_fallback) 本页总览 获取合约订单历史下载Id (USER\_DATA) ========================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取合约订单历史下载Id HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/order/asyn` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1000** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | startTime | LONG | YES | 起始时间,ms格式时间戳 | | endTime | LONG | YES | 结束时间,ms格式时间戳 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 存在每月10次的请求限制,网页端和Rest接口下载次数共用。 > * `startTime`与`endTime`间隔不能超过1年 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "avgCostTimestampOfLast30d":7241837, //过去30天平均数据下载时间 "downloadId":"546975389218332672", //下载Id} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Download Id For Futures Trade History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#__docusaurus_skipToContent_fallback) 本页总览 获取合约交易历史下载Id(USER\_DATA) ======================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取合约交易历史下载Id HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/trade/asyn` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1000** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | startTime | LONG | YES | 起始时间,ms格式时间戳 | | endTime | LONG | YES | 结束时间,ms格式时间戳 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 存在每月5次的请求限制,网页端和Rest接口下载次数共用。 > * `startTime`与`endTime`间隔不能超过1年 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "avgCostTimestampOfLast30d":7241837, //过去30天平均数据下载时间 "downloadId":"546975389218332672", //下载Id} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Download Id For Futures Transaction History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#__docusaurus_skipToContent_fallback) 本页总览 获取合约资金流水下载Id (USER\_DATA) ========================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取合约资金流水下载Id HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/income/asyn` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1000** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | startTime | LONG | YES | 起始时间,ms格式时间戳 | | endTime | LONG | YES | 结束时间,ms格式时间戳 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 存在每月5次的请求限制,网页端和Rest接口下载次数共用。 > * `startTime`与`endTime`间隔不能超过1年 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "avgCostTimestampOfLast30d":7241837, //过去30天平均数据下载时间 "downloadId":"546975389218332672", //下载Id} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Live Subscribing Unsubscribing To Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#__docusaurus_skipToContent_fallback) 本页总览 实时订阅/取消数据流 ========== * 以下数据可以通过websocket发送以实现订阅或取消订阅数据流。示例如下。 * 响应内容中的`id`是无符号整数,作为往来信息的唯一标识。 订阅一个信息流[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81 "订阅一个信息流的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > **请求** { "method": "SUBSCRIBE", "params": [ "btcusdt@aggTrade", "btcusdt@depth" ], "id": 1 } > **响应** { "result": null, "id": 1} 取消订阅一个信息流[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81 "取消订阅一个信息流的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **请求** { "method": "UNSUBSCRIBE", "params": [ "btcusdt@depth" ], "id": 312 } > **响应** { "result": null, "id": 312} 已订阅信息流[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E5%B7%B2%E8%AE%A2%E9%98%85%E4%BF%A1%E6%81%AF%E6%B5%81 "已订阅信息流的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **请求** { "method": "LIST_SUBSCRIPTIONS", "id": 3 } > **响应** { "result": [ "btcusdt@aggTrade" ], "id": 3} 设定属性[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E8%AE%BE%E5%AE%9A%E5%B1%9E%E6%80%A7 "设定属性的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 当前,唯一可以设置的属性是设置是否启用`combined`("组合")信息流。 当使用`/ws/`("原始信息流")进行连接时,combined属性设置为`false`,而使用 `/stream/`进行连接时则将属性设置为`true`。 > **请求** { "method": "SET_PROPERTY", "params": [ "combined", true ], "id": 5 } > **响应** { "result": null "id": 5} 检索属性[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E6%A3%80%E7%B4%A2%E5%B1%9E%E6%80%A7 "检索属性的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **请求** { "method": "GET_PROPERTY", "params": [ "combined" ], "id": 2 } > **响应** { "result": true, // Indicates that combined is set to true. "id": 2} 错误信息[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E9%94%99%E8%AF%AF%E4%BF%A1%E6%81%AF "错误信息的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 错误信息 | 描述 | | --- | --- | | {"code": 0, "msg": "Unknown property"} | `SET_PROPERTY` 或 `GET_PROPERTY`中应用的参数无效 | | {"code": 1, "msg": "Invalid value type: expected Boolean"} | 仅接受`true`或`false` | | {"code": 2, "msg": "Invalid request: property name must be a string"} | 提供的属性名无效 | | {"code": 2, "msg": "Invalid request: request ID must be an unsigned integer"} | 参数`id`未提供或`id`值是无效类型 | | {"code": 2, "msg": "Invalid request: unknown variant %s, expected one of `SUBSCRIBE`, `UNSUBSCRIBE`, `LIST_SUBSCRIPTIONS`, `SET_PROPERTY`, `GET_PROPERTY` at line 1 column 28"} | 错字提醒,或提供的值不是预期类型 | | {"code": 2, "msg": "Invalid request: too many parameters"} | 数据中提供了不必要参数 | | {"code": 2, "msg": "Invalid request: property name must be a string"} | 未提供属性名 | | {"code": 2, "msg": "Invalid request: missing field `method` at line 1 column 73"} | 数据未提供`method` | | {"code":3,"msg":"Invalid JSON: expected value at line %s column %s"} | JSON 语法有误. | * [订阅一个信息流](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81) * [取消订阅一个信息流](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E5%8F%96%E6%B6%88%E8%AE%A2%E9%98%85%E4%B8%80%E4%B8%AA%E4%BF%A1%E6%81%AF%E6%B5%81) * [已订阅信息流](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E5%B7%B2%E8%AE%A2%E9%98%85%E4%BF%A1%E6%81%AF%E6%B5%81) * [设定属性](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E8%AE%BE%E5%AE%9A%E5%B1%9E%E6%80%A7) * [检索属性](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E6%A3%80%E7%B4%A2%E5%B1%9E%E6%80%A7) * [错误信息](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Live-Subscribing-Unsubscribing-to-streams#%E9%94%99%E8%AF%AF%E4%BF%A1%E6%81%AF) --- # Mark Price Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#__docusaurus_skipToContent_fallback) 本页总览 最新标记价格 ====== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 最新标记价格 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#stream-name "Stream Name的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@markPrice` 或 `@markPrice@1s` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **3000ms** 或 **1000ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "markPriceUpdate", // 事件类型 "E": 1562305380000, // 事件时间 "s": "BTCUSDT", // 交易对 "p": "11794.15000000", // 标记价格 "ap": "11794.15000000", // 标记价格移动平均 "i": "11784.62659091", // 现货指数价格 "P": "11784.25641265", // 预估结算价,仅在结算前最后一小时有参考价值 "r": "0.00038167", // 资金费率 "T": 1562306400000 // 下次资金时间 } * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Mark Price Stream For All Market | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#__docusaurus_skipToContent_fallback) 本页总览 全市场最新标记价格 ========= 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 全市场最新标记价格 **注意:** 传统金融合约将通过单独的消息推送。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#url-path "URL PATH的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `!markPrice@arr` 或 `!markPrice@arr@1s` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **3000ms** 或 **1000ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "e": "markPriceUpdate", // 事件类型 "E": 1562305380000, // 事件时间 "s": "BTCUSDT", // 交易对 "p": "11185.87786614", // 标记价格 "ap": "11185.87786614", // 标记价格移动平均 "i": "11784.62659091", // 现货指数价格 "P": "11784.25641265", // 预估结算价,仅在结算前最后一小时有参考价值 "r": "0.00030000", // 资金费率 "T": 1562306400000 // 下个资金时间 }] * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # List all convert pairs | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#__docusaurus_skipToContent_fallback) 本页总览 查询可交易币对信息 ========= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- 查询可交易的币对的信息,以及它们分别所支持交易金额的上下限。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/convert/exchangeInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- **20(IP)** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | fromAsset | STRING | EITHER OR BOTH | 用户售出币种 | | toAsset | STRING | EITHER OR BOTH | 用户买入币种 | > * 用户应当fromAsset和toAsset参数至少填一个。 > * 如果fromAsset和toAsset只填写了一个参数,将会返回部分币对信息。 > * BNFCR资产仅对MICA地区用户有效 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E5%93%8D%EF%BF%BD%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "fromAsset":"BTC", "toAsset":"USDT", "fromAssetMinAmount":"0.0004", "fromAssetMaxAmount":"50", "toAssetMinAmount":"20", "toAssetMaxAmount":"2500000" }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/convert#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Keepalive User Data Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#__docusaurus_skipToContent_fallback) 本页总览 延长listenKey有效期(USER\_STREAM) ============================ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 有效期延长至本次调用后60分钟 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- PUT `/papi/v1/listenKey` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **None** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ {} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Future Account Transaction History List | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Future-Account-Transaction-History-List#__docusaurus_skipToContent_fallback) 获取划转历史 ====== 获取现货账户与合约账户之间的资金划转历史记录,[详情请见这里](https://developers.binance.com/docs/zh-CN/wallet/asset/query-user-universal-transfer) . --- # Aggregate Trade Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#__docusaurus_skipToContent_fallback) 本页总览 归集交易 ==== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 同一价格、同一方向、同一时间(100ms计算)的trade会被聚合为一条. URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#stream-name "Stream Name的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@aggTrade` **注意:** 响应消息字段`q`聚合RPI订单数据,但无任何特殊标签区别。 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **100ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "aggTrade", // 事件类型 "E": 123456789, // 事件时间 "s": "BNBUSDT", // 交易对 "a": 5933014, // 归集成交 ID "p": "0.001", // 成交价格 "q": "100", // 成交量,包含RPI订单数据 "nq": "100", // 普通订单成交量,不包含RPI订单数据 "f": 100, // 被归集的首个交易ID "l": 105, // 被归集的末次交易ID "T": 123456785, // 成交时间 "m": true // 买方是否是做市方。如true,则此次成交是一个主动卖出单,否则是一个主动买入单。} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Toggle BNB Burn On Futures Trade | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#__docusaurus_skipToContent_fallback) 本页总览 合约交易BNB抵扣开关(TRADE) ================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 改变用户 _**所有 symbol**_ 合约交易BNB抵扣开关(手续费抵扣开或关) HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ POST `/fapi/v1/feeBurn` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | feeBurn | STRING | YES | "true": 手续费抵扣开; "false": 手续费抵扣关 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "�响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": 200, "msg": "success"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Symbol Configuration | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#__docusaurus_skipToContent_fallback) 本页总览 交易对配置 (USER\_DATA) ================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询交易对上的基础配置 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/symbolConfig` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BTCUSDT", "marginType": "CROSSED", "isAutoAddMargin": false, "leverage": 21, "maxNotionalValue": "1000000", }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Symbol-Config#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # User Commission Rate | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#__docusaurus_skipToContent_fallback) 本页总览 用户手续费率 (USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询用户手续费率 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/commissionRate` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **20** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "symbol": "BTCUSDT", "makerCommissionRate": "0.0002", // 0.02% "takerCommissionRate": "0.0004", // 0.04% "rpiCommissionRate": "0.00005" // 0.005%} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Delist Schedule | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delist-Schedule#__docusaurus_skipToContent_fallback) 本页总览 下架时间 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delist-Schedule#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 合约团队会在下架公告后发布后更新`Get /fapi/v1/exchangeInfo`中`deliverydate`为下架时间,请查询[获取交易规则和交易对](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information) 提前获取合约交易对下架信息。 * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delist-Schedule#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) --- # Continuous Contract Kline Candlestick Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#__docusaurus_skipToContent_fallback) 本页总览 连续合约K线 ====== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ K线stream逐秒推送所请求的K线种类(最新一根K线)的更新。 **合约类型:** * perpetual 永续合约 * current\_quarter 当季交割合约 * next\_quarter 次季交割合约 * tradifi\_perpetual 传统金融合约 **订阅Kline需要提供间隔参数,最短为分钟线,最长为月线。支持以下间隔:** s -> 秒; m -> 分钟; h -> 小时; d -> 天; w -> 周; M -> 月 * 1s * 1m * 3m * 5m * 15m * 30m * 1h * 2h * 4h * 6h * 8h * 12h * 1d * 3d * 1w * 1M URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#url-path "URL PATH的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#stream-name "Stream Name的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `_@continuousKline_` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **250ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"continuous_kline", // 事件类型 "E":1607443058651, // 事件时间 "ps":"BTCUSDT", // 标的交易对 "ct":"PERPETUAL", // 合约类型 "k":{ "t":1607443020000, // 这根K线的起始时间 "T":1607443079999, // 这根K线的结束时间 "i":"1m", // K线间隔 "f":116467658886, // 这根K线期间第一笔更新ID "L":116468012423, // 这根K线期间末一笔更新ID "o":"18787.00", // 这根K线期间第一笔成交价 "c":"18804.04", // 这根K线期间末一笔成交价 "h":"18804.04", // 这根K线期间最高成交价 "l":"18786.54", // 这根K线期间最低成交价 "v":"197.664", // 这根K线期间成交量 "n":543, // 这根K线期间成交笔数 "x":false, // 这根K线是否完结(是否已经开始下一根K线) "q":"3715253.19494", // 这根K线期间成交额 "V":"184.769", // 主动买入的成交量 "Q":"3472925.84746", // 主动买入的成交额 "B":"0" // 忽略此参数 }} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Continuous-Contract-Kline-Candlestick-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Important WebSocket Change Notice | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#__docusaurus_skipToContent_fallback) 本页总览 WebSocket Base URL 迁移公告(重要变更) ============================= 变更背景[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E5%8F%98%E6%9B%B4%E8%83%8C%E6%99%AF "变更背景的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 由于现有 WebSocket 服务流量持续升高,我们对 WebSocket URL 结构进行了拆分与升级:以 **Root** 作为根路径,并新增 **Public / Market / Private** 三类入口,供不同频率与类型的数据分别接入,从而提升整体稳定性与可扩展性。 变更摘要(What’s New)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E5%8F%98%E6%9B%B4%E6%91%98%E8%A6%81whats-new "变更摘要(What’s New)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **新增 3 个 WebSocket Base URL(Root + 分流路径)** * Public(高频公共行情/盘口):`wss://fstream.binance.com/public` * Market(常规公共市场数据):`wss://fstream.binance.com/market` * Private(用户私有数据):`wss://fstream.binance.com/private` * **支持两种访问模式** * `ws` 模式:使用 URL path 拼接订阅流 * `stream` 模式:使用 `?streams=`(或 private 的 `listenKey/events`)参数传入订阅流 * **继续支持 Combined Streams(组合订阅)** * **Private 维度支持 listenKey + events 订阅方式(可多 listenKey、多 event)** 新 URL 使用方式(Examples)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E6%96%B0-url-%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8Fexamples "新 URL 使用方式(Examples)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Public / Market:组合订阅[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#public--market%E7%BB%84%E5%90%88%E8%AE%A2%E9%98%85 "Public / Market:组合订阅的直接链接") * `ws` 模式(path 拼接) * `wss://fstream.binance.com/public/ws/bnbusdt@depth/ethusdt@depth` * `wss://fstream.binance.com/market/ws/btcusdt@aggTrade/ethusdt@aggTrade` * `stream` 模式(query 传 streams) * `wss://fstream.binance.com/market/stream?streams=bnbusdt@aggTrade/btcusdt@markPrice` * `wss://fstream.binance.com/public/stream?streams=btcusdt@depth/ethusdt@depth` ### Private:listenKey & events[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#privatelistenkey--events "Private:listenKey & events的直接链接") * `ws` 模式(示例:listenKey + events) * `wss://fstream.binance.com/private/ws?listenKey=&events=ORDER_TRADE_UPDATE/ACCOUNT_UPDATE` * `stream` 模式(示例:多 listenKey + 多 events) * `wss://fstream.binance.com/private/stream?listenKey=&events=ORDER_TRADE_UPDATE&listenKey=&events=ACCOUNT_UPDATE` > 也支持使用 JSON `SUBSCRIBE` 请求订阅流(params 中可混合 market/public stream 与 listenKey 事件)。 Endpoint 与 Stream 映射(摘录)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#endpoint-%E4%B8%8E-stream-%E6%98%A0%E5%B0%84%E6%91%98%E5%BD%95 "Endpoint 与 Stream 映射(摘录)的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Public(高频公共数据)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#public%E9%AB%98%E9%A2%91%E5%85%AC%E5%85%B1%E6%95%B0%E6%8D%AE "Public(高频公共数据)的直接链接") * Individual Symbol Book Ticker:`@bookTicker` * All Book Tickers:`!bookTicker` * Partial Book Depth:`@depth`(支持 `@500ms` / `@100ms`) * Diff. Book Depth:`@depth`(支持 `@500ms` / `@100ms`) ### Market(常规市场数据)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#market%E5%B8%B8%E8%A7%84%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE "Market(常规市场数据)的直接链接") * Aggregate Trade:`@aggTrade` * Mark Price:`@markPrice` 或 `@markPrice@1s` * Mark Price (All market):`!markPrice@arr` 或 `!markPrice@arr@1s` * Kline/Candlestick:`@kline_` * Continuous Kline:`_@continuousKline_` * Mini Ticker:`@miniTicker`;All mini ticker:`!miniTicker@arr` * Ticker:`@ticker`;All ticker:`!ticker@arr` * Liquidation Order:`@forceOrder`;All:`!forceOrder@arr` * Composite Index:`@compositeIndex` * Contract Info:`!contractInfo` * Multi-Assets Mode Asset Index:`!assetIndex@arr` 或 `@assetIndex` 兼容性与迁移建议(Migration)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E5%85%BC%E5%AE%B9%E6%80%A7%E4%B8%8E%E8%BF%81%E7%A7%BB%E5%BB%BA%E8%AE%AEmigration "兼容性与迁移建议(Migration)的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **旧 URL 将继续可用至 2026-04-23**,届时将被永久下线。建议用户在此日期前完成迁移到新的 `/public`、`/market`、`/private` 入口。 * 迁移优先级建议: 1. 高频盘口/核心公共数据 → 迁移到 `/public` 2. 常规市场数据(markPrice/kline/ticker 等)→ 迁移到 `/market` 3. 用户数据(listenKey 相关)→ 迁移到 `/private` * 客户端 SDK/连接管理建议: * 建议按数据类型拆分连接(public/market/private 分开建连),降低单连接负载与抖动风险。 * 如需组合订阅,优先使用 `stream` 模式的 `?streams=` 管理订阅列表(private 按 listenKey/events 管理)。 行动项(Action Required)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E8%A1%8C%E5%8A%A8%E9%A1%B9action-required "行动项(Action Required)的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 请评估并更新你们的 WebSocket 连接配置: * 将 Base URL 替换为新的 `/public`、`/market`、`/private` * 确认订阅 stream 名称与所属入口一致(Public vs Market vs Private) * **请在 2026-04-23 前完成迁移。** 届时旧 URL(`wss://fstream.binance.com/ws`、`wss://fstream.binance.com/stream`)将不再可用。 * [变更背景](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E5%8F%98%E6%9B%B4%E8%83%8C%E6%99%AF) * [变更摘要(What’s New)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E5%8F%98%E6%9B%B4%E6%91%98%E8%A6%81whats-new) * [新 URL 使用方式(Examples)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E6%96%B0-url-%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8Fexamples) * [Public / Market:组合订阅](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#public--market%E7%BB%84%E5%90%88%E8%AE%A2%E9%98%85) * [Private:listenKey & events](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#privatelistenkey--events) * [Endpoint 与 Stream 映射(摘录)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#endpoint-%E4%B8%8E-stream-%E6%98%A0%E5%B0%84%E6%91%98%E5%BD%95) * [Public(高频公共数据)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#public%E9%AB%98%E9%A2%91%E5%85%AC%E5%85%B1%E6%95%B0%E6%8D%AE) * [Market(常规市场数据)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#market%E5%B8%B8%E8%A7%84%E5%B8%82%E5%9C%BA%E6%95%B0%E6%8D%AE) * [兼容性与迁移建议(Migration)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E5%85%BC%E5%AE%B9%E6%80%A7%E4%B8%8E%E8%BF%81%E7%A7%BB%E5%BB%BA%E8%AE%AEmigration) * [行动项(Action Required)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Important-WebSocket-Change-Notice#%E8%A1%8C%E5%8A%A8%E9%A1%B9action-required) --- # Kline Candlestick Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#__docusaurus_skipToContent_fallback) 本页总览 K线 == Stream Description[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#stream-description "Stream Description的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- K线stream逐秒推送所请求的K线种类(最新一根K线)的更新。推送间隔250毫秒(如有刷新) **订阅 Kline 需要提供间隔参数,最短为分钟线,最长为月线。支持以下间隔:** m -> 分钟; h -> 小时; d -> 天; w -> 周; M -> 月 * 1m * 3m * 5m * 15m * 30m * 1h * 2h * 4h * 6h * 8h * 12h * 1d * 3d * 1w * 1M URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#url-path "URL PATH的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `@kline_` Update Speed[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#update-speed "Update Speed的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **250ms** Response Example[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#response-example "Response Example的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "kline", // 事件类型 "E": 123456789, // 事件时间 "s": "BNBUSDT", // 交易对 "k": { "t": 123400000, // 这根K线的起始时间 "T": 123460000, // 这根K线的结束时间 "s": "BNBUSDT", // 交易对 "i": "1m", // K线间隔 "f": 100, // 这根K线期间第一笔成交ID "L": 200, // 这根K线期间末一笔成交ID "o": "0.0010", // 这根K线期间第一笔成交价 "c": "0.0020", // 这根K线期间末一笔成交价 "h": "0.0025", // 这根K线期间最高成交价 "l": "0.0015", // 这根K线期间最低成交价 "v": "1000", // 这根K线期间成交量 "n": 100, // 这根K线期间成交笔数 "x": false, // 这根K线是否完结(是否已经开始下一根K线) "q": "1.0000", // 这根K线期间成交额 "V": "500", // 主动买入的成交量 "Q": "0.500", // 主动买入的成交额 "B": "123456" // 忽略此参数 }} * [Stream Description](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#stream-description) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#stream-name) * [Update Speed](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#update-speed) * [Response Example](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams#response-example) --- # Classic Portfolio Margin Account Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#__docusaurus_skipToContent_fallback) 本页总览 查询经典统一账户账户信息 (USER\_DATA)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E6%9F%A5%E8%AF%A2%E7%BB%8F%E5%85%B8%E7%BB%9F%E4%B8%80%E8%B4%A6%E6%88%B7%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data "查询经典统一账户账户信息 (USER_DATA)的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询经典统一账户当前账户信息 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/pmAccountInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | asset | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 最大可转出余额指可以转出到现货钱包到金额。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "maxWithdrawAmountUSD": "1627523.32459208", //经典统一账户以USD计价的最大可转出余额 "asset": "BTC", // 资产 "maxWithdrawAmount": "27.43689636", //最大可转出余额} * [查询经典统一账户账户信息 (USER\_DATA)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E6%9F%A5%E8%AF%A2%E7%BB%8F%E5%85%B8%E7%BB%9F%E4%B8%80%E8%B4%A6%E6%88%B7%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data) * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints/Classic-Portfolio-Margin-Account-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Connect | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Connect#__docusaurus_skipToContent_fallback) 市场数据连接 ====== * 本篇所列出的所有wss接口需用下列方式连接: * Base Url:**wss://fstream.binance.com** * 订阅单一stream格式为 **/ws/** * 组合streams的URL格式为 **/stream?streams=///** * 连接样例: * `wss://fstream.binance.com/ws/bnbusdt@aggTrade` * `wss://fstream.binance.com/stream?streams=bnbusdt@aggTrade/btcusdt@markPrice` * 订阅组合streams时,事件payload会以这样的格式封装 **{"stream":"}** * stream名称中所有交易对均为**小写**。 * 每个链接有效期不超过24小时,请妥善处理断线重连。 * 服务端每3分钟会发送ping帧,客户端应当在10分钟内回复pong帧,否则服务端会主动断开链接。允许客户端发送不成对的pong帧(即客户端可以以高于15分钟每次的频率发送pong帧保持链接)。 * Websocket服务器每秒最多接受10个订阅消息。 * 如果用户发送的消息超过限制,连接会被断开连接。反复被断开连接的IP有可能被服务器屏蔽。 * 单个连接最多可以订阅 **1024** 个Streams。 --- # Check Server Time | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#__docusaurus_skipToContent_fallback) 本页总览 获取服务器时间 ======= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取服务器时间 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/time` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NONE 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "serverTime": 1499827319559 // 当前的系统时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Composite Index Symbol Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#__docusaurus_skipToContent_fallback) 本页总览 综合指数交易对信息 ========= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取交易对为综合指数的基础成分信息。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/indexInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "DEFIUSDT", "time": 1589437530011, // 请求时间 "component": "baseAsset", //成分资产 "baseAssetList":[ { "baseAsset":"BAL", // 基础资产 "quoteAsset": "USDT", // 报价资产 "weightInQuantity":"1.04406228", //权重(数量) "weightInPercentage":"0.02783900" //权重(比例) }, { "baseAsset":"BAND", "quoteAsset": "USDT", "weightInQuantity":"3.53782729", "weightInPercentage":"0.03935200" } ] }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Continuous Contract Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 连续合约K线数据 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 每根K线的开盘时间可视为唯一ID HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/continuousKlines` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ | \> 1000 | 10 |\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | pair | STRING | YES | 标的交易对 |\ | contractType | ENUM | YES | 合约类型 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ * 缺省返回最近的数据\ \ * 合约类型:\ \ * PERPETUAL 永续合约\ * CURRENT\_QUARTER 当季交割合约\ * NEXT\_QUARTER 次季交割合约\ * TRADIFI\_PERPETUAL 传统金融合约\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1607444700000, // 开盘时间 "18879.99", // 开盘价 "18900.00", // 最高价 "18878.98", // 最低价 "18896.13", // 收盘价(当前K线未结束的即为最新价) "492.363", // 成交量 1607444759999, // 收盘时间 "9302145.66080", // 成交额 1874, // 成交笔数 "385.983", // 主动买入成交量 "7292402.33267", // 主动买入成交额 "0" // 请忽略该参数 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Delivery Price | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#__docusaurus_skipToContent_fallback) 本页总览 季度合约历史结算价 ========= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 返回季度合约历史结算价 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/futures/data/delivery-price` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | pair | STRING | YES | 如BTCUSDT | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** [ { "deliveryTime": 1695945600000, "deliveryPrice": 27103.00000000 }, { "deliveryTime": 1688083200000, "deliveryPrice": 30733.60000000 }, { "deliveryTime": 1680220800000, "deliveryPrice": 27814.20000000 }, { "deliveryTime": 1648166400000, "deliveryPrice": 44066.30000000 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Funding Rate History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#__docusaurus_skipToContent_fallback) 本页总览 查询资金费率历史 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 查询资金费率历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/fundingRate` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 和GET /fapi/v1/fundingInfo共享500/5min/IP 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间 | | limit | INT | NO | 默认值:100 最大值:1000 | > * 如果 `startTime` 和 `endTime` 都未发送, 返回最近200条数据. > * 如果 `startTime` 和 `endTime` 之间的数据量大于 `limit`, 返回 `startTime` + `limit`情况下的数据。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "symbol": "BTCUSDT", // 交易对 "fundingRate": "-0.03750000", // 资金费率 "fundingTime": 1570608000000, // 资金费时间 "markPrice": "34287.54619963" // 资金费对应标记价格 }, { "symbol": "BTCUSDT", "fundingRate": "0.00010000", "fundingTime": 1570636800000, "markPrice": "34287.54619963" // 资金费对应标记价格 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Funding Info | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#__docusaurus_skipToContent_fallback) 本页总览 查询资金费率信息 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询资金费率信息,接口仅返回FundingRateCap/FundingRateFloor/fundingIntervalHours等被特殊调整过的交易对,没调整过的不返回。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/fundingInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 和`GET /fapi/v1/fundingRate`共享500/5min/IP 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BLZUSDT", "adjustedFundingRateCap": "0.02500000", "adjustedFundingRateFloor": "-0.02500000", "fundingIntervalHours": 8, "disclaimer": false }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Index Price Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 价格指数K线数据 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 价格指数K线数据,每根K线的开盘时间可视为唯一ID HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/indexPriceKlines` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ | \> 1000 | 10 |\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | pair | STRING | YES | 标的交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * 缺省返回最近的数据\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1591256400000, // 开盘时间 "9653.69440000", // 开盘价 "9653.69640000", // 最高价 "9651.38600000", // 最低价 "9651.55200000", // 收盘价(当前K线未结束的即为最新价) "0 ", // 请忽略 1591256459999, // 收盘时间 "0", // 请忽略 60, // 请忽略 "0", // 请忽略 "0", // 请忽略 "0" // 请忽略 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 K线数据 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 每根K线的开盘时间可视为唯一ID HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/klines` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ | \> 1000 | 10 |\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | symbol | STRING | YES | 交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500. |\ \ > * 缺省返回最近的数据\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1499040000000, // 开盘时间 "0.01634790", // 开盘价 "0.80000000", // 最高价 "0.01575800", // 最低价 "0.01577100", // 收盘价(当前K线未结束的即为最新价) "148976.11427815", // 成交量 1499644799999, // 收盘时间 "2434.19055334", // 成交额 308, // 成交笔数 "1756.87402397", // 主动买入成交量 "28.46694368", // 主动买入成交额 "17928899.62484339" // 请忽略该参数 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Long Short Ratio | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#__docusaurus_skipToContent_fallback) 本页总览 多空持仓人数比 ======= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 多空持仓人数比 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/futures/data/globalLongShortAccountRatio` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | default 30, max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近30天的数据 > * IP限频为1000次/5min 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol":"BTCUSDT", "longShortRatio":"0.1960", // 多空人数比值 "longAccount": "0.6622", // 多仓人数比例 "shortAccount":"0.3378", // 空仓人数比例 "timestamp":"1583139600000" }, { "symbol":"BTCUSDT", "longShortRatio":"1.9559", "longAccount": "0.6617", "shortAccount":"0.3382", "timestamp":"1583139900000" }, ] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Mark Price | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#__docusaurus_skipToContent_fallback) 本页总览 最新标记价格和资金费率 =========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 采集各大交易所数据加权平均 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/premiumIndex` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 带symbol **1**, 不带symbol **10** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "symbol": "BTCUSDT", // 交易对 "markPrice": "11793.63104562", // 标记价格 "indexPrice": "11781.80495970", // 指数价格 "estimatedSettlePrice": "11781.16138815", // 预估结算价,仅在交割开始前最后一小时有意义 "lastFundingRate": "0.00038246", // 最近更新的资金费率 "interestRate": "0.00010000", // 标的资产基础利率 "nextFundingTime": 1597392000000, // 下次资金费时间 "time": 1597370495002 // 更新时间} > **当不指定symbol时相应** [ { "symbol": "BTCUSDT", // 交易对 "markPrice": "11793.63104562", // 标记价格 "indexPrice": "11781.80495970", // 指数价格 "estimatedSettlePrice": "11781.16138815", // 预估结算价,仅在交割开始前最后一小时有意义 "lastFundingRate": "0.00038246", // 最近更新的资金费率 "interestRate": "0.00010000", // 标的资产基础利率 "nextFundingTime": 1597392000000, // 下次资金费时间 "time": 1597370495002 // 更新时间 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Mark Price Kline Candlestick Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#__docusaurus_skipToContent_fallback) 本页总览 标记价格K线数据 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 每根K线的开盘时间可视为唯一ID HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/markPriceKlines` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ | \> 1000 | 10 |\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | symbol | STRING | YES | 交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * 缺省返回最近的数据\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1591256400000, // 开盘时间 "9653.69440000", // 开盘价 "9653.69640000", // 最高价 "9651.38600000", // 最低价 "9651.55200000", // 收盘价(当前K线未结束的即为最新价) "0 ", // 请忽略 1591256459999, // 收盘时间 "0", // 请忽略 60, // 请忽略 "0", // 请忽略 "0", // 请忽略 "0" // 请忽略 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Multi Assets Mode Asset Index | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#__docusaurus_skipToContent_fallback) 本页总览 多资产模式资产汇率指数 =========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 多资产模式资产汇率指数 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/assetIndex` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** for a single symbol; **10** when the symbol parameter is omitted 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Name | Type | Mandatory | Description | | --- | --- | --- | --- | | symbol | STRING | NO | Asset pair | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "symbol": "ADAUSD", "time": 1635740268004, "index": "1.92957370", "bidBuffer": "0.10000000", "askBuffer": "0.10000000", "bidRate": "1.73661633", "askRate": "2.12253107", "autoExchangeBidBuffer": "0.05000000", "autoExchangeAskBuffer": "0.05000000", "autoExchangeBidRate": "1.83309501", "autoExchangeAskRate": "2.02605238"} > 或(当不发送交易对信息) [ { "symbol": "ADAUSD", "time": 1635740268004, "index": "1.92957370", "bidBuffer": "0.10000000", "askBuffer": "0.10000000", "bidRate": "1.73661633", "askRate": "2.12253107", "autoExchangeBidBuffer": "0.05000000", "autoExchangeAskBuffer": "0.05000000", "autoExchangeBidRate": "1.83309501", "autoExchangeAskRate": "2.02605238" }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Old Trades Lookup | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#__docusaurus_skipToContent_fallback) 本页总览 查询历史成交(MARKET\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询订单簿历史成交 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/historicalTrades` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **20** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认值:100 最大值:500. | | fromId | LONG | NO | 从哪一条成交id开始返回. 缺省返回最近的成交记录 | > * 仅返回订单簿成交,即不会返回保险基金和自动减仓(ADL)成交 > * 仅支持返回最近1个月的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "id": 28457, // 成交ID "price": "4.00000100", // 成交价格 "qty": "12.00000000", // 成交量 "quoteQty": "48.00", // 成交额 "time": 1499865549590, // 时间 "isBuyerMaker": true // 买方是否为挂单方 "isRPITrade": true // Maker方是否为RPI挂单 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Open Interest | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#__docusaurus_skipToContent_fallback) 本页总览 获取未平仓合约数 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取未平仓合约数 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/openInterest` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "openInterest": "10659.509", // 未平仓合约数量 "symbol": "BTCUSDT", // 交易对 "time": 1589437530011 // 撮合引擎时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Open Interest Statistics | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#__docusaurus_skipToContent_fallback) 本页总览 合约持仓量历史 ======= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 查询合约持仓量历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/futures/data/openInterestHist` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | default 30, max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近1个月的数据 > * IP限频为1000次/5min 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "symbol":"BTCUSDT", "sumOpenInterest":"20403.12345678",// 持仓总数量 "sumOpenInterestValue": "176196512.12345678", // 持仓总价值 "CMCCirculatingSupply": "165880.538", // CMC提供的流通供应量 "timestamp":"1583127900000" }, { "symbol":"BTCUSDT", "sumOpenInterest":"20401.36700000", "sumOpenInterestValue":"149940752.14464448", "CMCCirculatingSupply": "165900.14853", "timestamp":"1583128200000" }, ] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Order Book | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#__docusaurus_skipToContent_fallback) 本页总览 深度信息 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 交易对深度信息 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/depth` **注意:** 响应消息不包含RPI订单,其不可见。 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | limit | 权重 | | --- | --- | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认 500; 可选值:\[5, 10, 20, 50, 100, 500, 1000\] | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "lastUpdateId": 1027024, "E": 1589436922972, // 消息时间 "T": 1589436922959, // 撮合引擎时间 "bids": [ // 买单 [ "4.00000000", // 价格 "431.00000000" // 数量 ] ], "asks": [ // 卖单 [ "4.00000200", // 价格 "12.00000000" // 数量 ] ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # RPI Order Book | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#__docusaurus_skipToContent_fallback) 本页总览 RPI深度信息 ======= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 交易对深度信息,包含非交叉的RPI订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/rpiDepth` **注意:** 响应消息包含RPI订单数量。相互交叉的价格档位不可见。 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | limit | 权重 | | --- | --- | | 1000 | 20 | 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求��参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认 1000; 可选值:\[1000\] | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "lastUpdateId": 1027024, "E": 1589436922972, // 消息时间 "T": 1589436922959, // 撮合引擎时间 "bids": [ // 买单 [ "4.00000000", // 价格 "431.00000000" // 数量 ] ], "asks": [ // 卖单 [ "4.00000200", // 价格 "12.00000000" // 数量 ] ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Order-Book-RPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Premium Index Kline Data | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#__docusaurus_skipToContent_fallback) 本页总览 溢价指数K线数据 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 合约溢价指数K线。每根K线的开盘时间可视为唯一ID。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/premiumIndexKlines` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 取决于请求中的LIMIT参数 | LIMIT参数 | 权重 | | --- | --- | | \[1,100) | 1 |\ | \[100, 500) | 2 |\ | \[500, 1000\] | 5 |\ | \> 1000 | 10 |\ \ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ | 名称 | 类型 | 是否必需 | 描述 |\ | --- | --- | --- | --- |\ | symbol | STRING | YES | 交易对 |\ | interval | ENUM | YES | 时间间隔 |\ | startTime | LONG | NO | 起始时间 |\ | endTime | LONG | NO | 结束时间 |\ | limit | INT | NO | 默认值:500 最大值:1500 |\ \ > * 缺省返回最近的数据\ \ 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接")\ \ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ \ [ [ 1691603820000, // 开盘时间 "-0.00042931", // 开盘价 "-0.00023641", // 最高价 "-0.00059406", // 最低价 "-0.00043659", // 收盘价 "0", // 请忽略 1691603879999, // 收盘时间 "0", // 请忽略 12, // 请忽略 "0", // 请忽略 "0", // 请忽略 "0" // 请忽略 ]]\ \ * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0)\ \ * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#http%E8%AF%B7%E6%B1%82)\ \ * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D)\ \ * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0)\ \ * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Recent Trades List | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#__docusaurus_skipToContent_fallback) 本页总览 近期成交 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 获取近期订单簿成交 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/trades` **注意:** 响应消息不包含RPI订单,其不可见。 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认:500,最大1000 | > * 仅返回订单簿成交,即不会返回保险基金和自动减仓(ADL)成交 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "id": 28457, // 成交ID "price": "4.00000100", // 成交价格 "qty": "12.00000000", // 成交量 "quoteQty": "48.00", // 成交额 "time": 1499865549590, // 时间 "isBuyerMaker": true // 买方是否为挂单方 "isRPITrade": true // Maker方是否为RPI挂单 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Symbol Order Book Ticker | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#__docusaurus_skipToContent_fallback) 本页总览 当前最优挂单 ====== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 返回当前最优的挂单(最高买单,最低卖单) HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/ticker/bookTicker` **注意:** 响应消息不包含RPI订单,其不可见。 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 单交易对**2**,无交易对**5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | > * 不发送交易对参数,则会返回所有交易对信息 > * 该接口返回头中的`X-MBX-USED-WEIGHT-1M`参数不准确,可以忽略 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "symbol": "BTCUSDT", // 交易对 "bidPrice": "4.00000000", //最优买单价 "bidQty": "431.00000000", //挂单量 "askPrice": "4.00000200", //最优卖单价 "askQty": "9.00000000", //挂单量 "time": 1589437530011 // 撮合引擎时间} > 或(当不发送symbol) [ { "symbol": "BTCUSDT", // 交易对 "bidPrice": "4.00000000", //最优买单价 "bidQty": "431.00000000", //挂单量 "askPrice": "4.00000200", //最优卖单价 "askQty": "9.00000000", //挂单量 "time": 1589437530011 // 撮合引擎时间 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Symbol Price Ticker(Deprecated) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#__docusaurus_skipToContent_fallback) 本页总览 最新价格 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 返回最近价格 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/ticker/price` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 单交易对**1**,无交易对**2** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | > * 不发送交易对参数,则会返回所有交易对信息 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "symbol": "LTCBTC", // 交易对 "price": "4.00000200", // 价格 "time": 1589437530011 // 撮合引擎时间} > 或(当不发送symbol) [ { "symbol": "BTCUSDT", // 交易对 "price": "6000.01", // 价格 "time": 1589437530011 // 撮合引擎时间 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Symbol Price Ticker V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#__docusaurus_skipToContent_fallback) 本页总览 最新价格V2 ====== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 返回最近价格 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v2/ticker/price` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 单交易对**1**,无交易对**2** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | > * 不发送交易对参数,则会返回所有交易对信息 > * 该接口返回头中的`X-MBX-USED-WEIGHT-1M`参数不准确,可以忽略 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "symbol": "LTCBTC", // 交易对 "price": "4.00000200", // 价格 "time": 1589437530011 // 撮合引擎时间} > 或(当不发送symbol) [ { "symbol": "BTCUSDT", // 交易对 "price": "6000.01", // 价格 "time": 1589437530011 // 撮合引擎时间 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker-v2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Taker Buysell Volume | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#__docusaurus_skipToContent_fallback) 本页总览 合约主动买卖量 ======= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 合约主动买卖量 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/futures/data/takerlongshortRatio` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | default 30, max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的 limit 值 > * 仅支持最近 30 天的数据 > * IP限频为1000次/5min 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { buySellRatio: "1.5586", buyVol: "387.3300", // 主动买入量 sellVol: "248.5030", // 主动卖出量 timestamp: "1585614900000", }, { buySellRatio: "1.3104", buyVol: "343.9290", sellVol: "248.5030", timestamp: "1583139900000", },] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Top Trader Long Short Account Ratio | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#__docusaurus_skipToContent_fallback) 本页总览 大户账户数多空比 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 持仓大户的净持仓多头和空头账户数占比,大户指保证金余额排名前20%的用户。一个账户记一次。 多仓账户数比例 = 持多仓大户数 / 总持仓大户数 空仓账户数比例 = 持空仓大户数 / 总持仓大户数 多空账户数比值 = 多仓账户数比例 / 空仓账户数比例 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/futures/data/topLongShortAccountRatio` 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | default 30, max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近30天的数据 > * IP限频为1000次/5min 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol":"BTCUSDT", "longShortRatio":"1.8105",// 大户多空账户数比值 "longAccount": "0.6442", // 大户多仓账户数比例 "shortAccount":"0.3558", // 大户空仓账户数比例 "timestamp":"1583139600000" }, { "symbol":"BTCUSDT", "longShortRatio":"1.8233", "longAccount": "0.5338", "shortAccount":"0.3454", "timestamp":"1583139900000" }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Top Trader Long Short Position Ratio | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#__docusaurus_skipToContent_fallback) 本页总览 大户持仓量多空比 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 大户的多头和空头总持仓量占比,大户指保证金余额排名前20%的用户。 多仓持仓量比例 = 大户多仓持仓量 / 大户总持仓量 空仓持仓量比例 = 大户空仓持仓量 / 大户总持仓量 多空持仓量比值 = 多仓持仓量比例 / 空仓持仓量比例 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/futures/data/topLongShortPositionRatio` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | NO | default 30, max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近30天的数据 > * IP限频为1000次/5min 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol":"BTCUSDT", "longShortRatio":"1.4342",// 大户多空持仓量比值 "longAccount": "0.5344", // 大户多仓持仓量比例 "shortAccount":"0.4238", // 大户空仓持仓量比例 "timestamp":"1583139600000" }, { "symbol":"BTCUSDT", "longShortRatio":"1.4337", "longAccount": "0.5891", "shortAccount":"0.4108", "timestamp":"1583139900000" }, ] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Notional And Leverage Brackets | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#__docusaurus_skipToContent_fallback) 本页总览 杠杆分层标准 (USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询账户特定交易对的杠杆分层标准 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/leverageBracket` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** [ { "symbol": "ETHUSDT", "notionalCoef": 1.50, //用户bracket相对默认bracket的倍数,仅在和交易对默认不一样时显示 "brackets": [ { "bracket": 1, // 层级 "initialLeverage": 75, // 该层允许的最高初始杠杆倍数 "notionalCap": 10000, // 该层对应的名义价值上限 "notionalFloor": 0, // 该层对应的名义价值下限 "maintMarginRatio": 0.0065, // 该层对应的维持保证金率 "cum": 0.0 // 速算数 }, ] }] > **或** (若发送symbol) { "symbol": "ETHUSDT", "notionalCoef": 1.50, "brackets": [ { "bracket": 1, "initialLeverage": 75, "notionalCap": 10000, "notionalFloor": 0, "maintMarginRatio": 0.0065, "cum":0 }, ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Test Connectivity | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#__docusaurus_skipToContent_fallback) 本页总览 测试服务器连通性 PING ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- 测试能否联通 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/ping` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- 1 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------- NONE 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应�示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ {} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Sign TradFi-Perps agreement | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#__docusaurus_skipToContent_fallback) 本页总览 传统金融合约协议(USER\_DATA) ==================== 签署传统金融合约协议 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/stock/contract` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ **50** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "code": 200, "msg": "success"} * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/TradFi-Perps#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Futures Account Balance V3 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#__docusaurus_skipToContent_fallback) 本页总览 账户余额V3 (USER\_DATA) =================== HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v3/balance` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "accountAlias": "SgsR", // 账户唯一识别码 "asset": "USDT", // 资产 "balance": "122607.35137903", // 总余额 "crossWalletBalance": "23.72469206", // 全仓余额 "crossUnPnl": "0.00000000", // 全仓持仓未实现盈亏 "availableBalance": "23.72469206", // 下单可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "marginAvailable": true, // 是否可用作联合保证金 "updateTime": 1617939110373 }] * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Futures Transaction History Download Link By Id | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#__docusaurus_skipToContent_fallback) 本页总览 通过下载Id获取合约资金流水下载链接(USER\_DATA) ============================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 过下载Id获取合约资金流水下载链接 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/income/asyn/id` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **10** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | downloadId | STRING | YES | 通过下载id 接口获取 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * 下载链接有效期:24小时。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "downloadId":"545923594199212032", // 下载Id "status":"completed", // 状态,枚举类型:completed 已完成,processing 处理中 "url":"www.binance.com", // 适配该笔ID请求的下载链接 "notified":true, // 忽略 "expirationTimestamp":1645009771000, // 晚于该时间戳之后链接将自动失效 "isExpired":null,} > **或** (服务器仍在处理中会返回) { "downloadId":"545923594199212032", "status":"processing", "url":"", "notified":false, "expirationTimestamp":-1 "isExpired":null,} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Futures Trade Download Link By Id | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#__docusaurus_skipToContent_fallback) 本页总览 通过下载Id获取合约交易历史下载链接 (USER\_DATA) =============================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 通过下载Id获取合约交易历史下载链接 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/trade/asyn/id` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **10** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | downloadId | STRING | YES | 通过下载id 接口获取 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 下载链接有效期:24小时。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "downloadId":"545923594199212032", // 下载Id "status":"completed", // 状态,枚举类型:completed 已完成,processing 处理中 "url":"www.binance.com", // 适配该笔ID请求的下载链接 "notified":true, // 忽略 "expirationTimestamp":1645009771000, // 晚于该时间戳之后链接将自动失效 "isExpired":null,} > **或** (服务器仍在处理中会返回) { "downloadId":"545923594199212032", "status":"processing", "url":"", "notified":false, "expirationTimestamp":-1 "isExpired":null, } * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Income History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Income-History#__docusaurus_skipToContent_fallback) 本页总览 获取账户损益资金流水(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Income-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取账户损益资金流水 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Income-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/income` **权重:** 30 **参数:** | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | incomeType | STRING | NO | 收益类型: TRANSFER 转账, WELCOME\_BONUS 欢迎奖金, REALIZED\_PNL 已实现盈亏, FUNDING\_FEE 资金费用, COMMISSION 佣金, INSURANCE\_CLEAR 强平, REFERRAL\_KICKBACK 推荐人返佣, COMMISSION\_REBATE 被推荐人返佣, API\_REBATE API佣金回扣, CONTEST\_REWARD 交易大赛奖金, CROSS\_COLLATERAL\_TRANSFER cc转账, OPTIONS\_PREMIUM\_FEE 期权购置手续费, OPTIONS\_SETTLE\_PROFIT 期权行权收益, INTERNAL\_TRANSFER 内部账户,给普通用户划转, AUTO\_EXCHANGE 自动兑换, DELIVERED\_SETTELMENT 下架结算, COIN\_SWAP\_DEPOSIT 闪兑转入, COIN\_SWAP\_WITHDRAW 闪兑转出, POSITION\_LIMIT\_INCREASE\_FEE 仓位限制上调费用,STRATEGY\_UMFUTURES\_TRANSFER UM策略子账户划转,FEE\_RETURN 策略交易手续费退还,BFUSD\_REWARD BFUSD每日奖励 | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间 | | page | INT | NO | 分页数 | | limit | INT | NO | 返回的结果集数量 默认值:100 最大值:1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果`startTime` 和 `endTime` 均未发送, 只会返回最近7天的数据。 > * 如果`incomeType`没有发送,返回所有类型账户损益资金流水。 > * "trandId" 在相同用户的同一种收益流水类型中是唯一的。 > * 仅保留最近3个月的数据。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Income-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "", // 交易对,仅针对涉及交易对的资金流 "incomeType": "TRANSFER", // 资金流类型 "income": "-0.37500000", // 资金流数量,正数代表流入,负数代表流出 "asset": "USDT", // 资产内容 "info":"TRANSFER", // 备注信息,取决于流水类型 "time": 1570608000000, // 时间 "tranId":9689322392, // 划转ID "tradeId":"" // 引起流水产生的原始交易ID }, { "symbol": "BTCUSDT", "incomeType": "COMMISSION", "income": "-0.01000000", "asset": "USDT", "info":"COMMISSION", "time": 1570636800000, "tranId":9689322392, "tradeId":"2059192" }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Income-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Income-History#http%E8%AF%B7%E6%B1%82) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Income-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Order Rate Limit | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#__docusaurus_skipToContent_fallback) 本页总览 查询用户下单限频 (USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 查询用户下单限频 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/rateLimit/order` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 10000, }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 20000, }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Futures Account Balance | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#__docusaurus_skipToContent_fallback) 本页总览 账户余额 (USER\_DATA) ================= 查询账户余额 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E6%96%B9%E5%BC%8F "方式的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- `account.balance` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82 "请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "method": "account.balance", "params": { "apiKey": "xTaDyrmvA9XT2oBHHjy39zyPzKCvMdtH3b9q4xadkAg2dNSJXQGCxzui26L823W2", "timestamp": 1702561978458, "signature": "208bb94a26f99aa122b1319490ca9cb2798fccc81d9b6449521a26268d53217a" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": [ { "accountAlias": "SgsR", // 账户唯一识别码 "asset": "USDT", // 资产 "balance": "122607.35137903", // 总余额 "crossWalletBalance": "23.72469206", // 全仓余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "23.72469206", // 下单可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "marginAvailable": true, // 是否可用作联合保证金 "updateTime": 1617939110373 } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Futures Order History Download Link By Id | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#__docusaurus_skipToContent_fallback) 本页总览 通过下载Id获取合约订单下载链接 (USER\_DATA) ============================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 通过下载Id获取合约订单下载链接 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/order/asyn/id` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **10** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | downloadId | STRING | YES | 通过下载id 接口获取 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | * 下载链接有效期:24小时。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "downloadId":"545923594199212032", // 下载Id "status":"completed", // 状态,枚举类型:completed 已完成,processing 处理中 "url":"www.binance.com", // 适配该笔ID请求的下载链接 "notified":true, // 忽略 "expirationTimestamp":1645009771000, // 晚于该时间戳之后链接将自动失效 "isExpired":null, } > **或** (服务器仍在处理中会返回) { "downloadId":"545923594199212032", "status":"processing", "url":"", "notified":false, "expirationTimestamp":-1 "isExpired":null,} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query ADL risk rating | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#__docusaurus_skipToContent_fallback) 本页总览 自动减仓风险评级 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询symbol级别的 ADL 风险评级。 ADL 风险评级用于衡量在发生强平时触发 ADL 的可能性,该评级会综合考虑该symbol的保险基金余额、仓位集中度、盘口深度、价格波动率、平均杠杆水平、未实现盈亏以及保证金利用率。 风险等级分为高、中、低,每半小时更新一次。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/symbolAdlRisk` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "symbol": "BTCUSDT", "adlRisk": "low", // 自动减仓风险评级 "updateTime": 1597370495002} > **当不指定symbol时相应** [ { "symbol": "BTCUSDT", "adlRisk": "low", // 自动减仓风险评级 "updateTime": 1597370495002 }, { "symbol": "ETHUSDT", "adlRisk": "high", // 自动减仓风险评级 "updateTime": 1597370495004 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Basis | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#__docusaurus_skipToContent_fallback) 本页总览 基差 == 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询期货基差 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/futures/data/basis` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | pair | STRING | YES | BTCUSDT | | contractType | ENUM | YES | CURRENT\_QUARTER, NEXT\_QUARTER, PERPETUAL | | period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" | | limit | LONG | YES | Default 30,Max 500 | | startTime | LONG | NO | | | endTime | LONG | NO | | > * 若无 startime 和 endtime 限制, 则默认返回当前时间往前的limit值 > * 仅支持最近30天的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "indexPrice": "34400.15945055", "contractType": "PERPETUAL", "basisRate": "0.0004", "futuresPrice": "34414.10", "annualizedBasisRate": "", "basis": "13.94054945", "pair": "BTCUSDT", "timestamp": 1698742800000 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Basis#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 24hr Ticker Price Change Statistics | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#__docusaurus_skipToContent_fallback) 本页总览 24hr价格变动情况 ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 请注意,不携带symbol参数会返回全部交易对数据,不仅数据庞大,而且权重极高 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/ticker/24hr` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 带symbol为**1**, 不带为**40** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | > * 不发送交易对参数,则会返回所有交易对信息 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "symbol": "BTCUSDT", "priceChange": "-94.99999800", //24小时价格变动 "priceChangePercent": "-95.960", //24小时价格变动百分比 "weightedAvgPrice": "0.29628482", //加权平均价 "lastPrice": "4.00000200", //最近一次成交价 "lastQty": "200.00000000", //最近一次成交额 "openPrice": "99.00000000", //24小时内第一次成交的价格 "highPrice": "100.00000000", //24小时最高价 "lowPrice": "0.10000000", //24小时最低价 "volume": "8913.30000000", //24小时成交量 "quoteVolume": "15.30000000", //24小时成交额 "openTime": 1499783499040, //24小时内,第一笔交易的发生时间 "closeTime": 1499869899040, //24小时内,最后一笔交易的发生时间 "firstId": 28385, // 首笔成交id "lastId": 28460, // 末笔成交id "count": 76 // 成交笔数} > 或(当不发送交易对信息) [ { "symbol": "BTCUSDT", "priceChange": "-94.99999800", //24小时价格变动 "priceChangePercent": "-95.960", //24小时价格变动百分比 "weightedAvgPrice": "0.29628482", //加权平均价 "lastPrice": "4.00000200", //最近一次成交价 "lastQty": "200.00000000", //最近一次成交额 "openPrice": "99.00000000", //24小时内第一次成交的价格 "highPrice": "100.00000000", //24小时最高价 "lowPrice": "0.10000000", //24小时最低价 "volume": "8913.30000000", //24小时成交量 "quoteVolume": "15.30000000", //24小时成交额 "openTime": 1499783499040, //24小时内,第一笔交易的发生时间 "closeTime": 1499869899040, //24小时内,最后一笔交易的发生时间 "firstId": 28385, // 首笔成交id "lastId": 28460, // 末笔成交id "count": 76 // 成交笔数 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Futures Trading Quantitative Rules Indicators | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#__docusaurus_skipToContent_fallback) 本页总览 合约交易量化规则指标(USER\_DATA) ====================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 合约交易量化规则指标,更多细节, 请参考[合约交易量化规则](https://www.binance.com/cn/support/faq/4f462ebe6ff445d4a170be7d9e897272) HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/apiTradingStatus` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 带 symbol _**1**_ * 不带 _**10**_ 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **响应:** { "indicators": { // indicator:风控指标名, value:用户在该市场的风控指标数值, triggerValue:阈值, 对于没有达到记录阈值的则不返回数据。 "BTCUSDT": [ { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, // 预计恢复时间,若当前时间大等于预计恢复时间则为空 "indicator": "UFR", // Unfilled Ratio (UFR) "value": 0.05, // Current value "triggerValue": 0.995 // Trigger value }, { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, "indicator": "IFER", // IOC/FOK Expiration Ratio (IFER) "value": 0.99, // Current value "triggerValue": 0.99 // Trigger value }, { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, "indicator": "GCR", // GTC Cancellation Ratio (GCR) "value": 0.99, // Current value "triggerValue": 0.99 // Trigger value }, { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, "indicator": "DR", // Dust Ratio (DR) "value": 0.99, // Current value "triggerValue": 0.99 // Trigger value } ], "ETHUSDT": [ { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, "indicator": "UFR", "value": 0.05, "triggerValue": 0.995 }, { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, "indicator": "IFER", "value": 0.99, "triggerValue": 0.99 }, { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, "indicator": "GCR", "value": 0.99, "triggerValue": 0.99 } { "isLocked": true, // 用户该品种交易是否被风控禁用 "plannedRecoverTime": 1545741270000, "indicator": "DR", "value": 0.99, "triggerValue": 0.99 } ] }, "updateTime": 1545741270000 // 返回值的更新时间} > 或(触发账号层级违规时) { "indicators":{ "ACCOUNT":[ { "indicator":"TMV", // Too many violations 多交易对触发账号层级违规 "value":10, "triggerValue":1, "plannedRecoverTime":1644919865000, "isLocked":true } ] }, "updateTime":1644913304748} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Compressed Aggregate Trades List | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#__docusaurus_skipToContent_fallback) 本页总览 近期成交(归集) ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 归集交易与逐笔交易的区别在于,同一价格、同一方向、同一时间(100ms计算)的订单簿trade会被聚合为一条 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/aggTrades` **注意:** 响应消息聚合RPI订单数据,但无任何特殊标签区别。 **权重:** 20 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | fromId | LONG | NO | 从包含fromID的成交开始返回结果 | | startTime | LONG | NO | 从该时刻之后的成交记录开始返回结果 | | endTime | LONG | NO | 返回该时刻为止的成交记录 | | limit | INT | NO | 默认 500; 最大 1000. | > * 接口仅支持查询最近1年的交易数据 > * 如果同时发送`startTime`和`endTime`,间隔必须小于一小时 > * 如果没有发送任何筛选参数(`fromId`, `startTime`, `endTime`),默认返回最近的成交记录 > * 保险基金和自动减仓(ADL)成交不属于订单簿成交,故不会被归并聚合 > * 同时发送`startTime`/`endTime`和`fromId`可能导致请求超时,建议仅发送`fromId`或仅发送`startTime`和`endTime` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "a": 26129, // 归集成交ID "p": "0.01633102", // 成交价 "q": "4.70443515", // 成交量 "f": 27781, // 被归集的首个成交ID "l": 27781, // 被归集的末个成交ID "T": 1498793709153, // 成交时间 "m": true, // 是否为主动卖出单 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Index Price Constituents | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#__docusaurus_skipToContent_fallback) 本页总览 查询指数价格成分 ======== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 查询指数价格成分 **注意:** 传统金融合约的成分价格将被隐藏,并统一显示为 -1。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/constituents` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **2** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "symbol": "BTCUSDT", "time": 1745401553408, "constituents": [ { "exchange": "binance", "symbol": "BTCUSDT", "price": "94057.03000000", "weight": "0.51282051" }, { "exchange": "coinbase", "symbol": "BTC-USDT", "price": "94140.58000000", "weight": "0.15384615" }, { "exchange": "gateio", "symbol": "BTC_USDT", "price": "94060.10000000", "weight": "0.02564103" }, { "exchange": "kucoin", "symbol": "BTC-USDT", "price": "94096.70000000", "weight": "0.07692308" }, { "exchange": "mxc", "symbol": "BTCUSDT", "price": "94057.02000000", "weight": "0.07692308" }, { "exchange": "bitget", "symbol": "BTCUSDT", "price": "94064.03000000", "weight": "0.07692308" }, { "exchange": "bybit", "symbol": "BTCUSDT", "price": "94067.90000000", "weight": "0.07692308" } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Trading Schedule | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#__docusaurus_skipToContent_fallback) 本页总览 一周交易时段 ====== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 从查询时间的前一日起算、返回为期一周的传统金融合约标的资产的交易时段信息,覆盖美国股票市场和商品市场。美股市场的时段类型包括 "PRE\_MARKET"、"REGULAR"、"AFTER\_MARKET"、"OVERNIGHT" 和 "NO\_TRADING";商品市场的时段类型包括 "REGULAR" 和 "NO\_TRADING"。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/tradingSchedule` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NONE 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "updateTime": 1761286643918, "marketSchedules": { "EQUITY": { "sessions": [ { "startTime": 1761177600000, "endTime": 1761206400000, "type": "OVERNIGHT" }, { "startTime": 1761206400000, "endTime": 1761226200000, "type": "PRE_MARKET" } ] }, "COMMODITY": { "sessions": [ { "startTime": 1761724800000, "endTime": 1761744600000, "type": "NO_TRADING" }, { "startTime": 1761744600000, "endTime": 1761768000000, "type": "REGULAR" } ] } }} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Trading-Schedule#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Symbol Order Book Ticker | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#__docusaurus_skipToContent_fallback) 本页总览 当前最优挂单 ====== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 返回当前最优的挂单(最高买单,最低卖单) 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- `ticker.book` **注意:** 响应消息不包含RPI订单,其不可见。 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "9d32157c-a556-4d27-9866-66760a174b57", "method": "ticker.book", "params": { "symbol": "BTCUSDT" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 单交易对**2**,无交易对**5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | > * 不发送交易对参数,则会返回所有交易对信息 > * 该接口返回头中的`X-MBX-USED-WEIGHT-1M`参数不准确,可以忽略 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "9d32157c-a556-4d27-9866-66760a174b57", "status": 200, "result": { "lastUpdateId": 1027024, "symbol": "BTCUSDT", // 交易对 "bidPrice": "4.00000000", //最优买单价 "bidQty": "431.00000000", //挂单量 "askPrice": "4.00000200", //最优卖单价 "askQty": "9.00000000", //挂单量 "time": 1589437530011 // 撮合引擎时间 }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 2 } ]} > 或(当不发送symbol) { "id": "9d32157c-a556-4d27-9866-66760a174b57", "status": 200, "result": [ { "lastUpdateId": 1027024, "symbol": "BTCUSDT", // 交易对 "bidPrice": "4.00000000", //最优买单价 "bidQty": "431.00000000", //挂单量 "askPrice": "4.00000200", //最优卖单价 "askQty": "9.00000000", //挂单量 "time": 1589437530011 // 撮合引擎时间 } ] "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 2 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Insurance Fund Balance Snapshot | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#__docusaurus_skipToContent_fallback) 本页总览 查询保险基金余额快照 ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询保险基金余额快照 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/insuranceBalance` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 传symbol { "symbols":[ "BNBUSDT", "BTCUSDT", "BTCUSDT_250627", "BTCUSDT_250926", "ETHBTC", "ETHUSDT", "ETHUSDT_250627", "ETHUSDT_250926" ], "assets":[ { "asset":"USDC", "marginBalance":"299999998.6497832", "updateTime":1745366402000 }, { "asset":"USDT", "marginBalance":"793930579.315848", "updateTime":1745366402000 }, { "asset":"BTC", "marginBalance":"61.73143554", "updateTime":1745366402000 }, { "asset":"BNFCR", "marginBalance":"633223.99396922", "updateTime":1745366402000 } ]} > 或不传symbol [ { "symbols":[ "ADAUSDT", "BCHUSDT", "DOTUSDT", "EOSUSDT", "ETCUSDT", "LINKUSDT", "LTCUSDT", "TRXUSDT", "XLMUSDT", "XMRUSDT", "XRPUSDT" ], "assets":[ { "asset":"USDT", "marginBalance":"314151411.06482935", "updateTime":1745366402000 } ] }, { "symbols":[ "ACTUSDT", "MUBARAKUSDT", "OMUSDT", "TSTUSDT" ], "assets":[ { "asset":"USDT", "marginBalance":"5166686.84431694", "updateTime":1745366402000 } ] }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Account Trade List | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#__docusaurus_skipToContent_fallback) 本页总览 账户成交历史 (USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 获取某交易对的成交历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/userTrades` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 必须要和参数`symbol`一起使用 | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间 | | fromId | LONG | NO | 返回该fromId及之后的成交,缺省返回最近的成交 | | limit | INT | NO | 返回的结果集数量 默认值:500 最大值:1000. | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果`startTime` 和 `endTime` 均未发送, 只会返回最近7天的数据。 > * startTime 和 endTime 的最大间隔为7天 > * 参数 fromId 不能和startTime 与 endTime一起发送 > * 本接口仅支持最近6个月历史交易的查询 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "buyer": false, // 是否是买方 "commission": "-0.07819010", // 手续费 "commissionAsset": "USDT", // 手续费计价单位 "id": 698759, // 交易ID "maker": false, // 是否是挂单方 "orderId": 25851813, // 订单编号 "price": "7819.01", // 成交价 "qty": "0.002", // 成交量 "quoteQty": "15.63802", // 成交额 "realizedPnl": "-0.91539999", // 实现盈亏 "side": "SELL", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "symbol": "BTCUSDT", // 交易对 "time": 1569514978020 // 时间 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Symbol Price Ticker | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#__docusaurus_skipToContent_fallback) 本页总览 最新价格 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 返回最近价格 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E6%96%B9%E5%BC%8F "方式的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- `ticker.price` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82 "请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "9d32157c-a556-4d27-9866-66760a174b57", "method": "ticker.price", "params": { "symbol": "BTCUSDT" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 单交易对**1**,无交易对**2** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | > * 不发送交易对参数,则会返回所有交易对信息 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "id": "9d32157c-a556-4d27-9866-66760a174b57", "status": 200, "result": { "symbol": "BTCUSDT", "price": "6000.01", "time": 1589437530011 }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 2 } ]} > 或(当不发送symbol) { "id": "9d32157c-a556-4d27-9866-66760a174b57", "status": 200, "result": [ { "symbol": "BTCUSDT", "price": "6000.01", "time": 1589437530011 } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 2 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Auto Cancel All Open Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#__docusaurus_skipToContent_fallback) 本页总览 倒计时撤销所有订单 (TRADE) ================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 该接口可以被用于确保在倒计时结束时撤销指定symbol上的所有挂单。 在使用这个功能时,接口应像心跳一样在倒计时内被反复调用,以便可以取消既有的倒计时并开始新的倒数计时设置。 * 用法示例: 以30s的间隔重复此接口,每次倒计时countdownTime设置为120000(120s)。 如果在120秒内未再次调用此接口,则您指定symbol上的所有挂单都会被自动撤销。 如果在120秒内以将countdownTime设置为0,则倒数计时器将终止,自动撤单功能取消。 * 系统会**大约每10毫秒**检查一次所有倒计时情况,因此请注意,使用此功能时应考虑足够的冗余。 我们不建议将倒记时设置得太精确或太小。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/countdownCancelAll` **权重:** **10** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | countdownTime | LONG | YES | 倒计时。 1000 表示 1 秒; 0 表示取消倒计时撤单功能。 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "symbol": "BTCUSDT", "countdownTime": "100000"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel Algo Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#__docusaurus_skipToContent_fallback) 本页总览 撤销条件订单 (TRADE) ============== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 撤销条件订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/fapi/v1/algoOrder` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoId | LONG | NO | 系统订单号 | | clientAlgoId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `algoId` 与 `clientAlgoId` 必须至少发送一个 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "algoId": 2146760, "clientAlgoId": "6B2I9XVcJpCjqPAJ4YoFX7", "code": "200", "msg": "success"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query All Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询所有订单(包括历史订单) (USER\_DATA) =========================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询所有订单(包括历史订单) * 请注意,如果订单满足如下条件,不会被查询到: * 订单的最终状态为 `CANCELED` 或者 `EXPIRED` **并且** 订单没有任何的成交记录 **并且** 订单生成时间 + 3天 < 当前时间 * 订单创建时间 + 90天 < 当前时间 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/allOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 只返回此orderID及之后的订单,缺省返回最近的订单 | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间 | | limit | INT | NO | 返回的结果集数量 默认值:500 最大值:1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 查询时间范围最大不得超过7天 > * 默认查询最近7天内的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "avgPrice": "0.00000", // 平均成交价 "clientOrderId": "abc", // 用户自定义的订单号 "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 1917641, // 系统订单号 "origQty": "0.40", // 原始委托数量 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "price": "0", // 委托价格 "reduceOnly": false, // 是否仅减仓 "side": "BUY", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "9300", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "time": 1579276756075, // 订单时间 "timeInForce": "GTC", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1579276756075, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 0 //订单TIF为GTD时的自动取消时间 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/All-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel All Algo Open Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#__docusaurus_skipToContent_fallback) 本页总览 撤销全部订单(TRADE) ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 撤销全部订单 (TRADE) HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/fapi/v1/algoOpenOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": 200, "msg": "The operation of cancel all open order is done."} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel All Open Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#__docusaurus_skipToContent_fallback) 本页总览 撤销全部订单(TRADE) ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 撤销全部订单 (TRADE) HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ DELETE `/fapi/v1/allOpenOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": 200, "msg": "The operation of cancel all open order is done."} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#__docusaurus_skipToContent_fallback) 本页总览 撤销订单 (TRADE) ============ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 撤销订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/fapi/v1/order` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `orderId` 与 `origClientOrderId` 必须至少发送一个 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "clientOrderId": "myOrder1", // 用户自定义的订单号 "cumQty": "0", "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 283194212, // 系统订单号 "origQty": "11", // 原始委托数量 "price": "0", // 委托价格 "avgPrice": "0.00", "reduceOnly": false, // 仅减仓 "side": "BUY", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "CANCELED", // 订单状态 "stopPrice": "9300", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "timeInForce": "GTC", // 有效方法 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "type": "TRAILING_STOP_MARKET", // 订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1571110484038, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 0 //订单TIF为GTD时的自动取消时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Change Initial Leverage | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#__docusaurus_skipToContent_fallback) 本页总览 调整开仓杠杆 (TRADE) ============== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 调整用户在指定symbol合约的开仓杠杆。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/leverage` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | leverage | INT | YES | 目标杠杆倍数:1 到 125 整数 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "leverage": 21, // 杠杆倍数 "maxNotionalValue": "1000000", // 当前杠杆倍数下允许的最大名义价值 "symbol": "BTCUSDT" // 交易对} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Change Margin Type | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#__docusaurus_skipToContent_fallback) 本页总览 变换逐全仓模式 (TRADE) =============== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 变换用户在指定symbol合约上的保证金模式:逐仓或全仓。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/marginType` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | marginType | ENUM | YES | 保证金模式 ISOLATED(逐仓), CROSSED(全仓) | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "code": 200, "msg": "success"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Change Multi Assets Mode | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#__docusaurus_skipToContent_fallback) 本页总览 更改联合保证金模式(TRADE) ================ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 变换用户在 _**所有symbol**_ 合约上的联合保证金模式:开启或关闭联合保证金模式。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/multiAssetsMargin` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | multiAssetsMargin | STRING | YES | "true": 联合保证金模式开启;"false": 联合保证金模式关闭 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "code": 200, "msg": "success"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Change Position Mode | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#__docusaurus_skipToContent_fallback) 本页总览 更改持仓模式(TRADE) ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 变换用户在 _**所有symbol**_ 合约上的持仓模式:双向持仓或单向持仓。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/positionSide/dual` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | dualSidePosition | STRING | YES | "true": 双向持仓模式;"false": 单向持仓模式 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "code": 200, "msg": "success"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Current All Algo Open Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#__docusaurus_skipToContent_fallback) 本页总览 查看当前全部条件挂单 (USER\_DATA) ======================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查看当前全部条件挂单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/openAlgoOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 带symbol _**1**_ * 不带 _**40**_ 请小心使用不带symbol参数的调用 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoType | STRING | NO | | | symbol | STRING | NO | | | algoId | LONG | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 不带symbol参数,会返回所有交易对的挂单 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "algoId": 2148627, "clientAlgoId": "MRumok0dkhrP4kCm12AHaB", "algoType": "CONDITIONAL", "orderType": "TAKE_PROFIT", "symbol": "BNBUSDT", "side": "SELL", "positionSide": "BOTH", "timeInForce": "GTC", "quantity": "0.01", "algoStatus": "NEW", "actualOrderId": "", "actualPrice": "0.00000", "triggerPrice": "750.000", "price": "750.000", "icebergQuantity": null, "tpTriggerPrice": "0.000", "tpPrice": "0.000", "slTriggerPrice": "0.000", "slPrice": "0.000", "tpOrderType": "", "selfTradePreventionMode": "EXPIRE_MAKER", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "closePosition": false, "priceProtect": false, "reduceOnly": false, "createTime": 1750514941540, "updateTime": 1750514941540, "triggerTime": 0, "goodTillDate": 0 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Algo-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Current All Open Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#__docusaurus_skipToContent_fallback) 本页总览 查看当前全部挂单 (USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查看当前全部挂单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/openOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 带symbol _**1**_ * 不带 _**40**_ 请小心使用不带symbol参数的调用 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | 交易对 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 不带symbol参数,会返回所有交易对的挂单 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "avgPrice": "0.00000", // 平均成交价 "clientOrderId": "abc", // 用户自定义的订单号 "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 1917641, // 系统订单号 "origQty": "0.40", // 原始委托数量 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "price": "0", // 委托价格 "reduceOnly": false, // 是否仅减仓 "side": "BUY", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "9300", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "time": 1579276756075, // 订单时间 "timeInForce": "GTC", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1579276756075, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //price match mode "selfTradePreventionMode": "NONE", //self trading preventation mode "goodTillDate": 0 //order pre-set auot cancel time for TIF GTD order }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Position Margin Change History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#__docusaurus_skipToContent_fallback) 本页总览 逐仓保证金变动历史(TRADE) ================ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询逐仓保证金变动历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/positionMargin/history` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | type | INT | NO | 调整方向 1: 增加逐仓保证金,2: 减少逐仓保证金 | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间,默认为当前时间 | | limit | INT | NO | 返回的结果集数量 默认值: 500 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `startTime`与`endTime`间隔不能超过30天 > * 支持查询不超过1个月的合约数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "BTCUSDT", // 交易对 "type": 1, // 调整方向 "deltaType": "USER_ADJUST", // 划转类型 "amount": "23.36332311", // 数量 "asset": "USDT", // 资产 "time": 1578047897183, // 时间 "positionSide": "BOTH" // 持仓方向 }, { "symbol": "BTCUSDT", "type": 1, "deltaType": "USER_ADJUST", "amount": "100", "asset": "USDT", "time": 1578047900425, "positionSide": "LONG" }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Modify Isolated Position Margin | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#__docusaurus_skipToContent_fallback) 本页总览 调整逐仓保证金 (TRADE) =============== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 针对逐仓模式下的仓位,调整其逐仓保证金资金。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/positionMargin` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | amount | DECIMAL | YES | 保证金资金 | | type | INT | YES | 调整方向 1: 增加逐仓保证金,2: 减少逐仓保证金 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 只针对逐仓symbol 与 positionSide(如有) 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "amount": 100.0, "code": 200, "msg": "Successfully modify position margin.", "type": 1} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Modify Multiple Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#__docusaurus_skipToContent_fallback) 本页总览 批量修改订单(TRADE) ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 批量修改订单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ PUT `/fapi/v1/batchOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10s order rate limit(X-MBX-ORDER-COUNT-10S)为5; 1min order rate limit(X-MBX-ORDER-COUNT-1M)为1; IP rate limit(x-mbx-used-weight-1m)为5; 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | batchOrders | list | YES | 订单列表,最多支持5个订单 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **其中`batchOrders`应以list of JSON格式填写订单参数** | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | orderId | LONG | NO | 系统订单号,orderId 与 origClientOrderId 至少要传一个 | | origClientOrderId | STRING | NO | 用户自定义的订单号,orderId 与 origClientOrderId 至少要传一个 | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | quantity | DECIMAL | YES | 下单数量,使用`closePosition`不支持此参数。 | | price | DECIMAL | YES | 委托价格 | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | stopPrice | DECIMAL | NO | 触发价, 仅 `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 需要此参数 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 具体订单条件规则,与普通修改订单一致 > * 批量修改订单采取并发处理,不保证订单撮合顺序 > * 批量修改订单的返回内容顺序,与订单列表顺序一致 > * 同一订单修改次数最多10000次 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "orderId": 20072994037, "symbol": "BTCUSDT", "pair": "BTCUSDT", "status": "NEW", "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "price": "30005", "avgPrice": "0.0", "origQty": "1", "executedQty": "0", "cumQty": "0", "cumBase": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "LONG", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 0, //订单TIF为GTD时的自动取消时间 "updateTime": 1629182711600 }, { "code": -2022, "msg": "ReduceOnly Order is rejected." }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Modify Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#__docusaurus_skipToContent_fallback) 本页总览 修改订单 (TRADE) ============ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 修改订单功能,当前只支持限价(LIMIT)订单修改,修改后会在撮合队列里重新排序 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- PUT `/fapi/v1/order` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 10s order rate limit(X-MBX-ORDER-COUNT-10S)为1; 1min order rate limit(X-MBX-ORDER-COUNT-1M)为1; IP rate limit(x-mbx-used-weight-1m)为0 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | quantity | DECIMAL | YES | 下单数量,使用`closePosition`不支持此参数。 | | price | DECIMAL | YES | 委托价格 | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `orderId` 与 `origClientOrderId` 必须至少发送一个,同时发送则以 order id为准 > * `quantity` 与 `price` 均必须发送,这点和 dapi 修改订单不同 > * 当新订单的`quantity` 或 `price`不满足PRICE\_FILTER / PERCENT\_FILTER / LOT\_SIZE限制,修改会被拒绝,原订单依旧被保留 > * 订单会在下列情况下被取消: > * 原订单被部分执行且新订单`quantity` <= `executedQty` > * 原订单是`GTX`,新订单的价格会导致订单立刻执行 > * 同一订单修改次数最多10000次 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "orderId": 20072994037, "symbol": "BTCUSDT", "pair": "BTCUSDT", "status": "NEW", "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "price": "30005", "avgPrice": "0.0", "origQty": "1", "executedQty": "0", "cumQty": "0", "cumBase": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "LONG", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 0, //订单TIF为GTD时的自动取消时间 "updateTime": 1629182711600} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Modify-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Position Adl Quantile Estimation | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#__docusaurus_skipToContent_fallback) 本页总览 持仓ADL队列估算(USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 持仓ADL队列估算 > * 每30秒更新数据 > * 队列分数0,1,2,3,4,分数越高说明在ADL队列中的位置越靠前 > * 对于单向持仓模式或者是逐仓状态下的双向持仓模式的交易对,会返回 "LONG", "SHORT" 和 "BOTH" 分别表示不同持仓方向上持仓的adl队列分数 > * 对于全仓状态下的双向持仓模式的交易对,会返回 "LONG", "SHORT" 和 "HEDGE", 其中"HEDGE"的存在仅作为标记;其中如果多空均有持仓的情况下,"LONG"和"SHORT"返回共同计算后相同的队列分数。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/adlQuantile` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "symbol": "ETHUSDT", "adlQuantile": { // 对于全仓状态下的双向持仓模式的交易对,会返回 "LONG", "SHORT" 和 "HEDGE", 其中"HEDGE"的存在仅作为标记;如果多空均有持仓的情况下,"LONG"和"SHORT"应返回共同计算后相同的队列分数。 "LONG": 3, "SHORT": 3, "HEDGE": 0 // HEDGE 仅作为指示出现,请忽略数值 } }, { "symbol": "BTCUSDT", "adlQuantile": { // 对于单向持仓模式或者是逐仓状态下的双向持仓模式的交易对,会返回 "LONG", "SHORT" 和 "BOTH" 分别表示不同持仓方向上持仓的adl队列分数 "LONG": 1, // 双开模式下多头持仓的ADL队列估算分 "SHORT": 2, // 双开模式下空头持仓的ADL队列估算分 "BOTH": 0 // 单开模式下持仓的ADL队列估算分 } } ] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Algo Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#__docusaurus_skipToContent_fallback) 本页总览 查询条件订单 (USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询条件订单状态 * 请注意,如果订单满足如下条件,不会被查询到: * 订单的最终状态为 `CANCELED` 或者 `EXPIRED` **并且** 订单没有任何的成交记录 **并且** 订单生成时间 + 3天 < 当前时间 * 订单创建时间 + 90天 < 当前时间 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ GET `/fapi/v1/algoOrder` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoId | LONG | NO | 系统订单号 | | clientAlgoId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 注意: > * 至少需要发送 `algoId` 与 `clientAlgoId`中的一个 > * `algoId`在`symbol`维度是自增的 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "algoId": 2146760, "clientAlgoId": "6B2I9XVcJpCjqPAJ4YoFX7", "algoType": "CONDITIONAL", "orderType": "TAKE_PROFIT", "symbol": "BNBUSDT", "side": "SELL", "positionSide": "BOTH", "timeInForce": "GTC", "quantity": "0.01", "algoStatus": "CANCELED", "actualOrderId": "", "actualPrice": "0.00000", "triggerPrice": "750.000", "price": "750.000", "icebergQuantity": null, "tpTriggerPrice": "0.000", "tpPrice": "0.000", "slTriggerPrice": "0.000", "slPrice": "0.000", "tpOrderType": "", "selfTradePreventionMode": "EXPIRE_MAKER", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "closePosition": false, "priceProtect": false, "reduceOnly": false, "createTime": 1750485492076, "updateTime": 1750514545091, "triggerTime": 0, "goodTillDate": 0} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query All Algo Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#__docusaurus_skipToContent_fallback) 本页总览 查询所有条件订单(包括历史订单) (USER\_DATA) ============================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询所有条件订单(包括历史订单) * 请注意,如果订单满足如下条件,不会被查询到: * 订单的最终状态为 `CANCELED` 或者 `EXPIRED` **并且** 订单没有任何的成交记录 **并且** 订单生成时间 + 3天 < 当前时间 * 订单创建时间 + 90天 < 当前时间 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/allAlgoOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | | | algoId | LONG | NO | 只返回此orderID及之后的订单,缺省返回最近的订单 | | startTime | LONG | NO | | | endTime | LONG | NO | | | page | INT | NO | | | limit | INT | NO | 返回的结果集数量 默认值:500 最大值:1000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 查询时间范围最大不得超过7天 > * 默认查询最近7天内的数据 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "algoId": 2146760, "clientAlgoId": "6B2I9XVcJpCjqPAJ4YoFX7", "algoType": "CONDITIONAL", "orderType": "TAKE_PROFIT", "symbol": "BNBUSDT", "side": "SELL", "positionSide": "BOTH", "timeInForce": "GTC", "quantity": "0.01", "algoStatus": "CANCELED", "actualOrderId": "", "actualPrice": "0.00000", "triggerPrice": "750.000", "price": "750.000", "icebergQuantity": null, "tpTriggerPrice": "0.000", "tpPrice": "0.000", "slTriggerPrice": "0.000", "slPrice": "0.000", "tpOrderType": "", "selfTradePreventionMode": "EXPIRE_MAKER", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "closePosition": false, "priceProtect": false, "reduceOnly": false, "createTime": 1750485492076, "updateTime": 1750514545091, "triggerTime": 0, "goodTillDate": 0 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-All-Algo-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Current Open Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#__docusaurus_skipToContent_fallback) 本页总览 查询当前挂单 (USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 请小心使用不带symbol参数的调用 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/openOrder` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `orderId` 与 `origClientOrderId` 中的一个为必填参数 > * 查询的订单如果已经成交或取消,将返回报错 "Order does not exist." 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "avgPrice": "0.00000", // 平均成交价 "clientOrderId": "abc", // 用户自定义的订单号 "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 1917641, // 系统订单号 "origQty": "0.40", // 原始委托数量 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "price": "0", // 委托价格 "reduceOnly": false, // 是否仅减仓 "side": "BUY", // 买卖方向 "status": "NEW", // 订单状态 "positionSide": "SHORT", // 持仓方向 "stopPrice": "9300", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "time": 1579276756075, // 订单时间 "timeInForce": "GTC", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1579276756075, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", // 盘口价格下单模式 "selfTradePreventionMode": "NONE", // 订单自成交保护模式 "goodTillDate": 0 // 订单TIF为GTD时的自动取消时间 } * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#__docusaurus_skipToContent_fallback) 本页总览 查询订单 (USER\_DATA) ================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询订单状态 * 请注意,如果订单满足如下条件,不会被查询到: * 订单的最终状态为 `CANCELED` 或者 `EXPIRED` **并且** 订单没有任何的成交记录 **并且** 订单生成时间 + 3天 < 当前时间 * 订单创建时间 + 90天 < 当前时间 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/order` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 注意: > * 至少需要发送 `orderId` 与 `origClientOrderId`中的一个 > * `orderId`在`symbol`维度是自增的 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "avgPrice": "0.00000", // 平均成交价 "clientOrderId": "abc", // 用户自定义的订单号 "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 1573346959, // 系统订单号 "origQty": "0.40", // 原始委托数量 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "price": "0", // 委托价格 "reduceOnly": false, // 是否仅减仓 "side": "BUY", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "9300", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "time": 1579276756075, // 订单时间 "timeInForce": "GTC", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1579276756075, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 0 //订单TIF为GTD时的自动取消时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Query-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#__docusaurus_skipToContent_fallback) 本页总览 撤销订单 (TRADE) ============ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 撤销订单 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- `order.cancel` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "5633b6a2-90a9-4192-83e7-925c90b6a2fd", "method": "order.cancel", "params": { "apiKey": "HsOehcfih8ZRxnhjp2XjGXhsOBd6msAhKz9joQaWwZ7arcJTlD2hGOGQj1lGdTjR", "orderId": 283194212, "symbol": "BTCUSDT", "timestamp": 1703439070722, "signature": "b09c49815b4e3f1f6098cd9fbe26a933a9af79803deaaaae03c29f719c08a8a8" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `orderId` 与 `origClientOrderId` 必须至少发送一个 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "5633b6a2-90a9-4192-83e7-925c90b6a2fd", "status": 200, "result": { "clientOrderId": "myOrder1", "cumQty": "0", "cumQuote": "0", "executedQty": "0", "orderId": 283194212, "origQty": "11", "origType": "TRAILING_STOP_MARKET", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "CANCELED", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSDT", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1571110484038, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "goodTillDate": 0 }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 1 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#__docusaurus_skipToContent_fallback) 本页总览 查询订单 (USER\_DATA) ================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询订单状态 * 请注意,如果订单满足如下条件,不会被查询到: * 订单的最终状态为 `CANCELED` 或者 `EXPIRED` **并且** 订单没有任何的成交记录 **并且** 订单生成时间 + 3天 < 当前时间 * 订单创建时间 + 90天 < 当前时间 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ `order.status` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------ { "id": "0ce5d070-a5e5-4ff2-b57f-1556741a4204", "method": "order.status", "params": { "apiKey": "HMOchcfii9ZRZnhjp2XjGXhsOBd6msAhKz9joQaWwZ7arcJTlD2hGPHQj1lGdTjR", "orderId": 328999071, "symbol": "BTCUSDT", "timestamp": 1703441060152, "signature": "ba48184fc38a71d03d2b5435bd67c1206e3191e989fe99bda1bc643a880dfdbf" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 注意: > * 至少需要发送 `orderId` 与 `origClientOrderId`中的一个 > * `orderId`在`symbol`维度是自增的 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "avgPrice": "0.00000", // 平均成交价 "clientOrderId": "abc", // 用户自定义的订单号 "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 1573346959, // 系统订单号 "origQty": "0.40", // 原始委托数量 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "price": "0", // 委托价格 "reduceOnly": false, // 是否仅减仓 "side": "BUY", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "9300", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "time": 1579276756075, // 订单时间 "timeInForce": "GTC", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1579276756075, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false // 是否开启条件单触发保护} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Query-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Account Information V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#__docusaurus_skipToContent_fallback) 本页总览 账户信息V2 (USER\_DATA) =================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 现有账户信息。 用户在单资产模式和多资产模式下会看到不同结果,响应部分的注释解释了两种模式下的不同。 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- `v2/account.status` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "method": "v2/account.status", "params": { "apiKey": "xTaDyrmvA9XT2oBHHjy39zyPzKCvMdtH3b9q4xadkAg2dNSJXQGCxzui26L823W2", "timestamp": 1702620814781, "signature": "6bb98ef84170c70ba3d01f44261bfdf50fef374e551e590de22b5c3b729b1d8c" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 单资产模式 { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": { "totalInitialMargin": "0.00000000", // 当前所需起始保证金总额(存在逐仓请忽略), 仅计算usdt资产positions), only for USDT asset "totalMaintMargin": "0.00000000", // 维持保证金总额, 仅计算usdt资产 "totalWalletBalance": "103.12345678", // 账户总余额, 仅计算usdt资产 "totalUnrealizedProfit": "0.00000000", // 持仓未实现盈亏总额, 仅计算usdt资产 "totalMarginBalance": "103.12345678", // 保证金总余额, 仅计算usdt资产 "totalPositionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格), 仅计算usdt资产 "totalOpenOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格), 仅计算usdt资产 "totalCrossWalletBalance": "103.12345678", // 全仓账户余额, 仅计算usdt资产 "totalCrossUnPnl": "0.00000000", // 全仓持仓未实现盈亏总额, 仅计算usdt资产 "availableBalance": "103.12345678", // 可用余额, 仅计算usdt资产 "maxWithdrawAmount": "103.12345678" // 最大可转出余额, 仅计算usdt资产 "assets": [ { "asset": "USDT", // 资产 "walletBalance": "23.72469206", // 余额 "unrealizedProfit": "0.00000000", // 未实现盈亏 "marginBalance": "23.72469206", // 保证金余额 "maintMargin": "0.00000000", // 维持保证金 "initialMargin": "0.00000000", // 当前所需起始保证金 "positionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格) "crossWalletBalance": "23.72469206", // 全仓账户余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "23.72469206", // 可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "marginAvailable": true, // 是否可用作联合保证金 "updateTime": 1625474304765 // 更新时间 },    { "asset": "USDC", "walletBalance": "103.12345678", "unrealizedProfit": "0.00000000", "marginBalance": "103.12345678", "maintMargin": "0.00000000", "initialMargin": "0.00000000", "positionInitialMargin": "0.00000000", "openOrderInitialMargin": "0.00000000", "crossWalletBalance": "103.12345678", "crossUnPnl": "0.00000000" "availableBalance": "126.72469206", "maxWithdrawAmount": "103.12345678", "marginAvailable": true, "updateTime": 1625474304765 }    ], "positions": [ // 仅有仓位或挂单的交易对会被返回 // 根据用户持仓模式展示持仓方向,即单向模式下只返回BOTH持仓情况,双向模式下只返回 LONG 和 SHORT 持仓情况 { "symbol": "BTCUSDT", // 交易对 "positionSide": "BOTH", // 持仓方向 "positionAmt": "1.000", // 持仓数量 "unrealizedProfit": "0.00000000", // 持仓未实现盈亏   "isolatedMargin": "0.00000000", "notional": "0", "isolatedWallet": "0", "initialMargin": "0", // 持仓所需起始保证金(基于最新标记价格) "maintMargin": "0", // 当前杠杆下用户可用的最大名义价值 "updateTime": 0 // 更新时间 } ] }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} > 多资产模式 { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": { "totalInitialMargin": "0.00000000", // 以USD计价的所需起始保证金总额 "totalMaintMargin": "0.00000000", // 以USD计价的维持保证金总额 "totalWalletBalance": "126.72469206", // 以USD计价的账户总余额 "totalUnrealizedProfit": "0.00000000", // 以USD计价的持仓未实现盈亏总额 "totalMarginBalance": "126.72469206", // 以USD计价的保证金总余额 "totalPositionInitialMargin": "0.00000000", // 以USD计价的持仓所需起始保证金(基于最新标记价格) "totalOpenOrderInitialMargin": "0.00000000", // 以USD计价的当前挂单所需起始保证金(基于最新标记价格) "totalCrossWalletBalance": "126.72469206", // 以USD计价的全仓账户余额 "totalCrossUnPnl": "0.00000000", // 以USD计价的全仓持仓未实现盈亏总额 "availableBalance": "126.72469206", // 以USD计价的可用余额 "maxWithdrawAmount": "126.72469206" // 以USD计价的最大可转出余额 "assets": [ { "asset": "USDT", // 资产 "walletBalance": "23.72469206", // 余额 "unrealizedProfit": "0.00000000", // 未实现盈亏 "marginBalance": "23.72469206", // 保证金余额 "maintMargin": "0.00000000", // 维持保证金 "initialMargin": "0.00000000", // 当前所需起始保证金 "positionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格) "crossWalletBalance": "23.72469206", // 全仓账户余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "23.72469206", // 可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "updateTime": 1625474304765 // 更新时间 },    { "asset": "USDC", "walletBalance": "103.12345678", "unrealizedProfit": "0.00000000", "marginBalance": "103.12345678", "maintMargin": "0.00000000", "initialMargin": "0.00000000", "positionInitialMargin": "0.00000000", "openOrderInitialMargin": "0.00000000", "crossWalletBalance": "103.12345678", "crossUnPnl": "0.00000000" "availableBalance": "126.72469206", "maxWithdrawAmount": "103.12345678", "updateTime": 1625474304765 } ], "positions": [ // 仅有仓位或挂单的交易对会被返回 // 根据用户持仓模式展示持仓方向,即单向模式下只返回BOTH持仓情况,双向模式下只返回 LONG 和 SHORT 持仓情况 { "symbol": "BTCUSDT", // 交易对 "positionSide": "BOTH", // 持仓方向 "positionAmt": "1.000", // 持仓数量 "unrealizedProfit": "0.00000000", // 持仓未实现盈亏   "isolatedMargin": "0.00000000", "notional": "0", "isolatedWallet": "0", "initialMargin": "0", // 持仓所需起始保证金(基于最新标记价格) "maintMargin": "0", // 当前杠杆下用户可用的最大名义价值 "updateTime": 0 // 更新时间 } ] }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel Multiple Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#__docusaurus_skipToContent_fallback) 本页总览 批量撤销订单(TRADE) ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 批量撤销订单 (TRADE) HTTP Request[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#http-request "HTTP Request的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/fapi/v1/batchOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderIdList | LIST | NO | 系统订单号, 最多支持10个订单

比如`[1234567,2345678]` | | origClientOrderIdList | LIST | NO | 用户自定义的订单号, 最多支持10个订单

比如`["my_id_1","my_id_2"]` 需要encode双引号。逗号后面没有空格。 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `orderIdList` 与 `origClientOrderIdList` 必须至少发送一个,不可同时发送 Response Example[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#response-example "Response Example的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "clientOrderId": "myOrder1", // 用户自定义的订单号 "cumQty": "0", "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 283194212, // 系统订单号 "origQty": "11", // 原始委托数量 "price": "0", // 委托价格 "reduceOnly": false, // 仅减仓 "side": "BUY", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "CANCELED", // 订单状态 "stopPrice": "9300", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "timeInForce": "GTC", // 有效方法 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "type": "TRAILING_STOP_MARKET", // 订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1571110484038, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 0 //订单TIF为GTD时的自动取消时间 }, { "code": -2011, "msg": "Unknown order sent." }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP Request](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#http-request) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [Response Example](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders#response-example) --- # Exchange Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#__docusaurus_skipToContent_fallback) 本页总览 获取交易规则和交易对 ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取交易规则和交易对 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/exchangeInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NONE 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "exchangeFilters": [], "rateLimits": [ // API访问的限制 { "interval": "MINUTE", // 按照分钟计算 "intervalNum": 1, // 按照1分钟计算 "limit": 2400, // 上限次数 "rateLimitType": "REQUEST_WEIGHT" // 按照访问权重来计算 }, { "interval": "MINUTE", "intervalNum": 1, "limit": 1200, "rateLimitType": "ORDERS" // 按照订单数量来计算 } ], "serverTime": 1565613908500, // 请忽略。如果需要获取当前系统时间,请查询接口 “GET /fapi/v1/time” "assets": [ // 资产信息 { "asset": "BTC", "marginAvailable": true, // 是否可用作保证金 "autoAssetExchange": "-0.10" // 保证金资产自动兑换阈值 }, { "asset": "USDT", "marginAvailable": true, // 是否可用作保证金 "autoAssetExchange": "0" // 保证金资产自动兑换阈值 }, { "asset": "BNB", "marginAvailable": false, // 是否可用作保证金 "autoAssetExchange": null // 保证金资产自动兑换阈值 } ], "symbols": [ // 交易对信息 { "symbol": "BLZUSDT", // 交易对 "pair": "BLZUSDT", // 标的交易对 "contractType": "PERPETUAL", // 合约类型 "deliveryDate": 4133404800000, // 交割日期 "onboardDate": 1598252400000, // 上线日期 "status": "TRADING", // 交易对状态 "maintMarginPercent": "2.5000", // 请忽略 "requiredMarginPercent": "5.0000", // 请忽略 "baseAsset": "BLZ", // 标的资产 "quoteAsset": "USDT", // 报价资产 "marginAsset": "USDT", // 保证金资产 "pricePrecision": 5, // 价格小数点位数(仅作为系统精度使用,注意同tickSize 区分) "quantityPrecision": 0, // 数量小数点位数(仅作为系统精度使用,注意同stepSize 区分) "baseAssetPrecision": 8, // 标的资产精度 "quotePrecision": 8, // 报价资产精度 "underlyingType": "COIN", "underlyingSubType": ["STORAGE"], "settlePlan": 0, "triggerProtect": "0.15", // 开启"priceProtect"的条件订单的触发阈值 "filters": [ { "filterType": "PRICE_FILTER", // 价格限制 "maxPrice": "300", // 价格上限, 最大价格 "minPrice": "0.0001", // 价格下限, 最小价格 "tickSize": "0.0001" // 订单最小价格间隔 }, { "filterType": "LOT_SIZE", // 数量限制 "maxQty": "10000000", // 数量上限, 最大数量 "minQty": "1", // 数量下限, 最小数量 "stepSize": "1" // 订单最小数量间隔 }, { "filterType": "MARKET_LOT_SIZE", // 市价订单数量限制 "maxQty": "590119", // 数量上限, 最大数量 "minQty": "1", // 数量下限, 最小数量 "stepSize": "1" // 允许的步进值 }, { "filterType": "MAX_NUM_ORDERS", // 最多订单数限制 "limit": 200 }, { "filterType": "MIN_NOTIONAL", // 最小名义价值 "notional": "5.0", }, { "filterType": "PERCENT_PRICE", // 价格比限制 "multiplierUp": "1.1500", // 价格上限百分比 "multiplierDown": "0.8500", // 价格下限百分比 "multiplierDecimal": "4" } ], "orderTypes": [ // 订单类型 "LIMIT", // 限价单 "MARKET", // 市价单 "STOP", // 止损单 "STOP_MARKET", // 止损市价单 "TAKE_PROFIT", // 止盈单 "TAKE_PROFIT_MARKET", // 止盈暑市价单 "TRAILING_STOP_MARKET" // 跟踪止损市价单 ], "timeInForce": [ // 有效方式 "GTC", // 成交为止, 一直有效 "IOC", // 无法立即成交(吃单)的部分就撤销 "FOK", // 无法全部立即成交就撤销 "GTX" // 无法成为挂单方就撤销 ], "liquidationFee": "0.010000", // 强平费率 "marketTakeBound": "0.30", // 市价吃单(相对于标记价格)允许可造成的最大价格偏离比例 } ], "timezone": "UTC" // 服务器所用的时间区域} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # New Algo Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#__docusaurus_skipToContent_fallback) 本页总览 下条件单 (TRADE) ============ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 下条件单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/algoOrder` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- IP rate limit(x-mbx-used-weight-1m)为0 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoType | ENUM | YES | 仅支持 `CONDITIONAL` | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | type | ENUM | YES | 条件订单类型 `STOP`, `TAKE_PROFIT`, `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` | | timeInForce | ENUM | NO | `IOC` or `GTC` or `FOK` or `GTX` , 默认 `GTC` | | quantity | DECIMAL | NO | 下单数量,使用`closePosition`不支持此参数。 | | price | DECIMAL | NO | 委托价格 | | triggerPrice | DECIMAL | NO | 触发价 | | workingType | ENUM | NO | 触发类型: `MARK_PRICE`(标记价格), `CONTRACT_PRICE`(合约最新价). 默认 `CONTRACT_PRICE` | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | closePosition | STRING | NO | `true`, `false`;触发后全部平仓,仅支持`STOP_MARKET`和`TAKE_PROFIT_MARKET`;不与`quantity`合用;自带只平仓效果,不与`reduceOnly` 合用 | | priceProtect | STRING | NO | 条件单触发保护:"TRUE","FALSE", 默认"FALSE". | | reduceOnly | STRING | NO | `true`, `false`; 非双开模式下默认`false`;双开模式下不接受此参数; 使用`closePosition`不支持此参数。 | | activatePrice | DECIMAL | NO | 追踪止损激活价格,仅`TRAILING_STOP_MARKET` 需要此参数, 默认为下单当前市场价格(支持不同`workingType`) | | callbackRate | DECIMAL | NO | 追踪止损回调比例,可取值范围\[0.1, 10\],其中 1代表1% ,仅`TRAILING_STOP_MARKET` 需要此参数 | | clientAlgoId | STRING | NO | 用户自定义的条件订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 `^[\.A-Z\:/a-z0-9_-]{1,36}$` | | newOrderRespType | ENUM | NO | "ACK", "RESULT", 默认 "ACK" | | selfTradePreventionMode | ENUM | NO | `EXPIRE_TAKER`/ `EXPIRE_MAKER`/ `EXPIRE_BOTH`; 默认`NONE` | | goodTillDate | LONG | NO | TIF为GTD时订单的自动取消时间, 当`timeInforce`为`GTD`时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 类型为 `STOP` 的条件订单可以传入参数 `timeInForce`(默认值为 `GTC`)。 > * 类型为 `TAKE_PROFIT` 的条件订单可以传入参数 `timeInForce`(默认值为 `GTC`)。 > * 条件单的触发必须: > > * 如果订单参数`priceProtect`为true: > * 达到触发价时,`MARK_PRICE`(标记价格)与`CONTRACT_PRICE`(合约最新价)之间的价差不能超过改symbol触发保护阈值 > * 触发保护阈值请参考接口`GET /fapi/v1/exchangeInfo` 返回内容相应symbol中"triggerProtect"字段 > * `STOP`, `STOP_MARKET` 止损单: > * 买入: 最新合约价格/标记价格高于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格低于等于触发价`stopPrice` > * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 止盈单: > * 买入: 最新合约价格/标记价格低于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格高于等于触发价`stopPrice` > * `TRAILING_STOP_MARKET` 跟踪止损单: > * 买入: 当合约价格/标记价格区间最低价格低于激活价格`activatePrice`,且最新合约价格/标记价高于等于最低价设定回调幅度。 > * 卖出: 当合约价格/标记价格区间最高价格高于激活价格`activatePrice`,且最新合约价格/标记价低于等于最高价设定回调幅度。 > * `TRAILING_STOP_MARKET` 跟踪止损单如果遇到报错 `{"code": -2021, "msg": "Order would immediately trigger."}` > 表示订单不满足以下条件: > > * 买入: 指定的`activatePrice` 必须小于 latest price > * 卖出: 指定的`activatePrice` 必须大于 latest price > * `STOP_MARKET`, `TAKE_PROFIT_MARKET` 配合 `closePosition`\=`true`: > > * 条件单触发依照上述条件单触发逻辑 > * 条件触发后,平掉当时持有所有多头仓位(若为卖单)或当时持有所有空头仓位(若为买单) > * 不支持 `quantity` 参数 > * 自带只平仓属性,不支持`reduceOnly`参数 > * 双开模式下,`LONG`方向上不支持`BUY`; `SHORT` 方向上不支持`SELL` > * `selfTradePreventionMode` 仅在 `timeInForce`为`IOC`或`GTC`或`GTD`时生效. > 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "algoId": 2146760, "clientAlgoId": "6B2I9XVcJpCjqPAJ4YoFX7", "algoType": "CONDITIONAL", "orderType": "TAKE_PROFIT", "symbol": "BNBUSDT", "side": "SELL", "positionSide": "BOTH", "timeInForce": "GTC", "quantity": "0.01", "algoStatus": "NEW", "triggerPrice": "750.000", "price": "750.000", "icebergQuantity": null, "selfTradePreventionMode": "EXPIRE_MAKER", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "closePosition": false, "priceProtect": false, "reduceOnly": false, "activatePrice": "", //TRAILING_STOP_MARKET order "callbackRate": "", //TRAILING_STOP_MARKET order "createTime": 1750485492076, "updateTime": 1750485492076, "triggerTime": 0, "goodTillDate": 0} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Get Order Modify History | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#__docusaurus_skipToContent_fallback) 本页总览 查询订单修改历史 (USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 查询订单修改历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/orderAmendment` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | startTime | LONG | NO | 起始时间 | | endTime | LONG | NO | 结束时间 | | limit | INT | NO | 返回的结果集数量 默认值:50 最大值:100 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 至少需要发送 `orderId` 与 `origClientOrderId`中的一个,同时发送则以 `orderId` 为准 > * 接口仅保留最近三个月订单修改历史 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "amendmentId": 5363, // 修改记录号 "symbol": "BTCUSDT", "pair": "BTCUSDT", "orderId": 20072994037, "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "time": 1629184560899, // 修改时间 "amendment": { "price": { "before": "30004", "after": "30003.2" }, "origQty": { "before": "1", "after": "1" }, "count": 3 // 修改记数,代表该修改记录是这笔订单第几次修改 } }, { "amendmentId": 5361, "symbol": "BTCUSDT", "pair": "BTCUSDT", "orderId": 20072994037, "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "time": 1629184533946, "amendment": { "price": { "before": "30005", "after": "30004" }, "origQty": { "before": "1", "after": "1" }, "count": 2 } }, { "amendmentId": 5325, "symbol": "BTCUSDT", "pair": "BTCUSDT", "orderId": 20072994037, "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "time": 1629182711787, "amendment": { "price": { "before": "30002", "after": "30005" }, "origQty": { "before": "1", "after": "1" }, "count": 1 } }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Place Multiple Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#__docusaurus_skipToContent_fallback) 本页总览 批量下单(TRADE) =========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 批量下单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/batchOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10s order rate limit(X-MBX-ORDER-COUNT-10S)为5; 1min order rate limit(X-MBX-ORDER-COUNT-1M)为1; IP rate limit(x-mbx-used-weight-1m)为5; 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | batchOrders | list | YES | 订单列表,最多支持5个订单 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **其中`batchOrders`应以list of JSON格式填写订单参数** * **例子:** /fapi/v1/batchOrders?batchOrders=\[{"type":"LIMIT","timeInForce":"GTC", \ "symbol":"BTCUSDT","side":"BUY","price":"10001","quantity":"0.001"}\] | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | type | ENUM | YES | 订单类型 `LIMIT`, `MARKET` | | timeInForce | ENUM | NO | 有效方法 | | quantity | DECIMAL | YES | 下单数量 | | reduceOnly | STRING | NO | `true`, `false`; 非双开模式下默认`false`;双开模式下不接受此参数。 | | price | DECIMAL | NO | 委托价格 | | newClientOrderId | STRING | NO | 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值. 必须满足正则规则 `^[\.A-Z\:/a-z0-9_-]{1,36}$` | | newOrderRespType | ENUM | NO | "ACK", "RESULT", 默认 "ACK" | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | selfTradePreventionMode | ENUM | NO | `EXPIRE_TAKER`/ `EXPIRE_MAKER`/ `EXPIRE_BOTH`; 默认`NONE` | | goodTillDate | LONG | NO | TIF为GTD时订单的自动取消时间, 当`timeInforce`为`GTD`时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 | > * 具体订单条件规则,与普通下单一致 > * 批量下单采取并发处理,不保证订单撮合顺序 > * 批量下单的返回内容顺序,与订单列表顺序一致 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "clientOrderId": "testOrder", // 用户自定义的订单号 "cumQty": "0", "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 22542179, // 系统订单号 "avgPrice": "0.00000", // 平均成交价 "origQty": "10", // 原始委托数量 "price": "0", // 委托价格 "reduceOnly": false, // 仅减仓 "side": "SELL", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "0", "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "timeInForce": "GTC", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "updateTime": 1566818724722, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 1693207680000 //订单TIF为GTD时的自动取消时间 }, { "code": -2022, "msg": "ReduceOnly Order is rejected." }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Test New Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#__docusaurus_skipToContent_fallback) 本页总览 下单测试 (TRADE) ============ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- 用于测试订单请求,但不会提交到撮合引擎 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/order/test` 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | type | ENUM | YES | 订单类型 `LIMIT`, `MARKET`, `STOP`, `TAKE_PROFIT`, `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` | | reduceOnly | STRING | NO | `true`, `false`; 非双开模式下默认`false`;双开模式下不接受此参数; 使用`closePosition`不支持此参数。 | | quantity | DECIMAL | NO | 下单数量,使用`closePosition`不支持此参数。 | | price | DECIMAL | NO | 委托价格 | | newClientOrderId | STRING | NO | 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 `^[\.A-Z\:/a-z0-9_-]{1,36}$` | | stopPrice | DECIMAL | NO | 触发价, 仅 `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 需要此参数 | | closePosition | STRING | NO | `true`, `false`;触发后全部平仓,仅支持`STOP_MARKET`和`TAKE_PROFIT_MARKET`;不与`quantity`合用;自带只平仓效果,不与`reduceOnly` 合用 | | activationPrice | DECIMAL | NO | 追踪止损激活价格,仅`TRAILING_STOP_MARKET` 需要此参数, 默认为下单当前市场价格(支持不同`workingType`) | | callbackRate | DECIMAL | NO | 追踪止损回调比例,可取值范围\[0.1, 5\],其中 1代表1% ,仅`TRAILING_STOP_MARKET` 需要此参数 | | timeInForce | ENUM | NO | 有效方法 | | workingType | ENUM | NO | stopPrice 触发类型: `MARK_PRICE`(标记价格), `CONTRACT_PRICE`(合约最新价). 默认 `CONTRACT_PRICE` | | priceProtect | STRING | NO | 条件单触发保护:"TRUE","FALSE", 默认"FALSE". 仅 `STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 需要此参数 | | newOrderRespType | ENUM | NO | "ACK", "RESULT", 默认 "ACK" | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | selfTradePreventionMode | ENUM | NO | `NONE` / `EXPIRE_TAKER`/ `EXPIRE_MAKER`/ `EXPIRE_BOTH`; 默认`NONE` | | goodTillDate | LONG | NO | TIF为GTD时订单的自动取消时间, 当`timeInforce`为`GTD`时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 根据 order `type`的不同,某些参数强制要求,具体如下: | Type | 强制要求的参数 | | --- | --- | | `LIMIT` | `timeInForce`, `quantity`, `price` | | `MARKET` | `quantity` | | `STOP`, `TAKE_PROFIT` | `quantity`, `price`, `stopPrice` | | `STOP_MARKET`, `TAKE_PROFIT_MARKET` | `stopPrice` | | `TRAILING_STOP_MARKET` | `callbackRate` | > * 条件单的触发必须: > > * 如果订单参数`priceProtect`为true: > * 达到触发价时,`MARK_PRICE`(标记价格)与`CONTRACT_PRICE`(合约最新价)之间的价差不能超过改symbol触发保护阈值 > * 触发保护阈值请参考接口`GET /fapi/v1/exchangeInfo` 返回内容相应symbol中"triggerProtect"字段 > * `STOP`, `STOP_MARKET` 止损单: > * 买入: 最新合约价格/标记价格高于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格低于等于触发价`stopPrice` > * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 止盈单: > * 买入: 最新合约价格/标记价格低于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格高于等于触发价`stopPrice` > * `TRAILING_STOP_MARKET` 跟踪止损单: > * 买入: 当合约价格/标记价格区间最低价格低于激活价格`activationPrice`,且最新合约价格/标记价高于等于最低价设定回调幅度。 > * 卖出: 当合约价格/标记价格区间最高价格高于激活价格`activationPrice`,且最新合约价格/标记价低于等于最高价设定回调幅度。 > * `TRAILING_STOP_MARKET` 跟踪止损单如果遇到报错 `{"code": -2021, "msg": "Order would immediately trigger."}` > 表示订单不满足以下条件: > > * 买入: 指定的`activationPrice` 必须小于 latest price > * 卖出: 指定的`activationPrice` 必须大于 latest price > * `newOrderRespType` 如果传 `RESULT`: > > * `MARKET` 订单将直接返回成交结果; > * 配合使用特殊 `timeInForce` 的 `LIMIT` 订单将直接返回成交或过期拒绝结果。 > * `STOP_MARKET`, `TAKE_PROFIT_MARKET` 配合 `closePosition`\=`true`: > > * 条件单触发依照上述条件单触发逻辑 > * 条件触发后,平掉当时持有所有多头仓位(若为卖单)或当时持有所有空头仓位(若为买单) > * 不支持 `quantity` 参数 > * 自带只平仓属性,不支持`reduceOnly`参数 > * 双开模式下,`LONG`方向上不支持`BUY`; `SHORT` 方向上不支持`SELL` > * `selfTradePreventionMode` 仅在 `timeInForce`为`IOC`或`GTC`或`GTD`时生效. > > * 极端行情时,`timeInForce`为`GTD`的订单自动取消可能有一定延迟 > 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "clientOrderId": "testOrder", // 用户自定义的订单号 "cumQty": "0", "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 22542179, // 系统订单号 "avgPrice": "0.00000", // 平均成交价 "origQty": "10", // 原始委托数量 "price": "0", // 委托价格 "reduceOnly": false, // 仅减仓 "side": "SELL", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "0", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "timeInForce": "GTD", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "activatePrice": "9020", // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "priceRate": "0.3", // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段 "updateTime": 1566818724722, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 1693207680000 //订单TIF为GTD时的自动取消时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#http%E8%AF%B7%E6%B1%82) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Position Information V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#__docusaurus_skipToContent_fallback) 本页总览 用户持仓风险V2 (USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询持仓风险 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v2/positionRisk` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **注意** > * 请与账户推送信息`ACCOUNT_UPDATE`配合使用,以满足您的及时性和准确性需求。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 单向持仓模式下: [ { "entryPrice": "0.00000", // 开仓均价 "breakEvenPrice": "0.0", // 盈亏平衡价 "marginType": "isolated", // 逐仓模式或全仓模式 "isAutoAddMargin": "false", "isolatedMargin": "0.00000000", // 逐仓保证金 "leverage": "10", // 当前杠杆倍数 "liquidationPrice": "0", // 参考强平价格 "markPrice": "6679.50671178", // 当前标记价格 "maxNotionalValue": "20000000", // 当前杠杆倍数允许的名义价值上限 "positionAmt": "0.000", // 头寸数量,符号代表多空方向, 正数为多,负数为空 "notional": "0", "isolatedWallet": "0", "symbol": "BTCUSDT", // 交易对 "unRealizedProfit": "0.00000000", // 持仓未实现盈亏 "positionSide": "BOTH", // 持仓方向 "updateTime": 1625474304765 // 更新时间 }] > 双向持仓模式下: [ { "symbol": "BTCUSDT", // 交易对 "positionAmt": "0.001", // 头寸数量,符号代表多空方向, 正数为多,负数为空 "entryPrice": "22185.2", // 开仓均价 "breakEvenPrice": "0.0", // 盈亏平衡价 "markPrice": "21123.05052574", // 当前标记价格 "unRealizedProfit": "-1.06214947", // 持仓未实现盈亏 "liquidationPrice": "19731.45529116", // 参考强平价格 "leverage": "4", // 当前杠杆倍数 "maxNotionalValue": "100000000", // 当前杠杆倍数允许的名义价值上限 "marginType": "cross", // 逐仓模式或全仓模式 "isolatedMargin": "0.00000000", // 逐仓保证金 "isAutoAddMargin": "false", "positionSide": "LONG", // 持仓方向 "notional": "21.12305052", "isolatedWallet": "0", "updateTime": 1655217461579 //更新时间 }, { "symbol": "BTCUSDT", "positionAmt": "0.000", "entryPrice": "0.0", "breakEvenPrice": "0.0", "markPrice": "21123.05052574", "unRealizedProfit": "0.00000000", "liquidationPrice": "0", "leverage": "4", "maxNotionalValue": "100000000", "marginType": "cross", "isolatedMargin": "0.00000000", "isAutoAddMargin": "false", "positionSide": "SHORT", "notional": "0", "isolatedWallet": "0", "updateTime": 0 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Query Users Force Orders | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#__docusaurus_skipToContent_fallback) 本页总览 用户强平单历史 (USER\_DATA) ==================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 查询用户强平单历史 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/forceOrders` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 带symbol **20**, 不带symbol **50** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | autoCloseType | ENUM | NO | "LIQUIDATION": 强平单, "ADL": ADL 减仓单. | | startTime | LONG | NO | | | endTime | LONG | NO | | | limit | INT | NO | Default 50; max 100. | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 如果没有传 "autoCloseType", 强平单和 ADL 减仓单都会被返回 > * 如果没有传"startTime", 只会返回"endTime"之前 7 天内的数据 > * 本接口仅支持最近90天数据的查询 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "orderId": 6071832819, "symbol": "BTCUSDT", "status": "FILLED", "clientOrderId": "autoclose-1596107620040000020", "price": "10871.09", "avgPrice": "10913.21000", "origQty": "0.001", "executedQty": "0.001", "cumQuote": "10.91321", "timeInForce": "IOC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "origType": "LIMIT", "time": 1596107620044, "updateTime": 1596107620087 } { "orderId": 6072734303, "symbol": "BTCUSDT", "status": "FILLED", "clientOrderId": "adl_autoclose", "price": "11023.14", "avgPrice": "10979.82000", "origQty": "0.001", "executedQty": "0.001", "cumQuote": "10.97982", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "SHORT", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "origType": "LIMIT", "time": 1596110725059, "updateTime": 1596110725071 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Position Information V3 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#__docusaurus_skipToContent_fallback) 本页总览 用户持仓风险V3 (USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询持仓风险,仅返回有持仓或挂单的交易对 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v3/positionRisk` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **注意** > * 请与账户推送信息`ACCOUNT_UPDATE`配合使用,以满足您的及时性和准确性需求。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 单向持仓模式下: [ { "symbol": "ADAUSDT", "positionSide": "BOTH", // 持仓方向 "positionAmt": "30", "entryPrice": "0.385", "breakEvenPrice": "0.385077", "markPrice": "0.41047590", "unRealizedProfit": "0.76427700", // 持仓未实现盈亏 "liquidationPrice": "0", "isolatedMargin": "0", "notional": "12.31427700", "marginAsset": "USDT", "isolatedWallet": "0", "initialMargin": "0.61571385", // 初始保证金 "maintMargin": "0.08004280", // 维持保证金 "positionInitialMargin": "0.61571385",// 仓位初始保证金 "openOrderInitialMargin": "0", // 订单初始保证金 "adl": 2, "bidNotional": "0", "askNotional": "0", "updateTime": 1720736417660 // 更新时间 }] > 双向持仓模式下: [ { "symbol": "ADAUSDT", "positionSide": "LONG", "positionAmt": "30", "entryPrice": "0.385", "breakEvenPrice": "0.385077", "markPrice": "0.41047590", "unRealizedProfit": "0.76427700", "liquidationPrice": "0", "isolatedMargin": "0", "notional": "12.31427700", "marginAsset": "USDT", "isolatedWallet": "0", "initialMargin": "0.61571385", "maintMargin": "0.08004280", "positionInitialMargin": "0.61571385", "openOrderInitialMargin": "0", "adl": 2, "bidNotional": "0", "askNotional": "0", "updateTime": 1720736417660 }, { "symbol": "COMPUSDT", "positionSide": "SHORT", "positionAmt": "-1.000", "entryPrice": "70.92841", "breakEvenPrice": "70.900038636", "markPrice": "49.72023376", "unRealizedProfit": "21.20817624", "liquidationPrice": "2260.56757210", "isolatedMargin": "0", "notional": "-49.72023376", "marginAsset": "USDT", "isolatedWallet": "0", "initialMargin": "2.48601168", "maintMargin": "0.49720233", "positionInitialMargin": "2.48601168", "openOrderInitialMargin": "0", "adl": 2, "bidNotional": "0", "askNotional": "0", "updateTime": 1708943511656 }] * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # New Algo Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#__docusaurus_skipToContent_fallback) 本页总览 条件单下单 (TRADE) ============= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 条件单下单 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E6%96%B9%E5%BC%8F "方式的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------- `algoOrder.place` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E8%AF%B7%E6%B1%82 "请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "7731f6b5-8d5e-419c-a424-016b0a5fe8d7", "method": "algoOrder.place", "params": { "algoType": "CONDITIONAL", "apiKey": "autoApiKey7mM4kPWaRuTUypdTEZKG8U8tDjO64xdBJBrmE1nXU2XSwdxGPyXcYx", "newOrderRespType": "RESULT", "positionSide": "SHORT", "price": "160000", "quantity": "1", "recvWindow": "99999999", "side": "SELL", "symbol": "BTCUSDT", "timeInForce": "GTC", "timestamp": 1762506268690, "triggerprice": 120000, "type": "TAKE_PROFIT", "signature": "ec6e529c69fd8193b19484907bc713114eae06259fcab9728dafd5910f9cac5a" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **0** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoType | ENUM | YES | 仅支持 `CONDITIONAL` | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | type | ENUM | YES | 条件订单类型 `STOP`, `TAKE_PROFIT`, `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` | | timeInForce | ENUM | NO | `IOC` or `GTC` or `FOK`, 默认 `GTC` | | quantity | DECIMAL | NO | 下单数量,使用`closePosition`不支持此参数。 | | price | DECIMAL | NO | 委托价格 | | triggerPrice | DECIMAL | NO | 触发价 | | workingType | ENUM | NO | 触发类型: `MARK_PRICE`(标记价格), `CONTRACT_PRICE`(合约最新价). 默认 `CONTRACT_PRICE` | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | closePosition | STRING | NO | `true`, `false`;触发后全部平仓,仅支持`STOP_MARKET`和`TAKE_PROFIT_MARKET`;不与`quantity`合用;自带只平仓效果,不与`reduceOnly` 合用 | | priceProtect | STRING | NO | 条件单触发保护:"TRUE","FALSE", 默认"FALSE". | | reduceOnly | STRING | NO | `true`, `false`; 非双开模式下默认`false`;双开模式下不接受此参数; 使用`closePosition`不支持此参数。 | | activatePrice | DECIMAL | NO | 追踪止损激活价格,仅`TRAILING_STOP_MARKET` 需要此参数, 默认为下单当前市场价格(支持不同`workingType`) | | callbackRate | DECIMAL | NO | 追踪止损回调比例,可取值范围\[0.1, 10\],其中 1代表1% ,仅`TRAILING_STOP_MARKET` 需要此参数 | | clientAlgoId | STRING | NO | 用户自定义的条件订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 `^[\.A-Z\:/a-z0-9_-]{1,36}$` | | newOrderRespType | ENUM | NO | "ACK", "RESULT", 默认 "ACK" | | selfTradePreventionMode | ENUM | NO | `EXPIRE_TAKER`/ `EXPIRE_MAKER`/ `EXPIRE_BOTH`; 默认`NONE` | | goodTillDate | LONG | NO | TIF为GTD时订单的自动取消时间, 当`timeInforce`为`GTD`时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 条件单的触发必须: > > * 如果订单参数`priceProtect`为true: > * 达到触发价时,`MARK_PRICE`(标记价格)与`CONTRACT_PRICE`(合约最新价)之间的价差不能超过改symbol触发保护阈值 > * 触发保护阈值请参考接口`GET /fapi/v1/exchangeInfo` 返回内容相应symbol中"triggerProtect"字段 > * `STOP`, `STOP_MARKET` 止损单: > * 买入: 最新合约价格/标记价格高于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格低于等于触发价`stopPrice` > * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 止盈单: > * 买入: 最新合约价格/标记价格低于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格高于等于触发价`stopPrice` > * `TRAILING_STOP_MARKET` 跟踪止损单: > * 买入: 当合约价格/标记价格区间最低价格低于激活价格`activatePrice`,且最新合约价格/标记价高于等于最低价设定回调幅度。 > * 卖出: 当合约价格/标记价格区间最高价格高于激活价格`activatePrice`,且最新合约价格/标记价低于等于最高价设定回调幅度。 > * `TRAILING_STOP_MARKET` 跟踪止损单如果遇到报错 `{"code": -2021, "msg": "Order would immediately trigger."}` > 表示订单不满足以下条件: > > * 买入: 指定的`activatePrice` 必须小于 latest price > * 卖出: 指定的`activatePrice` 必须大于 latest price > * `STOP_MARKET`, `TAKE_PROFIT_MARKET` 配合 `closePosition`\=`true`: > > * 条件单触发依照上述条件单触发逻辑 > * 条件触发后,平掉当时持有所有多头仓位(若为卖单)或当时持有所有空头仓位(若为买单) > * 不支持 `quantity` 参数 > * 自带只平仓属性,不支持`reduceOnly`参数 > * 双开模式下,`LONG`方向上不支持`BUY`; `SHORT` 方向上不支持`SELL` > * `selfTradePreventionMode` 仅在 `timeInForce`为`IOC`或`GTC`或`GTD`时生效. > 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "06c9dbd8-ccbf-4ecf-a29c-fe31495ac73f", "status": 200, "result": { "algoId": 3000000000003505, "clientAlgoId": "0Xkl1p621E4EryvufmYre1", "algoType": "CONDITIONAL", "orderType": "TAKE_PROFIT", "symbol": "BTCUSDT", "side": "SELL", "positionSide": "SHORT", "timeInForce": "GTC", "quantity": "1.000", "algoStatus": "NEW", "triggerPrice": "120000.00", "price": "160000.00", "icebergQuantity": null, "selfTradePreventionMode": "EXPIRE_MAKER", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "closePosition": false, "priceProtect": false, "reduceOnly": false, "createTime": 1762507264142, "updateTime": 1762507264143, "triggerTime": 0, "goodTillDate": 0 }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 1 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/New-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Modify Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#__docusaurus_skipToContent_fallback) 本页总览 修改订单 (TRADE) ============ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 修改订单功能,当前只支持限价(LIMIT)订单修改,修改后会在撮合队列里重新排序 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- `order.modify` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "c8c271ba-de70-479e-870c-e64951c753d9", "method": "order.modify", "params": { "apiKey": "HMOchcfiT9ZRZnhjp2XjGXhsOBd6msAhKz9joQaWwZ7arcJTlD2hGPHQj1lGdTjR", "orderId": 328971409, "origType": "LIMIT", "positionSide": "SHORT", "price": "43769.1", "priceMatch": "NONE", "quantity": "0.11", "side": "SELL", "symbol": "BTCUSDT", "timestamp": 1703426755754, "signature": "d30c9f0736a307f5a9988d4a40b688662d18324b17367d51421da5484e835923" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10s order rate limit(X-MBX-ORDER-COUNT-10S)为1 1min order rate limit(X-MBX-ORDER-COUNT-1M)为1 IP rate limit(x-mbx-used-weight-1m)为0 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | orderId | LONG | NO | 系统订单号 | | origClientOrderId | STRING | NO | 用户自定义的订单号 | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | quantity | DECIMAL | YES | 下单数量,使用`closePosition`不支持此参数。 | | price | DECIMAL | YES | 委托价格 | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `orderId` 与 `origClientOrderId` 必须至少发送一个,同时发送则以 order id为准 > * `quantity` 与 `price` 均必须发送,这点和 dapi 修改订单不同 > * 当新订单的`quantity` 或 `price`不满足PRICE\_FILTER / PERCENT\_FILTER / LOT\_SIZE限制,修改会被拒绝,原订单依旧被保留 > * 订单会在下列情况下被取消: > * 原订单被部分执行且新订单`quantity` <= `executedQty` > * 原订单是`GTX`,新订单的价格会导致订单立刻执行 > * 同一订单修改次数最多10000次 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "c8c271ba-de70-479e-870c-e64951c753d9", "status": 200, "result": { "orderId": 328971409, "symbol": "BTCUSDT", "status": "NEW", "clientOrderId": "xGHfltUMExx0TbQstQQfRX", "price": "43769.10", "avgPrice": "0.00", "origQty": "0.110", "executedQty": "0.000", "cumQty": "0.000", "cumQuote": "0.00000", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "SHORT", "stopPrice": "0.00", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "goodTillDate": 0, "updateTime": 1703426756190 }, "rateLimits": [ { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 300, "count": 1 }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200, "count": 1 }, { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 1 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Position Information V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#__docusaurus_skipToContent_fallback) 本页总览 用户持仓风险V2 (USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询持仓风险,仅返回有仓位或挂单的交易对 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E6%96%B9%E5%BC%8F "方式的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- `v2/account.position` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E8%AF%B7%E6%B1%82 "请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "method": "v2/account.position", "params": { "apiKey": "xTaDyrmvA9XT2oBHHjy39zyPzKCvMdtH3b9q4xadkAg2dNSJXQGCxzui26L823W2", "symbol": "BTCUSDT", "timestamp": 1702920680303, "signature": "31ab02a51a3989b66c29d40fcdf78216978a60afc6d8dc1c753ae49fa3164a2a" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **注意** > * 请与账户推送信息`ACCOUNT_UPDATE`配合使用,以满足您的及时性和准确性需求。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 单向持仓模式下: { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result":[ { "symbol": "ADAUSDT", "positionSide": "BOTH", // 持仓方向 "positionAmt": "30", "entryPrice": "0.385", "breakEvenPrice": "0.385077", "markPrice": "0.41047590", "unRealizedProfit": "0.76427700", // 持仓未实现盈亏 "liquidationPrice": "0", "isolatedMargin": "0", "notional": "12.31427700", "marginAsset": "USDT", "isolatedWallet": "0", "initialMargin": "0.61571385", // 初始保证金 "maintMargin": "0.08004280", // 维持保证金 "positionInitialMargin": "0.61571385",// 仓位初始保证金 "openOrderInitialMargin": "0", // 订单初始保证金 "adl": 2, "bidNotional": "0", "askNotional": "0", "updateTime": 1720736417660 // 更新时间 } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} > 双向持仓模式下: { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": [ { "symbol": "ADAUSDT", "positionSide": "LONG", "positionAmt": "30", "entryPrice": "0.385", "breakEvenPrice": "0.385077", "markPrice": "0.41047590", "unRealizedProfit": "0.76427700", "liquidationPrice": "0", "isolatedMargin": "0", "notional": "12.31427700", "marginAsset": "USDT", "isolatedWallet": "0", "initialMargin": "0.61571385", "maintMargin": "0.08004280", "positionInitialMargin": "0.61571385", "openOrderInitialMargin": "0", "adl": 2, "bidNotional": "0", "askNotional": "0", "updateTime": 1720736417660 }, { "symbol": "COMPUSDT", "positionSide": "SHORT", "positionAmt": "-1.000", "entryPrice": "70.92841", "breakEvenPrice": "70.900038636", "markPrice": "49.72023376", "unRealizedProfit": "21.20817624", "liquidationPrice": "2260.56757210", "isolatedMargin": "0", "notional": "-49.72023376", "marginAsset": "USDT", "isolatedWallet": "0", "initialMargin": "2.48601168", "maintMargin": "0.49720233", "positionInitialMargin": "2.48601168", "openOrderInitialMargin": "0", "adl": 2, "bidNotional": "0", "askNotional": "0", "updateTime": 1708943511656 } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Cancel Algo Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#__docusaurus_skipToContent_fallback) 本页总览 条件单撤销订单 (TRADE) =============== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 撤销条件订单 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ `algoOrder.cancel` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ { "id": "5633b6a2-90a9-4192-83e7-925c90b6a2fd", "method": "algoOrder.cancel", "params": { "apiKey": "HsOehcfih8ZRxnhjp2XjGXhsOBd6msAhKz9joQaWwZ7arcJTlD2hGOGQj1lGdTjR", "algoId": 283194212, "clientAlgoId": "DolwRKnQNjoc1E9Bbh03ER", "timestamp": 1703439070722, "signature": "b09c49815b4e3f1f6098cd9fbe26a933a9af79803deaaaae03c29f719c08a8a8" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | algoId | LONG | NO | 系统订单号 | | clientAlgoId | STRING | NO | 用户自定义的订单号 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * `algoId` 与 `clientAlgoId` 必须至少发送一个 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "unique-cancel-request-id-5678", "status": 200, "result": { "algoId": 2000000002162519, "clientAlgoId": "rDMG8WSde6LkyMNtk6s825", "code": "200", "msg": "success" }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 6 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Algo-Order#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Self Trade Prevention | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#__docusaurus_skipToContent_fallback) 本页总览 自我交易预防 (Self Trade Prevention - STP) 常见问题 ========================================= 什么是 Self Trade Prevention - STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E4%BB%80%E4%B9%88%E6%98%AF-self-trade-prevention---stp "什么是 Self Trade Prevention - STP?的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 自我交易预防是指阻止订单与来自同一账户或者同一 `tradeGroupId` 账户的订单交易。 什么是自我交易(self-trade)?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E4%BB%80%E4%B9%88%E6%98%AF%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93self-trade "什么是自我交易(self-trade)?的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 在以下任一情况下都可能发生自我交易: * 属于同一账户的订单之间交易。 * 属于相同 `tradeGroupId` 的账户的订单之间交易。 STP 触发时会发生什么?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#stp-%E8%A7%A6%E5%8F%91%E6%97%B6%E4%BC%9A%E5%8F%91%E7%94%9F%E4%BB%80%E4%B9%88 "STP 触发时会发生什么?的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 如果订单会触发自我交易,系统将执行三种可能的模式: `EXPIRE_TAKER` - 此模式通过立即使吃单者(taker)的剩余数量过期来预防交易。 `EXPIRE_MAKER` - 此模式通过立即使潜在挂单者(maker)的剩余数量过期来预防交易。 `EXPIRE_BOTH` - 此模式通过立即同时使吃单和挂单者的剩余数量过期来预防交易。 STP 的发生取决于 **Taker 订单** 的 STP 模式。 因此,订单薄上的订单的 STP 模式不再有效果,并且将在所有未来的订单处理中被忽略。 如何在订单上设置自我交易预防 ?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%A6%82%E4%BD%95%E5%9C%A8%E8%AE%A2%E5%8D%95%E4%B8%8A%E8%AE%BE%E7%BD%AE%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93%E9%A2%84%E9%98%B2- "如何在订单上设置自我交易预防 ?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 自我交易预防可以通过下单接口的参数`selfTradePreventionMode`设置,相关接口如下: * POST `/fapi/v1/order` * POST `/fapi/v1/batchOrders` 什么是交易组 Id(Trade Group Id)?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E4%BB%80%E4%B9%88%E6%98%AF%E4%BA%A4%E6%98%93%E7%BB%84-idtrade-group-id "什么是交易组 Id(Trade Group Id)?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 属于同一 `tradeGroupId` 的账户被视为同一交易组。相同交易组成员提交的订单有 STP 资格。 每个账户可以从 `GET /fapi/v1/accountConfig`(REST API)确认账户是否属于同一个 `tradeGroupId`。 `tradeGroupId` 也存在 `GET /api/v3/preventedMatches`(Rest API)或 `myPreventedMatches`(Websocket API)的响应中。 如果该值为 `-1`,这表示账户未设置 `tradeGroupId`,因此 STP 只能发生在同一账户的订单之间。 我们将在之后的更新提供将子账户设置为同一`tradeGroupId`的功能 如何知道有那些交易对支持 STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E6%9C%89%E9%82%A3%E4%BA%9B%E4%BA%A4%E6%98%93%E5%AF%B9%E6%94%AF%E6%8C%81-stp "如何知道有那些交易对支持 STP?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 所有`GET fapi/v1/exchangeInfo`中的交易对都支持`selfTradePreventionMode`。 哪些订单类型支持 STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%93%AA%E4%BA%9B%E8%AE%A2%E5%8D%95%E7%B1%BB%E5%9E%8B%E6%94%AF%E6%8C%81-stp "哪些订单类型支持 STP?的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `LIMIT`/`MARKET`/`STOP`/`TAKE_PROFIT`/`STOP_MARKET`/`TAKE_PROFIT_MARKET`/`TRAILING_STOP_MARKET` 在Time in force(timeInForce)设置为`GTC`/ `IOC`/ `GTD`时支持STP。 当Time in force(timeInForce)为`FOK` 或 `GTX`时订单STP设置不生效 改单是否支持 STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E6%94%B9%E5%8D%95%E6%98%AF%E5%90%A6%E6%94%AF%E6%8C%81-stp "改单是否支持 STP?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 目前不支持。改单会将订单的`selfTradePreventionMode` 重制为 `NONE` 如何知道订单因为 STP 而过期?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E8%AE%A2%E5%8D%95%E5%9B%A0%E4%B8%BA-stp-%E8%80%8C%E8%BF%87%E6%9C%9F "如何知道订单因为 STP 而过期?的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 订单的状态会是 `EXPIRED_IN_MATCH`. 在用户信息流推送 `ORDER_TRADE_UPDATE`,如果订单因为STP过期字段`X`会显示`EXPIRED_IN_MATCH` { "e":"ORDER_TRADE_UPDATE", // Event Type "E":1568879465651, // Event Time "T":1568879465650, // Transaction Time "o":{ "s":"BTCUSDT", // Symbol "c":"TEST", // Client Order Id // special client order id: // starts with "autoclose-": liquidation order // "adl_autoclose": ADL auto close order // "settlement_autoclose-": settlement order for delisting or delivery "S":"SELL", // Side "o":"TRAILING_STOP_MARKET", // Order Type "f":"GTC", // Time in Force "q":"0.001", // Original Quantity "p":"0", // Original Price "ap":"0", // Average Price "sp":"7103.04", // Stop Price. Please ignore with TRAILING_STOP_MARKET order "x":"EXPIRED", // Execution Type "X":"EXPIRED_IN_MATCH", // Order Status "i":8886774, // Order Id "l":"0", // Order Last Filled Quantity "z":"0", // Order Filled Accumulated Quantity "L":"0", // Last Filled Price "N":"USDT", // Commission Asset, will not push if no commission "n":"0", // Commission, will not push if no commission "T":1568879465650, // Order Trade Time "t":0, // Trade Id "b":"0", // Bids Notional "a":"9.91", // Ask Notional "m":false, // Is this trade the maker side? "R":false, // Is this reduce only "wt":"CONTRACT_PRICE", // Stop Price Working Type "ot":"TRAILING_STOP_MARKET", // Original Order Type "ps":"LONG", // Position Side "cp":false, // If Close-All, pushed with conditional order "AP":"7476.89", // Activation Price, only puhed with TRAILING_STOP_MARKET order "cr":"5.0", // Callback Rate, only puhed with TRAILING_STOP_MARKET order "pP": false, // ignore "si": 0, // ignore "ss": 0, // ignore "rp":"0", // Realized Profit of the trade "V": "EXPIRE_MAKER", // selfTradePreventionMode "pm":"QUEUE", // price match type "gtd":1768879465650 // good till date }} STP 的一些示例:[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#stp-%E7%9A%84%E4%B8%80%E4%BA%9B%E7%A4%BA%E4%BE%8B "STP 的一些示例:的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- 假设以下示例的所有订单都是在同一个账户下发送。 **情况 A - 用户发送带有 `EXPIRE_MAKER` 的订单,该订单将与订单薄上已有的订单撮合。** Maker 订单 1: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20002 selfTradePreventionMode=EXPIRE_MAKERMaker 订单 2: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20001 selfTradePreventionMode=EXPIRE_MAKERTaker 订单 1: symbol=BTCUSDT side=SELL type=LIMIT quantity=1 price=20000 selfTradePreventionMode=EXPIRE_MAKER **结果:** : 由于 STP,订单薄上的订单将会过期,taker 订单将继续在订单薄。 Maker 订单 1 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "FILLED", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "20002", "origQty": "1", "executedQty": "1", "cumQuote": "20002", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Maker 订单 2 { "orderId": 292864711, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker2", "price": "20001", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单的响应 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "PARTIALLY_FILLED", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "20002", "origQty": "2", "executedQty": "1", "cumQuote": "20002", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 B - 用户发送带有 `EXPIRE_TAKER` 的订单,该订单将与订单薄上已有的订单撮合。** Maker 订单 1: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20002 selfTradePreventionMode=EXPIRE_MAKERMaker 订单 2: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20001 selfTradePreventionMode=EXPIRE_MAKERTaker 订单 1: symbol=BTCUSDT side=SELL type=LIMIT quantity=2 price=3 selfTradePreventionMode=EXPIRE_TAKER **结果:** : 已经在订单薄上的订单将保留,而taker订单将过期。 Maker 订单 1 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "FILLED", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Maker 订单 2 { "orderId": 292864711, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker2", "price": "20001", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单的状态 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_TAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 C - 用户发送带有 `EXPIRE_BOTH` 的订单,该订单将与订单薄上已有的订单撮合。** Maker 订单: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20002 selfTradePreventionMode=EXPIRE_MAKERTaker 订单: symbol=BTCUSDT side=SELL type=LIMIT quantity=3 price=20000 selfTradePreventionMode=EXPIRE_BOTH **结果:** 两个订单都将过期。 Maker 订单 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_BOTH", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 D - 用户在订单薄上有一个带有 `EXPIRE_MAKER` 的订单,然后发送一个带有 `EXPIRE_TAKER` 的新订单,该订单将与订单薄上的订单撮合。** Maker Order: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=1 selfTradePreventionMode=EXPIRE_MAKERTaker Order: symbol=BTCUSDT side=SELL type=LIMIT quantity=1 price=1 selfTradePreventionMode=EXPIRE_TAKER **结果:** 将使用 taker 订单的 STP 模式,因此 taker 订单将过期。 Maker 订单 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "NEW", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_TAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 E - 用户发送带有 `EXPIRE_MAKER` 的市价订单,该订单将与订单薄上已有的订单撮合。** Maker 订单: symbol=ABCDEF side=BUY type=LIMIT quantity=1 price=1 selfTradePreventionMode=EXPIRE_MAKERTaker 订单: symbol=ABCDEF side=SELL type=MARKET quantity=3 selfTradePreventionMode=EXPIRE_MAKER **结果:** 由于 STP,订单薄上的订单会过期,状态为 `EXPIRED_IN_MATCH`。 由于订单薄上的流动性低,新订单也已过期但状态为 `EXPIRED`。 Maker 订单 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} * [什么是 Self Trade Prevention - STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E4%BB%80%E4%B9%88%E6%98%AF-self-trade-prevention---stp) * [什么是自我交易(self-trade)?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E4%BB%80%E4%B9%88%E6%98%AF%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93self-trade) * [STP 触发时会发生什么?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#stp-%E8%A7%A6%E5%8F%91%E6%97%B6%E4%BC%9A%E5%8F%91%E7%94%9F%E4%BB%80%E4%B9%88) * [如何在订单上设置自我交易预防 ?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%A6%82%E4%BD%95%E5%9C%A8%E8%AE%A2%E5%8D%95%E4%B8%8A%E8%AE%BE%E7%BD%AE%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93%E9%A2%84%E9%98%B2-) * [什么是交易组 Id(Trade Group Id)?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E4%BB%80%E4%B9%88%E6%98%AF%E4%BA%A4%E6%98%93%E7%BB%84-idtrade-group-id) * [如何知道有那些交易对支持 STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E6%9C%89%E9%82%A3%E4%BA%9B%E4%BA%A4%E6%98%93%E5%AF%B9%E6%94%AF%E6%8C%81-stp) * [哪些订单类型支持 STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%93%AA%E4%BA%9B%E8%AE%A2%E5%8D%95%E7%B1%BB%E5%9E%8B%E6%94%AF%E6%8C%81-stp) * [改单是否支持 STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E6%94%B9%E5%8D%95%E6%98%AF%E5%90%A6%E6%94%AF%E6%8C%81-stp) * [如何知道订单因为 STP 而过期?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E8%AE%A2%E5%8D%95%E5%9B%A0%E4%B8%BA-stp-%E8%80%8C%E8%BF%87%E6%9C%9F) * [STP 的一些示例:](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq#stp-%E7%9A%84%E4%B8%80%E4%BA%9B%E7%A4%BA%E4%BE%8B) --- # Position Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#__docusaurus_skipToContent_fallback) 本页总览 用户持仓风险V2 (USER\_DATA) ===================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询持仓风险 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E6%96%B9%E5%BC%8F "方式的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- `account.position` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E8%AF%B7%E6%B1%82 "请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "method": "account.position", "params": { "apiKey": "xTaDyrmvA9XT2oBHHjy39zyPzKCvMdtH3b9q4xadkAg2dNSJXQGCxzui26L823W2", "symbol": "BTCUSDT", "timestamp": 1702920680303, "signature": "31ab02a51a3989b66c29d40fcdf78216978a60afc6d8dc1c753ae49fa3164a2a" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | NO | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | **注意** > * 请与账户推送信息`ACCOUNT_UPDATE`配合使用,以满足您的及时性和准确性需求。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 单向持仓模式下: { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result":[ { "entryPrice": "0.00000", // 开仓均价 "breakEvenPrice": "0.0", // 盈亏平衡价 "marginType": "isolated", // 逐仓模式或全仓模式 "isAutoAddMargin": "false", "isolatedMargin": "0.00000000", // 逐仓保证金 "leverage": "10", // 当前杠杆倍数 "liquidationPrice": "0", // 参考强平价格 "markPrice": "6679.50671178", // 当前标记价格 "maxNotionalValue": "20000000", // 当前杠杆倍数允许的名义价值上限 "positionAmt": "0.000", // 头寸数量,符号代表多空方向, 正数为多,负数为空 "notional": "0", "isolatedWallet": "0", "symbol": "BTCUSDT", // 交易对 "unRealizedProfit": "0.00000000", // 持仓未实现盈亏 "positionSide": "BOTH", // 持仓方向 "updateTime": 1625474304765 // 更新时间 } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} > 双向持仓模式下: { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": [ { "symbol": "BTCUSDT", "positionAmt": "0.001", "entryPrice": "22185.2", "breakEvenPrice": "0.0", "markPrice": "21123.05052574", "unRealizedProfit": "-1.06214947", "liquidationPrice": "19731.45529116", "leverage": "4", "maxNotionalValue": "100000000", "marginType": "cross", "isolatedMargin": "0.00000000", "isAutoAddMargin": "false", "positionSide": "LONG", "notional": "21.12305052", "isolatedWallet": "0", "updateTime": 1655217461579 }, { "symbol": "BTCUSDT", "positionAmt": "0.000", "entryPrice": "0.0", "breakEvenPrice": "0.0", "markPrice": "21123.05052574", "unRealizedProfit": "0.00000000", "liquidationPrice": "0", "leverage": "4", "maxNotionalValue": "100000000", "marginType": "cross", "isolatedMargin": "0.00000000", "isAutoAddMargin": "false", "positionSide": "SHORT", "notional": "0", "isolatedWallet": "0", "updateTime": 0 }], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api/Position-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Account Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#__docusaurus_skipToContent_fallback) 本页总览 账户信息 (USER\_DATA) ================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 现有账户信息。 用户在单资产模式和多资产模式下会看到不同结果,响应部分的注释解释了两种模式下的不同。 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E6%96%B9%E5%BC%8F "方式的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- `account.status` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E8%AF%B7%E6%B1%82 "请求的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "method": "account.status", "params": { "apiKey": "xTaDyrmvA9XT2oBHHjy39zyPzKCvMdtH3b9q4xadkAg2dNSJXQGCxzui26L823W2", "timestamp": 1702620814781, "signature": "6bb98ef84170c70ba3d01f44261bfdf50fef374e551e590de22b5c3b729b1d8c" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 单资产模式 { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": { "feeTier": 0, // 手续费等级 "canTrade": true, // 是否可以交易 "canDeposit": true, // 是否可以入金 "canWithdraw": true, // 是否可以出金 "updateTime": 0, // 保留字段,请忽略 "multiAssetsMargin": false, "tradeGroupId": -1, "totalInitialMargin": "0.00000000", // 当前所需起始保证金总额(存在逐仓请忽略), 仅计算usdt资产 "totalMaintMargin": "0.00000000", // 维持保证金总额, 仅计算usdt资产 "totalWalletBalance": "23.72469206", // 账户总余额, 仅计算usdt资产 "totalUnrealizedProfit": "0.00000000", // 持仓未实现盈亏总额, 仅计算usdt资产 "totalMarginBalance": "23.72469206", // 保证金总余额, 仅计算usdt资产 "totalPositionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格), 仅计算usdt资产 "totalOpenOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格), 仅计算usdt资产 "totalCrossWalletBalance": "23.72469206", // 全仓账户余额, 仅计算usdt资产 "totalCrossUnPnl": "0.00000000", // 全仓持仓未实现盈亏总额, 仅计算usdt资产 "availableBalance": "23.72469206", // 可用余额, 仅计算usdt资产 "maxWithdrawAmount": "23.72469206" // 最大可转出余额, 仅计算usdt资产 "assets": [ { "asset": "USDT", //资产 "walletBalance": "23.72469206", //余额 "unrealizedProfit": "0.00000000", // 未实现盈亏 "marginBalance": "23.72469206", // 保证金余额 "maintMargin": "0.00000000", // 维持保证金 "initialMargin": "0.00000000", // 当前所需起始保证金 "positionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格) "crossWalletBalance": "23.72469206", //全仓账户余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "126.72469206", // 可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "marginAvailable": true, // 是否可用作联合保证金 "updateTime": 1625474304765 //更新时间 }, { "asset": "BUSD", //资产 "walletBalance": "103.12345678", //余额 "unrealizedProfit": "0.00000000", // 未实现盈亏 "marginBalance": "103.12345678", // 保证金余额 "maintMargin": "0.00000000", // 维持保证金 "initialMargin": "0.00000000", // 当前所需起始保证金 "positionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格) "crossWalletBalance": "103.12345678", //全仓账户余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "126.72469206", // 可用余额 "maxWithdrawAmount": "103.12345678", // 最大可转出余额 "marginAvailable": true, // 否可用作联合保证金 "updateTime": 0 // 更新时间 } ], "positions": [ // 头寸,将返回所有市场symbol。 //根据用户持仓模式展示持仓方向,即单向模式下只返回BOTH持仓情况,双向模式下只返回 LONG 和 SHORT 持仓情况 { "symbol": "BTCUSDT", // 交易对 "initialMargin": "0", // 当前所需起始保证金(基于最新标记价格) "maintMargin": "0", //维持保证金 "unrealizedProfit": "0.00000000", // 持仓未实现盈亏 "positionInitialMargin": "0", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0", // 当前挂单所需起始保证金(基于最新标记价格) "leverage": "100", // 杠杆倍率 "isolated": true, // 是否是逐仓模式 "entryPrice": "0.00000", // 持仓成本价 "maxNotional": "250000", // 当前杠杆下用户可用的最大名义价值 "bidNotional": "0", // 买单净值,忽略 "askNotional": "0", // 卖单净值,忽略 "positionSide": "BOTH", // 持仓方向 "positionAmt": "0", // 持仓数量 "updateTime": 0 // 更新时间 } ] }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} > 多资产模式 { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": { "feeTier": 0, // 手续费等级 "canTrade": true, // 是否可以交易 "canDeposit": true, // 是否可以入金 "canWithdraw": true, // 是否可以出金 "updateTime": 0, // 保留字段,请忽略 "multiAssetsMargin": true, "tradeGroupId": -1, "totalInitialMargin": "0.00000000", // 以USD计价的所需起始保证金总额 "totalMaintMargin": "0.00000000", // 以USD计价的维持保证金总额 "totalWalletBalance": "126.72469206", // 以USD计价的账户总余额 "totalUnrealizedProfit": "0.00000000", // 以USD计价的持仓未实现盈亏总额 "totalMarginBalance": "126.72469206", // 以USD计价的保证金总余额 "totalPositionInitialMargin": "0.00000000", // 以USD计价的持仓所需起始保证金(基于最新标记价格) "totalOpenOrderInitialMargin": "0.00000000", // 以USD计价的当前挂单所需起始保证金(基于最新标记价格) "totalCrossWalletBalance": "126.72469206", // 以USD计价的全仓账户余额 "totalCrossUnPnl": "0.00000000", // 以USD计价的全仓持仓未实现盈亏总额 "availableBalance": "126.72469206", // 以USD计价的可用余额 "maxWithdrawAmount": "126.72469206" // 以USD计价的最大可转出余额 "assets": [ { "asset": "USDT", //资产 "walletBalance": "23.72469206", //余额 "unrealizedProfit": "0.00000000", // 未实现盈亏 "marginBalance": "23.72469206", // 保证金余额 "maintMargin": "0.00000000", // 维持保证金 "initialMargin": "0.00000000", // 当前所需起始保证金 "positionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格) "crossWalletBalance": "23.72469206", //全仓账户余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "23.72469206", // 可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "marginAvailable": true, // 是否可用作联合保证金 "updateTime": 1625474304765 //更新时间 }, { "asset": "BUSD", //资产 "walletBalance": "103.12345678", //余额 "unrealizedProfit": "0.00000000", // 未实现盈亏 "marginBalance": "103.12345678", // 保证金余额 "maintMargin": "0.00000000", // 维持保证金 "initialMargin": "0.00000000", // 当前所需起始保证金 "positionInitialMargin": "0.00000000", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0.00000000", // 当前挂单所需起始保证金(基于最新标记价格) "crossWalletBalance": "103.12345678", //全仓账户余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "103.12345678", // 可用余额 "maxWithdrawAmount": "103.12345678", // 最大可转出余额 "marginAvailable": true, // 否可用作联合保证金 "updateTime": 0 // 更新时间 } ], "positions": [ // 头寸,将返回所有市场symbol。 //根据用户持仓模式展示持仓方向,即单向模式下只返回BOTH持仓情况,双向模式下只返回 LONG 和 SHORT 持仓情况 { "symbol": "BTCUSDT", // 交易对 "initialMargin": "0", // 当前所需起始保证金(基于最新标记价格) "maintMargin": "0", //维持保证金 "unrealizedProfit": "0.00000000", // 持仓未实现盈亏 "positionInitialMargin": "0", // 持仓所需起始保证金(基于最新标记价格) "openOrderInitialMargin": "0", // 当前挂单所需起始保证金(基于最新标记价格) "leverage": "100", // 杠杆倍率 "isolated": true, // 是否是逐仓模式 "entryPrice": "0.00000", // 持仓成本价 "breakEvenPrice": "0.0", // 持仓成本价 "maxNotional": "250000", // 当前杠杆下用户可用的最大名义价值 "bidNotional": "0", // 买单净值,忽略 "askNotional": "0", // 买单净值,忽略 "positionSide": "BOTH", // 持仓方向 "positionAmt": "0", // 持仓数量 "updateTime": 0 // 更新时间 } ] }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api/Account-Information#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Classic Portfolio Margin Account Information | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#__docusaurus_skipToContent_fallback) 本页总览 查询经典统一账户账户信息 (USER\_DATA)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E6%9F%A5%E8%AF%A2%E7%BB%8F%E5%85%B8%E7%BB%9F%E4%B8%80%E8%B4%A6%E6%88%B7%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data "查询经典统一账户账户信息 (USER_DATA)的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 查询经典统一账户当前账户信息 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- GET `/fapi/v1/pmAccountInfo` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | asset | STRING | YES | | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | > * 最大可转出余额指可以转出到现货钱包到金额。 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "maxWithdrawAmountUSD": "1627523.32459208", //经典统一账户以USD计价的最大可转出余额 "asset": "BTC", // 资产 "maxWithdrawAmount": "27.43689636", //最大可转出余额} * [查询经典统一账户账户信息 (USER\_DATA)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E6%9F%A5%E8%AF%A2%E7%BB%8F%E5%85%B8%E7%BB%9F%E4%B8%80%E8%B4%A6%E6%88%B7%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data) * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/portfolio-margin-endpoints#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Connect | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams#__docusaurus_skipToContent_fallback) 账户信息流连接 ======= * 本篇所列出REST接口的baseurl **[https://fapi.binance.com](https://fapi.binance.com/) ** * 用于订阅账户数据的 `listenKey` 从创建时刻起有效期为60分钟 * 可以通过`PUT`一个`listenKey`延长60分钟有效期,如收到`-1125`报错提示此`listenKey`不存在,建议重新使用`POST /fapi/v1/listenKey`生成`listenKey` * 可以通过`DELETE`一个 `listenKey` 立即关闭当前数据流,并使该`listenKey` 无效 * 在具有有效`listenKey`的帐户上执行`POST`将返回当前有效的`listenKey`并将其有效期延长60分钟 * 本篇所列出的websocket接口,连接方式如下: * Base Url: **wss://fstream.binance.com** * 订阅账户数据流的stream名称为 **/ws/\`\`** * 连接样例: * `wss://fstream.binance.com/ws/XaEAKTsQSRLZAGH9tuIu37plSRsdjmlAVBoNYPUITlTAko1WI22PgmBMpI1rS8Yh` * 每个链接有效期不超过24小时,请妥善处理断线重连。 * 单一账户,单一连接的推送数据流消息可以保证时间序; **强烈建议您使用 E 字段进行排序** * 考虑到剧烈行情下, RESTful接口可能存在查询延迟,我们强烈建议您优先从Websocket user data stream推送的消息来获取订单,仓位等信息。 --- # Close User Data Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#__docusaurus_skipToContent_fallback) 本页总览 关闭listenKey (USER\_STREAM) ========================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 关闭某账户数据流 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- DELETE `/fapi/v1/listenKey` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- None 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Conditional Order Trigger Reject | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#__docusaurus_skipToContent_fallback) 本页总览 条件订单(TP/SL)触发后拒绝更新推送 ==================== 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `CONDITIONAL_ORDER_TRIGGER_REJECT` 在止盈止损单触发后被拒绝时推送 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#url-path "URL PATH的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `CONDITIONAL_ORDER_TRIGGER_REJECT` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"CONDITIONAL_ORDER_TRIGGER_REJECT", // 事件类型 "E":1685517224945, // 事件时间 "T":1685517224955, // 撮合时间 "or":{ "s":"ETHUSDT", // 交易对 "i":155618472834, // 订单号 "r":"Due to the order could not be filled immediately, the FOK order has been rejected. The order will not be recorded in the order history", // 拒绝原因 }} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Conditional-Order-Trigger-Reject#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Futures Account Balance V2 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#__docusaurus_skipToContent_fallback) 本页总览 账户余额V2 (USER\_DATA) =================== 查询账户余额 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E6%96%B9%E5%BC%8F "方式的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- `v2/account.balance` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E8%AF%B7%E6%B1%82 "请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------- { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "method": "v2/account.balance", "params": { "apiKey": "xTaDyrmvA9XT2oBHHjy39zyPzKCvMdtH3b9q4xadkAg2dNSJXQGCxzui26L823W2", "timestamp": 1702561978458, "signature": "208bb94a26f99aa122b1319490ca9cb2798fccc81d9b6449521a26268d53217a" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ **5** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ { "id": "605a6d20-6588-4cb9-afa0-b0ab087507ba", "status": 200, "result": [ { "accountAlias": "SgsR", // 账户唯一识别码 "asset": "USDT", // 资产 "balance": "122607.35137903", // 总余额 "crossWalletBalance": "23.72469206", // 全仓余额 "crossUnPnl": "0.00000000" // 全仓持仓未实现盈亏 "availableBalance": "23.72469206", // 下单可用余额 "maxWithdrawAmount": "23.72469206", // 最大可转出余额 "marginAvailable": true, // 是否可用作联合保证金 "updateTime": 1617939110373 } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 20 } ]} * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/account/websocket-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Liquidation Order Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#__docusaurus_skipToContent_fallback) 本页总览 强平订单 ==== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 推送特定`symbol`的强平订单快照信息。 1000ms内至多仅推送一条最近的强平订单作为快照 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#url-path "URL PATH的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------    `@forceOrder` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1000ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"forceOrder",                   // 事件类型 "E":1568014460893,                  // 事件时间 "o":{ "s":"BTCUSDT",                   // 交易对 "S":"SELL",                      // 订单方向 "o":"LIMIT",                     // 订单类型 "f":"IOC",                       // 有效方式 "q":"0.014",                     // 订单数量 "p":"9910",                      // 订单价格 "ap":"9910",                     // 平均价格 "X":"FILLED",                    // 订单状态 "l":"0.014",                     // 订单最近成交量 "z":"0.014",                     // 订单累计成交量 "T":1568014460893,          // 交易时间 }} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Multi Assets Mode Asset Index | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#__docusaurus_skipToContent_fallback) 本页总览 多资产模式资产汇率指数 =========== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 多资产模式资产价格指数 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#stream-name "Stream Name的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `!assetIndex@arr`OR `@assetIndex` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1s** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "e":"assetIndexUpdate", "E":1686749230000, "s":"ADAUSD", // asset index symbol "i":"0.27462452", // 指数价格 "b":"0.10000000", // bid估值折扣 "a":"0.10000000", // ask估值折扣 "B":"0.24716207", // bid价格 "A":"0.30208698", // ask价格 "q":"0.05000000", // 自动兑换bid估值折扣 "g":"0.05000000", // 自动兑换ask估值折扣 "Q":"0.26089330", // 自动兑换bid价格 "G":"0.28835575" // 自动兑换ask价格 }, { "e":"assetIndexUpdate", "E":1686749230000, "s":"USDTUSD", "i":"0.99987691", "b":"0.00010000", "a":"0.00010000", "B":"0.99977692", "A":"0.99997689", "q":"0.00010000", "g":"0.00010000", "Q":"0.99977692", "G":"0.99997689" }] * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Multi-Assets-Mode-Asset-Index#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Partial Book Depth Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#__docusaurus_skipToContent_fallback) 本页总览 有限档深度信息 ======= 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 推送有限档深度信息。levels表示几档买卖单信息, 可选 5/10/20档 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#url-path "URL PATH的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/public` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@depth` 或 `@depth@500ms` 或 `@depth@100ms`. **注意:** 响应消息不包含RPI订单,其不可见。 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **250ms** 或 **500ms** 或 **100ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "e": "depthUpdate", // 事件类型 "E": 1571889248277, // 事件时间 "T": 1571889248276, // 交易时间 "s": "BTCUSDT", "U": 390497796, // 从上次推送至今新增的第一个 update Id "u": 390497878, // 从上次推送至今新增的最后一个 update Id "pu": 390497794, // 上次推送的最后一个update Id(即上条消息的‘u’) "b": [ // 买方 [ "7403.89", // 价格 "0.002" // 数量 ], [ "7403.90", "3.906" ], [ "7404.00", "1.428" ], [ "7404.85", "5.239" ], [ "7405.43", "2.562" ] ], "a": [ // 卖方 [ "7405.96", // 价格 "3.340" // 数量 ], [ "7406.63", "4.525" ], [ "7407.08", "2.475" ], [ "7407.15", "4.800" ], [ "7407.20", "0.175" ] ]} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Partial-Book-Depth-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Order Book | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#__docusaurus_skipToContent_fallback) 本页总览 深度信息 ==== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取有限档订单薄信息 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ `depth` **注意:** 响应消息不包含RPI订单,其不可见。 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------ { "id": "51e2affb-0aba-4821-ba75-f2625006eb43", "method": "depth", "params": { "symbol": "BTCUSDT" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | limit | 权重 | | --- | --- | | 5, 10, 20, 50 | 2 | | 100 | 5 | | 500 | 10 | | 1000 | 20 | 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | limit | INT | NO | 默认 500; 可选值:\[5, 10, 20, 50, 100, 500, 1000\] | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "51e2affb-0aba-4821-ba75-f2625006eb43", "status": 200, "result": { "lastUpdateId": 1027024, "E": 1589436922972, // 消息时间 "T": 1589436922959, // 撮合引擎时间 "bids": [ // 买单 [ "4.00000000", // 价格 "431.00000000" // 数量 ] ], "asks": [ // 卖单 [ "4.00000200", // 价格 "12.00000000" // 数量 ] ] }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 5 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/websocket-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # New Order | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#__docusaurus_skipToContent_fallback) 本页总览 下单 (TRADE) ========== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- 下单 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/order` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- 10s order rate limit(X-MBX-ORDER-COUNT-10S)为1; 1min order rate limit(X-MBX-ORDER-COUNT-1M)为1; IP rate limit(x-mbx-used-weight-1m)为0 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | symbol | STRING | YES | 交易对 | | side | ENUM | YES | 买卖方向 `SELL`, `BUY` | | positionSide | ENUM | NO | 持仓方向,单向持仓模式下非必填,默认且仅可填`BOTH`;在双向持仓模式下必填,且仅可选择 `LONG` 或 `SHORT` | | type | ENUM | YES | 订单类型 `LIMIT`, `MARKET`, `STOP`, `TAKE_PROFIT`, `STOP_MARKET`, `TAKE_PROFIT_MARKET`, `TRAILING_STOP_MARKET` | | timeInForce | ENUM | NO | | | reduceOnly | STRING | NO | `true`, `false`; 非双开模式下默认`false`;双开模式下不接受此参数 | | quantity | DECIMAL | NO | | | price | DECIMAL | NO | 委托价格 | | newClientOrderId | STRING | NO | 用户自定义的订单号,不可以重复出现在挂单中。如空缺系统会自动赋值。必须满足正则规则 `^[\.A-Z\:/a-z0-9_-]{1,36}$` | | newOrderRespType | ENUM | NO | "ACK", "RESULT", 默认 "ACK" | | priceMatch | ENUM | NO | `OPPONENT`/ `OPPONENT_5`/ `OPPONENT_10`/ `OPPONENT_20`/`QUEUE`/ `QUEUE_5`/ `QUEUE_10`/ `QUEUE_20`;不能与price同时传 | | selfTradePreventionMode | ENUM | NO | `EXPIRE_TAKER`/ `EXPIRE_MAKER`/ `EXPIRE_BOTH`; 默认`EXPIRE_MAKER` | | goodTillDate | LONG | NO | TIF为GTD时订单的自动取消时间, 当`timeInforce`为`GTD`时必传;传入的时间戳仅保留秒级精度,毫秒级部分会被自动忽略,时间戳需大于当前时间+600s且小于253402300799000 | | recvWindow | LONG | NO | | | timestamp | LONG | YES | | 根据 order `type`的不同,某些参数强制要求,具体如下: | Type | 强制要求的参数 | | --- | --- | | `LIMIT` | `timeInForce`, `quantity`, `price` | | `MARKET` | `quantity` | > * `newOrderRespType` 如果传 `RESULT`: > * `MARKET` 订单将直接返回成交结果; > * 配合使用特殊 `timeInForce` 的 `LIMIT` 订单将直接返回成交或过期拒绝结果。 > * `selfTradePreventionMode` 仅在 `timeInForce`为`IOC`或`GTC`或`GTD`时生效. > * 极端行情时,`timeInForce`为`GTD`的订单自动取消可能有一定延迟 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- { "clientOrderId": "testOrder", // 用户自定义的订单号 "cumQty": "0", "cumQuote": "0", // 成交金额 "executedQty": "0", // 成交量 "orderId": 22542179, // 系统订单号 "avgPrice": "0.00000", // 平均成交价 "origQty": "10", // 原始委托数量 "price": "0", // 委托价格 "reduceOnly": false, // 仅减仓 "side": "SELL", // 买卖方向 "positionSide": "SHORT", // 持仓方向 "status": "NEW", // 订单状态 "stopPrice": "0", // 触发价,对`TRAILING_STOP_MARKET`无效 "closePosition": false, // 是否条件全平仓 "symbol": "BTCUSDT", // 交易对 "timeInForce": "GTD", // 有效方法 "type": "TRAILING_STOP_MARKET", // 订单类型 "origType": "TRAILING_STOP_MARKET", // 触发前订单类型 "updateTime": 1566818724722, // 更新时间 "workingType": "CONTRACT_PRICE", // 条件价格触发类型 "priceProtect": false, // 是否开启条件单触发保护 "priceMatch": "NONE", //盘口价格下单模式 "selfTradePreventionMode": "NONE", //订单自成交保护模式 "goodTillDate": 1693207680000 //订单TIF为GTD时的自动取消时间} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/rest-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # 通用枚举定义 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#__docusaurus_skipToContent_fallback) 本页总览 公开API参数 ======= 术语解释[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#%E6%9C%AF%E8%AF%AD%E8%A7%A3%E9%87%8A "术语解释的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- * `base asset` 指一个交易对的交易对象,即写在靠前部分的资产名 * `quote asset` 指一个交易对的定价资产,即写在靠后部分资产名 枚举定义[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#%E6%9E%9A%E4%B8%BE%E5%AE%9A%E4%B9%89 "枚举定义的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------- **交易对类型:** * FUTURE 期货 **合约类型 (contractType):** * PERPETUAL 永续合约 * CURRENT\_MONTH 当月交割合约 * NEXT\_MONTH 次月交割合约 * CURRENT\_QUARTER 当季交割合约 * NEXT\_QUARTER 次季交割合约 * PERPETUAL\_DELIVERING 交割结算中合约 **合约状态 (contractStatus, status):** * PENDING\_TRADING 待上市 * TRADING 交易中 * PRE\_DELIVERING 预交割 * DELIVERING 交割中 * DELIVERED 已交割 * PRE\_SETTLE 预结算 * SETTLING 结算中 * CLOSE 已下架 **订单状态 (status):** * NEW 新建订单 * PARTIALLY\_FILLED 部分成交 * FILLED 全部成交 * CANCELED 已撤销 * REJECTED 订单被拒绝 * EXPIRED 订单过期(根据timeInForce参数规则) * EXPIRED\_IN\_MATCH 订单被STP过期 **订单种类 (orderTypes, type):** * LIMIT 限价单 * MARKET 市价单 * STOP 止损限价单 * STOP\_MARKET 止损市价单 * TAKE\_PROFIT 止盈限价单 * TAKE\_PROFIT\_MARKET 止盈市价单 * TRAILING\_STOP\_MARKET 跟踪止损单 **订单方向 (side):** * BUY 买入 * SELL 卖出 **持仓方向:** * BOTH 单一持仓方向 * LONG 多头(双向持仓下) * SHORT 空头(双向持仓下) **有效方式 (timeInForce):** * GTC - Good Till Cancel 成交为止(下单后仅有1年有效期,1年后自动取消) * IOC - Immediate or Cancel 无法立即成交(吃单)的部分就撤销 * FOK - Fill or Kill 无法全部立即成交就撤销 * GTX - Good Till Crossing 无法成为挂单方就撤销 * GTD - Good Till Date 在特定时间之前有效,到期自动撤销 * RPI - Retail Price Improvement(仅与来自APP或者网页端的订单成交,且为Post Only) **条件价格触发类型 (workingType)** * MARK\_PRICE * CONTRACT\_PRICE **响应类型 (newOrderRespType)** * ACK * RESULT **K线间隔:** m -> 分钟; h -> 小时; d -> 天; w -> 周; M -> 月 * 1m * 3m * 5m * 15m * 30m * 1h * 2h * 4h * 6h * 8h * 12h * 1d * 3d * 1w * 1M **防止自成交模式:** * EXPIRE\_TAKER * EXPIRE\_BOTH * EXPIRE\_MAKER **盘口价下单模式:** * OPPONENT (盘口对手价) * OPPONENT\_5 (盘口对手5档价) * OPPONENT\_10 (盘口对手10档价) * OPPONENT\_20 * QUEUE (盘口同向价) * QUEUE\_5 (盘口同向排队5档价) * QUEUE\_10 (盘口同向排队10档价) * QUEUE\_20 (盘口同向排队20档价) **限制种类 (rateLimitType)** > REQUEST\_WEIGHT { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400 } > ORDERS { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200 } * REQUESTS\_WEIGHT 单位时间请求权重之和上限 * ORDERS 单位时间下单(撤单)次数上限 **限制间隔** * MINUTE 过滤器 === 过滤器,即Filter,定义了一系列交易规则。 共有两类,分别是针对交易对的过滤器`symbol filters`,和针对整个交易所的过滤器`exchange filters`(暂不支持) 交易对过滤器[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#%E4%BA%A4%E6%98%93%E5%AF%B9%E8%BF%87%E6%BB%A4%E5%99%A8 "交易对过滤器的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ #### PRICE\_FILTER 价格过滤器[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#price_filter-%E4%BB%B7%E6%A0%BC%E8%BF%87%E6%BB%A4%E5%99%A8 "PRICE_FILTER 价格过滤器的直接链接") > **/exchangeInfo 响应中的格式:** { "filterType": "PRICE_FILTER", "minPrice": "0.00000100", "maxPrice": "100000.00000000", "tickSize": "0.00000100" } 价格过滤器用于检测order订单中price参数的合法性 * `minPrice` 定义了 `price`/`stopPrice` 允许的最小值 * `maxPrice` 定义了 `price`/`stopPrice` 允许的最大值。 * `tickSize` 定义了 `price`/`stopPrice` 的步进间隔,即price必须等于minPrice+(tickSize的整数倍) 以上每一项均可为0,为0时代表这一项不再做限制。 逻辑伪代码如下: * `price` >= `minPrice` * `price` <= `maxPrice` * (`price`\-`minPrice`) % `tickSize` == 0 ### LOT\_SIZE 订单尺寸[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#lot_size-%E8%AE%A2%E5%8D%95%E5%B0%BA%E5%AF%B8 "LOT_SIZE 订单尺寸的直接链接") > _/exchangeInfo 响应中的格式:_\* { "filterType": "LOT_SIZE", "minQty": "0.00100000", "maxQty": "100000.00000000", "stepSize": "0.00100000" } lots是拍卖术语,这个过滤器对订单中的`quantity`也就是数量参数进行合法性检查。包含三个部分: * `minQty` 表示 `quantity` 允许的最小值. * `maxQty` 表示 `quantity` 允许的最大值 * `stepSize` 表示 `quantity`允许的步进值。 逻辑伪代码如下: * `quantity` >= `minQty` * `quantity` <= `maxQty` * (`quantity`\-`minQty`) % `stepSize` == 0 ### MARKET\_LOT\_SIZE 市价订单尺寸[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#market_lot_size-%E5%B8%82%E4%BB%B7%E8%AE%A2%E5%8D%95%E5%B0%BA%E5%AF%B8 "MARKET_LOT_SIZE 市价订单尺寸的直接链接") 参考LOT\_SIZE,区别仅在于对市价单还是限价单生效 ### MAX\_NUM\_ORDERS 最多订单数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#max_num_orders-%E6%9C%80%E5%A4%9A%E8%AE%A2%E5%8D%95%E6%95%B0 "MAX_NUM_ORDERS 最多订单数的直接链接") > **/exchangeInfo 响应中的格式:** { "filterType": "MAX_NUM_ORDERS", "limit": 200 } 定义了某个交易对最多允许的挂单数量(不包括已关闭的订单) 普通订单与条件订单均计算在内 ### MAX\_NUM\_ALGO\_ORDERS 最多条件订单数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#max_num_algo_orders-%E6%9C%80%E5%A4%9A%E6%9D%A1%E4%BB%B6%E8%AE%A2%E5%8D%95%E6%95%B0 "MAX_NUM_ALGO_ORDERS 最多条件订单数的直接链接") > **/exchangeInfo format:** { "filterType": "MAX_NUM_ALGO_ORDERS", "limit": 100 } 定义了某个交易对最多允许的条件订单的挂单数量(不包括已关闭的订单)。 条件订单目前包括`STOP`, `STOP_MARKET`, `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`, 和 `TRAILING_STOP_MARKET` ### PERCENT\_PRICE 价格振幅过滤器[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#percent_price-%E4%BB%B7%E6%A0%BC%E6%8C%AF%E5%B9%85%E8%BF%87%E6%BB%A4%E5%99%A8 "PERCENT_PRICE 价格振幅过滤器的直接链接") > **/exchangeInfo 响应中的格式:** { "filterType": "PERCENT_PRICE", "multiplierUp": "1.1500", "multiplierDown": "0.8500", "multiplierDecimal": 4 } `PERCENT_PRICE` 定义了基于标记价格计算的挂单价格的可接受区间. 挂单价格必须同时满足以下条件: * 买单: `price` <= `markPrice` \* `multiplierUp` * 卖单: `price` >= `markPrice` \* `multiplierDown` ### MIN\_NOTIONAL 最小名义价值[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#min_notional-%E6%9C%80%E5%B0%8F%E5%90%8D%E4%B9%89%E4%BB%B7%E5%80%BC "MIN_NOTIONAL 最小名义价值的直接链接") > **/exchangeInfo 响应中的格式:** { "filterType": "MIN_NOTIONAL", "notional": "5.0" } MIN\_NOTIONAL过滤器定义了交易对订单所允许的最小名义价值(成交额)。 订单的名义价值是`价格`\*`数量`。 由于`MARKET`订单没有价格,因此会使用 mark price 计算。 * [术语解释](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#%E6%9C%AF%E8%AF%AD%E8%A7%A3%E9%87%8A) * [枚举定义](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#%E6%9E%9A%E4%B8%BE%E5%AE%9A%E4%B9%89) * [交易对过滤器](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#%E4%BA%A4%E6%98%93%E5%AF%B9%E8%BF%87%E6%BB%A4%E5%99%A8) * [LOT\_SIZE 订单尺寸](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#lot_size-%E8%AE%A2%E5%8D%95%E5%B0%BA%E5%AF%B8) * [MARKET\_LOT\_SIZE 市价订单尺寸](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#market_lot_size-%E5%B8%82%E4%BB%B7%E8%AE%A2%E5%8D%95%E5%B0%BA%E5%AF%B8) * [MAX\_NUM\_ORDERS 最多订单数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#max_num_orders-%E6%9C%80%E5%A4%9A%E8%AE%A2%E5%8D%95%E6%95%B0) * [MAX\_NUM\_ALGO\_ORDERS 最多条件订单数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#max_num_algo_orders-%E6%9C%80%E5%A4%9A%E6%9D%A1%E4%BB%B6%E8%AE%A2%E5%8D%95%E6%95%B0) * [PERCENT\_PRICE 价格振幅过滤器](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#percent_price-%E4%BB%B7%E6%A0%BC%E6%8C%AF%E5%B9%85%E8%BF%87%E6%BB%A4%E5%99%A8) * [MIN\_NOTIONAL 最小名义价值](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/common-definition#min_notional-%E6%9C%80%E5%B0%8F%E5%90%8D%E4%B9%89%E4%BB%B7%E5%80%BC) --- # 基本信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#__docusaurus_skipToContent_fallback) 本页总览 基本信息 ==== Rest 基本信息[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#rest-%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "Rest 基本信息的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ * 接口可能需要用户的 API Key,如何创建API-KEY请参考[这里](https://www.binance.com/cn/support/articles/360002502072) * 本篇列出REST接口的baseurl **[https://fapi.binance.com](https://fapi.binance.com/) ** * 所有接口的响应都是JSON格式 * 响应中如有数组,数组元素以时间升序排列,越早的数据越提前。 * 所有时间、时间戳均为UNIX时间,单位为毫秒 * 所有数据类型采用JAVA的数据类型定义 ### Testnet API 信息[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#testnet-api-%E4%BF%A1%E6%81%AF "Testnet API 信息的直接链接") * 本篇接口亦可接入testnet测试平台使用 * **testnet**的 REST baseurl 为 "[https://demo-fapi.binance.com](https://demo-fapi.binance.com/) " * **testnet**的 Websocket baseurl 为 "wss://fstream.binancefuture.com" * * * 接口的基本信息[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E6%8E%A5%E5%8F%A3%E7%9A%84%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF "接口的基本信息的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ * `GET`方法的接口, 参数必须在`query string`中发送. * `POST`, `PUT`, 和 `DELETE` 方法的接口, 参数可以在 `query string`中发送,也可以在 `request body`中发送(content type `application/x-www-form-urlencoded`)。允许混合这两种方式发送参数。但如果同一个参数名在query string和request body中都有,query string中的会被优先采用。 * 对参数的顺序不做要求。 ### HTTP 返回代码[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#http-%E8%BF%94%E5%9B%9E%E4%BB%A3%E7%A0%81 "HTTP 返回代码的直接链接") * HTTP `4XX` 错误码用于指示错误的请求内容、行为、格式。 * HTTP `403` 错误码表示违反WAF限制(Web应用程序防火墙)。 * HTTP `408` 返回代码表示在等待后端服务器响应时发生了超时。 * HTTP `429` 错误码表示警告访问频次超限,即将被封IP * HTTP `418` 表示收到429后继续访问,于是被封了。 * HTTP `5XX` 错误码用于指示Binance服务侧的问题。 1. 如果返回内容里包含了报错信息 **"Request occur unknown error."**,请稍后重试请求。 * HTTP `503` 表示三种可能: 1. 如果返回内容里包含了报错信息 **"Unknown error, please check your request or try again later."**,则表示API服务端已经向业务核心提交了请求但未能获取响应,特别需要注意的是其不代表请求失败,而是未知。很可能已经得到了执行,也有可能执行失败,需要做进一步确认。 2. 如果返回内容里包含了报错信息 **"Service Unavailable."**,则表示本次API请求失败。这种情况下可能是服务暂不可用,您需要稍后重试。 3. 如果返回内容里包含了报错信息 **"Internal error; unable to process your request. Please try again."**,则表示本次API请求失败。这种情况下您如果需要的话可以选择立即重试。 4. 如果返回内容里包含了报错信息 **"Request throttled by system-level protection. Reduce-only/close-position orders are exempt. Please try again.(-1008)"**。这表示节点已超出最大并发限制,正在临时限流。平仓、仅减仓与取消订单均予以豁免,不会触发该错误。 ### HTTP 503 状态码:错误类型与处理[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#http-503-%E7%8A%B6%E6%80%81%E7%A0%81%E9%94%99%E8%AF%AF%E7%B1%BB%E5%9E%8B%E4%B8%8E%E5%A4%84%E7%90%86 "HTTP 503 状态码:错误类型与处理的直接链接") #### A. “Unknown error, please check your request or try again later.”(执行状态未知)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#a-unknown-error-please-check-your-request-or-try-again-later%E6%89%A7%E8%A1%8C%E7%8A%B6%E6%80%81%E6%9C%AA%E7%9F%A5 "A. “Unknown error, please check your request or try again later.”(执行状态未知)的直接链接") * **语义**:API 成功接收请求,但在超时前未返回结果;**执行状态未知(可能已成功)**。 * **处理**: * **不要直接当失败重试**;先通过 **WebSocket 回报**或 **orderId 查询**确认是否已执行,避免重复下单。 * 高峰期尽量使用**单笔下单**替代批量下单以降低不确定性。 * **是否计入限速**:**可能计入,也可能不计入**, 请参考header中的rate计数信息 #### B. “Service Unavailable.”(失败)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#b-service-unavailable%E5%A4%B1%E8%B4%A5 "B. “Service Unavailable.”(失败)的直接链接") * **语义**:服务暂不可用;**100% 失败**。 * **处理**:**退避重试**(如 200ms → 400ms → 800ms,上限 3–5 次)。 * **是否计入限速**:**不计入** #### C. "Request throttled by system-level protection. Reduce-only/close-position orders are exempt. Please try again."(**\-1008**,失败)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#c-request-throttled-by-system-level-protection-reduce-onlyclose-position-orders-are-exempt-please-try-again-1008%E5%A4%B1%E8%B4%A5 "c-request-throttled-by-system-level-protection-reduce-onlyclose-position-orders-are-exempt-please-try-again-1008失败的直接链接") * **语义**:系统过载;**100% 失败**。 * **处理**:**退避重试**并**降低并发**; * **适用接口**: * `POST /fapi/v1/order` * `POST /fapi/v1/batchOrders` * `POST /fapi/v1/order/test` * **仅适用于 C 的豁免说明**:当请求满足**只减仓/平仓**条件时(`closePosition = true`,或 `positionSide = BOTH` 且 `reduceOnly = true`,或 `LONG+SELL`,或 `SHORT+BUY`),**不会受 -1008 过载的影响或享有优先处理**,以保障风险收敛。 * 覆盖接口:`POST /fapi/v1/order`、`POST /fapi/v1/batchOrders`(当参数满足只减仓/平仓判定) ### 接口错误代码[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E6%8E%A5%E5%8F%A3%E9%94%99%E8%AF%AF%E4%BB%A3%E7%A0%81 "接口错误代码的直接链接") * 每个接口都有可能抛出异常 > 异常响应格式如下: { "code": -1121, "msg": "Invalid symbol."} * 具体的错误码及其解释在[错误代码](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#cf68bca02a) * * * SDK和代码示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#sdk%E5%92%8C%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B "SDK和代码示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- **免责声明:** * 以下SDK由合作方和用户提供,**非官方制作**行为。仅做熟悉api接口和学习使用,请广大用户谨慎使用并根据自身情况自行拓展研发。 * Binance 官方不对SDK的安全和性能做任何承诺,亦不会对使用SDK引起的风险甚至损失承担责任。 ### Python3[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#python3 "Python3的直接链接") **SDK:** 可以通过以下方式获取Binance Futures Connector SDK: * 访问 [https://github.com/binance/binance-connector-python](https://github.com/binance/binance-connector-python) * 执行以下命令: `pip install binance-sdk-derivatives-trading-usds-futures` ### Java[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#java "Java的直接链接") 可以通过以下方式获取SDK: * 访问 [https://github.com/binance/binance-connector-java](https://github.com/binance/binance-connector-java) , * 执行以下命令: `git clone https://github.com/binance/binance-connector-java.git` * * * 访问限制[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "访问限制的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------- * 在 `/fapi/v1/exchangeInfo`接口中`rateLimits`数组里包含有REST接口(不限于本篇的REST接口)的访问限制。包括带权重的访问频次限制、下单速率限制。本篇`枚举定义`章节有限制类型的进一步说明。 * 违反上述任何一个访问限制都会收到HTTP 429,这是一个警告. ### IP 访问限制[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#ip-%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "IP 访问限制的直接链接") * 每个请求将包含一个`X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)`的头,其中包含当前IP所有请求的已使用权重。 * 每个路由都有一个"权重",该权重确定每个接口计数的请求数。较重的接口和对多个交易对进行操作的接口将具有较重的"权重"。 * 收到429时,您有责任作为API退回而不向其发送更多的请求。 * **如果屡次违反速率限制和/或在收到429后未能退回,将导致API的IP被禁(http状态418)。** * 频繁违反限制,封禁时间会逐渐延长 ,**对于重复违反者,将会被封从2分钟到3天**。 * **访问限制是基于IP的,而不是API Key** ### 下单频率限制[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E4%B8%8B%E5%8D%95%E9%A2%91%E7%8E%87%E9%99%90%E5%88%B6 "下单频率限制的直接链接") * 每个下单请求回报将包含一个`X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)`的头,其中包含当前账户已用的下单限制数量。 * 被拒绝或不成功的下单并不保证回报中包含以上头内容。 * **下单频率限制是基于每个账户计数的。** 接口鉴权类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E6%8E%A5%E5%8F%A3%E9%89%B4%E6%9D%83%E7%B1%BB%E5%9E%8B "接口鉴权类型的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 每个接口都有自己的鉴权类型,鉴权类型决定了访问时应当进行何种鉴权 * 如果需要 API-key,应当在HTTP头中以`X-MBX-APIKEY`字段传递 * API-key 与 API-secret 是大小写敏感的 * 可以在网页用户中心修改API-key 所具有的权限,例如读取账户信息、发送交易指令、发送提现指令 | 鉴权类型 | 描述 | | --- | --- | | NONE | 不需要鉴权的接口 | | TRADE | 需要有效的API-KEY和签名 | | USER\_DATA | 需要有效的API-KEY和签名 | | USER\_STREAM | 需要有效的API-KEY | | MARKET\_DATA | 需要有效的API-KEY | ### 需要签名的接口 (TRADE 与 USER\_DATA)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E9%9C%80%E8%A6%81%E7%AD%BE%E5%90%8D%E7%9A%84%E6%8E%A5%E5%8F%A3-trade-%E4%B8%8E-user_data "��需要签名的接口 (TRADE 与 USER_DATA)的直接链接") * 调用这些接口时,除了接口本身所需的参数外,还需要传递`signature`即签名参数。 * 签名使用`HMAC SHA256`算法. API-KEY所对应的API-Secret作为 `HMAC SHA256` 的密钥,其他所有参数作为`HMAC SHA256`的操作对象,得到的输出即为签名。 * 签名大小写不敏感。 * 请确保`signature`在`query string`或`request body`的最后 * 当同时使用query string和request body时,`HMAC SHA256`的输入query string在前,request body在后 ### 时间同步安全[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E6%97%B6%E9%97%B4%E5%90%8C%E6%AD%A5%E5%AE%89%E5%85%A8 "时间同步安全的直接链接") * 签名接口均需要传递`timestamp`参数, 其值应当是请求发送时刻的unix时间戳(毫秒) * 服务器收到请求时会判断请求中的时间戳,如果是5000毫秒之前发出的,则请求会被认为无效。这个时间窗口值可以通过发送可选参数`recvWindow`来自定义。 * 另外,如果服务器计算得出客户端时间戳在服务器时间的‘未来’一秒以上,也会拒绝请求。 > 逻辑伪代码: if (timestamp < (serverTime + 1000) && (serverTime - timestamp) <= recvWindow) { // process request} else { // reject request} **关于交易时效性** 互联网状况并不100%可靠,不可完全依赖,因此你的程序本地到币安服务器的时延会有抖动. 这是我们设置`recvWindow`的目的所在,如果你从事高频交易,对交易时效性有较高的要求,可以灵活设置recvWindow以达到你的要求。 ### POST /fapi/v1/order 的示例 - HMAC Keys[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#post-fapiv1order-%E7%9A%84%E7%A4%BA%E4%BE%8B---hmac-keys "POST /fapi/v1/order 的示例 - HMAC Keys的直接链接") 以下是在linux bash环境下使用 echo openssl 和curl工具实现的一个调用接口下单的示例 apikey、secret仅供示范 | Key | Value | | --- | --- | | apiKey | dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83 | | secretKey | 2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9 | | 参数 | 取值 | | --- | --- | | symbol | BTCUSDT | | side | BUY | | type | LIMIT | | timeInForce | GTC | | quantity | 1 | | price | 9000 | | recvWindow | 5000 | | timestamp | 1591702613943 | #### 示例 1: 所有参数通过 query string 发送[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E7%A4%BA%E4%BE%8B-1-%E6%89%80%E6%9C%89%E5%8F%82%E6%95%B0%E9%80%9A%E8%BF%87-query-string-%E5%8F%91%E9%80%81 "示例 1: 所有参数通过 query string 发送的直接链接") > **示例1:** > **HMAC SHA256 签名:** $ echo -n "symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000×tamp=1591702613943" | openssl dgst -sha256 -hmac "2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9" (stdin)= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9 > **curl 调用:** (HMAC SHA256) $ curl -H "X-MBX-APIKEY: dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83" -X POST 'https://fapi.binance.com/fapi/v1/order?symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000×tamp=1591702613943&signature= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9' * **queryString:** symbol=BTCUSDT &side=BUY &type=LIMIT &timeInForce=GTC &quantity=1 &price=0.1 &recvWindow=5000 ×tamp=1499827319559 #### 示例 2: 所有参数通过 request body 发送[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E7%A4%BA%E4%BE%8B-2-%E6%89%80%E6%9C%89%E5%8F%82%E6%95%B0%E9%80%9A%E8%BF%87-request-body-%E5%8F%91%E9%80%81 "示例 2: 所有参数通过 request body 发送的直接链接") > **示例2:** > **HMAC SHA256 签名:** $ echo -n "symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000×tamp=1591702613943" | openssl dgst -sha256 -hmac "2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9" (stdin)= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9 > **curl 调用:** (HMAC SHA256) $ curl -H "X-MBX-APIKEY: dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83" -X POST 'https://fapi.binance.com/fapi/v1/order' -d 'symbol=BTCUSDT&side=BUY&type=LIMIT&quantity=1&price=9000&timeInForce=GTC&recvWindow=5000×tamp=1591702613943&signature= 3c661234138461fcc7a7d8746c6558c9842d4e10870d2ecbedf7777cad694af9' * **requestBody:** symbol=BTCUSDT &side=BUY &type=LIMIT &timeInForce=GTC &quantity=1 &price=9000 &recvWindow=5000 ×tamp=1591702613943 #### 示例 3: 混合使用 query string 与 request body[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#%E7%A4%BA%E4%BE%8B-3-%E6%B7%B7%E5%90%88%E4%BD%BF%E7%94%A8-query-string-%E4%B8%8E-request-body "示例 3: 混合使用 query string 与 request body的直接链接") > **示例3:** > **HMAC SHA256 签名:** $ echo -n "symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTCquantity=1&price=9000&recvWindow=5000×tamp= 1591702613943" | openssl dgst -sha256 -hmac "2b5eb11e18796d12d88f13dc27dbbd02c2cc51ff7059765ed9821957d82bb4d9" (stdin)= f9d0ae5e813ef6ccf15c2b5a434047a0181cb5a342b903b367ca6d27a66e36f2 > **curl 调用:** (HMAC SHA256) $ curl -H "X-MBX-APIKEY: dbefbc809e3e83c283a984c3a1459732ea7db1360ca80c5c2c8867408d28cc83" -X POST 'https://fapi.binance.com/fapi/v1/order?symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC' -d 'quantity=1&price=9000&recvWindow=5000×tamp=1591702613943&signature=f9d0ae5e813ef6ccf15c2b5a434047a0181cb5a342b903b367ca6d27a66e36f2' * **queryString:** symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC * **requestBody:** quantity=1&price=9000&recvWindow=5000×tamp= 1591702613943 请注意,示例3中的签名有些许不同,在"GTC"和"quantity=1"之间**没有**"&"字符。 ### POST /fapi/v1/order 的示例 - RSA Keys[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/general-info#post-fapiv1order-%E7%9A%84%E7%A4%BA%E4%BE%8B---rsa-keys "POST /fapi/v1/order 的示例 - RSA Keys的直接链接") * 这将逐步介绍如何通过有效的签名发送 payload。 * 我们接受 `PKCS#8` 格式的 RSA Key。 * 要获取 API Key,您需要在您的账户上上传您的 RSA Public Key。 对于这个例子,Private Key 将被引用为`test-prv-key.pem`。 | Key | Value | | --- | --- | | apiKey | vE3BDAL1gP1UaexugRLtteaAHg3UO8Nza20uexEuW1Kh3tVwQfFHdAiyjjY428o2 | | 参数 | 取值 | | --- | --- | | symbol | BTCUSDT | | side | SELL | | type | MARKET | | quantity | 1.23 | | recvWindow | 9999999 | | timestamp | 1671090801999 | > **有列出参数的签名 payload:** timestamp=1671090801999&recvWindow=9999999&symbol=BTCUSDT&side=SELL&type=MARKET&quantity=1.23 **第1步: Payload** 将参数列表排列成一个 string。 用 `&` 分隔每个参数。对于上述参数,签名 payload 如右所示。 **第2步: 计算签名** 2.1 - 将签名有效负载编码为 ASCII 数据。 > **第2.2步** $ echo -n 'timestamp=1671090801999&recvWindow=9999999&symbol=BTCUSDT&side=SELL&type=MARKET&quantity=1.23' | openssl dgst -keyform PEM -sha256 -sign ./test-prv-key.pem 2.2 - 使用带有 SHA-256 hash 函数的 RSASSA-PKCS1-v1\_5 算法对 payload 进行签名。 > **第2.3步** $ echo -n 'timestamp=1671090801999&recvWindow=9999999&symbol=BTCUSDT&side=SELL&type=MARKET&quantity=1.23' | openssl dgst -keyform PEM -sha256 -sign ./test-prv-key.pem | openssl enc -base64aap36wD5loVXizxvvPI3wz9Cjqwmb3KVbxoym0XeWG1jZq8umqrnSk8H8dkLQeySjgVY91Ufs%2BBGCW%2B4sZjQEpgAfjM76riNxjlD3coGGEsPsT2lG39R%2F1q72zpDs8pYcQ4A692NgHO1zXcgScTGgdkjp%2Brp2bcddKjyz5XBrBM%3D 2.3 - 将输出编码为 base64 string。 > **第2.4步** $ echo -n 'timestamp=1671090801999&recvWindow=9999999&symbol=BTCUSDT&side=SELL&type=MARKET&quantity=1.23' | openssl dgst -keyform PEM -sha256 -sign ./test-prv-key.pem | openssl enc -base64 | tr -d '\n'aap36wD5loVXizxvvPI3wz9Cjqwmb3KVbxoym0XeWG1jZq8umqrnSk8H8dkLQeySjgVY91Ufs%2BBGCW%2B4sZjQEpgAfjM76riNxjlD3coGGEsPsT2lG39R%2F1q72zpDs8pYcQ4A692NgHO1zXcgScTGgdkjp%2Brp2bcddKjyz5XBrBM%3D 2.4 - 删除签名中的所有 `\n`。 > **第2.5步** aap36wD5loVXizxvvPI3wz9Cjqwmb3KVbxoym0XeWG1jZq8umqrnSk8H8dkLQeySjgVY91Ufs%2BBGCW%2B4sZjQEpgAfjM76riNxjlD3coGGEsPsT2lG39R%2F1q72zpDs8pYcQ4A692NgHO1zXcgScTGgdkjp%2Brp2bcddKjyz5XBrBM%3D 2.5 - 由于签名可能包含 `/` 和 `=`,这可能会导致发送请求时出现问题。 所以签名必须是 URL 编码的。 > **第2.6步** curl -H "X-MBX-APIKEY: vE3BDAL1gP1UaexugRLtteaAHg3UO8Nza20uexEuW1Kh3tVwQfFHdAiyjjY428o2" -X POST 'https://fapi.binance.com/fapi/v1/order?timestamp=1671090801999&recvWindow=9999999&symbol=BTCUSDT&side=SELL&type=MARKET&quantity=1.23&signature=aap36wD5loVXizxvvPI3wz9Cjqwmb3KVbxoym0XeWG1jZq8umqrnSk8H8dkLQeySjgVY91Ufs%2BBGCW%2B4sZjQEpgAfjM76riNxjlD3coGGEsPsT2lG39R%2F1q72zpDs8pYcQ4A692NgHO1zXcgScTGgdkjp%2Brp2bcddKjyz5XBrBM%3D' 2.6 - curl 命令 > **Bash 脚本** #!/usr/bin/env bash# 设置身份验证:apiKey="vE3BDAL1gP1UaexugRLtteaAHg3UO8Nza20uexEuW1Kh3tVwQfFHdAiyjjY428o2" ### 替换成您的 API Key# 设置您的请求:apiMethod="POST"apiCall="v1/order"apiParams="timestamp=1671090801999&recvWindow=9999999&symbol=BTCUSDT&side=SELL&type=MARKET&quantity=1.23"function rawurlencode { local value="$1" local len=${#value} local encoded="" local pos c o for (( pos=0 ; pos * 条件单的触发必须: > > * 如果订单参数`priceProtect`为true: > * 达到触发价时,`MARK_PRICE`(标记价格)与`CONTRACT_PRICE`(合约最新价)之间的价差不能超过改symbol触发保护阈值 > * 触发保护阈值请参考接口`GET /fapi/v1/exchangeInfo` 返回内容相应symbol中"triggerProtect"字段 > * `STOP`, `STOP_MARKET` 止损单: > * 买入: 最新合约价格/标记价格高于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格低于等于触发价`stopPrice` > * `TAKE_PROFIT`, `TAKE_PROFIT_MARKET` 止盈单: > * 买入: 最新合约价格/标记价格低于等于触发价`stopPrice` > * 卖出: 最新合约价格/标记价格高于等于触发价`stopPrice` > * `TRAILING_STOP_MARKET` 跟踪止损单: > * 买入: 当合约价格/标记价格区间最低价格低于激活价格`activationPrice`,且最新合约价格/标记价高于等于最低价设定回调幅度。 > * 卖出: 当合约价格/标记价格区间最高价格高于激活价格`activationPrice`,且最新合约价格/标记价低于等于最高价设定回调幅度。 > * `TRAILING_STOP_MARKET` 跟踪止损单如果遇到报错 `{"code": -2021, "msg": "Order would immediately trigger."}` > 表示订单不满足以下条件: > > * 买入: 指定的`activationPrice` 必须小于 latest price > * 卖出: 指定的`activationPrice` 必须大于 latest price > * `newOrderRespType` 如果传 `RESULT`: > > * `MARKET` 订单将直接返回成交结果; > * 配合使用特殊 `timeInForce` 的 `LIMIT` 订单将直接返回成交或过期拒绝结果。 > * `STOP_MARKET`, `TAKE_PROFIT_MARKET` 配合 `closePosition`\=`true`: > > * 条件单触发依照上述条件单触发逻辑 > * 条件触发后,平掉当时持有所有多头仓位(若为卖单)或当时持有所有空头仓位(若为买单) > * 不支持 `quantity` 参数 > * 自带只平仓属性,不支持`reduceOnly`参数 > * 双开模式下,`LONG`方向上不支持`BUY`; `SHORT` 方向上不支持`SELL` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "3f7df6e3-2df4-44b9-9919-d2f38f90a99a", "status": 200, "result": { "orderId": 325078477, "symbol": "BTCUSDT", "status": "NEW", "clientOrderId": "iCXL1BywlBaf2sesNUrVl3", "price": "43187.00", "avgPrice": "0.00", "origQty": "0.100", "executedQty": "0.000", "cumQty": "0.000", "cumQuote": "0.00000", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0.00", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "goodTillDate": 0, "updateTime": 1702555534435 }, "rateLimits": [ { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 300, "count": 1 }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200, "count": 1 }, { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 1 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/trade/websocket-api#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Balance And Position Update | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#__docusaurus_skipToContent_fallback) 本页总览 Balance 和 Position 更新推送 ======================= 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 账户更新事件的 event type 固定为 `ACCOUNT_UPDATE` * 当账户信息有变动时,会推送此事件: * 仅当账户信息有变动时(包括资金、仓位、保证金模式等发生变化),才会推送此事件; * 订单状态变化没有引起账户和持仓变化的,不会推送此事件; * position 信息:仅当 symbol 仓位有变动时推送。 * "FUNDING FEE" 引起的资金余额变化,仅推送简略事件: * 当用户某**全仓**持仓发生"FUNDING FEE"时,事件`ACCOUNT_UPDATE`将只会推送相关的用户资产余额信息`B`(仅推送 FUNDING FEE 发生相关的资产余额信息),而不会推送任何持仓信息`P`。 * 当用户某**逐仓**仓持仓发生"FUNDING FEE"时,事件`ACCOUNT_UPDATE`将只会推送相关的用户资产余额信息`B`(仅推送"FUNDING FEE"所使用的资产余额信息),和相关的持仓信息`P`(仅推送这笔"FUNDING FEE"发生所在的持仓信息),其余持仓信息不会被推送。 * 字段"m"代表了事件推出的原因,包含了以下可能类型: * DEPOSIT * WITHDRAW * ORDER * FUNDING\_FEE * WITHDRAW\_REJECT * ADJUSTMENT * INSURANCE\_CLEAR * ADMIN\_DEPOSIT * ADMIN\_WITHDRAW * MARGIN\_TRANSFER * MARGIN\_TYPE\_CHANGE * ASSET\_TRANSFER * OPTIONS\_PREMIUM\_FEE * OPTIONS\_SETTLE\_PROFIT * AUTO\_EXCHANGE * COIN\_SWAP\_DEPOSIT * COIN\_SWAP\_WITHDRAW * 字段"bc"代表了钱包余额的改变量,即 balance change,但注意其不包含仓位盈亏及交易手续费。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#url-path "URL PATH的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `ACCOUNT_UPDATE` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "e": "ACCOUNT_UPDATE", // 事件类型 "E": 1564745798939, // 事件时间 "T": 1564745798938 , // 撮合时间 "a": // 账户更新事件 { "m":"ORDER", // 事件推出原因 "B":[ // 余额信息 { "a":"USDT", // 资产名称 "wb":"122624.12345678", // 钱包余额 "cw":"100.12345678", // 除去逐仓仓位保证金的钱包余额 "bc":"50.12345678" // 除去盈亏与交易手续费以外的钱包余额改变量 }, { "a":"BUSD", "wb":"1.00000000", "cw":"0.00000000", "bc":"-49.12345678" } ], "P":[ { "s":"BTCUSDT", // 交易对 "pa":"0", // 仓位 "ep":"0.00000", // 入仓价格 "bep":"0", // 盈亏平衡价 "cr":"200", // (费前)累计实现损益 "up":"0", // 持仓未实现盈亏 "mt":"isolated", // 保证金模式 "iw":"0.00000000", // 若为逐仓,仓位保证金 "ps":"BOTH" // 持仓方向 }, { "s":"BTCUSDT", "pa":"20", "ep":"6563.66500", "bep":"6563.6", "cr":"0", "up":"2850.21200", "mt":"isolated", "iw":"13200.70726908", "ps":"LONG" }, { "s":"BTCUSDT", "pa":"-10", "ep":"6563.86000", "bep":"6563.6", "cr":"-45.04000000", "up":"-1423.15600", "mt":"isolated", "iw":"6570.42511771", "ps":"SHORT" } ] }} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Balance-and-Position-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Order Update | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#__docusaurus_skipToContent_fallback) 本页总览 订单交易更新推送 ======== 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 当有新订单创建、订单有新成交或者新的状态变化时会推送此类事件 事件类型统一为 `ORDER_TRADE_UPDATE` URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------- `/private` **订单方向** * BUY 买入 * SELL 卖出 **订单类型** * LIMIT 限价单 * MARKET 市价单 * STOP 止损限价单 * STOP\_MARKET 止损市价单 * TAKE\_PROFIT 止盈限价单 * TAKE\_PROFIT\_MARKET 止盈市价单 * TRAILING\_STOP\_MARKET 跟踪止损单 * LIQUIDATION 爆仓 **本次事件的具体执行类型** * NEW * CANCELED 已撤 * CALCULATED 订单 ADL 或爆仓 * EXPIRED 订单失效 * TRADE 交易 * AMENDMENT 订单修改 **订单状态** * NEW * PARTIALLY\_FILLED * FILLED * CANCELED * EXPIRED * EXPIRED\_IN\_MATCH **有效方式:** * GTC * IOC * FOK * GTX **强平和ADL:** * 若用户因保证金不足发生强平: * `c`为"autoclose-XXX",`X`为"NEW" * 若用户保证金充足但被 ADL: * `c`为“adl\_autoclose”,`X`为“NEW” **过期原因** * `0`: 无,默认值 * `1`: 自成交保护,订单被取消 * `2`: IOC订单无法完全成交,订单被取消 * `3`: IOC订单因自成交保护无法完全成交,订单被取消 * `4`: 只减仓竞争过程中,低优先级的只减仓订单被取消 * `5`: 账户强平过程中,订单被取消 * `6`: 不满足GTE条件,订单被取消 * `7`: Symbol下架,订单被取消 * `8`: 止盈止损单触发后,初始订单被取消 * `9`: 市价订单无法完全成交,订单被取消 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `ORDER_TRADE_UPDATE` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"ORDER_TRADE_UPDATE", // 事件类型 "E":1568879465651, // 事件时间 "T":1568879465650, // 撮合时间 "o":{ "s":"BTCUSDT", // 交易对 "c":"TEST", // 客户端自定订单ID // 特殊的自定义订单ID: // "autoclose-"开头的字符串: 系统强平订单 // "adl_autoclose": ADL自动减仓订单 // "settlement_autoclose-": 下架或交割的结算订单 "S":"SELL", // 订单方向 "o":"TRAILING_STOP_MARKET", // 订单类型 "f":"GTC", // 有效方式 "q":"0.001", // 订单原始数量 "p":"0", // 订单原始价格 "ap":"0", // 订单平均价格 "sp":"7103.04", // 条件订单触发价格,对追踪止损单无效 "x":"NEW", // 本次事件的具体执行类型 "X":"NEW", // 订单的当前状态 "i":8886774, // 订单ID "l":"0", // 订单末次成交量 "z":"0", // 订单累计已成交量 "L":"0", // 订单末次成交价格 "N": "USDT", // 手续费资产类型 "n": "0", // 手续费数量 "T":1568879465650, // 成交时间 "t":0, // 成交ID "b":"0", // 买单净值 "a":"9.91", // 卖单净值 "m": false, // 该成交是作为挂单成交吗? "R":false , // 是否是只减仓单 "wt": "CONTRACT_PRICE", // 触发价类型 "ot": "TRAILING_STOP_MARKET", // 原始订单类型 "ps":"LONG" // 持仓方向 "cp":false, // 是否为触发平仓单; 仅在条件订单情况下会推送此字段 "AP":"7476.89", // 追踪止损激活价格, 仅在追踪止损单时会推送此字段 "cr":"5.0", // 追踪止损回调比例, 仅在追踪止损单时会推送此字段 "pP": false, // 是否开启条件单触发保护 "si": 0, // 忽略 "ss": 0, // 忽略 "rp":"0", // 该交易实现盈亏 "V":"EXPIRE_TAKER", // 自成交防止模式 "pm":"OPPONENT", // 价格匹配模式 "gtd":0, // TIF为GTD的订单自动取消时间 "er":"0" // 过期原因 }} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Trade Lite | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Trade-Lite#__docusaurus_skipToContent_fallback) 本页总览 精简交易推送 ====== 精简交易推送相比原有的`ORDER_TRADE_UPDATE`流减少了数据延迟,但该交易推送仅推送和交易相关的字段。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Trade-Lite#url-path "URL PATH的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------- `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Trade-Lite#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `TRADE_LITE` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Trade-Lite#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"TRADE_LITE", // 事件类型 "E":1721895408092, // 事件时间 "T":1721895408214, // 交易时间 "s":"BTCUSDT", // 交易对 "q":"0.001", // 订单原始数量 "p":"0", // 订单原始价格 "m":false, // 该成交是作为挂单成交吗? "c":"z8hcUoOsqEdKMeKPSABslD", // 客户端自定订单ID // 特殊的自定义订单ID: // "autoclose-"开头的字符串: 系统强平订单 // "adl_autoclose": ADL自动减仓订单 // "settlement_autoclose-": 下架或交割的结算订单 "S":"BUY", // 订单方向 "L":"64089.20", // 订单末次成交价格 "l":"0.040", // 订单末次成交量 "t":109100866, // 成交ID "i":8886774, // 订单ID} * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Trade-Lite#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Trade-Lite#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Trade-Lite#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Keepalive User Data Stream(Websocket API) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#__docusaurus_skipToContent_fallback) 本页总览 Websocket API延长listenKey有效期(USER\_STREAM) ========================================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 有效期延长至本次调用后60分钟 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E6%96%B9%E5%BC%8F "方式的直�接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ `userDataStream.ping` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82 "请求的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "815d5fce-0880-4287-a567-80badf004c74", "method": "userDataStream.ping", "params": { "apiKey": "vmPUZE6mv9SD5VNHk9HlWFsOr9aLE2zvsw0MuIgwCIPy8atIco14y7Ju91duEh8A"  }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- None 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "815d5fce-0880-4287-a567-80badf004c74", "status": 200, "result": { "listenKey": "3HBntNTepshgEdjIwSUIBgB9keLyOCg5qv3n6bYAtktG8ejcaW5HXz9Vx1JgIieg" }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 2 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream-Wsp#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Start User Data Stream(Websocket API) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#__docusaurus_skipToContent_fallback) 本页总览 Websocket API生成listenKey (USER\_STREAM) ======================================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 创建一个新的user data stream,返回值为一个listenKey,即websocket订阅的stream名称。如果该帐户具有有效的`listenKey`,则将返回该`listenKey`并将其有效期延长60分钟。 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- `userDataStream.start` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "d3df8a61-98ea-4fe0-8f4e-0fcea5d418b0", "method": "userDataStream.start", "params": { "apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | apiKey | STRING | YES | | 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "d3df8a61-98ea-4fe0-8f4e-0fcea5d418b0", "status": 200, "result": { "listenKey": "xs0mRXdAKlIPDRFrlPcw0qI41Eh3ixNntmymGyhrhgqo7L6FuLaWArTD7RLP" }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 2 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream-Wsp#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # All Market Liquidation Order Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#__docusaurus_skipToContent_fallback) 本页总览 全市场强平订单 ======= 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 推送全市场强平订单快照信息 每个symbol,1000ms内至多仅推送一条最近的强平订单作为快照 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#url-path "URL PATH的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#stream-name "Stream Name的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `!forceOrder@arr` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **实时** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"forceOrder",                   // 事件类型 "E":1568014460893,                  // 事件时间 "o":{ "s":"BTCUSDT",                   // 交易对 "S":"SELL",                      // 订单方向 "o":"LIMIT",                     // 订单类型 "f":"IOC",                       // 有效方式 "q":"0.014",                     // 订单数量 "p":"9910",                      // 订单价格 "ap":"9910",                     // 平均价格 "X":"FILLED",                    // 订单状态 "l":"0.014",                     // 订单最近成交量 "z":"0.014",                     // 订单累计成交量 "T":1568014460893,          // 交易时间 }} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # All Market Mini Tickers Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#__docusaurus_skipToContent_fallback) 本页总览 全市场的精简Ticker ============ 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 所有symbol24小时精简ticker信息.需要注意的是,只有发生变化的ticker更新才会被推送。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#url-path "URL PATH的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#stream-name "Stream Name的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `!miniTicker@arr` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1000ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ { "e": "24hrMiniTicker", // 事件类型 "E": 123456789, // 事件时间(毫秒) "s": "BNBUSDT", // 交易对 "c": "0.0025", // 最新成交价格 "o": "0.0010", // 24小时前开始第一笔成交价格 "h": "0.0025", // 24小时内最高成交价 "l": "0.0010", // 24小时内最低成交价 "v": "10000", // 成交量 "q": "18" // 成交额 }] * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Mini-Tickers-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # All Book Tickers Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#__docusaurus_skipToContent_fallback) 本页总览 全市场最优挂单信息 ========= 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 所有交易对交易对最优挂单信息 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/public` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#stream-name "Stream Name的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `!bookTicker` **注意:** 响应消息不包含RPI订单,其不可见。 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **5s** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"bookTicker", // 事件类型 "u":400900217, // 更新ID "E": 1568014460893, // 事件推送时间 "T": 1568014460891, // 撮合时间 "s":"BNBUSDT", // 交易对 "b":"25.35190000", // 买单最优挂单价格 "B":"31.21000000", // 买单最优挂单数量 "a":"25.36520000", // 卖单最优挂单价格 "A":"40.66000000" // 卖单最优挂单数量} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#%E6%95%B0%E6%8D%AE%EF%BF%BD%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # All Market Tickers Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#__docusaurus_skipToContent_fallback) 本页总览 全市场的完整Ticker ============ 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 所有symbol 24小时完整ticker信息.需要注意的是,只有发生变化的ticker更新才会被推送。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#url-path "URL PATH的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `!ticker@arr` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **1000ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [ { "e": "24hrTicker", // 事件类型 "E": 123456789, // 事件时间 "s": "BNBUSDT", // 交易对 "p": "0.0015", // 24小时价格变化 "P": "250.00", // 24小时价格变化(百分比) "w": "0.0018", // 平均价格 "c": "0.0025", // 最新成交价格 "Q": "10", // 最新成交价格上的成交量 "o": "0.0010", // 24小时内第一比成交的价格 "h": "0.0025", // 24小时内最高成交价 "l": "0.0010", // 24小时内最低成交价 "v": "10000", // 24小时内成交量 "q": "18", // 24小时内成交额 "O": 0, // 统计开始时间 "C": 86400000, // 统计结束时间 "F": 0, // 24小时内第一笔成交交易ID "L": 18150, // 24小时内最后一笔成交交易ID "n": 18151 // 24小时内成交数 }] * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Tickers-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Composite Index Symbol Information Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#__docusaurus_skipToContent_fallback) 本页总览 综合指数交易对信息流 ========== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 获取交易对为综合指数的基础成分信息。 推送间隔1000毫秒(如有刷新) URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#url-path "URL PATH的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#stream-name "Stream Name的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@compositeIndex` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1000ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"compositeIndex", // 事件类型 "E":1602310596000, // 事件事件 "s":"DEFIUSDT", // 交易对 "p":"554.41604065", // 价格 "C":"baseAsset", "c":[ // 成分信息 { "b":"BAL", // 基础资产 "q":"USDT", // 报价资产 "w":"1.04884844", // 权重(数量) "W":"0.01457800", // 权重(比例) "i":"24.33521021" // 指数价格 }, { "b":"BAND", "q":"USDT", "w":"3.53782729", "W":"0.03935200", "i":"7.26420084" } ]} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Diff Book Depth Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#__docusaurus_skipToContent_fallback) 本页总览 增量深度信息 ====== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- orderbook 的变化部分,推送间隔 250 毫秒,500 毫秒,100 毫秒(如有刷新) URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/public` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#stream-name "Stream Name的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@depth` OR `@depth@500ms` OR `@depth@100ms` **注意:** 响应消息不包含RPI订单,其不可见。 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **250ms** 或 **500ms** 或 **100ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "depthUpdate", // 事件类型 "E": 123456789, // 事件时间 "T": 123456788, // 撮合时间 "s": "BNBUSDT", // 交易对 "U": 157, // 从上次推送至今新增的第一个 update Id "u": 160, // 从上次推送至今新增的最后一个 update Id "pu": 149, // 上次推送的最后一个update Id(即上条消息的‘u’) "b": [ // 变动的买单深度 [ "0.0024", // 价格 "10" // 数量 ] ], "a": [ // 变动的卖单深度 [ "0.0026", // 价格 "100" // 数量 ] ]} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Contract Info Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#__docusaurus_skipToContent_fallback) 本页总览 交易对信息信息流 ======== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Symbol状态更改时推送(上架/下架/bracket调整); `bks`仅在bracket调整时推出。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#url-path "URL PATH的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `!contractInfo` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **实时** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "e":"contractInfo", // 事件类型 "E":1669356423908, // 事件时间 "s":"IOTAUSDT", // 交易对 "ps":"IOTAUSDT", // 交易对标的 "ct":"PERPETUAL", // 合约类型 "dt":4133404800000, // 结算时间 "ot":1569398400000, // 上架时间 "cs":"TRADING", // 交易对状态 "bks":[ { "bs":1, // 层级 "bnf":0, // 该层对应的名义价值下限 "bnc":5000, // 该层对应的名义价值上限 "mmr":0.01, // 该层对应的维持保证金率 "cf":0, // 速算数 "mi":21, // 该层杠杆下界 "ma":50 // 该层杠杆上界 }, { "bs":2, "bnf":5000, "bnc":25000, "mmr":0.025, "cf":75, "mi":11, "ma":20 } ]} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Contract-Info-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Individual Symbol Book Ticker Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#__docusaurus_skipToContent_fallback) 本页总览 按Symbol的最优挂单信息 ============== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 实时推送指定交易对最优挂单信息 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#url-path "URL PATH的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/public` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `@bookTicker` **注意:** 响应消息不包含RPI订单,其不可见。 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **实时** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"bookTicker", // 事件类型 "u":400900217, // 更新ID "E": 1568014460893, // 事件推送时间 "T": 1568014460891, // 撮合时间 "s":"BNBUSDT", // 交易对 "b":"25.35190000", // 买单最优挂单价格 "B":"31.21000000", // 买单最优挂单数量 "a":"25.36520000", // 卖单最优挂单价格 "A":"40.66000000" // 卖单最优挂单数量} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Book-Ticker-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Individual Symbol Mini Ticker Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#__docusaurus_skipToContent_fallback) 本页总览 按交易对的精简Ticker ============= 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 按Symbol刷新的24小时精简ticker信息. URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#url-path "URL PATH的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#stream-name "Stream Name的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@miniTicker` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **2s** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "24hrMiniTicker", // 事件类型 "E": 123456789, // 事件时间(毫秒) "s": "BNBUSDT", // 交易对 "c": "0.0025", // 最新成交价格 "o": "0.0010", // 24小时前开始第一笔成交价格 "h": "0.0025", // 24小时内最高成交价 "l": "0.0010", // 24小时内最低成交价 "v": "10000", // 成交量 "q": "18" // 成交额 } * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Mini-Ticker-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # RPI Diff Book Depth Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#__docusaurus_skipToContent_fallback) 本页总览 RPI增量深度信息 ========= 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ orderbook 的变化部分,包含RPI订单,推送间隔 500 毫秒 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#url-path "URL PATH的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/public` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#stream-name "Stream Name的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@rpiDepth@500ms` **注意:** 响应消息包含RPI订单数量。如果增量数据的推送出现数量=0时,这意味着该价位的订单全部成交或者全部撤销,亦或该价位的RPI订单因价格交叉而隐藏 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **500ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "depthUpdate", // 事件类型 "E": 123456789, // 事件时间 "T": 123456788, // 撮合时间 "s": "BNBUSDT", // 交易对 "U": 157, // 从上次推送至今新增的第一个 update Id "u": 160, // 从上次推送至今新增的最后一个 update Id "pu": 149, // 上次推送的最后一个update Id(即上条消息的‘u’) "b": [ // 变动的买单深度 [ "0.0024", // 价格 "10" // 数量 ] ], "a": [ // 变动的卖单深度 [ "0.0026", // 价格 "100" // 数量 ] ]} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Diff-Book-Depth-Streams-RPI#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Individual Symbol Ticker Streams | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#__docusaurus_skipToContent_fallback) 本页总览 按Symbol的完整Ticker ================ 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 按Symbol刷新的24小时完整ticker信息 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#url-path "URL PATH的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#stream-name "Stream Name的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `@ticker` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **2000ms** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "e": "24hrTicker", // 事件类型 "E": 123456789, // 事件时间 "s": "BNBUSDT", // 交易对 "p": "0.0015", // 24小时价格变化 "P": "250.00", // 24小时价格变化(百分比) "w": "0.0018", // 平均价格 "c": "0.0025", // 最新成交价格 "Q": "10", // 最新成交价格上的成交量 "o": "0.0010", // 24小时内第一比成交的价格 "h": "0.0025", // 24小时内最高成交价 "l": "0.0010", // 24小时内最低成交价 "v": "10000", // 24小时内成交量 "q": "18", // 24小时内成交额 "O": 0, // 统计开始时间 "C": 86400000, // 统计关闭时间 "F": 0, // 24小时内第一笔成交交易ID "L": 18150, // 24小时内最后一笔成交交易ID "n": 18151 // 24小时内成交数} * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Individual-Symbol-Ticker-Streams#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Close User Data Stream(Websocket API) | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#__docusaurus_skipToContent_fallback) 本页总览 Websocket API关闭listenKey (USER\_STREAM) ======================================= 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 关闭某账户数据流 方式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E6%96%B9%E5%BC%8F "方式的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- `userDataStream.stop` 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82 "请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "819e1b1b-8c06-485b-a13e-131326c69599", "method": "userDataStream.stop", "params": { "apiKey": "vmPUZE6mv9SD5VNHk9HlWFsOr9aLE2zvsw0MuIgwCIPy8atIco14y7Ju91duEh8A" }} 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- None 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "id": "819e1b1b-8c06-485b-a13e-131326c69599", "status": 200, "result": {}, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 2 } ]} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [方式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E6%96%B9%E5%BC%8F) * [请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Close-User-Data-Stream-Wsp#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Account Configuration Update Previous Leverage Update | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#__docusaurus_skipToContent_fallback) 本页总览 杠杆倍数等账户配置 更新推送 ============== 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 当账户配置发生变化时会推送此类事件类型统一为`ACCOUNT_CONFIG_UPDATE` 当交易对杠杆倍数发生变化时推送消息体会包含对象`ac`表示交易对账户配置,其中`s`代表具体的交易对,`l`代表杠杆倍数 当用户联合保证金状态发生变化时推送消息体会包含对象`ai`表示用户账户配置,其中`j`代表用户联合保证金状态 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `ACCOUNT_CONFIG_UPDATE` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > **Payload:** { "e":"ACCOUNT_CONFIG_UPDATE", // 事件类型 "E":1611646737479, // 事件时间 "T":1611646737476, // 撮合时间 "ac":{ "s":"BTCUSDT", // 交易对 "l":25 // 杠杆倍数 }} > **Or** { "e":"ACCOUNT_CONFIG_UPDATE", // 事件类型 "E":1611646737479, // 事件时间 "T":1611646737476, // 撮合时间 "ai":{ // 用户账户配置 "j":true // 联合保证金状态 }} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Account-Configuration-Update-previous-Leverage-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Algo Order Update | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#__docusaurus_skipToContent_fallback) 本页总览 条件订单交易更新推送 ========== 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 当有新订单创建、订单有新成交或者新的状态变化时会推送此类事件 事件类型统一为 `ALGO_UPDATE` **本次事件的具体执行类型** * NEW:该状态表示条件订单已提交,但尚未触发。 * CANCELED:该状态表示条件订单已被取消。 * TRIGGERING:该状态表示条件订单已满足触发条件,且已被转发至撮合引擎。 * TRIGGERED:该状态表示条件订单已成功触发并成功进入撮合引擎。 * FINISHED:该状态表示触发的条件订单已在撮合引擎中被成交或取消。 * REJECTED:该状态表示条件订单被撮合引擎拒绝,例如保证金检查失败等情况。 * EXPIRED:该状态表示条件订单被系统取消。例如,用户下了一个GTE\_GTC时效条件订单,但随后关闭了该标的的所有持仓,系统因此取消了该条件订单。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------ `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `ALGO_UPDATE` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"ALGO_UPDATE", // 事件类型 "T":1750515742297, // 撮合时间 "E":1750515742303, // 事件时间 "o":{ "caid":"Q5xaq5EGKgXXa0fD7fs0Ip", // 客户端自定条件订单ID "aid":2148719, // 条件单 Id "at":"CONDITIONAL", // 条件单类型 "o":"TAKE_PROFIT", //订单类型 "s":"BNBUSDT", //交易对 "S":"SELL", //订单方向 "ps":"BOTH", //持仓方向 "f":"GTC", //有效方式 "q":"0.01", //订单数量 "X":"CANCELED", //条件单状态 "ai":"", // 触发后普通订单 id "ap": "0.00000", // 触发后在撮合引擎中实际订单的平均成交价格,仅在订单被触发并进入撮合引擎时显示 "aq": "0.00000", // 触发后在撮合引擎中实际订单已成交数量,仅当订单被触发并进入撮合引擎时显示 "act": "0", // 触发后在撮合引擎中实际的订单类型,仅当订单被触发并进入撮合引擎时显示 "tp":"750", //条件单触发价格 "p":"750", //订单价格 "V":"EXPIRE_MAKER", //自成交防止模式 "wt":"CONTRACT_PRICE", //触发价类型 "pm":"NONE", // 价格匹配模式 "cp":false, //是否为触发平仓单; 仅在条件订单情况下会推送此字段 "pP":false, //是否开启条件单触发保护 "R":false, // 是否是只减仓单 "tt":0, //触发时间 "gtd":0, // TIF为GTD的订单自动取消时间 "rm": "Reduce Only reject" // 条件单失败原因} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Algo-Order-Update#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Grid Update | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#__docusaurus_skipToContent_fallback) 本页总览 网格更新推送 ====== 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `GRID_UPDATE` 在网格子订单有部份或是完全成交时更新。 **策略状态** * NEW * WORKING * CANCELLED * EXPIRED URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `GRID_UPDATE` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "GRID_UPDATE", // 事件类型 "T": 1669262908216, // 撮合时间 "E": 1669262908218, // 事件时间 "gu": { "si": 176057039, // 策略 ID "st": "GRID", // 策略类型 "ss": "WORKING", // 策略状态 "s": "BTCUSDT", // 交易对 "r": "-0.00300716", // 已实现 PNL "up": "16720", // 未配对均价 "uq": "-0.001", // 未配对数量 "uf": "-0.00300716", // 未配对手续费 "mp": "0.0", // 已配对 PNL "ut": 1669262908197 // 更新时间 }} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-GRID-UPDATE#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Margin Call | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#__docusaurus_skipToContent_fallback) 本页总览 追加保证金通知 ======= 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 当用户持仓风险过高,会推送此消息。 * 此消息仅作为风险指导信息,不建议用于投资策略。 * 在大波动市场行情下,不排除此消息发出的同时用户仓位已被强平的可能。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------ `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `MARGIN_CALL` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e":"MARGIN_CALL", // 事件类型 "E":1587727187525, // 事件时间 "cw":"3.16812045", // 除去逐仓仓位保证金的钱包余额, 仅在全仓 margin call 情况下推送此字段 "p":[ // 涉及持仓 { "s":"ETHUSDT", // symbol "ps":"LONG", // 持仓方向 "pa":"1.327", // 仓位 "mt":"CROSSED", // 保证金模式 "iw":"0", // 若为逐仓,仓位保证金 "mp":"187.17127", // 标记价格 "up":"-1.166074", // 未实现盈亏 "mm":"1.614445" // 持仓需要的维持保证金 } ]} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-Margin-Call#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event Strategy Update | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#__docusaurus_skipToContent_fallback) 本页总览 策略交易更新推送 ======== 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `STRATEGY_UPDATE` 在策略交易创建、取消、失效等等时候更新。 **策略状态** * NEW * WORKING * CANCELLED * EXPIRED **opCode** * 8001: 策略参数更改 * 8002: 用户取消策略 * 8003: 用户手动新增或取消订单 * 8004: 达到 stop limit * 8005: 用户仓位爆仓 * 8006: 已达最大可挂单数量 * 8007: 新增网格策略 * 8008: 保证金不足 * 8009: 价格超出范围 * 8010: 市场非交易状态 * 8011: 关仓失败,平仓单无法成交 * 8012: 超过最大可交易名目金额 * 8013: 不符合网格交易身份 * 8014: 不符合 Futures Trading Quantitative Rules,策略终止 * 8015: 无仓位或是仓位已经爆仓 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#url-path "URL PATH的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------- `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `STRATEGY_UPDATE` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ { "e": "STRATEGY_UPDATE", // 事件类型 "T": 1669261797627, // 撮合时间 "E": 1669261797628, // 事件时间 "su": { "si": 176054594, // 策略 ID "st": "GRID", // 策略类型 "ss": "NEW", // 策略状态 "s": "BTCUSDT", // 交易对 "ut": 1669261797627, // 更新时间 "c": 8007 // opCode }} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-STRATEGY-UPDATE#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Event User Data Stream Expired | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#__docusaurus_skipToContent_fallback) 本页总览 listenKey过期推送 ============= 事件描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0 "事件描述的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 当前连接使用的有效listenKey过期时,user data stream 将会推送此事件。 **注意:** * 此事件与 websocket 连接中断没有必然联系 * 只有正在连接中的有效`listenKey`过期时才会收到此消息 * 收到此消息后 user data stream 将不再更新,直到用户使用新的有效的`listenKey` URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- `/private` 事件类型[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B "事件类型的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `listenKeyExpired` 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "listenKeyExpired", // 事件类型 "E": "1736996475556", // 事件时间 "listenKey":"WsCMN0a4KHUPTQuX6IUnqEZfB1inxmv1qR4kbf1LuEjur5VdbzqvyxqG9TSjVVxv"} * [事件描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#%E4%BA%8B%E4%BB%B6%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#url-path) * [事件类型](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#%E4%BA%8B%E4%BB%B6%E7%B1%BB%E5%9E%8B) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Event-User-Data-Stream-Expired#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Keepalive User Data Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#__docusaurus_skipToContent_fallback) 本页总览 延长listenKey有效期(USER\_STREAM) ============================ 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 有效期延长至本次调用后60分钟 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PUT `/fapi/v1/listenKey` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- None { "listenKey": "3HBntNTepshgEdjIwSUIBgB9keLyOCg5qv3n6bYAtktG8ejcaW5HXz9Vx1JgIieg" // 被延长的listenkey} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Keepalive-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) --- # How To Manage A Local Order Book Correctly | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/How-to-manage-a-local-order-book-correctly#__docusaurus_skipToContent_fallback) 如何正确在本地维护一个orderbook副本 ====================== 1. 订阅 **wss://fstream.binance.com/stream?streams=btcusdt@depth** 2. 开始缓存收到的更新。同一个价位,后收到的更新覆盖前面的。 3. 访问Rest接口 \*\*[https://fapi.binance.com/fapi/v1/depth?symbol=BTCUSDT&limit=1000\*\*获得一个1000档的深度快照](https://fapi.binance.com/fapi/v1/depth?symbol=BTCUSDT&limit=1000**%E8%8E%B7%E5%BE%97%E4%B8%80%E4%B8%AA1000%E6%A1%A3%E7%9A%84%E6%B7%B1%E5%BA%A6%E5%BF%AB%E7%85%A7) 4. 将目前缓存到的信息中`u`< 步骤3中获取到的快照中的`lastUpdateId`的部分丢弃(丢弃更早的信息,已经过期)。 5. 将深度快照中的内容更新到本地orderbook副本中,并从websocket接收到的第一个`U` `<= ``lastUpdateId` **且** `u` >`= ``lastUpdateId` 的event开始继续更新本地副本。 * U = 来自 WebSocket 流的 firstUpdateId(第一个更新 ID)。 * u = 来自 WebSocket 流的 finalUpdateId(最后一个更新 ID)。 * lastUpdateId = 你从 REST 深度快照中获取的 更新 ID。 6. 每一个新event的`pu`应该等于上一个event的`u`,否则可能出现了丢包,请从step3重新进行初始化。 7. 每一个event中的挂单量代表这个价格目前的挂单量**绝对值**,而不是相对变化。 8. 如果某个价格对应的挂单量为0,表示该价位的挂单已经撤单或者被吃,应该移除这个价位。 --- # WebSocket API基本信息 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#__docusaurus_skipToContent_fallback) 本页总览 WebSocket API基本信息 ================= * Base url为:**'wss://ws-fapi.binance.com/ws-fapi/v1'** * 测试网的Base url为:`wss://testnet.binancefuture.com/ws-fapi/v1` * 单次连接API有效期仅为24小时;预计在 24 小时标记后断开连接。 * Websocket服务器每3分钟发送一个ping消息。 * 如果 websocket 服务器在10分钟内没有收到来自连接的`pong frame`,则连接将断开。 * 当客户收到ping消息,必需尽快回复pong消息,同时payload需要和ping消息一致。 * 未经请求的pong消息是被允许的,但是不会保证连接不断开。**对于这些pong消息,建议payload为空**。 * 必须通过获取除签名之外的所有请求参数并按字母顺序按名称排序来生成签名payload * 除非另有说明,否则列表按**时间顺序**返回。 * 除非另有说明,否则所有时间戳均以 UTC 中的毫秒为单位。 * 除非另有说明,否则所有字段名称和值均区分大小写。 * **`INT` 参数(如时间戳)应为 JSON 整数,而不是字符串**。 * **`DECIMAL`参数(如 price)应为 JSON 字符串,而不是浮点数**。 * **用户数据流请求 - 您需要建立单独的WebSocket连接来获得 \[账户信息推送\]([https://binance-docs.github.io/apidocs/futures/cn/#websocket-2)](https://binance-docs.github.io/apidocs/futures/cn/#websocket-2%EF%BC%89) ** > 请求示例: { "id": "9ca10e58-7452-467e-9454-f669bb9c764e", "method": "order.place", "params": { "apiKey": "yeqKcXjtA9Eu4Tr3nJk61UJAGzXsEmFqqfVterxpMpR4peNfqE7Zl7oans8Qj089", "price": "42088.0", "quantity": "0.1", "recvWindow": 5000, "side": "BUY", "signature": "996962a19802b5a09d7bc6ab1524227894533322a2f8a1f8934991689cabf8fe", "symbol": "BTCUSDT", "timeInForce": "GTC", "timestamp": 1705311512994, "type": "LIMIT" }} 请求字段: | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | `id` | INT / STRING / `null` | YES | 任意的 ID 用于匹配对请求的响应 | | `method` | STRING | YES | 请求函数名称 | | `params` | OBJECT | NO | 请求参数。如果没有参数可以省略 | * 请求 `id` 是任意的。可以使用 UUID、顺次 ID、当前时间戳等。 服务器不会以任何方式解释 `id`,只是在响应中回显它。 可以在一个会话中自由重复使用 ID,不过请注意不要一次发送多个具有相同 ID 的请求,因为否则可能无法区分响应。 * 请求函数名称可以以显式版本为前缀,例如:`"v3/order.place"` * `params` 的顺序不重要。 WebSocket API响应格式[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E5%93%8D%E5%BA%94%E6%A0%BC%E5%BC%8F "WebSocket API响应格式的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 响应在 **text 帧** 中以 JSON 格式返回,每帧一个响应。 > 成功响应示例: { "id": "43a3843a-2321-4e45-8f79-351e5c354563", "status": 200, "result": { "orderId": 336829446, "symbol": "BTCUSDT", "status": "NEW", "clientOrderId": "FqEw6cn0vDhrkmfiwLYPeo", "price": "42088.00", "avgPrice": "0.00", "origQty": "0.100", "executedQty": "0.000", "cumQty": "0.000", "cumQuote": "0.00000", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0.00", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "goodTillDate": 0, "updateTime": 1705385954229 }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 1 }, { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 300, "count": 1 }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200, "count": 0 } ]} > 失败响应示例: { "id": "5761b939-27b1-4948-ab87-4a372a3f6b72", "status": 400, "error": { "code": -1102, "msg": "Mandatory parameter 'quantity' was not sent, was empty/null, or malformed." }, "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400, "count": 1 }, { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 300, "count": 1 }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200, "count": 1 } ]} 响应字段: | 名称 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | `id` | INT / STRING / `null` | YES | 与原来请求的ID一样 | | `status` | INT | YES | 响应状态。请看 [状态代码](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E7%8A%B6%E6%80%81%E4%BB%A3%E7%A0%81) | | `result` | OBJECT / ARRAY | YES | 响应内容。请求成功则显示 | | `error` | OBJECT | 错误描述。请求失败则显示 | | `rateLimits` | ARRAY | NO | 速率限制状态。请看 [速率限制](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6) | WebSocket API访问限制[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6 "WebSocket API访问限制的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * 速率限制与 REST API 相同,并且与 REST API 共享。 * WebSocket 握手尝试消耗权重5。 * ping/pong 帧的速率限制:每秒最多5次。 * 默认情况下,响应中包含速率限制信息,参见 `rateLimits` 字段。 * 可以通过在连接字符串或单个请求中的 `returnRateLimits` 布尔参数来控制 `rateLimits` 字段的可见性。 * 例如,使用 `wss://ws-fapi.binance.com/ws-fapi/v1?returnRateLimits=false` 默认在响应中隐藏 `rateLimits`。在这样的情况下,您可以在请求中传递额外的 `"returnRateLimits": true` 参数,当默认隐藏时,就可以在响应中显示速率限制。 WebSocket API连接后进行身份验证[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E8%BF%9E%E6%8E%A5%E5%90%8E%E8%BF%9B%E8%A1%8C%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81 "WebSocket API连接后进行身份验证的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 你可以使用会话身份验证请求对已经建立的连接进行身份验证: * [`session.logon`](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#log-in-with-api-key-signed) – 进行身份验证,或更改与连接相关联的API密钥。 * [`session.status`](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#query-session-status) – 检查连接状态和当前API密钥。 * [`session.logout`](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#log-out-of-the-session) – 忘记与连接关联的API密钥。 WebSocket API关于吊销API密钥[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E5%85%B3%E4%BA%8E%E5%90%8A%E9%94%80api%E5%AF%86%E9%92%A5 "WebSocket API关于吊销API密钥的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 如果在活动会话期间,由于 _任何_ 原因(例如IP地址未被加入白名单、API密钥被删除、API密钥没有正确的权限等),在下一个请求后,会话将被吊销,并显示以下错误消息: { "id": null, "status": 401, "error": { "code": -2015, "msg": "Invalid API-key, IP, or permissions for action." }} WebSocket API授权 _临时_ 请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E6%8E%88%E6%9D%83-%E4%B8%B4%E6%97%B6-%E8%AF%B7%E6%B1%82 "websocket-api授权-临时-请求的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- WebSocket连接只能通过一个API密钥进行身份验证。 默认情况下,经过身份验证的API密钥将用于需要`apiKey`参数的请求。 但是,你始终可以为单个请求明确指定`apiKey`和`signature`,覆盖已认证的API密钥,以使用不同的API密钥授权特定请求。 例如,你可能希望用默认密钥来验证 `USER_DATA`,但在下单时使用`TRADE`密钥来签名。 WebSocket API身份验证请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E8%AF%B7%E6%B1%82 "WebSocket API身份验证请求的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ **注意:** 仅支持 _Ed25519_ 密钥用于此功能。 ### 用API key登录 (SIGNED)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E7%94%A8api-key%E7%99%BB%E5%BD%95-signed "用API key登录 (SIGNED)的直接链接") > **请求** { "id": "c174a2b1-3f51-4580-b200-8528bd237cb7", "method": "session.logon", "params": { "apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "signature": "1cf54395b336b0a9727ef27d5d98987962bc47aca6e13fe978612d0adee066ed", "timestamp": 1649729878532 }} > **响应:** { "id": "c174a2b1-3f51-4580-b200-8528bd237cb7", "status": 200, "result": { "apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "authorizedSince": 1649729878532, "connectedSince": 1649729873021, "returnRateLimits": false, "serverTime": 1649729878630 }} 使用提供的API密钥进行WebSocket连接身份验证。 在调用`session.logon`后,将来的需要`apiKey`和`signature`参数的请求可以省略它们。 请注意,只能认证一个API密钥。 多次调用`session.logon`将更改当前已认证的API密钥。 **权重:** 2 **参数:** | 参数名 | 类型 | 是否必需 | 描述 | | --- | --- | --- | --- | | `apiKey` | STRING | YES | | | `recvWindow` | INT | NO | The value cannot be greater than `60000` | | `signature` | STRING | YES | | | `timestamp` | INT | YES | | **数据源:** 缓存 ### 查询会话状态[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E6%9F%A5%E8%AF%A2%E4%BC%9A%E8%AF%9D%E7%8A%B6%E6%80%81 "查询会话状态的直接链接") > **请求** { "id": "b50c16cd-62c9-4e29-89e4-37f10111f5bf", "method": "session.status"} > **响应:** { "id": "b50c16cd-62c9-4e29-89e4-37f10111f5bf", "status": 200, "result": { // 如果连接未经身份验证,"apiKey" 和 "authorizedSince" 将显示为 null。 "apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A", "authorizedSince": 1649729878532, "connectedSince": 1649729873021, "returnRateLimits": false, "serverTime": 1649730611671 }} 查询WebSocket连接的状态,检查用于授权请求的API密钥(如果有的话)。 **权重:** 2 **参数:** NONE **数据源:** 缓存 ### 退出会话[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E9%80%80%E5%87%BA%E4%BC%9A%E8%AF%9D "退出会话的直接链接") > **请求** { "id": "c174a2b1-3f51-4580-b200-8528bd237cb7", "method": "session.logout"} > **响应:** { "id": "c174a2b1-3f51-4580-b200-8528bd237cb7", "status": 200, "result": { "apiKey": null, "authorizedSince": null, "connectedSince": 1649729873021, "returnRateLimits": false, "serverTime": 1649730611671 }} 忘记之前认证的API密钥。 如果连接未经身份验证,此请求不会有任何作用。 请注意,`session.logout`请求后,WebSocket连接仍然保持打开状态。 你可以继续使用连接,但现在必须在需要的地方明确提供`apiKey`和`signature`参数。 **权重:** 2 **参数:** NONE **数据源:** 缓存 SIGNED (TRADE and USER\_DATA) 请求安全[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#signed-trade-and-user_data-%E8%AF%B7%E6%B1%82%E5%AE%89%E5%85%A8 "SIGNED (TRADE and USER_DATA) 请求安全的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### SIGNED 请求示例 (Ed25519)[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#signed-%E8%AF%B7%E6%B1%82%E7%A4%BA%E4%BE%8B-ed25519 "SIGNED 请求示例 (Ed25519)的直接链接") | 参数 | 取值 | | --- | --- | | symbol | BTCUSDT | | side | SELL | | type | LIMIT | | timeInForce | GTC | | quantity | 1 | | price | 0.2 | | timestamp | 1668481559918 | #!/usr/bin/env python3import base64import timeimport jsonfrom cryptography.hazmat.primitives.serialization import load_pem_private_keyfrom websocket import create_connection# 设置身份验证:API_KEY='替换成您的 API Key'PRIVATE_KEY_PATH='test-prv-key.pem'# 加载 private key。# 在这个例子中,private key 没有加密,但我们建议使用强密码以提高安全性。with open(PRIVATE_KEY_PATH, 'rb') as f: private_key = load_pem_private_key(data=f.read(), password=None)# 设置请求参数:params = { 'apiKey': API_KEY, 'symbol': 'BTCUSDT', 'side': 'SELL', 'type': 'LIMIT', 'timeInForce': 'GTC', 'quantity': '1.0000000', 'price': '0.20'}# 参数中加时间戳:timestamp = int(time.time() * 1000) # 以毫秒为单位的 UNIX 时间戳params['timestamp'] = timestamp# 参数中加签名:payload = '&'.join([f'{param}={value}' for param, value in sorted(params.items())])signature = base64.b64encode(private_key.sign(payload.encode('ASCII')))params['signature'] = signature.decode('ASCII')# 发送请求:request = { 'id': 'my_new_order', 'method': 'order.place', 'params': params}ws = create_connection('wss://ws-fapi.binance.com/ws-fapi/v1') ws.send(json.dumps(request)) result = ws.recv() ws.close() print(result) 右边有 Python 脚本来示例如何使用 Ed25519 key 签名。 * [WebSocket API响应格式](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E5%93%8D%E5%BA%94%E6%A0%BC%E5%BC%8F) * [WebSocket API访问限制](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E8%AE%BF%E9%97%AE%E9%99%90%E5%88%B6) * [WebSocket API连接后进行身份验证](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E8%BF%9E%E6%8E%A5%E5%90%8E%E8%BF%9B%E8%A1%8C%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81) * [WebSocket API关于吊销API密钥](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E5%85%B3%E4%BA%8E%E5%90%8A%E9%94%80api%E5%AF%86%E9%92%A5) * [WebSocket API授权 _临时_ 请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E6%8E%88%E6%9D%83-%E4%B8%B4%E6%97%B6-%E8%AF%B7%E6%B1%82) * [WebSocket API身份验证请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#websocket-api%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E8%AF%B7%E6%B1%82) * [用API key登录 (SIGNED)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E7%94%A8api-key%E7%99%BB%E5%BD%95-signed) * [查询会话状态](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E6%9F%A5%E8%AF%A2%E4%BC%9A%E8%AF%9D%E7%8A%B6%E6%80%81) * [退出会话](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#%E9%80%80%E5%87%BA%E4%BC%9A%E8%AF%9D) * [SIGNED (TRADE and USER\_DATA) 请求安全](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#signed-trade-and-user_data-%E8%AF%B7%E6%B1%82%E5%AE%89%E5%85%A8) * [SIGNED 请求示例 (Ed25519)](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-api-general-info#signed-%E8%AF%B7%E6%B1%82%E7%A4%BA%E4%BE%8B-ed25519) --- # Start User Data Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#__docusaurus_skipToContent_fallback) 本页总览 生成listenKey (USER\_STREAM) ========================== 接口描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0 "接口描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 创建一个新的user data stream,返回值为一个listenKey,即websocket订阅的stream名称。如果该帐户具有有效的`listenKey`,则将返回该`listenKey`并将其有效期延长60分钟。 HTTP请求[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#http%E8%AF%B7%E6%B1%82 "HTTP请求的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------- POST `/fapi/v1/listenKey` 请求权重[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D "请求权重的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1** 请求参数[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 "请求参数的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- None 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1"} * [接口描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E6%8E%A5%E5%8F%A3%E6%8F%8F%E8%BF%B0) * [HTTP请求](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#http%E8%AF%B7%E6%B1%82) * [请求权重](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E8%AF%B7%E6%B1%82%E6%9D%83%E9%87%8D) * [请求参数](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/user-data-streams/Start-User-Data-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Trading Session Stream | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#__docusaurus_skipToContent_fallback) 本页总览 当前交易时段 ====== 数据流描述[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0 "数据流描述的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 每秒返回统金融合约标的资产(美股市场及大宗商品市场)的当前交易时段信息。不同标的市场的交易时段信息由不同消息推送。美股市场的交易时段包括 "PRE\_MARKET"、"REGULAR"、"AFTER\_MARKET"、"OVERNIGHT" 及 "NO\_TRADING";大宗商品市场的交易时段包括 "REGULAR" 和 "NO\_TRADING"。 URL PATH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#url-path "URL PATH的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ `/market` Stream Name[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#stream-name "Stream Name的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `tradingSession` 更新速度[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6 "更新速度的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **1s** 响应示例[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B "响应示例的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { "e": "EquityUpdate", // 事件类型, 也可以是CommodityUpdate "E": 1765244143062, // 事件时间 "t": 1765242000000, // 交易时段开始时间 "T": 1765270800000, // 交易时段结束时间 "S": "OVERNIGHT" // 交易时段类型 } * [数据流描述](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#%E6%95%B0%E6%8D%AE%E6%B5%81%E6%8F%8F%E8%BF%B0) * [URL PATH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#url-path) * [Stream Name](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#stream-name) * [更新速度](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#%E6%9B%B4%E6%96%B0%E9%80%9F%E5%BA%A6) * [响应示例](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams/Trading-Session-Stream#%E5%93%8D%E5%BA%94%E7%A4%BA%E4%BE%8B) --- # Self Trade Prevention | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#__docusaurus_skipToContent_fallback) 本页总览 自我交易预防 (Self Trade Prevention - STP) 常见问题 ========================================= 什么是 Self Trade Prevention - STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E4%BB%80%E4%B9%88%E6%98%AF-self-trade-prevention---stp "什么是 Self Trade Prevention - STP?的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 自我交易预防是指阻止订单与来自同一账户或者同一 `tradeGroupId` 账户的订单交易。 什么是自我交易(self-trade)?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E4%BB%80%E4%B9%88%E6%98%AF%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93self-trade "什么是自我交易(self-trade)?的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 在以下任一情况下都可能发生自我交易: * 属于同一账户的订单之间交易。 * 属于相同 `tradeGroupId` 的账户的订单之间交易。 STP 触发时会发生什么?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#stp-%E8%A7%A6%E5%8F%91%E6%97%B6%E4%BC%9A%E5%8F%91%E7%94%9F%E4%BB%80%E4%B9%88 "STP 触发时会发生什么?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 如果订单会触发自我交易,系统将执行三种可能的模式: `EXPIRE_TAKER` - 此模式通过立即使吃单者(taker)的剩余数量过期来预防交易。 `EXPIRE_MAKER` - 此模式通过立即使潜在挂单者(maker)的剩余数量过期来预防交易。 `EXPIRE_BOTH` - 此模式通过立即同时使吃单和挂单者的剩余数量过期来预防交易。 STP 的发生取决于 **Taker 订单** 的 STP 模式。 因此,订单薄上的订单的 STP 模式不再有效果,并且将在所有未来的订单处理中被忽略。 如何在订单上设置自我交易预防 ?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%A6%82%E4%BD%95%E5%9C%A8%E8%AE%A2%E5%8D%95%E4%B8%8A%E8%AE%BE%E7%BD%AE%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93%E9%A2%84%E9%98%B2- "如何在订单上设置自我交易预防 ?的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 自我交易预防可以通过下单接口的参数`selfTradePreventionMode`设置,相关接口如下: * POST `/fapi/v1/order` * POST `/fapi/v1/batchOrders` 什么是交易组 Id(Trade Group Id)?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E4%BB%80%E4%B9%88%E6%98%AF%E4%BA%A4%E6%98%93%E7%BB%84-idtrade-group-id "什么是交易组 Id(Trade Group Id)?的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 属于同一 `tradeGroupId` 的账户被视为同一交易组。相同交易组成员提交的订单有 STP 资格。 每个账户可以从 `GET /fapi/v1/accountConfig`(REST API)确认账户是否属于同一个 `tradeGroupId`。 `tradeGroupId` 也存在 `GET /api/v3/preventedMatches`(Rest API)或 `myPreventedMatches`(Websocket API)的响应中。 如果该值为 `-1`,这表示账户未设置 `tradeGroupId`,因此 STP 只能发生在同一账户的订单之间。 我们将在之后的更新提供将子账户设置为同一`tradeGroupId`的功能 如何知道有那些交易对支持 STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E6%9C%89%E9%82%A3%E4%BA%9B%E4%BA%A4%E6%98%93%E5%AF%B9%E6%94%AF%E6%8C%81-stp "如何知道有那些交易对支持 STP?的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 所有`GET fapi/v1/exchangeInfo`中的交易对都支持`selfTradePreventionMode`。 哪些订单类型支持 STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%93%AA%E4%BA%9B%E8%AE%A2%E5%8D%95%E7%B1%BB%E5%9E%8B%E6%94%AF%E6%8C%81-stp "哪些订单类型支持 STP?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `LIMIT`/`MARKET`/`STOP`/`TAKE_PROFIT`/`STOP_MARKET`/`TAKE_PROFIT_MARKET`/`TRAILING_STOP_MARKET` 在Time in force(timeInForce)设置为`GTC`/ `IOC`/ `GTD`时支持STP。 当Time in force(timeInForce)为`FOK` 或 `GTX`时订单STP设置不生效 改单是否支持 STP?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E6%94%B9%E5%8D%95%E6%98%AF%E5%90%A6%E6%94%AF%E6%8C%81-stp "改单是否支持 STP?的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 目前不支持。改单会将订单的`selfTradePreventionMode` 重制为 `NONE` 如何知道订单因为 STP 而过期?[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E8%AE%A2%E5%8D%95%E5%9B%A0%E4%B8%BA-stp-%E8%80%8C%E8%BF%87%E6%9C%9F "如何知道订单因为 STP 而过期?的直接链接") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 订单的状态会是 `EXPIRED_IN_MATCH`. 在用户信息流推送 `ORDER_TRADE_UPDATE`,如果订单因为STP过期字段`X`会显示`EXPIRED_IN_MATCH` { "e":"ORDER_TRADE_UPDATE", // Event Type "E":1568879465651, // Event Time "T":1568879465650, // Transaction Time "o":{ "s":"BTCUSDT", // Symbol "c":"TEST", // Client Order Id // special client order id: // starts with "autoclose-": liquidation order // "adl_autoclose": ADL auto close order // "settlement_autoclose-": settlement order for delisting or delivery "S":"SELL", // Side "o":"TRAILING_STOP_MARKET", // Order Type "f":"GTC", // Time in Force "q":"0.001", // Original Quantity "p":"0", // Original Price "ap":"0", // Average Price "sp":"7103.04", // Stop Price. Please ignore with TRAILING_STOP_MARKET order "x":"EXPIRED", // Execution Type "X":"EXPIRED_IN_MATCH", // Order Status "i":8886774, // Order Id "l":"0", // Order Last Filled Quantity "z":"0", // Order Filled Accumulated Quantity "L":"0", // Last Filled Price "N":"USDT", // Commission Asset, will not push if no commission "n":"0", // Commission, will not push if no commission "T":1568879465650, // Order Trade Time "t":0, // Trade Id "b":"0", // Bids Notional "a":"9.91", // Ask Notional "m":false, // Is this trade the maker side? "R":false, // Is this reduce only "wt":"CONTRACT_PRICE", // Stop Price Working Type "ot":"TRAILING_STOP_MARKET", // Original Order Type "ps":"LONG", // Position Side "cp":false, // If Close-All, pushed with conditional order "AP":"7476.89", // Activation Price, only puhed with TRAILING_STOP_MARKET order "cr":"5.0", // Callback Rate, only puhed with TRAILING_STOP_MARKET order "pP": false, // ignore "si": 0, // ignore "ss": 0, // ignore "rp":"0", // Realized Profit of the trade "V": "EXPIRE_MAKER", // selfTradePreventionMode "pm":"QUEUE", // price match type "gtd":1768879465650 // good till date }} STP 的一些示例:[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#stp-%E7%9A%84%E4%B8%80%E4%BA%9B%E7%A4%BA%E4%BE%8B "STP 的一些示例:的直接链接") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 假设以下示例的所有订单都是在同一个账户下发送。 **情况 A - 用户发送带有 `EXPIRE_MAKER` 的订单,该订单将与订单薄上已有的订单撮合。** Maker 订单 1: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20002 selfTradePreventionMode=EXPIRE_MAKERMaker 订单 2: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20001 selfTradePreventionMode=EXPIRE_MAKERTaker 订单 1: symbol=BTCUSDT side=SELL type=LIMIT quantity=1 price=20000 selfTradePreventionMode=EXPIRE_MAKER **结果:** : 由于 STP,订单薄上的订单将会过期,taker 订单将继续在订单薄。 Maker 订单 1 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "FILLED", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "20002", "origQty": "1", "executedQty": "1", "cumQuote": "20002", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Maker 订单 2 { "orderId": 292864711, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker2", "price": "20001", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单的响应 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "PARTIALLY_FILLED", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "20002", "origQty": "2", "executedQty": "1", "cumQuote": "20002", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 B - 用户发送带有 `EXPIRE_TAKER` 的订单,该订单将与订单薄上已有的订单撮合。** Maker 订单 1: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20002 selfTradePreventionMode=EXPIRE_MAKERMaker 订单 2: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20001 selfTradePreventionMode=EXPIRE_MAKERTaker 订单 1: symbol=BTCUSDT side=SELL type=LIMIT quantity=2 price=3 selfTradePreventionMode=EXPIRE_TAKER **结果:** : 已经在订单薄上的订单将保留,而taker订单将过期。 Maker 订单 1 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "FILLED", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Maker 订单 2 { "orderId": 292864711, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker2", "price": "20001", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单的状态 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_TAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 C - 用户发送带有 `EXPIRE_BOTH` 的订单,该订单将与订单薄上已有的订单撮合。** Maker 订单: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=20002 selfTradePreventionMode=EXPIRE_MAKERTaker 订单: symbol=BTCUSDT side=SELL type=LIMIT quantity=3 price=20000 selfTradePreventionMode=EXPIRE_BOTH **结果:** 两个订单都将过期。 Maker 订单 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_BOTH", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 D - 用户在订单薄上有一个带有 `EXPIRE_MAKER` 的订单,然后发送一个带有 `EXPIRE_TAKER` 的新订单,该订单将与订单薄上的订单撮合。** Maker Order: symbol=BTCUSDT side=BUY type=LIMIT quantity=1 price=1 selfTradePreventionMode=EXPIRE_MAKERTaker Order: symbol=BTCUSDT side=SELL type=LIMIT quantity=1 price=1 selfTradePreventionMode=EXPIRE_TAKER **结果:** 将使用 taker 订单的 STP 模式,因此 taker 订单将过期。 Maker 订单 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "NEW", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_TAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} **情况 E - 用户发送带有 `EXPIRE_MAKER` 的市价订单,该订单将与订单薄上已有的订单撮合。** Maker 订单: symbol=ABCDEF side=BUY type=LIMIT quantity=1 price=1 selfTradePreventionMode=EXPIRE_MAKERTaker 订单: symbol=ABCDEF side=SELL type=MARKET quantity=3 selfTradePreventionMode=EXPIRE_MAKER **结果:** 由于 STP,订单薄上的订单会过期,状态为 `EXPIRED_IN_MATCH`。 由于订单薄上的流动性低,新订单也已过期但状态为 `EXPIRED`。 Maker 订单 { "orderId": 292864710, "symbol": "BTCUSDT", "status": "EXPIRED_IN_MATCH", "clientOrderId": "testMaker1", "price": "20002", "avgPrice": "0.0000", "origQty": "1", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} Taker 订单 { "orderId": 292864712, "symbol": "BTCUSDT", "status": "EXPIRED", "clientOrderId": "testTaker1", "price": "20000", "avgPrice": "0.0000", "origQty": "3", "executedQty": "0", "cumQuote": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceMatch": "NONE", "selfTradePreventionMode": "EXPIRE_MAKER", "goodTillDate": "null", "priceProtect": false, "origType": "LIMIT", "time": 1692849639460, "updateTime": 1692849639460} * [什么是 Self Trade Prevention - STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E4%BB%80%E4%B9%88%E6%98%AF-self-trade-prevention---stp) * [什么是自我交易(self-trade)?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E4%BB%80%E4%B9%88%E6%98%AF%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93self-trade) * [STP 触发时会发生什么?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#stp-%E8%A7%A6%E5%8F%91%E6%97%B6%E4%BC%9A%E5%8F%91%E7%94%9F%E4%BB%80%E4%B9%88) * [如何在订单上设置自我交易预防 ?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%A6%82%E4%BD%95%E5%9C%A8%E8%AE%A2%E5%8D%95%E4%B8%8A%E8%AE%BE%E7%BD%AE%E8%87%AA%E6%88%91%E4%BA%A4%E6%98%93%E9%A2%84%E9%98%B2-) * [什么是交易组 Id(Trade Group Id)?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E4%BB%80%E4%B9%88%E6%98%AF%E4%BA%A4%E6%98%93%E7%BB%84-idtrade-group-id) * [如何知道有那些交易对支持 STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E6%9C%89%E9%82%A3%E4%BA%9B%E4%BA%A4%E6%98%93%E5%AF%B9%E6%94%AF%E6%8C%81-stp) * [哪些订单类型支持 STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%93%AA%E4%BA%9B%E8%AE%A2%E5%8D%95%E7%B1%BB%E5%9E%8B%E6%94%AF%E6%8C%81-stp) * [改单是否支持 STP?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E6%94%B9%E5%8D%95%E6%98%AF%E5%90%A6%E6%94%AF%E6%8C%81-stp) * [如何知道订单因为 STP 而过期?](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#%E5%A6%82%E4%BD%95%E7%9F%A5%E9%81%93%E8%AE%A2%E5%8D%95%E5%9B%A0%E4%B8%BA-stp-%E8%80%8C%E8%BF%87%E6%9C%9F) * [STP 的一些示例:](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/faq/stp-faq#stp-%E7%9A%84%E4%B8%80%E4%BA%9B%E7%A4%BA%E4%BE%8B) --- # Connect | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/websocket-market-streams#__docusaurus_skipToContent_fallback) 市场数据连接 ====== * 本篇所列出的所有wss接口需用下列方式连接: * Base Url:**wss://fstream.binance.com** * 订阅单一stream格式为 **/ws/** * 组合streams的URL格式为 **/stream?streams=///** * 连接样例: * `wss://fstream.binance.com/ws/bnbusdt@aggTrade` * `wss://fstream.binance.com/stream?streams=bnbusdt@aggTrade/btcusdt@markPrice` * 订阅组合streams时,事件payload会以这样的格式封装 **{"stream":"}** * stream名称中所有交易对均为**小写**。 * 每个链接有效期不超过24小时,请妥善处理断线重连。 * 服务端每3分钟会发送ping帧,客户端应当在10分钟内回复pong帧,否则服务端会主动断开链接。允许客户端发送不成对的pong帧(即客户端可以以高于15分钟每次的频率发送pong帧保持链接)。 * Websocket服务器每秒最多接受10个订阅消息。 * 如果用户发送的消息超过限制,连接会被断开连接。反复被断开连接的IP有可能被服务器屏蔽。 * 单个连接最多可以订阅 **1024** 个Streams。 --- # 错误代码 | Binance Open Platform [跳到主要内容](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#__docusaurus_skipToContent_fallback) 本页总览 错误代码 ==== > error JSON payload: { "code":-1121, "msg":"Invalid symbol."} 错误由两部分组成:错误代码和消息。 代码是通用的,但是消息可能会有所不同。 10xx - 常规服务器或网络问题[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#10xx---%E5%B8%B8%E8%A7%84%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%88%96%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98 "10xx - 常规服务器或网络问题的直接链接") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-1000 UNKNOWN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1000-unknown "-1000 UNKNOWN的直接链接") * An unknown error occured while processing the request. * 处理请求时发生未知错误。 ### \-1001 DISCONNECTED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1001-disconnected "-1001 DISCONNECTED的直接�链接") * Internal error; unable to process your request. Please try again. * 内部错误; 无法处理您的请求。 请再试一次. ### \-1002 UNAUTHORIZED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1002-unauthorized "-1002 UNAUTHORIZED的直接链接") * You are not authorized to execute this request. * 您无权执行此请求。 ### \-1003 TOO\_MANY\_REQUESTS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1003-too_many_requests "-1003 TOO_MANY_REQUESTS的直接链接") * Too many requests; current limit is %s requests per minute. Please use the websocket for live updates to avoid polling the API. * 请求权重过多; 当前限制为每分钟%s请求权重。 请使用websocket进行实时更新,以避免轮询API。 * Way too many requests; IP banned until %s. Please use the websocket for live updates to avoid bans. * 请求权重过多; IP被禁止,直到%s。 请使用websocket进行实时更新,以免被禁。 ### \-1004 DUPLICATE\_IP[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1004-duplicate_ip "-1004 DUPLICATE_IP的直接链接") * This IP is already on the white list * IP地址已经在白名单 ### \-1005 NO\_SUCH\_IP[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1005-no_such_ip "-1005 NO_SUCH_IP�的直接链接") * No such IP has been white listed * 白名单上没有此IP地址 ### \-1006 UNEXPECTED\_RESP[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1006-unexpected_resp "-1006 UNEXPECTED_RESP的直接链接") * An unexpected response was received from the message bus. Execution status unknown. * 从消息总线收到意外的响应。执行状态未知。 ### \-1007 TIMEOUT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1007-timeout "-1007 TIMEOUT的直接链接") * Timeout waiting for response from backend server. Send status unknown; execution status unknown. * 等待后端服务器响应超时。 发送状态未知; 执行状态未知。 ### \-1008 Request Throttled[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1008-request-throttled "-1008 Request Throttled的直接链接") * Server is currently overloaded with other requests. Please try again in a few minutes. * 服务器当前请求过多,请几分钟后再试。 * Request throttled by system-level protection. Reduce-only/close-position orders are exempt. Please try again. ### \-1014 UNKNOWN\_ORDER\_COMPOSITION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1014-unknown_order_composition "-1014 UNKNOWN_ORDER_COMPOSITION的直接链接") * Unsupported order combination. * 不支持当前的下单参数组合 ### \-1015 TOO\_MANY\_ORDERS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1015-too_many_orders "-1015 TOO_MANY_ORDERS的直接链接") * Too many new orders. * 新订单太多。 * Too many new orders; current limit is %s orders per %s.  \* 新订单太多; 当前限制为每%s %s个订单。 ### \-1016 SERVICE\_SHUTTING\_DOWN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1016-service_shutting_down "-1016 SERVICE_SHUTTING_DOWN的直接链接") * This service is no longer available. * 该服务不可用。 ### \-1020 UNSUPPORTED\_OPERATION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1020-unsupported_operation "-1020 UNSUPPORTED_OPERATION的直接链接") * This operation is not supported. * 不支持此操作。 ### \-1021 INVALID\_TIMESTAMP[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1021-invalid_timestamp "-1021 INVALID_TIMESTAMP的直接链接") * Timestamp for this request is outside of the recvWindow. * 此请求的时间戳在recvWindow之外。 * Timestamp for this request was 1000ms ahead of the server's time.  \* 此请求的时间戳比服务器时间提前1000毫秒。 ### \-1022 INVALID\_SIGNATURE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1022-invalid_signature "-1022 INVALID_SIGNATURE的直接链接") * Signature for this request is not valid. * 此请求的签名无效。 ### \-1023 START\_TIME\_GREATER\_THAN\_END\_TIME[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1023-start_time_greater_than_end_time "-1023 START_TIME_GREATER_THAN_END_TIME的直接链接") * Start time is greater than end time. * 参数里面的开始时间在结束时间之后 ### \-1099 NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1099-not_found "-1099 NOT_FOUND的直接链接") * Not found, unauthenticated, or unauthorized. 11xx - Request issues[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#11xx---request-issues "11xx - Request issues的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-1100 ILLEGAL\_CHARS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1100-illegal_chars "-1100 ILLEGAL_CHARS的直接链接") * Illegal characters found in a parameter. * 在参数中发现非法字符。 * Illegal characters found in parameter '%s'; legal range is '%s'. * 在参数`%s`中发现非法字符; 合法范围是`%s`。 ### \-1101 TOO\_MANY\_PARAMETERS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1101-too_many_parameters "-1101 TOO_MANY_PARAMETERS的直接链接") * Too many parameters sent for this endpoint. * 为此端点发送的参数太多。 * Too many parameters; expected '%s' and received '%s'. * 参数太多;预期为`%s`并收到了`%s`。 * Duplicate values for a parameter detected.  \* 检测到的参数值重复。 ### \-1102 MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1102-mandatory_param_empty_or_malformed "-1102 MANDATORY_PARAM_EMPTY_OR_MALFORMED的直接链接") * A mandatory parameter was not sent, was empty/null, or malformed. * 未发送强制性参数,该参数为空/空或格式错误。 * Mandatory parameter '%s' was not sent, was empty/null, or malformed.  \* 强制参数`%s`未发送,为空/空或格式错误。 * Param '%s' or '%s' must be sent, but both were empty/null!  \* 必须发送参数`%s`或`%s`,但两者均为空! ### \-1103 UNKNOWN\_PARAM[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1103-unknown_param "-1103 UNKNOWN_PARAM的直接链接") * An unknown parameter was sent. * 发送了未知参数。 ### \-1104 UNREAD\_PARAMETERS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1104-unread_parameters "-1104 UNREAD_PARAMETERS的直接链接") * Not all sent parameters were read. * 并非所有发送的参数都被读取。 * Not all sent parameters were read; read '%s' parameter(s) but was sent '%s'. * 并非所有发送的参数都被读取; 读取了`%s`参数,但被发送了`%s`。 ### \-1105 PARAM\_EMPTY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1105-param_empty "-1105 PARAM_EMPTY的直接链接") * A parameter was empty. * 参数为空。 * Parameter '%s' was empty. * 参数`%s`为空。 ### \-1106 PARAM\_NOT\_REQUIRED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1106-param_not_required "-1106 PARAM_NOT_REQUIRED的直接链接") * A parameter was sent when not required. * 发送了不需要的参数。 * Parameter '%s' sent when not required. * 发送了不需要参数`%s`。 ### \-1108 BAD\_ASSET[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1108-bad_asset "-1108 BAD_ASSET的直接链接") * Invalid asset. * 资产不正确 ### \-1109 BAD\_ACCOUNT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1109-bad_account "-1109 BAD_ACCOUNT的直接链接") * Invalid account. * 非有效账户 ### \-1110 BAD\_INSTRUMENT\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1110-bad_instrument_type "-1110 BAD_INSTRUMENT_TYPE的直接链接") * Invalid symbolType. * 交易对不正确 ### \-1111 BAD\_PRECISION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1111-bad_precision "-1111 BAD_PRECISION的直接链接") * Precision is over the maximum defined for this asset. * 精度超过为此资产定义的最大值。 ### \-1112 NO\_DEPTH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1112-no_depth "-1112 NO_DEPTH的直接链接") * No orders on book for symbol. * 交易对没有挂单。 ### \-1113 WITHDRAW\_NOT\_NEGATIVE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1113-withdraw_not_negative "-1113 WITHDRAW_NOT_NEGATIVE的直接链接") * Withdrawal amount must be negative. * 提现数量需要为负 ### \-1114 TIF\_NOT\_REQUIRED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1114-tif_not_required "-1114 TIF_NOT_REQUIRED的直接链接") * TimeInForce parameter sent when not required. * 发送的`TimeInForce`参数不需要。 ### \-1115 INVALID\_TIF[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1115-invalid_tif "-1115 INVALID_TIF的直接链接") * Invalid timeInForce. * 无效的`timeInForce` ### \-1116 INVALID\_ORDER\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1116-invalid_order_type "-1116 INVALID_ORDER_TYPE的直接链接") * Invalid orderType. * 无效订单类型。 ### \-1117 INVALID\_SIDE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1117-invalid_side "-1117 INVALID_SIDE的直接链接") * Invalid side. * 无效买卖方向。 ### \-1118 EMPTY\_NEW\_CL\_ORD\_ID[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1118-empty_new_cl_ord_id "-1118 EMPTY_NEW_CL_ORD_ID的直接链接") * New client order ID was empty. * 新的客户订单ID为空。 ### \-1119 EMPTY\_ORG\_CL\_ORD\_ID[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1119-empty_org_cl_ord_id "-1119 EMPTY_ORG_CL_ORD_ID的直接链接") * Original client order ID was empty. * 客户自定义的订单ID为空。 ### \-1120 BAD\_INTERVAL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1120-bad_interval "-1120 BAD_INTERVAL的直接链接") * Invalid interval. * 无效时间间隔。 ### \-1121 BAD\_SYMBOL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1121-bad_symbol "-1121 BAD_SYMBOL的直接链接") * Invalid symbol. * 无效的交易对。 ### \-1122 INVALID\_SYMBOL\_STATUS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1122-invalid_symbol_status "-1122 INVALID_SYMBOL_STATUS的直接链接") * Invalid symbol status. * 交易对状态不正确。 ### \-1125 INVALID\_LISTEN\_KEY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1125-invalid_listen_key "-1125 INVALID_LISTEN_KEY的直接链接") * This listenKey does not exist. * 此`listenKey`不存在。建议重新使用`POST /fapi/v1/listenKey`生成`listenKey` ### \-1126 ASSET\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1126-asset_not_supported "-1126 ASSET_NOT_SUPPORTED的直接链接") * This asset is not supported. * 不支持该资产 ### \-1127 MORE\_THAN\_XX\_HOURS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1127-more_than_xx_hours "-1127 MORE_THAN_XX_HOURS的直接链接") * Lookup interval is too big. * 查询间隔太大。 * More than %s hours between startTime and endTime. * 从开始时间到结束时间之间超过`%s`小时。 ### \-1128 OPTIONAL\_PARAMS\_BAD\_COMBO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1128-optional_params_bad_combo "-1128 OPTIONAL_PARAMS_BAD_COMBO的直接链接") * Combination of optional parameters invalid. * 可选参数组合无效。 ### \-1130 INVALID\_PARAMETER[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1130-invalid_parameter "-1130 INVALID_PARAMETER的直接链接") * Invalid data sent for a parameter. * 发送的参数为无效数据。 * Data sent for parameter '%s' is not valid. * 发送参数`%s`的数据无效。 ### \-1136 INVALID\_NEW\_ORDER\_RESP\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1136-invalid_new_order_resp_type "-1136 INVALID_NEW_ORDER_RESP_TYPE的直接链接") * Invalid newOrderRespType. * 无效的 newOrderRespType。 20xx - Processing Issues[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#20xx---processing-issues "20xx - Processing Issues的直接链接") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-2010 NEW\_ORDER\_REJECTED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2010-new_order_rejected "-2010 NEW_ORDER_REJECTED的直接链接") * NEW\_ORDER\_REJECTED * 新订单被拒绝 ### \-2011 CANCEL\_REJECTED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2011-cancel_rejected "-2011 CANCEL_REJECTED的直接链接") * CANCEL\_REJECTED * 取消订单被拒绝 "Unknown order sent" ### \-2012 CANCEL\_ALL\_FAIL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2012-cancel_all_fail "-2012 CANCEL_ALL_FAIL的直接链接") * Batch cancel failure. * 批量取消失败 ### \-2013 NO\_SUCH\_ORDER[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2013-no_such_order "-2013 NO_SUCH_ORDER的直接链接") * Order does not exist. * 订单不存在。 ### \-2014 BAD\_API\_KEY\_FMT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2014-bad_api_key_fmt "-2014 BAD_API_KEY_FMT的直接链接") * API-key format invalid. * API-key 格式无效。 ### \-2015 REJECTED\_MBX\_KEY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2015-rejected_mbx_key "-2015 REJECTED_MBX_KEY的直接链接") * Invalid API-key, IP, or permissions for action. * 无效的API密钥,IP或操作权限。 ### \-2016 NO\_TRADING\_WINDOW[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2016-no_trading_window "-2016 NO_TRADING_WINDOW的直接链接") * No trading window could be found for the symbol. Try ticker/24hrs instead. * 找不到该交易对的交易窗口。 尝试改为24小时自动报价。 ### \-2017 API\_KEYS\_LOCKED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2017-api_keys_locked "-2017 API_KEYS_LOCKED的直接链接") * API Keys are locked on this account. * API key被上锁 ### \-2018 BALANCE\_NOT\_SUFFICIENT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2018-balance_not_sufficient "-2018 BALANCE_NOT_SUFFICIENT的直接链接") * Balance is insufficient. * 余额不足 ### \-2019 MARGIN\_NOT\_SUFFICIEN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2019-margin_not_sufficien "-2019 MARGIN_NOT_SUFFICIEN的直接链接") * Margin is insufficient. * 杠杆账户余额不足 ### \-2020 UNABLE\_TO\_FILL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2020-unable_to_fill "-2020 UNABLE_TO_FILL的直接链接") * Unable to fill. * 无法成交 ### \-2021 ORDER\_WOULD\_IMMEDIATELY\_TRIGGER[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2021-order_would_immediately_trigger "-2021 ORDER_WOULD_IMMEDIATELY_TRIGGER的直接链接") * Order would immediately trigger. * 订单可能被立刻触发 ### \-2022 REDUCE\_ONLY\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2022-reduce_only_reject "-2022 REDUCE_ONLY_REJECT的直接链接") * ReduceOnly Order is rejected. * `ReduceOnly`订单被拒绝 * 这表示新的「仅减仓(reduce-only)」订单与当前未成交同向订单存在冲突;请先取消现有订单,然后重新提交仅减仓订单。 ### \-2023 USER\_IN\_LIQUIDATION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2023-user_in_liquidation "-2023 USER_IN_LIQUIDATION的直接链接") * User in liquidation mode now. * 用户正处于被强平模式 ### \-2024 POSITION\_NOT\_SUFFICIENT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2024-position_not_sufficient "-2024 POSITION_NOT_SUFFICIENT的直接链接") * Position is not sufficient. * 持仓不足 ### \-2025 MAX\_OPEN\_ORDER\_EXCEEDED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2025-max_open_order_exceeded "-2025 MAX_OPEN_ORDER_EXCEEDED的直接链接") * Reach max open order limit. * 挂单量达到上限 ### \-2026 REDUCE\_ONLY\_ORDER\_TYPE\_NOT\_SUPPORTED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2026-reduce_only_order_type_not_supported "-2026 REDUCE_ONLY_ORDER_TYPE_NOT_SUPPORTED的直接链接") * This OrderType is not supported when reduceOnly. * 当前订单类型不支持`reduceOnly` ### \-2027 MAX\_LEVERAGE\_RATIO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2027-max_leverage_ratio "-2027 MAX_LEVERAGE_RATIO的��直接链接") * Exceeded the maximum allowable position at current leverage. * 挂单或持仓超出当前初始杠杆下的最大值 ### \-2028 MIN\_LEVERAGE\_RATIO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2028-min_leverage_ratio "-2028 MIN_LEVERAGE_RATIO的直接链接") * Leverage is smaller than permitted: insufficient margin balance. * 调整初始杠杆过低,导致可用余额不足 40xx - Filters and other Issues[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#40xx---filters-and-other-issues "40xx - Filters and other Issues的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-4000 INVALID\_ORDER\_STATUS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4000-invalid_order_status "-4000 INVALID_ORDER_STATUS的直接链接") * Invalid order status. * 订单状态不正确 ### \-4001 PRICE\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4001-price_less_than_zero "-4001 PRICE_LESS_THAN_ZERO的直接链接") * Price less than 0. * 价格小于0 ### \-4002 PRICE\_GREATER\_THAN\_MAX\_PRICE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4002-price_greater_than_max_price "-4002 PRICE_GREATER_THAN_MAX_PRICE的直接链接") * Price greater than max price. * 价格超过最大值 ### \-4003 QTY\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4003-qty_less_than_zero "-4003 QTY_LESS_THAN_ZERO的直接链接") * Quantity less than zero. * 数量小于0 ### \-4004 QTY\_LESS\_THAN\_MIN\_QTY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4004-qty_less_than_min_qty "-4004 QTY_LESS_THAN_MIN_QTY的直接链接") * Quantity less than min quantity. * 数量小于最小值 ### \-4005 QTY\_GREATER\_THAN\_MAX\_QTY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4005-qty_greater_than_max_qty "-4005 QTY_GREATER_THAN_MAX_QTY的直接链接") * Quantity greater than max quantity. * 数量大于最大值 ### \-4006 STOP\_PRICE\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4006-stop_price_less_than_zero "-4006 STOP_PRICE_LESS_THAN_ZERO的直接链接") * Stop price less than zero. * 触发价小于最小值 ### \-4007 STOP\_PRICE\_GREATER\_THAN\_MAX\_PRICE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4007-stop_price_greater_than_max_price "-4007 STOP_PRICE_GREATER_THAN_MAX_PRICE的直接链接") * Stop price greater than max price. * 触发价大于最大值 ### \-4008 TICK\_SIZE\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4008-tick_size_less_than_zero "-4008 TICK_SIZE_LESS_THAN_ZERO的直接链接") * Tick size less than zero. * 价格精度小于0 ### \-4009 MAX\_PRICE\_LESS\_THAN\_MIN\_PRICE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4009-max_price_less_than_min_price "-4009 MAX_PRICE_LESS_THAN_MIN_PRICE的直接链接") * Max price less than min price. * 最大价格小于最小价格 ### \-4010 MAX\_QTY\_LESS\_THAN\_MIN\_QTY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4010-max_qty_less_than_min_qty "-4010 MAX_QTY_LESS_THAN_MIN_QTY的直接链接") * Max qty less than min qty. * 最大数量小于最小数量 ### \-4011 STEP\_SIZE\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4011-step_size_less_than_zero "-4011 STEP_SIZE_LESS_THAN_ZERO的直接链接") * Step size less than zero. * 步进值小于0 ### \-4012 MAX\_NUM\_ORDERS\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4012-max_num_orders_less_than_zero "-4012 MAX_NUM_ORDERS_LESS_THAN_ZERO的直接链接") * Max num orders less than zero. * 最大订单量小于0 ### \-4013 PRICE\_LESS\_THAN\_MIN\_PRICE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4013-price_less_than_min_price "-4013 PRICE_LESS_THAN_MIN_PRICE的直接链接") * Price less than min price. * 价格小于最小价格 ### \-4014 PRICE\_NOT\_INCREASED\_BY\_TICK\_SIZE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4014-price_not_increased_by_tick_size "-4014 PRICE_NOT_INCREASED_BY_TICK_SIZE的直接链接") * Price not increased by tick size. * 价格增量不是价格精度的倍数。 ### \-4015 INVALID\_CL\_ORD\_ID\_LEN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4015-invalid_cl_ord_id_len "-4015 INVALID_CL_ORD_ID_LEN的直接链接") * Client order id is not valid. * 客户订单ID有误。 * Client order id length should not be more than 36 chars * 客户订单ID长度应该不多于36字符 ### \-4016 PRICE\_HIGHTER\_THAN\_MULTIPLIER\_UP[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4016-price_highter_than_multiplier_up "-4016 PRICE_HIGHTER_THAN_MULTIPLIER_UP的直接链接") * Price is higher than mark price multiplier cap. ### \-4017 MULTIPLIER\_UP\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4017-multiplier_up_less_than_zero "-4017 MULTIPLIER_UP_LESS_THAN_ZERO的直接链接") * Multiplier up less than zero. * 价格上限小于0 ### \-4018 MULTIPLIER\_DOWN\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4018-multiplier_down_less_than_zero "-4018 MULTIPLIER_DOWN_LESS_THAN_ZERO的直接链接") * Multiplier down less than zero. * 价格下限小于0 ### \-4019 COMPOSITE\_SCALE\_OVERFLOW[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4019-composite_scale_overflow "-4019 COMPOSITE_SCALE_OVERFLOW的直接链接") * Composite scale too large. ### \-4020 TARGET\_STRATEGY\_INVALID[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4020-target_strategy_invalid "-4020 TARGET_STRATEGY_INVALID的直接链接") * Target strategy invalid for orderType '%s',reduceOnly '%b'. * 目标策略值不适合`%s`订单状态, 只减仓`%b`。 ### \-4021 INVALID\_DEPTH\_LIMIT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4021-invalid_depth_limit "-4021 INVALID_DEPTH_LIMIT的直接链接") * Invalid depth limit. * 深度信息的`limit`值不正确。 * '%s' is not valid depth limit. * `%s`不是合理的深度信息的`limit`值。 ### \-4022 WRONG\_MARKET\_STATUS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4022-wrong_market_status "-4022 WRONG_MARKET_STATUS的直接链接") * market status sent is not valid. * 发送的市场状态不正确。 ### \-4023 QTY\_NOT\_INCREASED\_BY\_STEP\_SIZE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4023-qty_not_increased_by_step_size "-4023 QTY_NOT_INCREASED_BY_STEP_SIZE的直接链接") * Qty not increased by step size. * 数量的递增值不是步进值的倍数。 ### \-4024 PRICE\_LOWER\_THAN\_MULTIPLIER\_DOWN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4024-price_lower_than_multiplier_down "-4024 PRICE_LOWER_THAN_MULTIPLIER_DOWN的直接链接") * Price is lower than mark price multiplier floor. ### \-4025 MULTIPLIER\_DECIMAL\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4025-multiplier_decimal_less_than_zero "-4025 MULTIPLIER_DECIMAL_LESS_THAN_ZERO的直接链接") * Multiplier decimal less than zero. ### \-4026 COMMISSION\_INVALID[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4026-commission_invalid "-4026 COMMISSION_INVALID的直接链接") * Commission invalid. * 收益值不正确 * `%s` less than zero. * `%s`少于0 * `%s` absolute value greater than `%s` * `%s`绝对值大于`%s` ### \-4027 INVALID\_ACCOUNT\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4027-invalid_account_type "-4027 INVALID_ACCOUNT_TYPE的直接链接") * Invalid account type. * 账户类型不正确。 ### \-4028 INVALID\_LEVERAGE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4028-invalid_leverage "-4028 INVALID_LEVERAGE的直接链接") * Invalid leverage * 杠杆倍数不正确 * Leverage `%s` is not valid * 杠杆`%s`不正确 * Leverage `%s` already exist with `%s` * 杠杆`%s`已经存在于`%s` ### \-4029 INVALID\_TICK\_SIZE\_PRECISION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4029-invalid_tick_size_precision "-4029 INVALID_TICK_SIZE_PRECISION的直接链接") * Tick size precision is invalid. * 价格精度小数点位数不正确。 ### \-4030 INVALID\_STEP\_SIZE\_PRECISION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4030-invalid_step_size_precision "-4030 INVALID_STEP_SIZE_PRECISION的直接链接") * Step size precision is invalid. * 步进值小数点位数不正确。 ### \-4031 INVALID\_WORKING\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4031-invalid_working_type "-4031 INVALID_WORKING_TYPE的直接链接") * Invalid parameter working type * 不正确的参数类型 * Invalid parameter working type: `%s` * 不正确的参数类型: `%s` ### \-4032 EXCEED\_MAX\_CANCEL\_ORDER\_SIZE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4032-exceed_max_cancel_order_size "-4032 EXCEED_MAX_CANCEL_ORDER_SIZE的直接链接") * Exceed maximum cancel order size. * 超过可以取消的最大订单量。 * Invalid parameter working type: `%s` * 不正确的参数类型: `%s` ### \-4033 INSURANCE\_ACCOUNT\_NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4033-insurance_account_not_found "-4033 INSURANCE_ACCOUNT_NOT_FOUND的直接链接") * Insurance account not found. * 风险保障基金账号没找到。 ### \-4044 INVALID\_BALANCE\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4044-invalid_balance_type "-4044 INVALID_BALANCE_TYPE的直接链接") * Balance Type is invalid. * 余额类型不正确。 ### \-4045 MAX\_STOP\_ORDER\_EXCEEDED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4045-max_stop_order_exceeded "-4045 MAX_STOP_ORDER_EXCEEDED的直接链接") * Reach max stop order limit. * 达到止损单的上限。 ### \-4046 NO\_NEED\_TO\_CHANGE\_MARGIN\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4046-no_need_to_change_margin_type "-4046 NO_NEED_TO_CHANGE_MARGIN_TYPE的直接链接") * No need to change margin type. * 不需要切换仓位模式。 ### \-4047 THERE\_EXISTS\_OPEN\_ORDERS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4047-there_exists_open_orders "-4047 THERE_EXISTS_OPEN_ORDERS的直接链接") * Margin type cannot be changed if there exists open orders. * 如果有挂单,仓位模式不能切换。 ### \-4048 THERE\_EXISTS\_QUANTITY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4048-there_exists_quantity "-4048 THERE_EXISTS_QUANTITY的直接链接") * Margin type cannot be changed if there exists position. * 如果有仓位,仓位模式不能切换。 ### \-4049 ADD\_ISOLATED\_MARGIN\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4049-add_isolated_margin_reject "-4049 ADD_ISOLATED_MARGIN_REJECT的直接链接") * Add margin only support for isolated position. ### \-4050 CROSS\_BALANCE\_INSUFFICIENT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4050-cross_balance_insufficient "-4050 CROSS_BALANCE_INSUFFICIENT的直接链接") * Cross balance insufficient. * 全仓余额不足。 ### \-4051 ISOLATED\_BALANCE\_INSUFFICIENT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4051-isolated_balance_insufficient "-4051 ISOLATED_BALANCE_INSUFFICIENT的直接链接") * Isolated balance insufficient. * 逐仓余额不足。 ### \-4052 NO\_NEED\_TO\_CHANGE\_AUTO\_ADD\_MARGIN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4052-no_need_to_change_auto_add_margin "-4052 NO_NEED_TO_CHANGE_AUTO_ADD_MARGIN的直接链接") * No need to change auto add margin. ### \-4053 AUTO\_ADD\_CROSSED\_MARGIN\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4053-auto_add_crossed_margin_reject "-4053 AUTO_ADD_CROSSED_MARGIN_REJECT的直接链接") * Auto add margin only support for isolated position. * 自动增加保证金只适用于逐仓。 ### \-4054 ADD\_ISOLATED\_MARGIN\_NO\_POSITION\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4054-add_isolated_margin_no_position_reject "-4054 ADD_ISOLATED_MARGIN_NO_POSITION_REJECT的直接链接") * Cannot add position margin: position is 0. * 不能增加逐仓保证金: 持仓为0 ### \-4055 AMOUNT\_MUST\_BE\_POSITIVE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4055-amount_must_be_positive "-4055 AMOUNT_MUST_BE_POSITIVE的直接链接") * Amount must be positive. * 数量必须是正整数 ### \-4056 INVALID\_API\_KEY\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4056-invalid_api_key_type "-4056 INVALID_API_KEY_TYPE的直接链接") * Invalid api key type. * API key的类型不正确 ### \-4057 INVALID\_RSA\_PUBLIC\_KEY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4057-invalid_rsa_public_key "-4057 INVALID_RSA_PUBLIC_KEY的直接链接") * Invalid api public key * API key不正确 ### \-4058 MAX\_PRICE\_TOO\_LARGE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4058-max_price_too_large "-4058 MAX_PRICE_TOO_LARGE的直接链接") * maxPrice and priceDecimal too large,please check. * maxPrice和priceDecimal太大,请检查。 ### \-4059 NO\_NEED\_TO\_CHANGE\_POSITION\_SIDE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4059-no_need_to_change_position_side "-4059 NO_NEED_TO_CHANGE_POSITION_SIDE的直接链接") * No need to change position side. * 无需变更仓位方向 ### \-4060 INVALID\_POSITION\_SIDE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4060-invalid_position_side "-4060 INVALID_POSITION_SIDE的直接链接") * Invalid position side. * 仓位方向不正确。 ### \-4061 POSITION\_SIDE\_NOT\_MATCH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4061-position_side_not_match "-4061 POSITION_SIDE_NOT_MATCH的直接链接") * Order's position side does not match user's setting. * 订单的持仓方向和用户设置不一致。 ### \-4062 REDUCE\_ONLY\_CONFLICT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4062-reduce_only_conflict "-4062 REDUCE_ONLY_CONFLICT的直接链接") * Invalid or improper reduceOnly value. * 仅减仓的设置不正确。 ### \-4063 INVALID\_OPTIONS\_REQUEST\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4063-invalid_options_request_type "-4063 INVALID_OPTIONS_REQUEST_TYPE的直接链接") * Invalid options request type * 无效的期权请求类型 ### \-4064 INVALID\_OPTIONS\_TIME\_FRAME[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4064-invalid_options_time_frame "-4064 INVALID_OPTIONS_TIME_FRAME的直接链接") * Invalid options time frame * 无效的期权时间窗口 ### \-4065 INVALID\_OPTIONS\_AMOUNT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4065-invalid_options_amount "-4065 INVALID_OPTIONS_AMOUNT的直接链接") * Invalid options amount * 无效的期权数量 ### \-4066 INVALID\_OPTIONS\_EVENT\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4066-invalid_options_event_type "-4066 INVALID_OPTIONS_EVENT_TYPE的直接链接") * Invalid options event type * 无效的期权事件类型 ### \-4067 POSITION\_SIDE\_CHANGE\_EXISTS\_OPEN\_ORDERS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4067-position_side_change_exists_open_orders "-4067 POSITION_SIDE_CHANGE_EXISTS_OPEN_ORDERS的直接链接") * Position side cannot be changed if there exists open orders. * 如果有挂单,无法修改仓位方向。 ### \-4068 POSITION\_SIDE\_CHANGE\_EXISTS\_QUANTITY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4068-position_side_change_exists_quantity "-4068 POSITION_SIDE_CHANGE_EXISTS_QUANTITY的直接链接") * Position side cannot be changed if there exists position. * 如果有仓位, 无法修改仓位方向。 ### \-4069 INVALID\_OPTIONS\_PREMIUM\_FEE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4069-invalid_options_premium_fee "-4069 INVALID_OPTIONS_PREMIUM_FEE的直接链接") * Invalid options premium fee * 无效的期权费 ### \-4070 INVALID\_CL\_OPTIONS\_ID\_LEN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4070-invalid_cl_options_id_len "-4070 INVALID_CL_OPTIONS_ID_LEN的直接链接") * Client options id is not valid. * 客户的期权ID不合法 * Client options id length should be less than 32 chars * 客户的期权ID长度应该小于32个字符 ### \-4071 INVALID\_OPTIONS\_DIRECTION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4071-invalid_options_direction "-4071 INVALID_OPTIONS_DIRECTION的直接链接") * Invalid options direction * 期权的方向无效 ### \-4072 OPTIONS\_PREMIUM\_NOT\_UPDATE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4072-options_premium_not_update "-4072 OPTIONS_PREMIUM_NOT_UPDATE的直接链接") * premium fee is not updated, reject order * 期权费没有更新 ### \-4073 OPTIONS\_PREMIUM\_INPUT\_LESS\_THAN\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4073-options_premium_input_less_than_zero "-4073 OPTIONS_PREMIUM_INPUT_LESS_THAN_ZERO的直接链接") * input premium fee is less than 0, reject order * 输入的期权费小于0 ### \-4074 OPTIONS\_AMOUNT\_BIGGER\_THAN\_UPPER[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4074-options_amount_bigger_than_upper "-4074 OPTIONS_AMOUNT_BIGGER_THAN_UPPER的直接链接") * Order amount is bigger than upper boundary or less than 0, reject order ### \-4075 OPTIONS\_PREMIUM\_OUTPUT\_ZERO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4075-options_premium_output_zero "-4075 OPTIONS_PREMIUM_OUTPUT_ZERO的直接链接") * output premium fee is less than 0, reject order ### \-4076 OPTIONS\_PREMIUM\_TOO\_DIFF[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4076-options_premium_too_diff "-4076 OPTIONS_PREMIUM_TOO_DIFF的直接链接") * original fee is too much higher than last fee * 期权的费用比之前的费用高 ### \-4077 OPTIONS\_PREMIUM\_REACH\_LIMIT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4077-options_premium_reach_limit "-4077 OPTIONS_PREMIUM_REACH_LIMIT的直接链接") * place order amount has reached to limit, reject order * 下单的数量达到上限 ### \-4078 OPTIONS\_COMMON\_ERROR[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4078-options_common_error "-4078 OPTIONS_COMMON_ERROR的直接链接") * options internal error * 期权内部系统错误 ### \-4079 INVALID\_OPTIONS\_ID[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4079-invalid_options_id "-4079 INVALID_OPTIONS_ID的直接链接") * invalid options id * invalid options id: %s * duplicate options id %d for user %d * 期权ID无效 ### \-4080 OPTIONS\_USER\_NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4080-options_user_not_found "-4080 OPTIONS_USER_NOT_FOUND的直接链接") * user not found * user not found with id: %s * 用户找不到 ### \-4081 OPTIONS\_NOT\_FOUND[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4081-options_not_found "-4081 OPTIONS_NOT_FOUND的直接链接") * options not found * options not found with id: %s * 期权找不到 ### \-4082 INVALID\_BATCH\_PLACE\_ORDER\_SIZE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4082-invalid_batch_place_order_size "-4082 INVALID_BATCH_PLACE_ORDER_SIZE的直接链接") * Invalid number of batch place orders. * Invalid number of batch place orders: %s * 批量下单的数量不正确 ### \-4083 PLACE\_BATCH\_ORDERS\_FAIL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4083-place_batch_orders_fail "-4083 PLACE_BATCH_ORDERS_FAIL的直接链接") * Fail to place batch orders. * 无法批量下单 ### \-4084 UPCOMING\_METHOD[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4084-upcoming_method "-4084 UPCOMING_METHOD的直接链接") * Method is not allowed currently. Upcoming soon. * 方法不支持 ### \-4085 INVALID\_NOTIONAL\_LIMIT\_COEF[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4085-invalid_notional_limit_coef "-4085 INVALID_NOTIONAL_LIMIT_COEF的直接链接") * Invalid notional limit coefficient * 期权的有限系数不正确 ### \-4086 INVALID\_PRICE\_SPREAD\_THRESHOLD[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4086-invalid_price_spread_threshold "-4086 INVALID_PRICE_SPREAD_THRESHOLD的直接链接") * Invalid price spread threshold * 无效的价差阀值 ### \-4087 REDUCE\_ONLY\_ORDER\_PERMISSION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4087-reduce_only_order_permission "-4087 REDUCE_ONLY_ORDER_PERMISSION的直接链接") * User can only place reduce only order * 用户只能下仅减仓订单 ### \-4088 NO\_PLACE\_ORDER\_PERMISSION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4088-no_place_order_permission "-4088 NO_PLACE_ORDER_PERMISSION的直接链接") * User can not place order currently * 用户当前不能下单 ### \-4104 INVALID\_CONTRACT\_TYPE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4104-invalid_contract_type "-4104 INVALID_CONTRACT_TYPE的直接链接") * Invalid contract type * 无效的合约类型 ### \-4109 INACTIVE\_ACCOUNT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4109-inactive_account "-4109 INACTIVE_ACCOUNT的直接链接") * Inactive account, transfer any amount of asset to future wallet to reactive * 账户被归档,请向合约账户转入任意资产重新激活 ### \-4114 INVALID\_CLIENT\_TRAN\_ID\_LEN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4114-invalid_client_tran_id_len "-4114 INVALID_CLIENT_TRAN_ID_LEN的直接链接") * clientTranId is not valid * clientTranId不正确 * Client tran id length should be less than 64 chars * 客户的tranId长度应该小于64个字符 ### \-4115 DUPLICATED\_CLIENT\_TRAN\_ID[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4115-duplicated_client_tran_id "-4115 DUPLICATED_CLIENT_TRAN_ID的直接链接") * clientTranId is duplicated * clientTranId重复 * Client tran id should be unique within 7 days * 客户的tranId应在7天内唯一 ### \-4116 DUPLICATED\_CLIENT\_ORDER\_ID[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4116-duplicated_client_order_id "-4116 DUPLICATED_CLIENT_ORDER_ID的直接链接") * clientOrderId is duplicated * clientOrderId 重复 ### \-4117 STOP\_ORDER\_TRIGGERING[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4117-stop_order_triggering "-4117 STOP_ORDER_TRIGGERING的直接链接") * stop order is triggering * stop订单在触发中 ### \-4118 REDUCE\_ONLY\_MARGIN\_CHECK\_FAILED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4118-reduce_only_margin_check_failed "-4118 REDUCE_ONLY_MARGIN_CHECK_FAILED的直接链接") * ReduceOnly Order Failed. Please check your existing position and open orders * 仅减仓订单失败。请检查现有的持仓和挂单 * 这表示新的「仅减仓(reduce-only)」订单与同方向的未成交订单叠加后,会形成反向持仓并导致保证金不足;请先取消该未成交订单后再重试 ### \-4120 STOP\_ORDER\_SWITCH\_ALGO[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4120-stop_order_switch_algo "-4120 STOP_ORDER_SWITCH_ALGO的直接链接") * Order type not supported for this endpoint. Please use the Algo Order API endpoints instead. * 该接口不支持此订单类型。请改用Algo Order API 接口。 ### \-4131 MARKET\_ORDER\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4131-market_order_reject "-4131 MARKET_ORDER_REJECT的直接链接") * The counterparty's best price does not meet the PERCENT\_PRICE filter limit * 交易对手的最高价格未达到PERCENT\_PRICE过滤器限制 ### \-4135 INVALID\_ACTIVATION\_PRICE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4135-invalid_activation_price "-4135 INVALID_ACTIVATION_PRICE的直接链接") * Invalid activation price * 无效的激活价格 ### \-4137 QUANTITY\_EXISTS\_WITH\_CLOSE\_POSITION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4137-quantity_exists_with_close_position "-4137 QUANTITY_EXISTS_WITH_CLOSE_POSITION的直接链接") * Quantity must be zero with closePosition equals true * 数量必须为0,当closePosition为true时 ### \-4138 REDUCE\_ONLY\_MUST\_BE\_TRUE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4138-reduce_only_must_be_true "-4138 REDUCE_ONLY_MUST_BE_TRUE的直接链接") * Reduce only must be true with closePosition equals true * Reduce only 必须为true,当closePosition为true时 ### \-4139 ORDER\_TYPE\_CANNOT\_BE\_MKT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4139-order_type_cannot_be_mkt "-4139 ORDER_TYPE_CANNOT_BE_MKT的直接链接") * Order type can not be market if it's unable to cancel * 订单类型不能为市价单如果不能取消 ### \-4140 INVALID\_OPENING\_POSITION\_STATUS[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4140-invalid_opening_position_status "-4140 INVALID_OPENING_POSITION_STATUS的直接链接") * Invalid symbol status for opening position * 无效的交易对状态 ### \-4141 SYMBOL\_ALREADY\_CLOSED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4141-symbol_already_closed "-4141 SYMBOL_ALREADY_CLOSED的直接链接") * Symbol is closed * 交易对已下架 ### \-4142 STRATEGY\_INVALID\_TRIGGER\_PRICE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4142-strategy_invalid_trigger_price "-4142 STRATEGY_INVALID_TRIGGER_PRICE的直接链接") * REJECT: take profit or stop order will be triggered immediately * 拒绝:止盈止损单将立即被触发 ### \-4144 INVALID\_PAIR[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4144-invalid_pair "-4144 INVALID_PAIR的直接链接") * Invalid pair * 无效的pair ### \-4161 ISOLATED\_LEVERAGE\_REJECT\_WITH\_POSITION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4161-isolated_leverage_reject_with_position "-4161 ISOLATED_LEVERAGE_REJECT_WITH_POSITION的直接链接") * Leverage reduction is not supported in Isolated Margin Mode with open positions * 逐仓仓位模式下无法降低杠杆 ### \-4164 MIN\_NOTIONAL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4164-min_notional "-4164 MIN_NOTIONAL的直接链接") * Order's notional must be no smaller than 5.0 (unless you choose reduce only) * 订单的名义价值不可以小于5,除了使用reduce only * Order's notional must be no smaller than %s (unless you choose reduce only) * 订单的名义价值不可以小于`%s`,除了使用reduce only ### \-4165 INVALID\_TIME\_INTERVAL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4165-invalid_time_interval "-4165 INVALID_TIME_INTERVAL的直接链接") * Invalid time interval * 无效的间隔 * Maximum time interval is %s days * 最大的时间间隔为 `%s` 天 ### \-4167 ISOLATED\_REJECT\_WITH\_JOINT\_MARGIN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4167-isolated_reject_with_joint_margin "-4167 ISOLATED_REJECT_WITH_JOINT_MARGIN的直接链接") * Unable to adjust to Multi-Assets mode with symbols of USDⓈ-M Futures under isolated-margin mode. * 因有交易对在逐仓模式,无法切换多资产模式 ### \-4168 JOINT\_MARGIN\_REJECT\_WITH\_ISOLATED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4168-joint_margin_reject_with_isolated "-4168 JOINT_MARGIN_REJECT_WITH_ISOLATED的直接链接") * Unable to adjust to isolated-margin mode under the Multi-Assets mode. * 多资产模式下无法使用逐仓 ### \-4169 JOINT\_MARGIN\_REJECT\_WITH\_MB[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4169-joint_margin_reject_with_mb "-4169 JOINT_MARGIN_REJECT_WITH_MB的直接链接") * Unable to adjust Multi-Assets Mode with insufficient margin balance in USDⓈ-M Futures. * 保证金不足无法切换多资产模式 ### \-4170 JOINT\_MARGIN\_REJECT\_WITH\_OPEN\_ORDER[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4170-joint_margin_reject_with_open_order "-4170 JOINT_MARGIN_REJECT_WITH_OPEN_ORDER的直接链接") * Unable to adjust Multi-Assets Mode with open orders in USDⓈ-M Futures. * 账户有订单无法切换多资产模式 ### \-4171 NO\_NEED\_TO\_CHANGE\_JOINT\_MARGIN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4171-no_need_to_change_joint_margin "-4171 NO_NEED_TO_CHANGE_JOINT_MARGIN的直接链接") * Adjusted asset mode is currently set and does not need to be adjusted repeatedly. * 多资产模式已经被设置 ### \-4172 JOINT\_MARGIN\_REJECT\_WITH\_NEGATIVE\_BALANCE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4172-joint_margin_reject_with_negative_balance "-4172 JOINT_MARGIN_REJECT_WITH_NEGATIVE_BALANCE的直接链接") * Unable to adjust Multi-Assets Mode with a negative wallet balance of margin available asset in USDⓈ-M Futures account. ### \-4183 PRICE\_HIGHTER\_THAN\_STOP\_MULTIPLIER\_UP[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4183-price_highter_than_stop_multiplier_up "-4183 PRICE_HIGHTER_THAN_STOP_MULTIPLIER_UP的直接链接") * Price is higher than stop price multiplier cap. * 止盈止损订单价格不应高于触发价与报价乘数上限的乘积 * Limit price can't be higher than %s. * 止盈止损订单价格不应高于 `%s` ### \-4184 PRICE\_LOWER\_THAN\_STOP\_MULTIPLIER\_DOWN[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4184-price_lower_than_stop_multiplier_down "-4184 PRICE_LOWER_THAN_STOP_MULTIPLIER_DOWN的直接链接") * Price is lower than stop price multiplier floor. * 止盈止损订单价格不应低于触发价与报价乘数下限的乘积 * Limit price can't be lower than %s. * 止盈止损订单价格不应低于 `%s`f ### \-4192 COOLING\_OFF\_PERIOD[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4192-cooling_off_period "-4192 COOLING_OFF_PERIOD的直接链接") * Trade forbidden due to Cooling-off Period. * 合约冷静期禁止开仓 ### \-4202 ADJUST\_LEVERAGE\_KYC\_FAILED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4202-adjust_leverage_kyc_failed "-4202 ADJUST_LEVERAGE_KYC_FAILED的直接链接") * Intermediate Personal Verification is required for adjusting leverage over 20x * 需要通过中级KYC才能使用20x以上杠杆 ### \-4203 ADJUST\_LEVERAGE\_ONE\_MONTH\_FAILED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4203-adjust_leverage_one_month_failed "-4203 ADJUST_LEVERAGE_ONE_MONTH_FAILED的直接链接") * More than 20x leverage is available one month after account registration. * 开户1个月后才可以使用20倍以上杠杆 ### \-4205 ADJUST\_LEVERAGE\_X\_DAYS\_FAILED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4205-adjust_leverage_x_days_failed "-4205 ADJUST_LEVERAGE_X_DAYS_FAILED的直接链接") * More than 20x leverage is available %s days after Futures account registration. * 开户%s天后才可以使用20倍以上杠杆 ### \-4206 ADJUST\_LEVERAGE\_KYC\_LIMIT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4206-adjust_leverage_kyc_limit "-4206 ADJUST_LEVERAGE_KYC_LIMIT的直接链接") * Users in this country has limited adjust leverage. * Users in your location/country can only access a maximum leverage of %s * 该国家有杠杆限制 * 该国家杠杆不能超过%s倍 ### \-4208 ADJUST\_LEVERAGE\_ACCOUNT\_SYMBOL\_FAILED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4208-adjust_leverage_account_symbol_failed "-4208 ADJUST_LEVERAGE_ACCOUNT_SYMBOL_FAILED的直接链接") * Current symbol leverage cannot exceed 20 when using position limit adjustment service. * 开启仓位放大功能的用户无法使用20x以上杠杆 ### \-4209 ADJUST\_LEVERAGE\_SYMBOL\_FAILED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4209-adjust_leverage_symbol_failed "-4209 ADJUST_LEVERAGE_SYMBOL_FAILED的直接链接") * The max leverage of Symbol is 20x * Leverage adjustment failed. Current symbol max leverage limit is %sx * 交易对最大杠杆为20x * 杠杆调整失败。交易对最大杠杆为%sx ### \-4210 STOP\_PRICE\_HIGHER\_THAN\_PRICE\_MULTIPLIER\_LIMIT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4210-stop_price_higher_than_price_multiplier_limit "-4210 STOP_PRICE_HIGHER_THAN_PRICE_MULTIPLIER_LIMIT的直接链接") * Stop price is higher than price multiplier cap. * Stop price can't be higher than %s * 触发价超过价格上限 * 触发价不能超过%s ### \-4211 STOP\_PRICE\_LOWER\_THAN\_PRICE\_MULTIPLIER\_LIMIT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4211-stop_price_lower_than_price_multiplier_limit "-4211 STOP_PRICE_LOWER_THAN_PRICE_MULTIPLIER_LIMIT的直接链接") * Stop price is lower than price multiplier floor. * Stop price can't be lower than %s * 触发价低于超过价格下限 * 触发价不能低于%s ### \-4400 TRADING\_QUANTITATIVE\_RULE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4400-trading_quantitative_rule "-4400 TRADING_QUANTITATIVE_RULE的直接链接") * Futures Trading Quantitative Rules violated, only reduceOnly order is allowed, please try again later. * 违反合约量化交易规则,账户设置为近减仓,请之后再试 ### \-4401 LARGE\_POSITION\_SYM\_RULE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4401-large_position_sym_rule "-4401 LARGE_POSITION_SYM_RULE的直接链接") * Futures Trading Risk Control Rules of large position holding violated, only reduceOnly order is allowed, please reduce the position * 账户违反大持仓风控规则,仅能下减仓单,请减少仓位 ### \-4402 COMPLIANCE\_BLACK\_SYMBOL\_RESTRICTION[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4402-compliance_black_symbol_restriction "-4402 COMPLIANCE_BLACK_SYMBOL_RESTRICTION的直接链接") * Dear user, as per our Terms of Use and compliance with local regulations, this feature is currently not available in your region. * 根据合规要求,所在地区不提供此服务 ### \-4403 ADJUST\_LEVERAGE\_COMPLIANCE\_FAILED[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4403-adjust_leverage_compliance_failed "-4403 ADJUST_LEVERAGE_COMPLIANCE_FAILED的直接链接") * Dear user, as per our Terms of Use and compliance with local regulations, the leverage can only up to 10x in your region * Dear user, as per our Terms of Use and compliance with local regulations, the leverage can only up to %sx in your region * 根据合规要求,所在地区杠杆不可超过10x * 根据合规要求,所在地区杠杆不可超过%sx 50xx - Order Execution Issues[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#50xx---order-execution-issues "50xx - Order Execution Issues的直接链接") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### \-5021 FOK\_ORDER\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5021-fok_order_reject "-5021 FOK_ORDER_REJECT的直接链接") * Due to the order could not be filled immediately, the FOK order has been rejected. The order will not be recorded in the order history * 订单无法完全成交,FOK订单被拒绝 ### \-5022 GTX\_ORDER\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5022-gtx_order_reject "-5022 GTX_ORDER_REJECT的直接链接") * Due to the order could not be executed as maker, the Post Only order will be rejected. The order will not be recorded in the order history * 订单无法仅做maker单, Post Only订单被拒绝 ### \-5024 MOVE\_ORDER\_NOT\_ALLOWED\_SYMBOL\_REASON[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5024-move_order_not_allowed_symbol_reason "-5024 MOVE_ORDER_NOT_ALLOWED_SYMBOL_REASON的直接链接") * Symbol is not in trading status. Order amendment is not permitted. * 交易对不在交易状态,无法改单 ### \-5025 LIMIT\_ORDER\_ONLY[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5025-limit_order_only "-5025 LIMIT_ORDER_ONLY的直接链接") * Only limit order is supported. * 仅支持限价单改单 ### \-5026 Exceed\_Maximum\_Modify\_Order\_Limit[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5026-exceed_maximum_modify_order_limit "-5026 Exceed_Maximum_Modify_Order_Limit的直接链接") * Exceed maximum modify order limit. * 超过单个订单改单次数上限 ### \-5027 SAME\_ORDER[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5027-same_order "-5027 SAME_ORDER的直接链接") * No need to modify the order. * 与原订单相同,非必要改单 ### \-5028 ME\_RECVWINDOW\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5028-me_recvwindow_reject "-5028 ME_RECVWINDOW_REJECT的直接链接") * Timestamp for this request is outside of the ME recvWindow. * 请求的时间戳在撮合的recvWindow之外 ### \-5029 MODIFICATION\_MIN\_NOTIONAL[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5029-modification_min_notional "-5029 MODIFICATION_MIN_NOTIONAL的直接链接") * Order's notional must be no smaller than %s * 请求的时间戳在撮合的recvWindow之外 ### \-5037 INVALID\_PRICE\_MATCH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5037-invalid_price_match "-5037 INVALID_PRICE_MATCH的直接链接") * Invalid price match * 错误的价格匹配类型 ### \-5038 UNSUPPORTED\_ORDER\_TYPE\_PRICE\_MATCH[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5038-unsupported_order_type_price_match "-5038 UNSUPPORTED_ORDER_TYPE_PRICE_MATCH的直接链接") * Price match only supports order type: LIMIT, STOP AND TAKE\_PROFIT * 价格匹配仅支持下列订单类型: LIMIT, STOP AND TAKE\_PROFIT ### \-5039 INVALID\_SELF\_TRADE\_PREVENTION\_MODE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5039-invalid_self_trade_prevention_mode "-5039 INVALID_SELF_TRADE_PREVENTION_MODE的直接链接") * Invalid self trade prevention mode * 错误的防治自成交类型 ### \-5040 FUTURE\_GOOD\_TILL\_DATE[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5040-future_good_till_date "-5040 FUTURE_GOOD_TILL_DATE的直接链接") * The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000 (UTC 9999-12-31 23:59:59) * GTD订单需要时间大于当前时间60s且小于253402300799000 ### \-5041 BBO\_ORDER\_REJECT[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5041-bbo_order_reject "-5041 BBO_ORDER_REJECT的直接链接") * No depth matches this BBO order * 盘口没有深度挂价格匹配订单 ### \-5043 Existing\_Pending\_Modification[​](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5043-existing_pending_modification "-5043 Existing_Pending_Modification的直接链接") * A pending modification already exists for this order. * 改订单已经有改单请求在处理 * [10xx - 常规服务器或网络问题](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#10xx---%E5%B8%B8%E8%A7%84%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%88%96%E7%BD%91%E7%BB%9C%E9%97%AE%E9%A2%98) * [\-1000 UNKNOWN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1000-unknown) * [\-1001 DISCONNECTED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1001-disconnected) * [\-1002 UNAUTHORIZED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1002-unauthorized) * [\-1003 TOO\_MANY\_REQUESTS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1003-too_many_requests) * [\-1004 DUPLICATE\_IP](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1004-duplicate_ip) * [\-1005 NO\_SUCH\_IP](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1005-no_such_ip) * [\-1006 UNEXPECTED\_RESP](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1006-unexpected_resp) * [\-1007 TIMEOUT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1007-timeout) * [\-1008 Request Throttled](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1008-request-throttled) * [\-1014 UNKNOWN\_ORDER\_COMPOSITION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1014-unknown_order_composition) * [\-1015 TOO\_MANY\_ORDERS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1015-too_many_orders) * [\-1016 SERVICE\_SHUTTING\_DOWN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1016-service_shutting_down) * [\-1020 UNSUPPORTED\_OPERATION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1020-unsupported_operation) * [\-1021 INVALID\_TIMESTAMP](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1021-invalid_timestamp) * [\-1022 INVALID\_SIGNATURE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1022-invalid_signature) * [\-1023 START\_TIME\_GREATER\_THAN\_END\_TIME](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1023-start_time_greater_than_end_time) * [\-1099 NOT\_FOUND](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1099-not_found) * [11xx - Request issues](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#11xx---request-issues) * [\-1100 ILLEGAL\_CHARS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1100-illegal_chars) * [\-1101 TOO\_MANY\_PARAMETERS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1101-too_many_parameters) * [\-1102 MANDATORY\_PARAM\_EMPTY\_OR\_MALFORMED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1102-mandatory_param_empty_or_malformed) * [\-1103 UNKNOWN\_PARAM](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1103-unknown_param) * [\-1104 UNREAD\_PARAMETERS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1104-unread_parameters) * [\-1105 PARAM\_EMPTY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1105-param_empty) * [\-1106 PARAM\_NOT\_REQUIRED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1106-param_not_required) * [\-1108 BAD\_ASSET](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1108-bad_asset) * [\-1109 BAD\_ACCOUNT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1109-bad_account) * [\-1110 BAD\_INSTRUMENT\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1110-bad_instrument_type) * [\-1111 BAD\_PRECISION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1111-bad_precision) * [\-1112 NO\_DEPTH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1112-no_depth) * [\-1113 WITHDRAW\_NOT\_NEGATIVE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1113-withdraw_not_negative) * [\-1114 TIF\_NOT\_REQUIRED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1114-tif_not_required) * [\-1115 INVALID\_TIF](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1115-invalid_tif) * [\-1116 INVALID\_ORDER\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1116-invalid_order_type) * [\-1117 INVALID\_SIDE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1117-invalid_side) * [\-1118 EMPTY\_NEW\_CL\_ORD\_ID](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1118-empty_new_cl_ord_id) * [\-1119 EMPTY\_ORG\_CL\_ORD\_ID](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1119-empty_org_cl_ord_id) * [\-1120 BAD\_INTERVAL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1120-bad_interval) * [\-1121 BAD\_SYMBOL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1121-bad_symbol) * [\-1122 INVALID\_SYMBOL\_STATUS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1122-invalid_symbol_status) * [\-1125 INVALID\_LISTEN\_KEY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1125-invalid_listen_key) * [\-1126 ASSET\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1126-asset_not_supported) * [\-1127 MORE\_THAN\_XX\_HOURS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1127-more_than_xx_hours) * [\-1128 OPTIONAL\_PARAMS\_BAD\_COMBO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1128-optional_params_bad_combo) * [\-1130 INVALID\_PARAMETER](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1130-invalid_parameter) * [\-1136 INVALID\_NEW\_ORDER\_RESP\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-1136-invalid_new_order_resp_type) * [20xx - Processing Issues](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#20xx---processing-issues) * [\-2010 NEW\_ORDER\_REJECTED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2010-new_order_rejected) * [\-2011 CANCEL\_REJECTED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2011-cancel_rejected) * [\-2012 CANCEL\_ALL\_FAIL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2012-cancel_all_fail) * [\-2013 NO\_SUCH\_ORDER](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2013-no_such_order) * [\-2014 BAD\_API\_KEY\_FMT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2014-bad_api_key_fmt) * [\-2015 REJECTED\_MBX\_KEY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2015-rejected_mbx_key) * [\-2016 NO\_TRADING\_WINDOW](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2016-no_trading_window) * [\-2017 API\_KEYS\_LOCKED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2017-api_keys_locked) * [\-2018 BALANCE\_NOT\_SUFFICIENT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2018-balance_not_sufficient) * [\-2019 MARGIN\_NOT\_SUFFICIEN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2019-margin_not_sufficien) * [\-2020 UNABLE\_TO\_FILL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2020-unable_to_fill) * [\-2021 ORDER\_WOULD\_IMMEDIATELY\_TRIGGER](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2021-order_would_immediately_trigger) * [\-2022 REDUCE\_ONLY\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2022-reduce_only_reject) * [\-2023 USER\_IN\_LIQUIDATION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2023-user_in_liquidation) * [\-2024 POSITION\_NOT\_SUFFICIENT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2024-position_not_sufficient) * [\-2025 MAX\_OPEN\_ORDER\_EXCEEDED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2025-max_open_order_exceeded) * [\-2026 REDUCE\_ONLY\_ORDER\_TYPE\_NOT\_SUPPORTED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2026-reduce_only_order_type_not_supported) * [\-2027 MAX\_LEVERAGE\_RATIO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2027-max_leverage_ratio) * [\-2028 MIN\_LEVERAGE\_RATIO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-2028-min_leverage_ratio) * [40xx - Filters and other Issues](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#40xx---filters-and-other-issues) * [\-4000 INVALID\_ORDER\_STATUS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4000-invalid_order_status) * [\-4001 PRICE\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4001-price_less_than_zero) * [\-4002 PRICE\_GREATER\_THAN\_MAX\_PRICE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4002-price_greater_than_max_price) * [\-4003 QTY\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4003-qty_less_than_zero) * [\-4004 QTY\_LESS\_THAN\_MIN\_QTY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4004-qty_less_than_min_qty) * [\-4005 QTY\_GREATER\_THAN\_MAX\_QTY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4005-qty_greater_than_max_qty) * [\-4006 STOP\_PRICE\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4006-stop_price_less_than_zero) * [\-4007 STOP\_PRICE\_GREATER\_THAN\_MAX\_PRICE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4007-stop_price_greater_than_max_price) * [\-4008 TICK\_SIZE\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4008-tick_size_less_than_zero) * [\-4009 MAX\_PRICE\_LESS\_THAN\_MIN\_PRICE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4009-max_price_less_than_min_price) * [\-4010 MAX\_QTY\_LESS\_THAN\_MIN\_QTY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4010-max_qty_less_than_min_qty) * [\-4011 STEP\_SIZE\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4011-step_size_less_than_zero) * [\-4012 MAX\_NUM\_ORDERS\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4012-max_num_orders_less_than_zero) * [\-4013 PRICE\_LESS\_THAN\_MIN\_PRICE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4013-price_less_than_min_price) * [\-4014 PRICE\_NOT\_INCREASED\_BY\_TICK\_SIZE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4014-price_not_increased_by_tick_size) * [\-4015 INVALID\_CL\_ORD\_ID\_LEN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4015-invalid_cl_ord_id_len) * [\-4016 PRICE\_HIGHTER\_THAN\_MULTIPLIER\_UP](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4016-price_highter_than_multiplier_up) * [\-4017 MULTIPLIER\_UP\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4017-multiplier_up_less_than_zero) * [\-4018 MULTIPLIER\_DOWN\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4018-multiplier_down_less_than_zero) * [\-4019 COMPOSITE\_SCALE\_OVERFLOW](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4019-composite_scale_overflow) * [\-4020 TARGET\_STRATEGY\_INVALID](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4020-target_strategy_invalid) * [\-4021 INVALID\_DEPTH\_LIMIT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4021-invalid_depth_limit) * [\-4022 WRONG\_MARKET\_STATUS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4022-wrong_market_status) * [\-4023 QTY\_NOT\_INCREASED\_BY\_STEP\_SIZE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4023-qty_not_increased_by_step_size) * [\-4024 PRICE\_LOWER\_THAN\_MULTIPLIER\_DOWN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4024-price_lower_than_multiplier_down) * [\-4025 MULTIPLIER\_DECIMAL\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4025-multiplier_decimal_less_than_zero) * [\-4026 COMMISSION\_INVALID](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4026-commission_invalid) * [\-4027 INVALID\_ACCOUNT\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4027-invalid_account_type) * [\-4028 INVALID\_LEVERAGE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4028-invalid_leverage) * [\-4029 INVALID\_TICK\_SIZE\_PRECISION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4029-invalid_tick_size_precision) * [\-4030 INVALID\_STEP\_SIZE\_PRECISION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4030-invalid_step_size_precision) * [\-4031 INVALID\_WORKING\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4031-invalid_working_type) * [\-4032 EXCEED\_MAX\_CANCEL\_ORDER\_SIZE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4032-exceed_max_cancel_order_size) * [\-4033 INSURANCE\_ACCOUNT\_NOT\_FOUND](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4033-insurance_account_not_found) * [\-4044 INVALID\_BALANCE\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4044-invalid_balance_type) * [\-4045 MAX\_STOP\_ORDER\_EXCEEDED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4045-max_stop_order_exceeded) * [\-4046 NO\_NEED\_TO\_CHANGE\_MARGIN\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4046-no_need_to_change_margin_type) * [\-4047 THERE\_EXISTS\_OPEN\_ORDERS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4047-there_exists_open_orders) * [\-4048 THERE\_EXISTS\_QUANTITY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4048-there_exists_quantity) * [\-4049 ADD\_ISOLATED\_MARGIN\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4049-add_isolated_margin_reject) * [\-4050 CROSS\_BALANCE\_INSUFFICIENT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4050-cross_balance_insufficient) * [\-4051 ISOLATED\_BALANCE\_INSUFFICIENT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4051-isolated_balance_insufficient) * [\-4052 NO\_NEED\_TO\_CHANGE\_AUTO\_ADD\_MARGIN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4052-no_need_to_change_auto_add_margin) * [\-4053 AUTO\_ADD\_CROSSED\_MARGIN\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4053-auto_add_crossed_margin_reject) * [\-4054 ADD\_ISOLATED\_MARGIN\_NO\_POSITION\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4054-add_isolated_margin_no_position_reject) * [\-4055 AMOUNT\_MUST\_BE\_POSITIVE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4055-amount_must_be_positive) * [\-4056 INVALID\_API\_KEY\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4056-invalid_api_key_type) * [\-4057 INVALID\_RSA\_PUBLIC\_KEY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4057-invalid_rsa_public_key) * [\-4058 MAX\_PRICE\_TOO\_LARGE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4058-max_price_too_large) * [\-4059 NO\_NEED\_TO\_CHANGE\_POSITION\_SIDE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4059-no_need_to_change_position_side) * [\-4060 INVALID\_POSITION\_SIDE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4060-invalid_position_side) * [\-4061 POSITION\_SIDE\_NOT\_MATCH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4061-position_side_not_match) * [\-4062 REDUCE\_ONLY\_CONFLICT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4062-reduce_only_conflict) * [\-4063 INVALID\_OPTIONS\_REQUEST\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4063-invalid_options_request_type) * [\-4064 INVALID\_OPTIONS\_TIME\_FRAME](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4064-invalid_options_time_frame) * [\-4065 INVALID\_OPTIONS\_AMOUNT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4065-invalid_options_amount) * [\-4066 INVALID\_OPTIONS\_EVENT\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4066-invalid_options_event_type) * [\-4067 POSITION\_SIDE\_CHANGE\_EXISTS\_OPEN\_ORDERS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4067-position_side_change_exists_open_orders) * [\-4068 POSITION\_SIDE\_CHANGE\_EXISTS\_QUANTITY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4068-position_side_change_exists_quantity) * [\-4069 INVALID\_OPTIONS\_PREMIUM\_FEE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4069-invalid_options_premium_fee) * [\-4070 INVALID\_CL\_OPTIONS\_ID\_LEN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4070-invalid_cl_options_id_len) * [\-4071 INVALID\_OPTIONS\_DIRECTION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4071-invalid_options_direction) * [\-4072 OPTIONS\_PREMIUM\_NOT\_UPDATE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4072-options_premium_not_update) * [\-4073 OPTIONS\_PREMIUM\_INPUT\_LESS\_THAN\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4073-options_premium_input_less_than_zero) * [\-4074 OPTIONS\_AMOUNT\_BIGGER\_THAN\_UPPER](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4074-options_amount_bigger_than_upper) * [\-4075 OPTIONS\_PREMIUM\_OUTPUT\_ZERO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4075-options_premium_output_zero) * [\-4076 OPTIONS\_PREMIUM\_TOO\_DIFF](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4076-options_premium_too_diff) * [\-4077 OPTIONS\_PREMIUM\_REACH\_LIMIT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4077-options_premium_reach_limit) * [\-4078 OPTIONS\_COMMON\_ERROR](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4078-options_common_error) * [\-4079 INVALID\_OPTIONS\_ID](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4079-invalid_options_id) * [\-4080 OPTIONS\_USER\_NOT\_FOUND](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4080-options_user_not_found) * [\-4081 OPTIONS\_NOT\_FOUND](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4081-options_not_found) * [\-4082 INVALID\_BATCH\_PLACE\_ORDER\_SIZE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4082-invalid_batch_place_order_size) * [\-4083 PLACE\_BATCH\_ORDERS\_FAIL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4083-place_batch_orders_fail) * [\-4084 UPCOMING\_METHOD](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4084-upcoming_method) * [\-4085 INVALID\_NOTIONAL\_LIMIT\_COEF](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4085-invalid_notional_limit_coef) * [\-4086 INVALID\_PRICE\_SPREAD\_THRESHOLD](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4086-invalid_price_spread_threshold) * [\-4087 REDUCE\_ONLY\_ORDER\_PERMISSION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4087-reduce_only_order_permission) * [\-4088 NO\_PLACE\_ORDER\_PERMISSION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4088-no_place_order_permission) * [\-4104 INVALID\_CONTRACT\_TYPE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4104-invalid_contract_type) * [\-4109 INACTIVE\_ACCOUNT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4109-inactive_account) * [\-4114 INVALID\_CLIENT\_TRAN\_ID\_LEN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4114-invalid_client_tran_id_len) * [\-4115 DUPLICATED\_CLIENT\_TRAN\_ID](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4115-duplicated_client_tran_id) * [\-4116 DUPLICATED\_CLIENT\_ORDER\_ID](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4116-duplicated_client_order_id) * [\-4117 STOP\_ORDER\_TRIGGERING](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4117-stop_order_triggering) * [\-4118 REDUCE\_ONLY\_MARGIN\_CHECK\_FAILED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4118-reduce_only_margin_check_failed) * [\-4120 STOP\_ORDER\_SWITCH\_ALGO](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4120-stop_order_switch_algo) * [\-4131 MARKET\_ORDER\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4131-market_order_reject) * [\-4135 INVALID\_ACTIVATION\_PRICE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4135-invalid_activation_price) * [\-4137 QUANTITY\_EXISTS\_WITH\_CLOSE\_POSITION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4137-quantity_exists_with_close_position) * [\-4138 REDUCE\_ONLY\_MUST\_BE\_TRUE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4138-reduce_only_must_be_true) * [\-4139 ORDER\_TYPE\_CANNOT\_BE\_MKT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4139-order_type_cannot_be_mkt) * [\-4140 INVALID\_OPENING\_POSITION\_STATUS](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4140-invalid_opening_position_status) * [\-4141 SYMBOL\_ALREADY\_CLOSED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4141-symbol_already_closed) * [\-4142 STRATEGY\_INVALID\_TRIGGER\_PRICE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4142-strategy_invalid_trigger_price) * [\-4144 INVALID\_PAIR](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4144-invalid_pair) * [\-4161 ISOLATED\_LEVERAGE\_REJECT\_WITH\_POSITION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4161-isolated_leverage_reject_with_position) * [\-4164 MIN\_NOTIONAL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4164-min_notional) * [\-4165 INVALID\_TIME\_INTERVAL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4165-invalid_time_interval) * [\-4167 ISOLATED\_REJECT\_WITH\_JOINT\_MARGIN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4167-isolated_reject_with_joint_margin) * [\-4168 JOINT\_MARGIN\_REJECT\_WITH\_ISOLATED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4168-joint_margin_reject_with_isolated) * [\-4169 JOINT\_MARGIN\_REJECT\_WITH\_MB](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4169-joint_margin_reject_with_mb) * [\-4170 JOINT\_MARGIN\_REJECT\_WITH\_OPEN\_ORDER](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4170-joint_margin_reject_with_open_order) * [\-4171 NO\_NEED\_TO\_CHANGE\_JOINT\_MARGIN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4171-no_need_to_change_joint_margin) * [\-4172 JOINT\_MARGIN\_REJECT\_WITH\_NEGATIVE\_BALANCE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4172-joint_margin_reject_with_negative_balance) * [\-4183 PRICE\_HIGHTER\_THAN\_STOP\_MULTIPLIER\_UP](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4183-price_highter_than_stop_multiplier_up) * [\-4184 PRICE\_LOWER\_THAN\_STOP\_MULTIPLIER\_DOWN](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4184-price_lower_than_stop_multiplier_down) * [\-4192 COOLING\_OFF\_PERIOD](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4192-cooling_off_period) * [\-4202 ADJUST\_LEVERAGE\_KYC\_FAILED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4202-adjust_leverage_kyc_failed) * [\-4203 ADJUST\_LEVERAGE\_ONE\_MONTH\_FAILED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4203-adjust_leverage_one_month_failed) * [\-4205 ADJUST\_LEVERAGE\_X\_DAYS\_FAILED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4205-adjust_leverage_x_days_failed) * [\-4206 ADJUST\_LEVERAGE\_KYC\_LIMIT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4206-adjust_leverage_kyc_limit) * [\-4208 ADJUST\_LEVERAGE\_ACCOUNT\_SYMBOL\_FAILED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4208-adjust_leverage_account_symbol_failed) * [\-4209 ADJUST\_LEVERAGE\_SYMBOL\_FAILED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4209-adjust_leverage_symbol_failed) * [\-4210 STOP\_PRICE\_HIGHER\_THAN\_PRICE\_MULTIPLIER\_LIMIT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4210-stop_price_higher_than_price_multiplier_limit) * [\-4211 STOP\_PRICE\_LOWER\_THAN\_PRICE\_MULTIPLIER\_LIMIT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4211-stop_price_lower_than_price_multiplier_limit) * [\-4400 TRADING\_QUANTITATIVE\_RULE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4400-trading_quantitative_rule) * [\-4401 LARGE\_POSITION\_SYM\_RULE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4401-large_position_sym_rule) * [\-4402 COMPLIANCE\_BLACK\_SYMBOL\_RESTRICTION](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4402-compliance_black_symbol_restriction) * [\-4403 ADJUST\_LEVERAGE\_COMPLIANCE\_FAILED](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-4403-adjust_leverage_compliance_failed) * [50xx - Order Execution Issues](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#50xx---order-execution-issues) * [\-5021 FOK\_ORDER\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5021-fok_order_reject) * [\-5022 GTX\_ORDER\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5022-gtx_order_reject) * [\-5024 MOVE\_ORDER\_NOT\_ALLOWED\_SYMBOL\_REASON](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5024-move_order_not_allowed_symbol_reason) * [\-5025 LIMIT\_ORDER\_ONLY](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5025-limit_order_only) * [\-5026 Exceed\_Maximum\_Modify\_Order\_Limit](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5026-exceed_maximum_modify_order_limit) * [\-5027 SAME\_ORDER](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5027-same_order) * [\-5028 ME\_RECVWINDOW\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5028-me_recvwindow_reject) * [\-5029 MODIFICATION\_MIN\_NOTIONAL](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5029-modification_min_notional) * [\-5037 INVALID\_PRICE\_MATCH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5037-invalid_price_match) * [\-5038 UNSUPPORTED\_ORDER\_TYPE\_PRICE\_MATCH](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5038-unsupported_order_type_price_match) * [\-5039 INVALID\_SELF\_TRADE\_PREVENTION\_MODE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5039-invalid_self_trade_prevention_mode) * [\-5040 FUTURE\_GOOD\_TILL\_DATE](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5040-future_good_till_date) * [\-5041 BBO\_ORDER\_REJECT](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5041-bbo_order_reject) * [\-5043 Existing\_Pending\_Modification](https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/error-code#-5043-existing_pending_modification) ---