Python utilities used to generate and sign limit and market orders on Polymarket's CLOB
Project description
python-order-utils
Python utilities used to generate and sign limit and market orders on Polymarket's CLOB
Install
pip install py-order-utils
Usage
from py_order_utils.builders import LimitOrderBuilder
from py_order_utils.signer import Signer
exchange_address = "0x...."
chain_id = 1
signer = Signer("0xMockPrivateKey")
builder = LimitOrderBuilder(exchange_address, chain_id, signer)
# Create and sign the limit order
limit_order = builder.create_limit_order(
LimitOrderData(
maker_asset_address="0x...",
taker_asset_address="0x...",
taker_asset_id=1,
...
)
)
# Generate the Order and Signature json to be sent to the CLOB
d = json.dumps(limit_order.dict())
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
py_order_utils-0.0.19.tar.gz
(14.4 kB
view hashes)
Built Distribution
Close
Hashes for py_order_utils-0.0.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01826ebe54c7fa35a5dff0d8122bd08855bc18a521941d8099ef82244db97864 |
|
MD5 | cc63d7ba1d4f3f263b428d52e85cad95 |
|
BLAKE2b-256 | 269d6f72a2d93670a8218d12f84d6cba87bb5829d7aac797217a8f1d9f7f69e0 |