Python SDK
Python SDK to work with HeX orderbook
Overview
Key Components
Component
Description
Orderbook Architecture
Token Pairs
ob = OrderbookClient(
near_intent,
base=OmniToken.GNK, # Base: GNK
decimal_base=9,
quote=OmniToken.USDT, # Quote: USDT
decimal_quote=6,
)Order Sides
Price Format
Orderbook Depth
Fee Structure
Fee Components
Fee Type
Who Pays
Description
Fee Configuration
Fee Calculation
Basis Points
Percentage
Example (100 USDT trade)
Protocol Fees
Fee Flow
Getting Started
Installation
Basic Setup
Trading Operations
1. View Orderbook
2. Simulate Market Order
3. Place Limit Order
4. Place Market Order
5. Cancel Orders
6. Claim Pending Balance
Best Practices
1. Risk Management
2. Error Handling
3. Simulate Before Execution
4. Monitor Pending Balances
5. Graceful Shutdown
6. Logging
API Reference
OrderbookClient Methods
Method
Description
Models
Model
Description
Troubleshooting
Common Issues
Issue
Solution
Debugging
Last updated