Skip to content

Getting Started with Fivesight CLOB Client

The fivesight-clob-client is a modified fork of the Polymarket py-clob-client, optimized for use with the Fivesight Shadow Exchange simulation platform.

Installation

bash
git clone https://github.com/a-finance-bro/fivesight-backend.git
cd fivesight-clob-client
pip install -e .

Basic Usage

The client is designed to work seamlessly with the Shadow Exchange in simulation_mode.

python
from fivesight_clob_client.client import ClobClient

# Initialize Client
# host: URL of your running fivesight-backend
# simulation_mode: True (Enables simulation specific features)
client = ClobClient(
    host="https://api.fivesight.ai/api/simulation", 
    key="dummy", 
    chain_id=137, 
    simulation_mode=True
)

# Create a Simulation Session
# mode: "PAPER" (Live Proxy) or "BACKTEST" (Historical Data)
session = client.create_simulation_session(mode="PAPER", initial_balance=10000)

print(f"Session Token: {session['session_token']}")
print(f"API Key: {session['api_key']}")

Released under the MIT License.