Python utilities used to generate and sign limit and market orders on Polymarket's CLOB
Project description
Polymarket CLOB 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
from pprint import pprint
def main():
exchange_address = "0x...."
chain_id = 80001
signer = Signer("0x....")
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 API
pprint(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.23.tar.gz
(14.5 kB
view hashes)
Built Distribution
Close
Hashes for py_order_utils-0.0.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27af2f13db222dae4178090d4679035e47ef4b2251e00d7972758cb256b47bc3 |
|
MD5 | 56281f65448473bbc7e046eab2870072 |
|
BLAKE2b-256 | 0e4c6534e11460dcf825c98f40c4b77f9491ef9a67efa477e14acb39d19bf3f2 |