메뉴 건너뛰기

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.
번호 제목 글쓴이 날짜 조회 수
1563 How A Lot Do You Charge For Cryptocurrency Market Kristofer80571594780 2022.01.16 0
1562 Daftar Judi Slot Online Android Paling Baik LillianFreytag8 2022.01.16 0
1561 Metode Mengalahkan Mesin Slot Online BethanyStoltz730304 2022.01.16 0
1560 Bukti Memesona Mengenai Slots Online ArnoldoM744328577370 2022.01.16 0
1559 Kiat Tepat Main Game Slot Uang Asli NapoleonBurges4469 2022.01.16 0
1558 Cara Menggapai Menang Dalam Main Slot Online KandiLatham3928712552 2022.01.16 0
1557 Bear Grylls Is Compared To A 'PORN STAR' By Amused Fans EnidKopp519527817727 2022.01.16 0
1556 Daftar Permainan Judi Slot Terhebat Habanero CarmenMerry707400839 2022.01.16 0
1555 3 Tipe Permainan Judi Online Kartu Yang Termashyur MaribelFitzwater 2022.01.16 0
1554 All You Need To Know About Thumb Sucking DelbertHagen67782 2022.01.16 0
1553 a year after blowing ... NataliaSharrow5278 2022.01.16 0
1552 Teknik Penting Masuk Di Agen Sabung Ayam Online Teranyar KarmaByars570668986 2022.01.16 0
1551 Teknik Main Slot Online Untuk Pemula Tina1402554276106 2022.01.16 0
1550 Siasat Menang Judi Slot Online Untuk Pemula CassandraCates777 2022.01.16 0
1549 Metode Bermain Sabung Ayam Online SV388 CarinHawken5713 2022.01.16 0
1548 Tanda-tanda Bandar Slots Online Yang Gampang Ditundukkan FranciscaSchurr 2022.01.16 0
1547 Daftar Permainan Judi Slot Terhebat Habanero GeraldoFlanders99969 2022.01.16 0
1546 Langkah Daftar Di Bandar Judi Sabung Ayam Online Paling Dipercaya JanisWelsh85193770 2022.01.16 0
1545 Agen Resmi Slot SBOBET Online Bisa Dipercaya FriedaB842734343 2022.01.16 0
1544 Website Judi Agen Slot Online Dapat Deposit Pulsa HarrisLindeman3091 2022.01.16 0
위로