Skip to main content

Python client for the Kuest CLOB

Project description

Kuest
Kuest Python CLOB Client

PyPI

Python SDK for the Kuest CLOB.

Installation

pip install kuest-py-clob-client

Read-Only Usage

from py_clob_client.client import ClobClient

client = ClobClient("https://clob.kuest.com")

print(client.get_ok())
print(client.get_server_time())

Wallet-Only Trading

Kuest trading uses Deposit Wallet orders only. The public order path defaults to signature_type=3 and rejects signature types 0, 1, and 2.

from py_clob_client.client import ClobClient

HOST = "https://clob.kuest.com"
CHAIN_ID = 80002
PRIVATE_KEY = "<owner-private-key>"
DEPOSIT_WALLET = "<deposit-wallet-address>"

client = ClobClient(
    HOST,
    chain_id=CHAIN_ID,
    key=PRIVATE_KEY,
    signature_type=3,
    funder=DEPOSIT_WALLET,
)
client.set_api_creds(client.create_or_derive_api_creds())

Place a Limit Order

from py_clob_client.client import ClobClient
from py_clob_client.clob_types import OrderArgs, OrderType
from py_clob_client.order_builder.constants import BUY

client = ClobClient(
    "https://clob.kuest.com",
    chain_id=80002,
    key="<owner-private-key>",
    signature_type=3,
    funder="<deposit-wallet-address>",
)
client.set_api_creds(client.create_or_derive_api_creds())

order = OrderArgs(token_id="<token-id>", price=0.42, size=5.0, side=BUY)
signed = client.create_order(order)
response = client.post_order(signed, OrderType.GTC)
print(response)

Place a Market Order

from py_clob_client.client import ClobClient
from py_clob_client.clob_types import MarketOrderArgs, OrderType
from py_clob_client.order_builder.constants import BUY

client = ClobClient(
    "https://clob.kuest.com",
    chain_id=80002,
    key="<owner-private-key>",
    signature_type=3,
    funder="<deposit-wallet-address>",
)
client.set_api_creds(client.create_or_derive_api_creds())

order = MarketOrderArgs(token_id="<token-id>", amount=25.0, side=BUY, order_type=OrderType.FOK)
signed = client.create_market_order(order)
response = client.post_order(signed, OrderType.FOK)
print(response)

Manage Orders

from py_clob_client.client import ClobClient
from py_clob_client.clob_types import OpenOrderParams

client = ClobClient(
    "https://clob.kuest.com",
    chain_id=80002,
    key="<owner-private-key>",
    signature_type=3,
    funder="<deposit-wallet-address>",
)
client.set_api_creds(client.create_or_derive_api_creds())

open_orders = client.get_orders(OpenOrderParams())
if open_orders:
    client.cancel(open_orders[0]["id"])

client.cancel_all()

Notes

  • Use KUEST_API_KEY, KUEST_SECRET, and KUEST_PASSPHRASE credentials for authenticated Level 2 calls.
  • API_KEY, API_SECRET, API_PASSPHRASE, and PRIVATE_KEY may be used as local input aliases by applications, but SDK wire headers remain KUEST_*.
  • USDC remains the settlement collateral.

Project details


Download files

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

Source Distribution

kuest_py_clob_client-2.0.3.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

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

kuest_py_clob_client-2.0.3-py3-none-any.whl (47.8 kB view details)

Uploaded Python 3

File details

Details for the file kuest_py_clob_client-2.0.3.tar.gz.

File metadata

  • Download URL: kuest_py_clob_client-2.0.3.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kuest_py_clob_client-2.0.3.tar.gz
Algorithm Hash digest
SHA256 e863d2a0e76922ac883b337a841d171a10a5463d112915bfa9940733dc5d5872
MD5 f14273d877fe09eaae51f981c14e94d1
BLAKE2b-256 a6401b08dbcdd46f04f7c8c20601a31a1e56b23398387ed2419e3d28f4ad6e7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for kuest_py_clob_client-2.0.3.tar.gz:

Publisher: release.yaml on kuestcom/py-clob-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kuest_py_clob_client-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for kuest_py_clob_client-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b26116d2ca508ea9b0125dc0925385b230fb5ee579525eb2cbe12aefe71df143
MD5 40a7d10085a32f2b0c5853fdec6e2e80
BLAKE2b-256 a21d76df7f2f3489fe9d02cfc48d89402a5d182670aef5348c9711d87ab6d1eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for kuest_py_clob_client-2.0.3-py3-none-any.whl:

Publisher: release.yaml on kuestcom/py-clob-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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