메뉴 건너뛰기

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.
번호 제목 글쓴이 날짜 조회 수
33865 Situs Slots Online Popular Dengan Promosi Bonus Menarik Clarice36734221693252 2022.01.30 4
33864 The Best Online Photo Book Services Of 2021 ElliottTate2378160 2022.01.30 1
33863 Top 5 Digital Marketing Trends To Look For In 2021 DarrelBenn353995 2022.01.30 2
33862 Trial Of Former Malaysian PM's Wife Begins, Court Told She... ElvisHunter07545455 2022.01.30 1
33861 How Slot Machines Work – And Why You Should Think Twice Before Playing Them MarilouBenjamin94019 2022.01.30 3
33860 Erotic 대구안마 Uses BuddyMackennal79697 2022.01.30 1
33859 Prepare Your Financial Situation At Your Workplace Much Better Using These Suggestions WallySchultz4434 2022.01.30 3
33858 Are You Ready To Have A Career? Career Suggestions For Everybody! HungCockett685916 2022.01.30 3
33857 Binary Options Martingale Strategy - Binary Options In Malaysia UnaJvi91428814205955 2022.01.30 7
33856 The Fit Is Awesome. DottyHeritage982 2022.01.30 2
33855 Kim Kardashian Douses Herself In Rose Perfume From Her Fragrance Line HongWilburn742031 2022.01.30 1
33854 The Ideal Way To Get Work The Place You Want RodrigoByard875260686 2022.01.30 3
33853 Going Towards Right Path With Medical Marijuana JosieTrevizo9745 2022.01.30 1
33852 Have A Pet_ You Won't Be Able To Miss Out On This!... Advice Num 19 From 122 KelseyV9450414873 2022.01.30 2
33851 Skilled Techniques To Create A Smarter Video Clip Advertising Plan... Advice Num 6 From 859 Kaylene4657815788 2022.01.30 3
33850 In Incredibly Hot Drinking Water About Your Canine_ Climb Out With This Assistance... Advice No. 10 Of 501 DarrellHuxley90611 2022.01.30 2
33849 Latest Fair Go Casino No Deposit Bonuses 2021 Nabble Casino Bingo ImaWroblewski52657994 2022.01.30 3
33848 Free Slots Online - Alasan Utama Memilih Ini Bak Sumber Lipuran Anda Doris138623010373 2022.01.30 7
33847 Some Modes Of Travel Are Cheaper Than Many Others... Info No. 36 Of 425 MorganWitt137757 2022.01.30 4
33846 How To Properly Current Market Your Videos On Line... Tip No. 40 From 890 Shannan2198507530738 2022.01.30 5
위로