Path: blob/master/bitget-python-sdk-api/README_EN.md
731 views
How to use Python SDK?
python version:3.6+
WebSocketAPI:advice websockets library 1.4.2+
First:Download SDK,install Library
1.1 Download python SDK
Clone or Download the SDK directory locally and choose to use bitget-python-sdk-api
1.2 Install required libraries
Second:Configure Apikey information
2.1 If there is no API yet, you can click to go to the official website to apply.
2.2 Put all information inexample_*.py(RestAPI)
and example_ws_contract.py(WebSocketAPI)
Third:Use example
RestAPI
run
example.py
Unlock the annotations of the corresponding methods, pass parameters, and call each interface.
If your apikey is of RSA type, actively set the signature type to RSA: set the value of SIGN_TYPE to RSA in the
constans.py
file, such as SIGN_TYPE = RSA
WebSocketAPI
run
example_ws_contract.py
Select the corresponding startup method according to the personal/public channel, and unlock the annotation of the corresponding channel.
If your apikey is of RSA type, actively set the signature type to RSA: set the value of SIGN_TYPE to RSA in the
constans.py
file, such as SIGN_TYPE = RSA
Tips:
If you don’t know the API yet, it is recommended to refer to the
Bitget
official API document