Skip to main content

Installation

Contract Call

  • You need to apply for the corresponding api_key and api_secret
  • The api_key and sign parameters will be encapsulated and added to the request parameters internally, users do not need to worry about it.
  • API example
from lbank.old_api import BlockHttpClient
import logging
api_key = ""
api_secret = ""
# service address
base_url = "https://api.lbkex.com/"
# Encryption method
sign_method = "RSA"
# is_json is a boolean type. If True, the Content-Type is `application/json`.
# Otherwise, it is `application/x-www-form-urlencoded`.
client = BlockHttpClient(
    sign_method=sign_method,
    api_key=api_key,
    api_secret=api_secret,
    base_url=base_url,
    log_level=logging.DEBUG,
    is_json=True
)
# Pairs api
api_url = "v2/currencyPairs.do"
res = client.http_request("get", api_url)
print(res)
# withdrawConfigs api
api_url = "v2/withdrawConfigs.do"
payload = {
    "assetCode": "btc"
}
res = client.http_request("get", api_url, payload=payload)
print(res)
payload = {}
response = client.http_request("post", "v2/user_info.do", payload=payload)
print(response)
  • Websocket example
from lbank.websocket.websocket_client import LbankWebsocketClient
def sub_deep_data():
    ws_client = LbankWebsocketClient(
        base_url="",
        on_message=on_message,
    )
    subscribe_msg = {
    }
    ws_client.send(subscribe_msg)


def on_message(ws_client, msg):
    print(f"msg:{msg}")


if __name__ == '__main__':
    sub_deep_data()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lbank-connector-python-1.0.137.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lbank_connector_python-1.0.137-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file lbank-connector-python-1.0.137.tar.gz.

File metadata

  • Download URL: lbank-connector-python-1.0.137.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for lbank-connector-python-1.0.137.tar.gz
Algorithm Hash digest
SHA256 363a129a546e18525633f2c770af0f4d79a71c9ae904cdbb88c4749fcb5cd5f8
MD5 fe885e29b2f97832c77bf1becc862d8b
BLAKE2b-256 c08b19908b7530474b05b351c59d3c09ac931d4760ede9c4213ca902537c4b33

See more details on using hashes here.

File details

Details for the file lbank_connector_python-1.0.137-py3-none-any.whl.

File metadata

File hashes

Hashes for lbank_connector_python-1.0.137-py3-none-any.whl
Algorithm Hash digest
SHA256 bf6f7afa5211cd337361e9b9bea04bb33531976f86221890bb1b5f51094fd82b
MD5 fb4321bb33c15f76de629fce48956c3b
BLAKE2b-256 4d8f6795ab44a44fded8a5d5e35081e4961d98c45cf871916662332b230c7aac

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.137 This release

2 files

1.0.136

2 files

1.0.135

2 files

1.0.134

2 files

1.0.133

2 files

1.0.132

2 files

1.0.131

2 files

1.0.13

2 files

1.0.12

2 files

1.0.11

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

1 file

1.0.1

3 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page