Client Initialization
Your Polyhush API key. Can also be set via
POLYHUSH_API_KEY environment variable.API base URL. Override for testing or staging environments.
Order Type Constants
The client provides constants for order types:API Methods by Category
Balance & Account
get_balance()- Get USDC balanceget_account_summary()- Get full account summaryget_transactions()- Get transaction history
Positions
get_positions()- Get basic positionsget_position_details()- Get positions with P&L
Orders
buy()/sell()- Limit ordersmarket_buy()/market_sell()- Market orderscancel_order()/cancel_all_orders()- Cancel orderssync_order()/sync_all_orders()- Sync status
Market Data
get_ticker()- Get current prices
Settlements
settle_position()- Settle a marketsettle_all_positions()- Settle all marketsget_pending_settlements()- Get markets ready to settleget_settlement_status()- Check settlement status
Response Format
All methods return Python dictionaries or lists. Error responses raisePolyhushAPIError.