Current collected state Current
Observed since 20 Oct, 17:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
abfinance-python-api
Python3 HTTP/WebSocket API Connector
Official Python3 API connector for ABFinance's HTTP and WebSocket APIs.
pip install abfinance-python-api
Requires Python 3.9+
from abfinance_api.unified_trading import HTTP
# Public endpoints (no authentication required)
session = HTTP(testnet=True)
print(session.get_server_time())
print(session.get_orderbook(category="linear", symbol="BTCUSDT"))
# Private endpoints (authentication required)
session = HTTP(
testnet=True,
api_key="your_api_key",
api_secret="your_api_secret",
)
# Get wallet balance
print(session.get_wallet_balance(accountType="UNIFIED"))
# Place an order
print(session.place_order(
category="linear",
symbol="BTCUSDT",
side="Buy",
orderType="Limit",
qty="0.01",
price="30000",
))
from abfinance_api.unified_trading import WebSocket
def handle_message(message):
print(message)
# Public WebSocket
ws = WebSocket(testnet=True, channel_type="linear")
ws.orderbook_stream(depth=50, symbol="BTCUSDT", callback=handle_message)
# Private WebSocket
ws_private = WebSocket(
testnet=True,
channel_type="private",
api_key="your_api_key",
api_secret="your_api_secret",
)
ws_private.order_stream(callback=handle_message)
See the examples directory for more usage examples.
MIT License
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
requestsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.6",
"evaluation": "NOT_EVALUATED"
} | requests | runtime |
websocket-clientEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.6",
"evaluation": "NOT_EVALUATED"
} | websocket-client | runtime |
pycryptodomeEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.6",
"evaluation": "NOT_EVALUATED"
} | pycryptodome | runtime |
bdist_wheel · 25.29 KB · Python py2.py3
sdist · 24.2 KB · Python source
Shared repository data · GitHub
Observed since 20 Oct, 17:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:aecb216d0bb0c521552f656cda19cf36a9168e4ba3fa50ae7fc737db546debd4