Skip to content

Trading

Fivesight CLOB Client provides a unified interface for placing, modifying, and canceling orders.

Order Types

We support standard order types:

  • Limit: Buy or sell at a specific price or better.
  • Market: Immediate execution at best available price (FOK/IOC).

Placing an Order

The simplest way to place an order is place_order.

python
from fivesight_clob_client.clob_types import OrderArgs, OrderSide, OrderType

order_args = OrderArgs(
    price=0.65,
    size=100.0,
    side=OrderSide.BUY,
    token_id="token-id-123"
)

response = client.create_and_post_order(order_args)

Canceling Orders

You can cancel a single order by ID or cancel all orders.

python
# Cancel single
client.cancel(order_id="0x123...")

# Cancel all open orders
client.cancel_all()

Order Management

Fetch open orders to track your activity:

python
open_orders = client.get_orders()
for order in open_orders:
    print(f"{order.id}: {order.size} @ {order.price}")

Released under the MIT License.