Opinion CLOB SDK (Tech Preview) - Python SDK for Opinion Prediction Market Central Limit Order Book API
Project description
Opinion CLOB SDK (Tech Preview)
Technology Preview Release - BNB Chain Support
Python SDK for interacting with Opinion prediction markets via the CLOB (Central Limit Order Book) API.
Features
- Market data queries (markets, orderbooks, prices, candles)
- Order management (place, cancel, query orders)
- Position and balance tracking
- Smart contract interactions (split, merge, redeem)
- Support for BNB Chain mainnet (chain ID 56)
Installation
pip install opinion_clob_sdk
Quick Start
from opinion_clob_sdk import Client
client = Client(
host='https://proxy.opinion.trade:8443',
apikey='your_api_key',
chain_id=56, # BNB Chain mainnet
rpc_url='https://bsc-dataseed.binance.org',
private_key='your_private_key',
multi_sig_addr='your_multi_sig_address'
)
# Get markets
markets = client.get_markets(page=1, limit=10)
# Get orderbook
orderbook = client.get_orderbook(token_id='token_id')
# Place an order
from opinion_clob_sdk.chain.py_order_utils.model.order import PlaceOrderDataInput
from opinion_clob_sdk.chain.py_order_utils.model.sides import OrderSide
from opinion_clob_sdk.chain.py_order_utils.model.order_type import LIMIT_ORDER
order_data = PlaceOrderDataInput(
marketId=123,
tokenId='token_id',
side=OrderSide.BUY,
orderType=LIMIT_ORDER,
price='0.5',
makerAmountInQuoteToken=10
)
result = client.place_order(order_data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
opinion_clob_sdk-0.7.0.tar.gz
(88.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opinion_clob_sdk-0.7.0.tar.gz.
File metadata
- Download URL: opinion_clob_sdk-0.7.0.tar.gz
- Upload date:
- Size: 88.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ac12784912ed3b5b77758946b907c7a6dc0a65280c484b7bdb9f6642c6dce26
|
|
| MD5 |
8698ffc35be4f88e539986bd9b04441c
|
|
| BLAKE2b-256 |
424e663b55bda0e7681d0d64428333e7d5832aa8033b7ce5f541d89c1c58d078
|
File details
Details for the file opinion_clob_sdk-0.7.0-py3-none-any.whl.
File metadata
- Download URL: opinion_clob_sdk-0.7.0-py3-none-any.whl
- Upload date:
- Size: 88.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e438773d3bdabdb5bb0cd66d1747e6c0e11f18ced41255d459e94f0493aa58c7
|
|
| MD5 |
a5024296d26daf58f824ae2068e9aded
|
|
| BLAKE2b-256 |
a1a30df613709a1ec4b4da1c1e969e25e7c8d33aff0bb0cd37acba4c471eb4c4
|