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
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 the limit order
limit_order = builder.build_limit_order(
LimitOrderData(
maker_asset_address="0x...",
taker_asset_address="0x...",
taker_asset_id=1,
...
)
)
# Sign it
signature = builder.build_limit_order_signature(limit_order)
# Generate the Order and Signature json to be sent to the CLOB
order_and_sig = builder.build_limit_order_and_signature(limit_order, signature).json()
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.4.tar.gz
(11.4 kB
view hashes)
Built Distribution
Close
Hashes for py_order_utils-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 585e51b496051aae68b013d5edd0ee1f385a6692f5e97cb1ecf6f42edf8446ca |
|
MD5 | 9768970c1f80ca2b567b22077957b954 |
|
BLAKE2b-256 | 1acb1aca9536572d4261e9c5bf3016bfbe9825f64653a29ff574f43663c842e3 |