CodeTabs Component Demo
Interactive code examples with syntax highlighting and copy functionality
Clyra Agent Example
class=class="text-yellow-300">"text-blue-400">from clyra class=class="text-yellow-300">"text-blue-400">import class=class="text-yellow-300">"text-green-400">Agent
agent = class=class="text-yellow-300">"text-green-400">Agent(class=class="text-yellow-300">"text-purple-400">api_key=class="text-yellow-300">"class="text-green-400class="text-yellow-300">">CLYRA_...")
agent.subscribe(class="text-yellow-300">"class="text-green-400class="text-yellow-300">">polymarket:market_id=0x...:orderbook")
agent.on(class="text-yellow-300">"tick", class=class="text-yellow-300">"text-blue-400">lambda e: class=class="text-yellow-300">"text-blue-400">print(e.price, e.size))
agent.trade(class="text-yellow-300">"class="text-green-400class="text-yellow-300">">jupiter", class=class="text-yellow-300">"text-purple-400">token_in=class="text-yellow-300">"SOL", class=class="text-yellow-300">"text-purple-400">token_out=class="text-yellow-300">"USDC", class=class="text-yellow-300">"text-purple-400">amount=1.0)
agent.run()