> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vatic.trading/llms.txt
> Use this file to discover all available pages before exploring further.

# Trade Estimate

> Calculates the exact taker fee and net outcome for a BUY or SELL trade using the legacy fee formula (`fee = feeRate × p^exponent`). Provide `eventId` or `eventSlug` to identify the event.



## OpenAPI

````yaml POST /api/v1/fees/trade-estimate
openapi: 3.1.0
info:
  title: Vatic API
  version: 1.0.0
  description: >-
    Polymarket price targets, Hyperliquid prediction market data, market
    timestamps, fee calculators, and order management for systematic prediction
    market trading.
servers:
  - url: https://api.vatic.trading
    description: Production
security: []
paths:
  /api/v1/fees/trade-estimate:
    post:
      tags:
        - Fees (Legacy)
      summary: Trade fee estimate (legacy)
      description: >-
        Calculates the exact taker fee and net outcome for a BUY or SELL trade
        using the legacy fee formula (`fee = feeRate × p^exponent`). Provide
        `eventId` or `eventSlug` to identify the event.
      operationId: postFeesTradeEstimate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - side
                - makingAmount
                - takingAmount
              properties:
                eventId:
                  type: string
                  description: Polymarket event ID (provide this or eventSlug).
                eventSlug:
                  type: string
                  description: Polymarket event slug (provide this or eventId).
                side:
                  type: string
                  enum:
                    - BUY
                    - SELL
                makingAmount:
                  type: number
                  description: 'BUY: USDC you spend. SELL: shares you sell.'
                takingAmount:
                  type: number
                  description: 'BUY: gross shares you receive. SELL: gross USDC you receive.'
            example:
              eventSlug: btc-updown-5m-1744027500
              side: BUY
              makingAmount: 100
              takingAmount: 200
      responses:
        '200':
          description: Fee estimate result
          content:
            application/json:
              example:
                now: '2025-04-07T12:00:00.000Z'
                event:
                  id: '512345'
                  slug: btc-updown-5m-1744027500
                feeConfig:
                  hasTakerFees: true
                  type: crypto
                  feeRate: 0.25
                  exponent: 2
                  makerRebate: 20%
                side: BUY
                inputs:
                  makingAmount: 100
                  makingAmountUnit: usdc
                  takingAmount: 200
                  takingAmountUnit: shares
                averagePrice: 0.5
                fee:
                  chargedIn: shares
                  feeEquivalent: 12.5
                  feeInUsdcRaw: 6.25
                  minFeeThresholdUsdc: 0.0001
                result:
                  grossShares: 200
                  netShares: 187.5
        '400':
          description: Validation error
        '502':
          description: Gamma API unavailable

````