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.6.0.tar.gz
(85.9 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.6.0.tar.gz.
File metadata
- Download URL: opinion_clob_sdk-0.6.0.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec4c565d5dbb79d1aab5c58901911b9a49f94b29e0c85e2904a9fe620dbb6cb3
|
|
| MD5 |
44921d122411396c55d2efdb8bbafc98
|
|
| BLAKE2b-256 |
6d4bcdd79f9fb9f89f24e133d13ed92807bb2245b3877b46a5d61c6bb7b200df
|
File details
Details for the file opinion_clob_sdk-0.6.0-py3-none-any.whl.
File metadata
- Download URL: opinion_clob_sdk-0.6.0-py3-none-any.whl
- Upload date:
- Size: 88.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d63dee191b75256a400f0a3d0808acaf87a849542df8c21800082d13ba0f515
|
|
| MD5 |
3814f08fcbeb1d12b6f8f6cd827d1977
|
|
| BLAKE2b-256 |
d6ef0dd3103bbe7597f88d56feea728b40be76448b48c3f31bb6f2e02afc48f2
|