Skip to main content

Order Types

VoxFi supports multiple order types for different trading strategies:

Limit Orders

  • LIMIT_BUY: Buy contracts at a specific price or better;
  • LIMIT_SELL: Sell contracts at a specific price or better.
Limit orders are placed in the orderbook and execute when matched with a counterparty.

Market Orders

  • MARKET_BUY_VALUE: Buy contracts immediately, spending up to a specified value;
  • MARKET_BUY_QTY: Buy a specific quantity of contracts immediately at market price;
  • MARKET_SELL: Sell a specific quantity of contracts immediately at market price.
Market orders execute immediately against available liquidity in the orderbook.

Order Outcomes

All orders specify an outcome:
  • YES: Buying or selling YES contracts
  • NO: Buying or selling NO contracts

API Endpoints

Place Order

Creates a new order in the market. Supports different order types: limit orders (LIMIT_BUY, LIMIT_SELL) and market orders (MARKET_BUY_VALUE, MARKET_BUY_QTY, MARKET_SELL). Detailed documentation + playground

Cancel Order

Cancels an open limit order for the authenticated user. Detailed documentation + playground

Merge Contracts

The operation burns matching YES/NO contract pairs (X YES and X NO), permanently removing them from the user’s position without affecting the order book or market price. Parameters:
  • market_id (required): ID of the market where contracts will be merged
  • quantity (required): Quantity of contracts to be merged
Detailed documentation + playground

List User Orders

Gets all open orders for the authenticated user. If eventId is provided, returns orders only for that event. Detailed documentation + playground

Get User Activity

Returns the user’s trading activity (executed trades) for a given market. Parameters:
  • marketId (optional): Market ID to filter activity
  • page (optional): Page number for pagination
  • pageSize (optional): Number of items per page
Response: Array of UserActivity objects containing:
  • contract_type: Type of contract (YES/NO)
  • created_at: Timestamp of the trade
  • price_ticks: Price in ticks (0-100)
  • quantity: Number of contracts traded
  • side: Trade side (BUY/SELL)
Detailed documentation + playground

Get User P&L

Returns the user’s profit and loss (P&L) for a given market or event. Parameters:
  • marketId (optional): Market ID to filter P&L
  • eventId (optional): Event ID to filter P&L
Response: Array of UserPnl objects containing:
  • amount_received: Total amount received from sales (in cents)
  • amount_spent: Total amount spent on purchases (in cents)
  • event_id: Event ID
  • market_id: Market ID
  • pnl: Profit and loss (in cents)
  • qty_contracts_bought: Quantity of contracts bought
  • qty_contracts_sold: Quantity of contracts sold
Detailed documentation + playground

Order Lifecycle

  1. Placed: Order is sent and validated
  2. Open: Order is in the orderbook awaiting match
  3. Partially Filled: Some contracts have been executed
  4. Filled: Order is completely executed
  5. Cancelled: Order is cancelled before execution

Best Practices

  • Check Market Status: Make sure the market is open before placing orders;
  • Monitor Liquidity: Check orderbook depth before placing large orders;
  • Use Limit Orders: For better price control and potentially lower fees;
  • Cancel Unfilled Orders: Regularly cancel orders that are no longer needed.