Metadata-Version: 2.1
Name: lbank-connector-python
Version: 1.0.11
Summary: LBANK connector for the public API, private API, and websockets.
Home-page: 
License: MIT
Keywords: LBANK,Public API,python,connector
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md

# Installation
* pip install --upgrade lbank-connector-python -i https://pypi.org/simple
## Contract Call
* You need to apply for the corresponding api_key and api_secret
* 
```python
from lbank.old_api import BlockHttpClient
api_key = ""
api_secret = ""
# service address
base_url = "https://lbkperp.lbank.com"
# Encryption method
sign_method = "RSA"
client = BlockHttpClient(
    sign_method=sign_method,
    api_key=api_key,
    api_secret=api_secret,
    base_url=base_url
)
# Order api
order_url = "/cfd/openApi/v1/prv/placeOrder"
order_data = {
    "clientOrderId": f"{order_id}",
    "offsetFlag": 0,
    "orderPriceType": 4,
    "origType": 0,
    "price": 2000,
    "side": "BUY",
    "symbol": "ETHUSDT",
    "volume": 0.01,
}
res = client.http_request("POST", order_url, order_data)
print(res)
```
