메뉴 건너뛰기

XEDITION

Board

Binance python.
Binance Public API Connector Python.
This is a lightweight library that works as a connector to Binance public API.
Supported APIs: /api/* /sapi/* Spot Websocket Market Stream Spot User Data Stream.
Please find examples folder to check for more endpoints.
Spot Testnet is available, it can be used to test /api/* endpoints.
/sapi/* endpoints are not available. No UI. Steps to setup testnet API key. https://dev.binance.vision/t/99.
If base_url is not provided, it defaults to api.binance.com . It's recommended to pass in the base_url parameter, even in production as Binance provides alternative URLs in case of performance issues:
https://api1.binance.com https://api2.binance.com https://api3.binance.com.
PEP8 suggests lowercase with words separated by underscores , but for this connector, the methods' optional parameters should follow their exact naming as in the API documentation.
Additional parameter recvWindow is available for endpoints requiring signature. It defaults to 5000 (milliseconds) and can be any value lower than 60000 (milliseconds). Anything beyond the limit will result in an error response from Binance server.
timeout is available to be assigned with the number of seconds you find most appropriate to wait for a server response. Please remember the value as it won't be shown in error message no bytes have been received on the underlying socket for timeout seconds . By default, timeout is None. Hence, requests do not time out.
Proxy is supported.
The Binance API server provides weight usages in the headers of each response. You can display them by initializing the client with show_limit_usage=True :
You can also display full response metadata to help in debugging:
If ClientError is received, it'll display full response meta information.
Setting the log level to DEBUG will log the request URL, payload and response text.
There are 2 types of error returned from the library:
binance.error.ClientError This is thrown when server returns 4XX , it's an issue from client side. It has 4 properties: status_code - HTTP status code error_code - Server's error code, e.g. -1102 error_message - Server's error message, e.g. Unknown order sent. header - Full response header. This is thrown when server returns 5XX , it's an issue from server side.
More websocket examples are available in the examples folder.
Once connected, the websocket server sends a ping frame every 3 minutes and requires a response pong frame back within a 10 minutes period. This package handles the pong responses automatically.
Futures and Vanilla Options APIs are not supported:
/fapi/* /dapi/* /vapi/* Associated Websocket Market and User Data Streams.
Contributions are welcome. If you've found a bug within this project, please open an issue to discuss what you would like to change. If it's an issue with the API, please open a topic at Binance Developer Community.
번호 제목 글쓴이 날짜 조회 수
30205 Best Online Gambling Site 5116613 DouglasSpt461556 2022.01.19 1
30204 Excellent Online Gambling Site Tips 2378786 BenjaminPardue4359091 2022.01.19 1
30203 Trusted Safe Slot Details 7516676 BetsyPlate9541437491 2022.01.19 1
30202 Teknik Serta Strategi Main Judi Slot Online TeresitaDuncombe 2022.01.19 1
30201 10 Surefire Ways Bridal Makeup Artists Will Drive What You Are Promoting Into The Ground LucasT1750347560982 2022.01.19 1
30200 Black Lesbian Girls Videos JackiBenitez3679918 2022.01.19 1
30199 UPS Battery Backup Monitoring - Protect Towards Energy Loss WaldoNiven1398148919 2022.01.19 1
30198 Agen Resmi Slot SBOBET Online Bisa Dipercaya IsidroGramp7797655 2022.01.19 1
30197 Trik Menang Judi Slot Online Untuk Pemula AureliaRinaldi861208 2022.01.19 1
30196 Tehnik Menang Main Slot Online TorriOnus7212749461 2022.01.19 1
30195 How To Correctly Market Your Movies On The Web... Tip No. 29 From 263 LesleeCannan277978 2022.01.19 3
30194 Efek Bermain Slot Online Habanero Buat Pemula Matthew98R9669269 2022.01.19 1
30193 Taktik Menang Judi Slot Online Buat Pemula WoodrowKelsey081788 2022.01.19 1
30192 Jungle Wild Slots - Kesayangan Pemain Slot NoemiHairston78 2022.01.19 5
30191 Сказки Народов Мира TimothyBrauer38118155 2022.01.19 1
30190 Penyedia Permainan Slot Online Pragmatic Play OmaLaby5053871215351 2022.01.19 1
30189 Best Online Gambling Site Useful Information 4314273 LylePavy806373280169 2022.01.19 1
30188 Panduan Menang Bermain Slot Online LIWDanny7475037557177 2022.01.19 1
30187 Cara Mencapai Menang Dalam Bermain Slot Online WinfredTurney9705762 2022.01.19 3
30186 Online Gambling Agent Help 9314363 GayeI965712633655599 2022.01.19 1
위로