Doc binance api Raw streams are accessed at /ws/<streamName> Yes. API-keys can be configured to only access certain types of secure endpoints. SBE Market Data Streams will be available on March 18 2025, 07:00 UTC. Binance. Scroll down for code samples, example requests and responses. La API de Binance es compatible con varios lenguajes de programación, como Python, Java, Node. Previous. Il conviendra à tous vos besoins en matière de trading. Only API keys with FIX_API are allowed to connect. Binance supports common OAuth 2. The window used to compute statistics will be no more than 59999ms from the requested windowSize. js, DotNET, Ruby và nhiều ngôn ngữ khác. API Endpoints are rate limited by Binance at 20 requests per second, ask them if you require more. 0 With low fees and over 350 cryptocurrencies to trade, Binance is the preferred exchange to trade Bitcoin, Altcoins, and other virtual assets. netstandard client library for the Binance REST and Websocket Spot and Futures API focusing on clear usage and models - JKorf/Binance. Support Type Additional mandatory parameters Additional Information; LIMIT: timeInForce, quantity, price: MARKET: quantity or quoteOrderQty: MARKET orders using the quantity field specifies the amount of the base asset the user wants to buy or sell at the market price. Support Có. An aggregate trade (aggtrade) represents one or more individual trades. Data can be pulled from Binance a Ma clé API a disparu. Welcome to the Binance. Some endpoints will require an API Key. Websocket Market Data from data-stream. com A User Data Stream listenKey is valid for 60 minutes after creation. Read REST API or WebSocket API documentation to learn how to use different API keys. No entanto, todas as bibliotecas de terceiros não listadas em nossa biblioteca de APIs não são oficiais, não são afiliadas à Binance e não somos responsáveis por qualquer perda ou dano decorrente ou relacionado a tais usos. 0 means the last price is used. Binance Pay allows Binance customer to pay and get paid in crypto from your friends and family worldwide. The base endpoint is https://testnet. QuickFIX Schema can be 在 /api/v3/exchangeInfo接口中rateLimits数组里包含有REST接口(不限于本篇的REST接口)的访问限制。包括带权重的访问频次限制、下单速率限制。参考 枚举定义中有关有限制类型的进一步说明。 当您超出请求速率限制时,请求会失败并 Quick Start API Key Setup . Buy and sell cryptocurrencies with Binance P2P. The Binance Pay API uses API keys to authenticate requests. The websocket server will send a ping frame every 20 seconds. vision 。 请参考 Market Data Only_CN 页面。 上一页 Mar 5, 2025 · Official Documentation for the Binance Spot APIs and Streams - binance/binance-spot-api-docs Official Documentation for the Binance US APIs and Streams. described in the documents in this repository are considered official and supported . com:443. Support What is the Binance Pay. Mar 10, 2025 · API Market data from data. Next. 适合咨询关于 API 或者 Websocket 性能方面的疑问和困扰。 可以咨询在文档上面没有的 API 问题。 Binance 开发者论坛. 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 These terms will be used throughout the documentation, so it is recommended especially for new users to read to help their understanding of the API. APIs. com; A User Data Stream listenKey is valid for 60 minutes after creation. Sin embargo, todas las bibliotecas de terceros que no estén incluidas en la biblioteca de nuestra API no son oficiales y no están asociadas a Binance. 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. You can view and manage your API keys in the Binance Merchant Admin Portal. js, DotNET, Ruby y más. testnet. 0 Scopes (Permissions) for Binance APIs Only API keys with FIX_API or FIX_API_READ_ONLY are allowed to connect. 4,271 1,373 0 2 Updated Apr 3, 2025. me/binance_api_announcements Streams, endpoints, parameters, payloads, etc. 如果参数 symbol 或者 symbols 提供的交易对不存在, 系统会返回错误并提示交易对不正确。; 所有的参数都是可选的。 permissions 可以支持单个或多个值(例如 SPOT, ["MARGIN","LEVERAGED"])。 Nous offrons un accès au trading Spot, sur marge, en Futures et d’API d’options pour plus de 300 monnaies numériques et monnaies fiat. vision:9000; Supports receiving all of the account's ExecutionReport<8> and List Status<N>. U本位合约. May 25, 2022 · The Binance API allows algorithmic traders to automate their trading by plugging into the Binance servers using Python or a variety of other programming languages. Oct 20, 2017 · A C# . Scenarios Merchant Acquiring (C2B) - Payment by QR code Note: This endpoint is different from the GET /api/v3/ticker/24hr endpoint. HTTP Request GET /fapi/v1/apiTradingStatus. INVALID API Description Futures trading quantitative rules indicators, for more information on this, please refer to the Futures Trading Quantitative Rules. com/ws-dapi/v1; WebSocket API allows placing orders, canceling orders, etc. Some methods have a recvWindow parameter fortiming security, see Binance documentation. binance. avgPriceMins is the number of minutes the average price is calculated over. Contribute to binance/binance-connector-python development by creating an account on GitHub. Last Updated: 2024-12-17. Binance Pay is a contactless, borderless and secure cryptocurrency payment technology designed by Binance. FIX Market Data sessions Endpoint is: tcp+tls://fix-md. 咨询关于账户,资金,2FA 等问题。 Dec 17, 2024 · The base API endpoint is: https://api. This document will guide you through how your application communicates with Binance's OAuth 2. 如果您想要对此进行监控,请参阅 GET api/v3/rateLimit/order。 被拒绝/不成功的订单不保证在响应中有 X-MBX-ORDER-COUNT-** 报文头。 如果超过此值,您将收到一个 429 错误,而且不带 Retry-After 报文头。 请注意,如果您的订单一直顺利完成交易,您可以通过 API 持续下订单。 Derivative Trading API provide REST and WebSocket APIs to suit your derivative trading needs. US API Documentation! Our REST APIs offer access to: Exchange data; Market trade and price data; User account data; Trade order management; Wa The Binance API documentation references a timestamp parameter, this is generated for you where required. 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. Request Weight . Open Interest API Description . aggregate Change Log; General Info; Binance Link Endpoints. Account API Trading Status (USER_DATA) - Binance API Description binance/binance-spot-api-docs’s past year of commit activity. PERCENT_PRICE_BY_SIDE . With Binance users can: Trade hundreds of cryptocurrencies on Spot, Margin, and Futures markets. Suitable for all your trading needs. API-keys are passed into the Rest API via the X-MBX-APIKEY header. API-keys and secret-keys are case sensitive. Get user info 备注:. com can now be accessed from data-api. Check API identity key. PENDING_NEW: The order is in a pending phase until the working order of an order list has been fully filled. GET /eapi/v1/openInterest. Official Announcements regarding changes, downtime, etc. OAuth 2. Status Description; NEW: The order has been accepted by the engine. API Binance совместим со множеством языков программирования, таких как Python, Java, Node. Binance Gift Card API solution is to facilitate instant creation, redemption and value-checking for Binance Gift Card. ` Binance API 中文电报群 或 Binance API 英文电报群 适合咨询关于 API 或者 Websocket 性能方面的疑问和困扰。 可以咨询在文档上面没有的 API 问题。 Web3 API description Binance's Partners need to follow the API specification in this doc to provide Binance with a set of endpoints in order to integrate with Binance. BAB Token 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. Net Request id is truly arbitrary. Check API identity key: BAD_API_KEY_FMT: 400005: API identity key format invalid. Welcome to Binance Connect’s Open API Documentation. Notes: newClientOrderId specifies clientOrderId value for the order. For example, one API-key could be used for TRADE only, while another API-key can access everything except for TRADE routes. vision/api; All endpoints return either a JSON object or array. Data is returned in ascending order. US API Documentation! Our REST APIs offer access to:. 0 APIs for Binance APIs. Sí. No obstante, todas las bibliotecas de terceros que no estén en la biblioteca de nuestra API no son oficiales y no están afiliadas a Binance, por lo cual no nos hacemos responsables por pérdidas o daños que surjan de o en relación con dichos usos. A API da Binance é compatível com várias linguagens de programação, como Python, Java, Node. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. QuickFIX Schema can be found here. Get open interest for specific underlying asset on specific expiration date. 咨询关于账户,资金,2FA 等问题。 API-keys are passed into the Rest API via the X-MBX-APIKEY header. 注意:以下变更将于 2025 年 3 月 10 日 12:00 UTC 发生。 以下请求权重将从 2 增加到 4: REST API: GET /api/v3/aggTrade WebSocket API: trades. base asset refers to the asset that is the quantity of a symbol. Official Documentation for the Binance APIs and Streams - binance-exchange/binance-official-api-docs 2024-06-19 . The base endpoint for testnet is: wss://ws-api. com:9000; Supports market data streams and active instruments queries. 可以提问或者咨询关于 API 或者 Websocket 代码方面问题。 Binance 客服. Request Weight 1 for a single symbol; 10 when the symbol parameter is omitted; Request Parameters Introduction. Ed25519 Ed25519 keys use asymmetric cryptography. Binance API tương thích với nhiều ngôn ngữ lập trình như Python, Java, Node. Please refer to Market Data Only page. 0 protocol for authentication and authorization. Tuy nhiên, tất cả thư viện của bên thứ ba không được liệt kê trong thư viện API của chúng tôi là không chính thức và không liên quan đến Binance. GET /fapi/v1/userTrades的响应字段marginAsset将在2024-07-17被移除 INVALID_API_KEY_OR_IP: 400004: API identity key not found or invalid. com:9443 or wss://stream. API Rate Limit Check theget_exchange_info()call for API-keys and secret-keys are case sensitive. Any LIMIT or LIMIT_MAKER order can be made into an iceberg order by specifying the icebergQty. Check Request Media type. vision . By leveraging the SDK, developers can enhance their dApp's user experience and provide seamless access to the advanced features of the Binance Wallet. MEDIA_TYPE_NOT_SUPPORTED: 400007: Media type not supported. Binance API uses the public key to verify your signature. Sí, la API de Binance es compatible con múltiples lenguajes de programación, como Python, Java, node. Get aggregate trades. Binance Margin Trading provides a sophisticated approach to digital asset trading by enabling clients to borrow funds against their holdings and utilize leverage, ultimately allowing for a more capital-efficient trading experience. US’ API documentation has officially moved from GitHub to Binance. Streams, endpoints, parameters, payloads, etc. INVALID_API_KEY_OR_IP: 400004: API identity key not found or invalid. A new order with the same clientOrderId is accepted only when the previous one is filled or expired. The base API endpoint is: https://api. Binance API is compatible with multiple programming languages, such as Python, Java, Node. API 1. Binance API 中文电报群 或 Binance API 英文电报群. Support Welcome to the Binance. BAD_HTTP_METHOD: 400006: Request method not supported. All time and timestamp related fields in the JSON responses are in milliseconds by default. Exchange data; Market trade and price data; User account data; Trade order management; Wallet management For APIs that only send public market data, please use the base endpoint https://data-api. Le trading d’API fournit un environnement de test, une documentation API et un exemple de code dans de nombreux langages de programmation. to the API and Streams will be reported here: https://t. Introduction. Official Documentation for the Binance US APIs and Streams - binance-us/binance-us-api-docs Yes. Oldest first, newest last. Each endpoint has a security type that determines the how you will interact with it. js, DotNET, Ruby, and more. Portfolio Margin IP Limit is 6000/min. Base URLs: All endpoints return either a JSON object or array. Earn interest on your crypto with Binance Earn. ; Once API key is created, it is recommended to set IP restrictions on the key for security reasons. vision. js, DotNET, Ruby и INVALID_API_KEY_OR_IP: 400004: API identity key not found or invalid. You can stream candlestick chart data, market depth, or use other advanced features such as setting stop losses and iceberg orders. 幣安 API 與多種程式語言相容,例如 Python、Java、Node. General API Information All endpoints return a common JSON object with "code", "message" and "data", no matter if it's a success or not. Apr 18, 2019 · This project is designed to help you make your own projects that interact with the Binance API. All time and timestamp related fields are in milliseconds. aggregate 2024-06-19 . com can now be accessed from data-stream. The server does not interpret id in any way, simply echoing it back in the response. Only API keys with FIX_API or FIX_API_READ_ONLY are allowed Yes. Select a language for code samples from the tabs above or the mobile navigation menu. Trades that fill at the same time, from the same taker order, with the same price – those trades are collected into an aggregate trade with total quantity of the individual trades. REST API . GET /fapi/v1/userTrades的响应字段marginAsset将在2024-07-17被移除 Mar 10, 2025 · 2025-03-05 . We encourage you to bookmark the link to stay up to date on our API resources and documentation. vision/ws-api/v3 A single connection to the API is only valid for 24 hours; expect to be disconnected after the 24-hour mark. Only API keys with FIX_API or FIX_API_READ_ONLY are allowed to connect. get_order_book (symbol = 'BNBBTC') # place a test market buy order, to place an actual order use the create_order function order = client. For APIs that only send public market data, please use the base endpoint https://data-api. 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 Mar 10, 2025 · 2025-03-05 . Protocol Rules The following specifies the rules for calling the Webhook Notification from Binance payment. The limits on the API are based on the IPs, not the API keys. FIX API Drop Copy sessions Endpoint is: tcp+tls://fix-dc. You share your public key with Binance and use the private key to sign API requests. 2023-03-13 HTTP 5XX return codes are used for internal errors; the issue is on Binance's side. US API Documentation! Our REST APIs offer access to: Published new API documentation interface and added Python code samples. Terminology . Enums. 0 server to secure a user's consent for performing an API request on his behalf. API trading provides a testing environment, API documentation, and sample code in multiple programming languages. Websocket Streams . Feb 27, 2025 · from binance import Client, ThreadedWebsocketManager, ThreadedDepthCacheManager client = Client (api_key, api_secret) # get market depth depth = client. us. Streams can be accessed either in a single raw stream or in a combined stream. The base endpoint for testnet is: wss://testnet. create_test_order (symbol = 'BNBBTC', side = Client 本篇所列出的 wss 接口的 base URL:wss443/ws-api/v3* Apr 8, 2018 · Si votre IP n’est pas restreinte, l’autorisation de la clé API générée par le système ne pourra être définie sur [Activer la lecture] qu’à partir du 30/01/2023 à 00 h 00 (UTC). api-key所对应的api-secret作为 hmac sha256 的密钥,其他所有参数作为hmac sha256的操作对象,得到的输出即为签名。 签名大小写不敏感。 当同时使用query string和request body时, HMAC SHA256 的输入query string在前,request body在后 Да. js, DotNET, Ruby y muchos más. It is strongly recommended to use websocket stream for getting data as much as possible, which can not only ensure the timeliness of the message, but also reduce the access restriction pressure caused by the request. Doing a DELETE on an active listenKey will close the stream and invalidate the listenKey. Websocket API will be available on 2025-02-25 and can be accessed through this URL: wss://ws-dapi. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success. 2. Public market data can also be retrieved through the websocket market data using the URL data-stream. Binance APIs utilize the OAuth 2. Endpoint Security Type. Pour en savoir plus sur les API Binance, consultez la page FAQ relative au didacticiel sur les API. Il n’y a que deux explications plausibles expliquant la « disparition » d’une clé API : Si vous n’avez pas été actif récemment et que vous utilisiez l’API avant le 7 mars 2018, il est possible que votre ou vos clés API aient été purgées pour assurer la sécurité de votre compte. Please refer to this page regarding API key creation. Binance Open API. Doing a PUT on an active listenKey will extend its validity for 60 minutes. Jan 28, 2025 · Web Socket Streams for Binance (2025-01-28) General WSS information The base endpoint is: wss://stream. Simple connector to Binance Public API. These streams offer a smaller payload and should offer better latency than the equivalent JSON streams for a subset of latency-sensitive market data streams. Margin Trading, supports leveraged long and short positions across a variety of digital assets on the spot market. Check Request method. Name Type Mandatory Description; coin: STRING: YES: withdrawOrderId: STRING: NO: client id for withdraw: network: STRING: NO: address: STRING: YES: addressTag: STRING Get started with Binance perpetual future API documentation from Binance APIs exclusively on the Postman API Network. By default, API-keys can access all secure routes. js、DotNET和Ruby等。 然而,所有第三方提供未列举于币安API资料库中之套件皆为非官方提供亦非币安所属,如使用此类套件导致损失,币安不负任何赔偿责任。 In March 2022, we relocated our documentation portal from GitHub to docs. On this page. The Binance API documentation on Github has been moved to our official company repository: The FIX API documentation has been updated to reflect the upcoming changes. We offer access to Spot, Margin, Futures, and Options API trading for over 300 digital and fiat currencies. binance-api-postman Public Postman collection for Binance Public Sim. WebSocket API is a separate service from WebSocket Market Data streams. js, DotNET, Ruby e mais. . 0 scenarios such as those for web server, single page (browser based), mobile and native applications. The PERCENT_PRICE_BY_SIDE filter defines the valid range for the price based on the average of the previous trades. API scopes. js、DotNET、Ruby 等。 然而,我們的 API 庫中未列出之所有第三方資料庫皆非官方來源,亦與幣安無關,若為該使用事宜所衍生或與其相關之任何損失或損害,我方概不負責。 For Security Purpose, Binance will add signature for webhook notification. HTTP Request . Official Documentation for the Binance APIs and Streams. Does not support placing or canceling orders. However, all third-party libraries not listed in our API library are unofficial and not affiliated with Binance and we are not responsible for any loss or damage arising out of or in connection with such uses. US Docs. through a WebSocket connection. to the API and Streams will be reported here. The streams available through this domain are the same that can be found in the Websocket Market Streams documentation. Support 币安API能兼容多种编程语言,例如Python、Java、Node. You can use UUIDs, sequential IDs, current timestamp, etc. Streams available in SBE format: Jan 20, 2025 · WEBSOCKET API. 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. Please visit the new portal for the latest, most up-to-date information on our publicly accessible APIs. vision 。 请参考 Market Data Only_CN 页面。 上一页 This SDK is designed to empower third-party Decentralized Applications (dApps) by enabling seamless integration with the Binance Wallet. 对于仅发送公开市场数据的 API,您可以使用接口的 base URL https://data-api. Create a Sub Account; Enable Futures for Sub Account; Create Api Key for Sub Account; Delete Sub Account Api Key Parameters Response; symbol: allocations from oldest to newest: symbol + startTime: oldest allocations since startTime: symbol + endTime: newest allocations until endTime: symbol + startTime + endTime Dec 17, 2024 · User Data Streams for Binance. Partner needs to verify the signature using the public key issued from Binance Pay. These terms will be used throughout the documentation, so it is recommended especially for new users to read to help their understanding of the API. qyzovhhstnqppzktznoydqctntolwycegpecdzntjtnfhnidkjxgoazmwhxxuenrytr