메뉴 건너뛰기

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 how to trade 60 second binary options like a professional 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.
번호 제목 글쓴이 날짜 조회 수
28865 Metode Menang Permainan Slot Online Playtech YoungElizabeth5437 2022.01.17 1
28864 MBTI: Making The Most Of A Flawed Theory EleanorDeen7083 2022.01.17 6
28863 What Are The Types Of Myers Briggs? HGOLeo304081352367 2022.01.17 6
28862 The MBTI DeenaBoan768906774709 2022.01.17 5
28861 Website Judi Agen Slot Online Dapat Deposit Pulsa OllieAubry80320 2022.01.17 1
28860 Session Replay, High Temperature Maps And Form Analytics Combined With Advanced. Gustavo44061879530515 2022.01.17 3
28859 MUST READS  vopda7nchidvpkv 2022.01.17 1
28858 Gottlieb Daimler Says Furnish String Comparatively Static - Exclude For Chips PasqualeBraswell043 2022.01.17 2
28857 4 Provider Slot Online Simpel Menang Banyak MonicaGarica4080569 2022.01.17 1
28856 DAVID LLOYD: Ted Dexter Was A Real Adventurer, And Was Loved By All LizzieBrandon26038 2022.01.17 1
28855 Asik77 Susunan Daftar Game Letak Judi Slot Online Terpercaya Dan Paling Baik Di Tahun 2021 QuintonBruni8511370 2022.01.17 3
28854 Metode Menang Permainan Slot Online Playtech BrigetteHennings029 2022.01.17 1
28853 Keuntungan Main Judi Slot Dengan Cara Online SharylPlowman07 2022.01.17 1
28852 Teknik Menang Permainan Slot Online Playtech CarlaGallegos525 2022.01.17 3
28851 Server Rental EugeniaPoate39507 2022.01.17 4
28850 Dankstop Snowman Hand Pipe KlaudiaFtx0896930154 2022.01.17 2
28849 Trick Menang Main Slot Online Paling Simpel ReinaSheridan65 2022.01.17 1
28848 Zeitschriften Schnell Herstellen TIFWillie309813695557 2022.01.17 2
28847 Daftar Permainan Judi Slot Terpilih Habanero ShirleenZ104942 2022.01.17 1
28846 Ipl - It's Not Every About Cricket MaynardC592286957 2022.01.17 2
위로