Skip to main content

Signature

client.sell(
    token_id: str,
    shares: float = None,
    price: float = None,
    usdc_amount: float = None,
    order_type: str = "GTC"
) -> Dict

Parameters

ParameterTypeDescription
token_idstringRequired. The outcome token ID to sell
sharesfloatNumber of shares to sell
pricefloatLimit price per share (0.01 - 0.99). Required for GTC orders
usdc_amountfloatUSDC value of shares to sell. For market orders only
order_typestringGTC (limit), FOK (fill or kill), or FAK (market). Default: GTC

Returns

FieldTypeDescription
successboolWhether the order was placed successfully
orderIDstringThe created order ID
statusstringOrder status (see below)
takingAmountstringUSDC received (for SELL orders)
makingAmountstringTokens sold (for SELL orders)
transactionsHasheslistTransaction hashes from Polymarket
errorMsgstringError message if order failed (optional)

Status Values

GTC (limit) orders:
  • live: Order placed on the order book
  • PLACED: Order successfully created
Market orders (FOK/FAK):
  • matched: Order filled immediately
  • delayed: Order accepted but processing
  • unmatched: Order couldn’t be filled (FOK rejected, FAK partially filled)

Example

from polyhush import PolyhushClient

client = PolyhushClient(api_key="your-api-key")

# Limit order
result = client.sell(token_id="123...", shares=100, price=0.65)

# Market order - sell entire position
positions = client.get_positions(detailed=True)
pos = next((p for p in positions if p['token_id'] == token_id), None)

if pos and pos['available_to_sell'] > 0:
    client.sell(token_id=token_id, shares=pos['available_to_sell'], order_type="FAK")
Market Order Minimums: FOK/FAK orders have minimum size requirements that vary by market. Very small sell orders may be rejected. If your order fails with “minimum order size” error, increase the amount.

Order Types

TypeBehavior
GTCSits on order book until filled or cancelled
FOKMust fully fill immediately or cancel entirely
FAKFills what’s available immediately (market order)
Use get_positions(detailed=True) to check available_to_sell before selling—this accounts for shares reserved in pending sell orders.