{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"tags":[{"name":"Trading API v1 - Positions","description":"Position management operations"},{"name":"Trading Orders v1","description":"Trading REST API for order management"},{"name":"Trading API v1 - Trades","description":"Trade history and management operations"},{"name":"Easy Options","description":"Simplified options trading API"},{"name":"CoinMarketCap","description":"CoinMarketCap-compatible market data endpoints"},{"name":"Public Contest","description":"Public endpoints for contest information"}],"paths":{"/v1/utils/mock-mm-enabled":{"get":{"tags":["utils-controller"],"operationId":"getMmEnabled","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"boolean"}}}}}},"post":{"tags":["utils-controller"],"operationId":"mockMmEnabled","parameters":[{"name":"enabled","in":"query","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v1/orders":{"get":{"tags":["Trading Orders v1"],"summary":"Get orders","description":"Returns a paginated list of open and partially filled orders for the authenticated account. Supports filtering by asset and option type (CALL/PUT).","operationId":"getOrders","parameters":[{"name":"asset","in":"query","description":"Underlying asset symbol to filter orders","required":false,"schema":{"type":"string"},"example":"BTC"},{"name":"type","in":"query","description":"Option type to filter orders (CALL or PUT)","required":false,"schema":{"type":"string"},"example":"CALL"},{"name":"page","in":"query","description":"Page number (1-based)","required":false,"schema":{"type":"integer","format":"int32","default":1},"example":1},{"name":"pageSize","in":"query","description":"Number of orders per page (max 100)","required":false,"schema":{"type":"integer","format":"int32","default":20},"example":20}],"responses":{"200":{"description":"Orders retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedResponseV1OrderResponseV1"}}}},"400":{"description":"Invalid request parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"401":{"description":"Authentication required","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"413":{"description":"Request size too large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"429":{"description":"Rate Limit exceed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}}}},"post":{"tags":["Trading Orders v1"],"summary":"Create limit order","description":"Creates a new limit order with idempotency support","operationId":"createOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequestV1"}}},"required":true},"responses":{"200":{"description":"Order created successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"401":{"description":"Authentication required","content":{"*/*":{"schema":{"type":"object"}}}},"409":{"description":"Duplicate idempotency key with different payload","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"422":{"description":"Business validation failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/v1/options/order":{"post":{"tags":["orders-controller"],"summary":"Place order operation","description":"Place order operation.","operationId":"placeOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeDto"}}},"required":true},"responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionOrderDto"}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionOrderDto"}}}},"500":{"description":"Internal server error"}}}},"/v1/easy-options/{id}/close":{"post":{"tags":["Easy Options"],"summary":"Close Easy Option","description":"Closes an active Easy Option","operationId":"closeEasyOption","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Easy Option close initiated","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Easy Option not found","content":{"*/*":{"schema":{"type":"object"}}}},"422":{"description":"Business validation failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}}}}},"/v1/easy-options/open":{"post":{"tags":["Easy Options"],"summary":"Open Easy Option","description":"Opens an Easy Option based on a card and investment amount","operationId":"openEasyOption","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenEasyOptionRequest"}}},"required":true},"responses":{"200":{"description":"Easy Option opened successfully","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid input","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"422":{"description":"Business validation failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}}}}},"/v1/contest/{contestId}/join":{"post":{"tags":["Public Contest"],"summary":"Join a contest","description":"Allows the authenticated user to join a contest. Creates a contest account, deposits the initial balance, and registers the participant.","operationId":"joinContest","parameters":[{"name":"contestId","in":"path","description":"Contest ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinContestDto"}}},"required":true},"responses":{"200":{"description":"Successfully joined contest","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContestAccountInfoResponseDto"}}}},"400":{"description":"Invalid request - contest ended, disabled, deadline passed, nickname taken, or already registered"},"401":{"description":"Unauthorized - authentication required"},"500":{"description":"Internal server error"}}}},"/v1/trades":{"get":{"tags":["Trading API v1 - Trades"],"summary":"Get trades","description":"Retrieve trade history for the authenticated account with optional filtering","operationId":"getTrades","parameters":[{"name":"symbol","in":"query","description":"Symbol filter","required":false,"schema":{"type":"string"}},{"name":"orderId","in":"query","description":"Order ID filter","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"positionId","in":"query","description":"Position ID filter","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"side","in":"query","description":"Trade side filter (buy, sell)","required":false,"schema":{"type":"string"}},{"name":"startTime","in":"query","description":"Start timestamp (milliseconds)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"endTime","in":"query","description":"End timestamp (milliseconds)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Page number (1-based)","required":false,"schema":{"type":"integer","format":"int32","default":1},"example":1},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32","default":20},"example":20}],"responses":{"200":{"description":"Trades retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedResponseV1"}}}},"400":{"description":"Invalid request parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}}}}},"/v1/trades/{id}":{"get":{"tags":["Trading API v1 - Trades"],"summary":"Get trade by ID","description":"Retrieve a specific trade by its ID","operationId":"getTrade","parameters":[{"name":"id","in":"path","description":"Trade ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Trade retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradeResponseV1"}}}},"404":{"description":"Trade not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"400":{"description":"Invalid request parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}}}}},"/v1/positions":{"get":{"tags":["Trading API v1 - Positions"],"summary":"Get positions","description":"Retrieve positions for the authenticated account with optional filtering","operationId":"getPositions","parameters":[{"name":"symbol","in":"query","description":"Symbol filter","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Position status filter (open, closed, exercised, liquidated)","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (1-based)","required":false,"schema":{"type":"integer","format":"int32","default":1},"example":1},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32","default":20},"example":20}],"responses":{"200":{"description":"Positions retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedResponseV1PositionResponseV1"}}}},"400":{"description":"Invalid request parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}}}}},"/v1/positions/{id}":{"get":{"tags":["Trading API v1 - Positions"],"summary":"Get position by ID","description":"Retrieve a specific position by its ID","operationId":"getPosition","parameters":[{"name":"id","in":"path","description":"Position ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Position retrieved successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PositionResponseV1"}}}},"404":{"description":"Position not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"400":{"description":"Invalid request parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiErrorV1"}}}}}}},"/v1/orderbook/{ticker_id}":{"get":{"tags":["CoinMarketCap"],"summary":"Get option order book","description":"Returns the order book depth for the given option ticker, in CoinMarketCap format.","operationId":"getOrderBook","parameters":[{"name":"ticker_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved order book data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CmcOrderBookDto"}}}},"404":{"description":"Order book not found"},"500":{"description":"Internal server error"}}}},"/v1/options/positions":{"get":{"tags":["positions-controller"],"summary":"Get opened positions","description":"Return list of opened positions.","operationId":"getPositions_1","responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OptionPositionDto"}}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OptionPositionDto"}}}}},"500":{"description":"Internal server error"}},"deprecated":true}},"/v1/options/positions/{id}":{"get":{"tags":["positions-controller"],"summary":"get position","description":"Get position by id","operationId":"getPosition_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionPositionDto"}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionPositionDto"}}}},"500":{"description":"Internal server error"}},"deprecated":true}},"/v1/options/positions/history":{"get":{"tags":["positions-controller"],"summary":"Get closed positions history","description":"Return list of closed positions, using provided filter","operationId":"getPositionHistory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionPositionSearchDto"}}}},"responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OptionPositionDto"}}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OptionPositionDto"}}}}},"500":{"description":"Internal server error"}},"deprecated":true}},"/v1/options/orders":{"get":{"tags":["orders-controller"],"summary":"Get opened orders","description":"Return list of opened orders.","operationId":"getOpenedOrders","responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OptionOrderDto"}}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OptionOrderDto"}}}}},"500":{"description":"Internal server error"}}}},"/v1/options/order/{id}":{"get":{"tags":["orders-controller"],"summary":"Get order","description":"Get order by ID.","operationId":"getOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionOrderDto"}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionOrderDto"}}}},"500":{"description":"Internal server error"}}},"delete":{"tags":["orders-controller"],"summary":"Cancel order operation","description":"Cancel order operation.","operationId":"deleteOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionOrderDto"}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionOrderDto"}}}},"500":{"description":"Internal server error"}}}},"/v1/instrument/{type}":{"get":{"tags":["instruments-controller"],"summary":"Get options instruments","description":"Returns a list of OPTIONS instrumens with optional filtering","operationId":"getOptionsInstruments","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"searchDto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/InstrumentSearchDto"}}],"responses":{"200":{"description":"Successfully retrieved result","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstrumentOptionDto"}}}}},"500":{"description":"Internal server error"}}}},"/v1/instrument/{type}/{symbol}/depth":{"get":{"tags":["instruments-controller"],"summary":"Get instrument OrderBook (Depth) data","operationId":"getOptionsExchangeInfoDepth","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"symbol","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved OrderBook data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderBook"}}}},"500":{"description":"Internal server error"}}}},"/v1/instrument/{type}/{instrument}":{"get":{"tags":["instruments-controller"],"summary":"Get options symbols","description":"Returns a list of Option symbols with optional filtering","operationId":"getOptionsSymbols","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string"}},{"name":"dto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OptionExchangeSearchDto"}}],"responses":{"200":{"description":"Successfully retrieved result","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionsExchangesCollectionDto"}}}},"500":{"description":"Internal server error"}}}},"/v1/instrument/{type}/{instrument}/expirations":{"get":{"tags":["instruments-controller"],"summary":"Get option expiration dates","description":"Returns a list of expiration dates im milleseconds from epoch","operationId":"getOptionsExpirations","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved result","content":{"*/*":{"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}}},"500":{"description":"Internal server error"}}}},"/v1/instrument/types":{"get":{"tags":["instruments-controller"],"summary":"Get instrument types","description":"Returns a list of instruments types.","operationId":"getTypes","responses":{"200":{"description":"Successfully retrieved instrument types","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstrumentTypeDto"}}}}},"500":{"description":"Internal server error"}}}},"/v1/easy-options/search":{"get":{"tags":["Easy Options"],"summary":"Search Easy Options","description":"Search easy options with filtering and pagination","operationId":"searchEasyOptions","parameters":[{"name":"searchDto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/EasyOptionSearchDto"}}],"responses":{"200":{"description":"Successfully retrieved easy options","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedResultEasyOptionDto"}}}},"500":{"description":"Internal server error"}}}},"/v1/easy-options/list":{"get":{"tags":["Easy Options"],"operationId":"searchCards","parameters":[{"name":"searchDto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/EasyOptionCardSearchDto"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EasyOptionCardDto"}}}}}}}},"/v1/contracts":{"get":{"tags":["CoinMarketCap"],"summary":"Get all option contracts","description":"Returns every live (non-deleted, unexpired) option contract across all underlyings, in CoinMarketCap format.","operationId":"getContracts","responses":{"200":{"description":"Successfully retrieved result","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CmcContractDto"}}}}},"500":{"description":"Internal server error"}}}},"/v1/contest":{"get":{"tags":["Public Contest"],"summary":"Get all contests categorized by status","description":"Retrieves all non-deleted contests categorized into active, upcoming, and ended lists. Includes participant count and top return for each contest.","operationId":"getContests","responses":{"200":{"description":"Successfully retrieved contests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContestsResult"}}}},"500":{"description":"Internal server error"}}}},"/v1/contest/{id}":{"get":{"tags":["Public Contest"],"summary":"Get contest by ID","description":"Retrieves detailed information about a specific contest by its ID, including all metadata and statistics.","operationId":"getContestById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Successfully retrieved contest","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContestInfoDto"}}}},"404":{"description":"Contest not found"},"500":{"description":"Internal server error"}}}},"/v1/contest/{contestId}/leaderboard":{"get":{"tags":["Public Contest"],"summary":"Get contest leaderboard","description":"Retrieves the leaderboard for a specific contest with participant rankings and performance data. Supports pagination with optional page and size parameters.","operationId":"getContestLeaderboard","parameters":[{"name":"contestId","in":"path","description":"Contest ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"page","in":"query","description":"Page number (0-indexed)","required":false,"schema":{"type":"integer","format":"int32","default":0},"example":0},{"name":"size","in":"query","description":"Page size (number of entries per page)","required":false,"schema":{"type":"integer","format":"int32","default":100},"example":100}],"responses":{"200":{"description":"Successfully retrieved leaderboard","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContestLeaderboardEntryDto"}}}},"404":{"description":"Contest not found"},"500":{"description":"Internal server error"}}}},"/v1/contest/{contestId}/account-info":{"get":{"tags":["Public Contest"],"summary":"Get contest account information for authenticated user","description":"Retrieves the authenticated user's contest account information including current performance, latest snapshot data, and historical snapshots for charting (up to 30 most recent snapshots).","operationId":"getContestAccountInfo","parameters":[{"name":"contestId","in":"path","description":"Contest ID","required":true,"schema":{"type":"integer","format":"int64"},"example":1}],"responses":{"200":{"description":"Successfully retrieved contest account information","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContestAccountInfoResponseDto"}}}},"401":{"description":"Unauthorized - authentication required"},"404":{"description":"Contest or account not found"},"500":{"description":"Internal server error"}}}},"/v1/candles/options-index/{symbol}/{period}":{"get":{"tags":["historical-market-data-controller"],"summary":"Get historical candles for options index prices","description":"Returns historical candles for the given underlying instrument and period as JSON arrays of [timestamp, open, high, low, close]. Supports optional time anchors to request closed intervals (start/end), forward ranges (start only), backward ranges (end only), or the most recent candles when no anchors are provided. The optional limit defaults to 500 and is capped at 1000.","operationId":"getHistoricalCandles","parameters":[{"name":"symbol","in":"path","description":"Underlying instrument symbol","required":true,"schema":{"type":"string"},"example":"BTCUSDT"},{"name":"period","in":"path","description":"Candle aggregation period. Available values: MIN1, MIN5, MIN15, H1, H4, D1, W1, M1.","required":true,"schema":{"type":"string"},"example":"MIN5"},{"name":"startTime","in":"query","description":"Start timestamp (inclusive) in milliseconds since epoch.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"endTime","in":"query","description":"End timestamp (inclusive) in milliseconds since epoch.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","description":"Maximum number of candles to return (default 500, max 1000).","required":false,"schema":{"type":"integer","format":"int32"},"example":750}],"responses":{"200":{"description":"Successfully retrieved candles","content":{"*/*":{"schema":{"type":"array","items":{"type":"array","items":{}}}}}},"400":{"description":"Invalid request parameters"},"404":{"description":"Instrument not found"},"500":{"description":"Internal server error"}}}},"/v1/analytics/options/top-contracts":{"get":{"tags":["analytics-controller"],"summary":"Get top option contracts for underlyings","description":"Returns top-N option contracts for one or more underlyings, period, and metric, including per-vendor averages and the latest snapshot values. When no data is available, the response status is NO_DATA and contracts are empty. Use extended=1 with WEEK or TWO_WEEKS to include per-vendor daily stats.","operationId":"getTopContractsStats","parameters":[{"name":"underlying","in":"query","description":"Underlying symbol","required":false,"schema":{"type":"string"},"example":"BTCUSDT"},{"name":"underlyings","in":"query","description":"Underlying symbols list (comma-separated or repeated query param)","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"BTCUSDT,ETHUSDT"},{"name":"period","in":"query","description":"Stats period (DAY, WEEK, TWO_WEEKS)","required":true,"schema":{"type":"string","description":"Supported analytics periods","enum":["DAY","WEEK","TWO_WEEKS"]},"example":"DAY"},{"name":"topN","in":"query","description":"Top N size (TOP1, TOP3, TOP5)","required":true,"schema":{"type":"string","description":"Supported top-N sizes","enum":["TOP1","TOP3","TOP5"]},"example":"TOP5"},{"name":"metric","in":"query","description":"Metric to rank by (OI, VOLUME)","required":true,"schema":{"type":"string","description":"Supported analytics metrics","enum":["OI","VOLUME"]},"example":"OI"},{"name":"extended","in":"query","description":"Extended response (set to 1 to include daily vendor stats; WEEK/TWO_WEEKS only)","required":false,"schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"Successfully retrieved top contracts stats","content":{"application/json":{"examples":{"ok":{"summary":"Data available","description":"ok","value":{"period":"DAY","metric":"OI","topN":"TOP5","status":"OK","items":[{"underlying":"BTCUSDT","contracts":[{"symbol":"BTC-251226-100000-C","metricValue":"12345.67","vendors":[{"lpVendor":"DERIBIT_OPTIONS","avgSpreadUsd":"12.34","avgAskPriceUsd":"123.45","avgAskSizeUsd":"4567.89","lastTs":1717000000000,"lastAskPriceUsd":"124.00","lastAskSizeUsd":"4000.00","lastBidPriceUsd":"123.00","lastBidSizeUsd":"4100.00","lastSpreadUsd":"1.00"}]}]}]}},"extended":{"summary":"Extended daily vendor stats (WEEK/TWO_WEEKS only)","description":"extended","value":{"period":"WEEK","metric":"OI","topN":"TOP1","status":"OK","items":[{"underlying":"BTCUSDT","contracts":[{"symbol":"BTC-251226-100000-C","metricValue":"12345.67","vendors":[{"lpVendor":"DERIBIT_OPTIONS","avgSpreadUsd":"12.34","avgAskPriceUsd":"123.45","avgAskSizeUsd":"4567.89","lastTs":1717000000000,"lastAskPriceUsd":"124.00","lastAskSizeUsd":"4000.00","lastBidPriceUsd":"123.00","lastBidSizeUsd":"4100.00","lastSpreadUsd":"1.00","days":[{"date":"2025-12-23","avgSpreadUsd":"12.34","avgAskPriceUsd":"123.45","avgAskSizeUsd":"4567.89","lastTs":1717000000000,"lastAskPriceUsd":"124.00","lastAskSizeUsd":"4000.00","lastBidPriceUsd":"123.00","lastBidSizeUsd":"4100.00","lastSpreadUsd":"1.00"}]}]}]}]}},"noData":{"summary":"No data available","description":"noData","value":{"period":"DAY","metric":"OI","topN":"TOP5","status":"NO_DATA","items":[{"underlying":"BTCUSDT","contracts":[]}]}}}}}},"400":{"description":"Invalid request parameters"}}}},"/v1/all-accounts":{"get":{"tags":["accounts-controller"],"summary":"get user accounts","description":"Get user accounts","operationId":"getAccounts","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountDto"}}}}}}}},"/v1/account-total-pnl":{"get":{"tags":["accounts-controller"],"summary":"Get account total P&L","description":"Get total P&L for current account across all closed/exercised positions","operationId":"getAccountTotalPnL","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountTotalPnLDto"}}}}}}},"/v1/account-info":{"get":{"tags":["accounts-controller"],"summary":"Get account info for current api-key","description":"Get current trading acount","operationId":"getAccountInfo","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountDto"}}}}}}},"/swagger-credentials":{"get":{"tags":["swagger-config-controller"],"operationId":"getSwaggerCredentials","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SwaggerCredentials"}}}}}}},"/health":{"get":{"tags":["hello-controller"],"summary":"Health check","description":"Simple endpoint to verify the service is running.","operationId":"health","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/auth-check":{"get":{"tags":["hello-controller"],"summary":"Authorized request test","description":"Returns a confirmation message when the request is properly signed.","operationId":"authCheck","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/v1/orders/{orderId}":{"delete":{"tags":["Trading Orders v1"],"summary":"Cancel order","description":"Cancels an existing order by ID","operationId":"cancelOrder","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order cancelled successfully","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"404":{"description":"Order not found","content":{"*/*":{"schema":{"type":"object"}}}},"409":{"description":"Order already in final state","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/v1/options/orders/{underlaying}":{"delete":{"tags":["orders-controller"],"summary":"Cancel order by underlaying","description":"Cancel order by underlaying operation.","operationId":"deleteOrdersByUnderlaying","parameters":[{"name":"underlaying","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}},"500":{"description":"Internal server error"}}}},"/v1/options/orders/batch":{"delete":{"tags":["orders-controller"],"summary":"Cancel multpile order by id","description":"Cancel order multiple orders operation.","operationId":"deleteOrdersByIId","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"responses":{"200":{"description":"successful","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}},"400":{"description":"Invalid input data","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}},"500":{"description":"Internal server error"}}}}},"components":{"schemas":{"CreateOrderRequestV1":{"type":"object","description":"Request DTO for creating orders in v1 API","properties":{"idempotencyKey":{"type":"string","description":"Idempotency key for the order","example":"unique-key-123","minLength":1},"symbol":{"type":"string","description":"Trading symbol","example":"BTCUSDT","minLength":1},"price":{"type":"string","description":"Order price as a decimal string","example":25000.5,"minLength":1,"pattern":"^\\d+(\\.\\d+)?$"},"size":{"type":"string","description":"Order size as a decimal string","example":0.01,"minLength":1,"pattern":"^\\d+(\\.\\d+)?$"},"side":{"type":"string","description":"Order side","enum":["BUY","SELL"],"example":"BUY","pattern":"^(BUY|SELL)$"},"orderType":{"type":"string","default":"LIMIT","description":"Order type","enum":["LIMIT"],"example":"LIMIT","pattern":"^LIMIT$"},"positionId":{"type":"integer","format":"int64","description":"Position ID (optional)","example":123456}},"required":["idempotencyKey","price","side","size","symbol"]},"OrderResponseV1":{"type":"object","description":"Response DTO for order operations in v1 API","properties":{"orderId":{"type":"string","description":"Unique identifier of the order","example":123},"positionId":{"type":"integer","format":"int64","description":"Identifier of the related position, if available","example":98765},"symbol":{"type":"string","description":"Trading symbol","example":"BTC-251007-50000-C"},"price":{"type":"string","description":"Order price","example":50000},"size":{"type":"string","description":"Order size","example":0.01},"side":{"type":"string","description":"Order side (BUY/SELL)","example":"BUY"},"orderType":{"type":"string","description":"Order type (LIMIT/MARKET)","example":"LIMIT"},"status":{"type":"string","description":"Order status","example":"PENDING,FILLED,CANCELED"},"asset":{"type":"string","description":"Underlaying asset name","example":"BTCUSDT"},"type":{"type":"string","description":"Option type (CALL/PUT)","example":"CALL"},"expiryDate":{"type":"integer","format":"int64","description":"Expiry date as epoch millis","example":1717000000000},"sizeUsdt":{"type":"string","description":"Order size in USDT","example":100.0},"sizeContracts":{"type":"string","description":"Order size in contracts","example":10},"strikePrice":{"type":"string","description":"Strike price","example":50000},"openPrice":{"type":"string","description":"Open price (VWAP)","example":49500},"openDate":{"type":"integer","format":"int64","description":"Open date as epoch millis","example":1716000000000},"fee":{"type":"string","description":"Fee paid","example":0.5},"timestamp":{"type":"integer","format":"int64","description":"Order creation timestamp as epoch millis","example":1716000000000}}},"ApiErrorV1":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":{}}}},"TradeDto":{"type":"object","properties":{"symbol":{"type":"string","minLength":1},"amount":{"type":"number"},"price":{"type":"number"},"side":{"type":"string","minLength":1},"positionId":{"type":"integer","format":"int64"},"orderType":{"type":"string"}},"required":["amount","side","symbol"]},"OptionOrderDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"clientOrderId":{"type":"string"},"accno":{"type":"integer","format":"int64"},"sellerAccountId":{"type":"integer","format":"int64"},"positionId":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"tradeSide":{"type":"string"},"optionSide":{"type":"string"},"orderState":{"type":"string"},"orderQty":{"type":"number"},"price":{"type":"number"},"executedQty":{"type":"number"},"executedPrice":{"type":"number"},"closeQty":{"type":"number"},"fee":{"type":"number"},"feeAsset":{"type":"string"},"expire":{"type":"integer","format":"int64"},"strikePrice":{"type":"number"},"createTime":{"type":"integer","format":"int64"},"updateTime":{"type":"integer","format":"int64"},"triggerTime":{"type":"integer","format":"int64"},"bookedQty":{"type":"number"},"bookedCcy":{"type":"string"},"bookedMargin":{"type":"number"},"bookedMarginCcy":{"type":"string"},"indexPrice":{"type":"number"},"orderType":{"type":"string"}}},"OpenEasyOptionRequest":{"type":"object","properties":{"cardId":{"type":"integer","format":"int64"},"investmentAmount":{"type":"number"},"idempotencyKey":{"type":"string"}},"required":["cardId","investmentAmount"]},"JoinContestDto":{"type":"object","description":"Request body for joining a contest","properties":{"nickname":{"type":"string","description":"Nickname to display on the leaderboard","example":"TradingPro123","maxLength":255,"minLength":0}}},"ContestAccountInfoResponseDto":{"type":"object","description":"Complete contest account information with current state and historical snapshots","properties":{"id":{"type":"integer","format":"int64","description":"Contest account info ID","example":1},"contestId":{"type":"integer","format":"int64","description":"Contest ID","example":1},"accountId":{"type":"integer","format":"int64","description":"Account ID","example":123},"fundedAccountId":{"type":"integer","format":"int64","description":"Funded account ID","example":200},"userId":{"type":"integer","format":"int32","description":"User ID","example":50},"demoContestAccountId":{"type":"integer","format":"int64","description":"Demo contest account ID","example":300},"initialBalance":{"type":"number","description":"Initial balance for the contest account","example":10000.0},"joinTime":{"type":"string","format":"date-time","description":"Join time in ISO format"},"nickname":{"type":"string","description":"Participant's nickname or display name","example":"TradingPro123"},"contestStatus":{"type":"string","description":"Contest participation status","example":"IN_PROGRESS"},"disqualificationReason":{"type":"string","description":"Reason for disqualification","example":"Exceeded maximum drawdown limit"},"currentRank":{"type":"integer","format":"int32","description":"Current rank in contest","example":3},"currentNetPerformance":{"type":"number","description":"Current net performance percentage","example":25.5},"currentEquity":{"type":"number","description":"Current equity","example":12500.0},"currentBalance":{"type":"number","description":"Current balance","example":12000.0},"totalTradesCount":{"type":"integer","format":"int32","description":"Total number of trades","example":25},"tradingDaysCount":{"type":"integer","format":"int32","description":"Number of active trading days","example":10},"currentMaxDrawdown":{"type":"number","description":"Current maximum drawdown percentage","example":8.5},"currentMaxDayDrawdown":{"type":"number","description":"Current maximum daily drawdown percentage","example":4.2},"lastSnapshotTime":{"type":"string","format":"date-time","description":"Latest snapshot time in ISO format"},"profitRatioViolated":{"type":"boolean","description":"Indicates if the profit ratio rule was violated","example":false},"snapshotHistory":{"type":"array","description":"Historical snapshots for charting (ordered by time descending, max 30 entries)","items":{"$ref":"#/components/schemas/ContestAccountSnapshotHistoryDto"}}}},"ContestAccountSnapshotHistoryDto":{"type":"object","description":"Contest account snapshot data for historical charts","properties":{"snapshotTime":{"type":"string","format":"date-time","description":"Snapshot time in ISO format"},"equity":{"type":"number","description":"Current equity","example":12500.0},"balance":{"type":"number","description":"Current balance","example":12000.0},"netPerformance":{"type":"number","description":"Net performance percentage","example":25.5},"maxDrawdown":{"type":"number","description":"Maximum drawdown percentage","example":8.5},"maxDayDrawdown":{"type":"number","description":"Maximum daily drawdown percentage","example":4.2},"totalTradesCount":{"type":"integer","format":"int32","description":"Total number of trades","example":25},"tradingDaysCount":{"type":"integer","format":"int32","description":"Number of active trading days","example":10},"rank":{"type":"integer","format":"int32","description":"Current rank","example":3}}},"PagedResponseV1":{"type":"object","description":"Generic paged response for v1 API following trading standards","properties":{"total":{"type":"integer","format":"int32","description":"Total number of items","example":100},"page":{"type":"integer","format":"int32","description":"Current page number","example":1},"pageSize":{"type":"integer","format":"int32","description":"Number of items per page","example":10},"items":{"type":"array","description":"List of items for the current page","items":{}}}},"TradeResponseV1":{"type":"object","properties":{"tradeId":{"type":"integer","format":"int64","description":"Unique trade identifier","example":123456},"orderId":{"type":"integer","format":"int64","description":"Order identifier","example":654321},"positionId":{"type":"integer","format":"int64","description":"Position identifier","example":789012},"asset":{"type":"string","description":"Asset symbol","example":"BTC"},"type":{"type":"string","description":"Option type: CALL or PUT","example":"CALL"},"fillType":{"type":"string","description":"Fill type: FILL or PARTIAL_FILL","example":"FILL"},"expiryDate":{"type":"integer","format":"int64","description":"Expiry date (timestamp)","example":1712345678000},"filledSizeUsdt":{"type":"string","description":"Filled size in USDT","example":100.5},"filledSizeContracts":{"type":"string","description":"Filled size in contracts","example":2},"strikePrice":{"type":"string","description":"Strike price","example":45000},"openPrice":{"type":"string","description":"Open price","example":44900},"openDate":{"type":"integer","format":"int64","description":"Open date (timestamp)","example":1712345678000},"fee":{"type":"string","description":"Trade fee","example":0.25},"tradeSide":{"type":"string","description":"Trade side: BUY or SELL","example":"BUY"},"maker":{"type":"boolean","description":"Is maker trade","example":false}}},"PagedResponseV1PositionResponseV1":{"type":"object","properties":{"total":{"type":"integer","format":"int32","description":"Total number of items","example":100},"page":{"type":"integer","format":"int32","description":"Current page number","example":1},"pageSize":{"type":"integer","format":"int32","description":"Number of items per page","example":10},"items":{"type":"array","description":"List of items for the current page","items":{"$ref":"#/components/schemas/PositionResponseV1"}}}},"PositionResponseV1":{"type":"object","description":"Response DTO for position operations in v1 API","properties":{"positionId":{"type":"string","description":"Unique identifier of the position","example":"abc123"},"parentPositionId":{"type":"string","description":"Parent position, form which this positionw as created","example":"abc123"},"symbol":{"type":"string","description":"Trading symbol","example":"BTC-251007-50000-C"},"asset":{"type":"string","description":"Underlaying asset name","example":"BTCUSDT"},"type":{"type":"string","description":"Option type","example":"CALL"},"expiryDate":{"type":"integer","format":"int64","description":"Expiry date as epoch millis","example":1717000000000},"sizeUsdt":{"type":"string","description":"Position size in USDT","example":100.0},"size":{"type":"string","description":"Position size","example":0.01},"sizeContracts":{"type":"string","description":"Position size in contracts","example":10},"sizeUsdtClosed":{"type":"string","description":"Position closed size in USDT","example":100.0},"sizeClosed":{"type":"string","description":"Position closed size","example":0.01},"sizeContractsClosed":{"type":"string","description":"Position closed size in contracts","example":10},"strikePrice":{"type":"string","description":"Strike price","example":50000},"openPrice":{"type":"string","description":"Open price (VWAP)","example":49500},"openDate":{"type":"integer","format":"int64","description":"Open date as epoch millis","example":1716000000000},"status":{"type":"string","description":"Position status","example":"OPEN"},"fee":{"type":"string","description":"Fee paid","example":0.5},"premiumTotal":{"type":"string","description":"Total collected premium","example":2.0},"closePrice":{"type":"string","description":"Close price","example":51000},"pl":{"type":"string","description":"Trade Profit/Loss","example":100},"plClosed":{"type":"string","description":"Trade Profit/Loss closed","example":100},"contractQty":{"type":"string","description":"Contract quantity","example":1},"tradeSide":{"type":"string","description":"Trade side","example":"BUY"},"excercisePlClosed":{"type":"string","description":"Closed exercise P/L","example":10},"excercisePlFloating":{"type":"string","description":"Floating exercise P/L","example":5},"curIdxPrice":{"type":"string","description":"Current index price, used for calculation of floating excercise P/L","example":50500},"settlementPrice":{"type":"string","description":"Settlement price for exercise","example":150000},"easyOptionId":{"type":"string","description":"Id of easy option","example":1}}},"PagedResponseV1OrderResponseV1":{"type":"object","properties":{"total":{"type":"integer","format":"int32","description":"Total number of items","example":100},"page":{"type":"integer","format":"int32","description":"Current page number","example":1},"pageSize":{"type":"integer","format":"int32","description":"Number of items per page","example":10},"items":{"type":"array","description":"List of items for the current page","items":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"CmcOrderBookDto":{"type":"object","description":"CoinMarketCap order book data transfer object","properties":{"ticker_id":{"type":"string","description":"Option contract symbol","example":"BTC-260708-70000-C"},"timestamp":{"type":"integer","format":"int64","description":"Order book timestamp as epoch millis"},"bids":{"type":"array","description":"Bid levels as [price, qty] pairs","items":{"type":"array","items":{"type":"string"}}},"asks":{"type":"array","description":"Ask levels as [price, qty] pairs","items":{"type":"array","items":{"type":"string"}}}}},"OptionPositionDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"parentId":{"type":"integer","format":"int64"},"accountId":{"type":"integer","format":"int64"},"sellerAccountId":{"type":"integer","format":"int64"},"parentPositionId":{"type":"integer","format":"int64"},"symbol":{"type":"string"},"optionSide":{"type":"string"},"tradeSide":{"type":"string"},"strikePrice":{"type":"number"},"expiration":{"type":"integer","format":"int64"},"openQty":{"type":"number"},"closeQty":{"type":"number"},"openQtyNotional":{"type":"number"},"closeQtyNotional":{"type":"number"},"openPrice":{"type":"number"},"closePrice":{"type":"number"},"openTime":{"type":"integer","format":"int64"},"closeTime":{"type":"integer","format":"int64"},"fee":{"type":"number"},"feeAsset":{"type":"string"},"positionType":{"type":"string"},"positionState":{"type":"string"},"pl":{"type":"number"},"indexPrice":{"type":"number"},"excercisePl":{"type":"number"},"quoteAsset":{"type":"string"},"bookedMargin":{"type":"number"},"bookedMarginCcy":{"type":"string"},"underlying":{"type":"string"},"premiumTotal":{"type":"number"},"easyOptionId":{"type":"integer","format":"int64"}}},"OptionPositionSearchDto":{"type":"object","description":"DTO for OptionPosition search form parameters.","properties":{"search":{"type":"string","description":"Search query string","example":"BTCUSDT"},"pageNumber":{"type":"integer","format":"int32","default":0,"description":"Page number (zero-based)","example":0},"pageSize":{"type":"integer","format":"int32","default":40,"description":"Page size (number of items per page)","example":40},"wl":{"type":"integer","format":"int32","description":"Whitelist filter value","example":1},"sortByField":{"type":"string","description":"Field to sort by","example":"symbol"},"sortByDirection":{"type":"string","description":"Sort direction (ASC or DESC)","enum":["ASC","DESC"],"example":"ASC"},"id":{"type":"integer","format":"int64","description":"Unique identifier of the option position","example":123},"accountId":{"type":"integer","format":"int64","description":"Account ID","example":456},"parentPositionId":{"type":"integer","format":"int64","description":"Parent position ID","example":789},"easyOptionId":{"type":"integer","format":"int64","description":"Easy Option ID","example":101},"symbol":{"type":"string","description":"Symbol of the option","example":"BTCUSD"},"optionSide":{"type":"string","description":"Option side (CALL/PUT)","example":"CALL"},"tradeSide":{"type":"string","description":"Trade side (BUY/SELL)","example":"BUY"},"positionType":{"type":"string","description":"Type of the position","example":"LONG"},"positionState":{"type":"string","description":"State of the position","example":"OPEN"},"feeAsset":{"type":"string","description":"Fee asset","example":"USDT"},"quoteAsset":{"type":"string","description":"Quote asset","example":"BTC"},"symbolContains":{"type":"string","description":"Symbol pattern for search","example":"BTC"},"strikePriceMin":{"type":"number","description":"Minimum strike price","example":20000.0},"strikePriceMax":{"type":"number","description":"Maximum strike price","example":30000.0},"openQtyMin":{"type":"number","description":"Minimum open quantity","example":1.0},"openQtyMax":{"type":"number","description":"Maximum open quantity","example":10.0},"closeQtyMin":{"type":"number","description":"Minimum close quantity","example":0.5},"closeQtyMax":{"type":"number","description":"Maximum close quantity","example":5.0},"openPriceMin":{"type":"number","description":"Minimum open price","example":100.0},"openPriceMax":{"type":"number","description":"Maximum open price","example":200.0},"closePriceMin":{"type":"number","description":"Minimum close price","example":110.0},"closePriceMax":{"type":"number","description":"Maximum close price","example":210.0},"feeMin":{"type":"number","description":"Minimum fee","example":0.01},"feeMax":{"type":"number","description":"Maximum fee","example":0.05},"plMin":{"type":"number","description":"Minimum profit/loss","example":-100.0},"plMax":{"type":"number","description":"Maximum profit/loss","example":100.0},"openTimeFrom":{"type":"string","format":"date-time","description":"Open time from (ISO 8601)","example":"2024-01-01T00:00:00"},"openTimeTo":{"type":"string","format":"date-time","description":"Open time to (ISO 8601)","example":"2024-01-31T23:59:59"},"closeTimeFrom":{"type":"string","format":"date-time","description":"Close time from (ISO 8601)","example":"2024-02-01T00:00:00"},"closeTimeTo":{"type":"string","format":"date-time","description":"Close time to (ISO 8601)","example":"2024-02-28T23:59:59"},"expirationFrom":{"type":"string","format":"date-time","description":"Expiration from (ISO 8601)","example":"2024-03-01T00:00:00"},"expirationTo":{"type":"string","format":"date-time","description":"Expiration to (ISO 8601)","example":"2024-03-31T23:59:59"}}},"InstrumentSearchDto":{"type":"object","properties":{"search":{"type":"string","description":"Search query string","example":"BTCUSDT"},"pageNumber":{"type":"integer","format":"int32","default":0,"description":"Page number (zero-based)","example":0},"pageSize":{"type":"integer","format":"int32","default":40,"description":"Page size (number of items per page)","example":40},"wl":{"type":"integer","format":"int32","description":"Whitelist filter value","example":1},"sortByField":{"type":"string","description":"Field to sort by","example":"symbol"},"sortByDirection":{"type":"string","description":"Sort direction (ASC or DESC)","enum":["ASC","DESC"],"example":"ASC"},"symbol":{"type":"string"},"name":{"type":"string"},"baseCurrency":{"type":"string"},"quoteCurrency":{"type":"string"},"instrumentType":{"type":"string"},"isActive":{"type":"boolean"},"isTradable":{"type":"boolean"}}},"InstrumentOptionDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"symbol":{"type":"string","maxLength":2147483647,"minLength":3},"name":{"type":"string","maxLength":2147483647,"minLength":3},"baseCurrencyCode":{"type":"string","minLength":1},"quoteCurrencyCode":{"type":"string","minLength":1},"priceScale":{"type":"integer","format":"int32","maximum":8,"minimum":0},"amountScale":{"type":"integer","format":"int32","maximum":8,"minimum":0},"active":{"type":"boolean"},"tradable":{"type":"boolean"},"instrumentType":{"type":"string"},"description":{"type":"string"},"wl":{"type":"integer","format":"int32"},"lotAmountMult":{"type":"number","maximum":100000,"minimum":0.0001},"source":{"type":"string"},"contractAmount":{"type":"number","maximum":1000000,"minimum":0.0001},"makerFeeRate":{"type":"number","maximum":1.0,"minimum":0.0},"takerFeeRate":{"type":"number","maximum":1.0,"minimum":0.0},"liquidationFeeRate":{"type":"number","maximum":1.0,"minimum":0.0},"minQty":{"type":"number","minimum":0.0},"maxQty":{"type":"number","minimum":0.0},"stepQty":{"type":"number","minimum":0.0},"initialMargin":{"type":"number","minimum":0.0},"maintenanceMargin":{"type":"number","minimum":0.0},"commissionPolicyId":{"type":"string","maxLength":50,"minLength":0},"iconUrl":{"type":"string","maxLength":255,"minLength":0}},"required":["amountScale","baseCurrencyCode","contractAmount","instrumentType","name","priceScale","quoteCurrencyCode","symbol"]},"OrderBook":{"type":"object","properties":{"i":{"type":"string"},"T":{"type":"integer","format":"int64"},"u":{"type":"integer","format":"int64"},"bids":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"asks":{"type":"array","items":{"type":"array","items":{"type":"string"}}}}},"OptionExchangeSearchDto":{"type":"object","description":"Search criteria for option exchange queries","properties":{"searchString":{"type":"string","description":"Free text search string","example":"AAPL"},"pageNumber":{"type":"integer","format":"int32","description":"Page number (zero-based)","example":0},"pageSize":{"type":"integer","format":"int32","description":"Number of items per page","example":40},"sortBy":{"type":"array","description":"Sorting criteria list","items":{"$ref":"#/components/schemas/SortingDto"}},"symbol":{"type":"string","description":"Option symbol","example":"BTC-220617-145000-C"},"expiryDateFrom":{"type":"string","format":"date-time","description":"Start of expiry date range (yyyy-MM-dd)","example":"2024-06-01"},"expiryDateTo":{"type":"string","format":"date-time","description":"End of expiry date range (yyyy-MM-dd)","example":"2024-06-30"},"side":{"type":"string","description":"Option side (CALL or PUT)","example":"CALL","pattern":"CALL|PUT"},"strikePriceFrom":{"type":"number","description":"Minimum strike price","example":100},"strikePriceTo":{"type":"number","description":"Maximum strike price","example":150}}},"SortingDto":{"type":"object","description":"Sorting criteria for search results","properties":{"field":{"type":"string","description":"Field name to sort by","example":"symbol"},"direction":{"type":"string","description":"Sort direction (ASC or DESC)","enum":["ASC","DESC"],"example":"ASC"}}},"ExchangeInfoDto":{"type":"object","description":"Exchange information data transfer object","properties":{"expiryDate":{"type":"integer","format":"int64","description":"Expiry date as epoch millis","example":1717000000000},"createdAt":{"type":"integer","format":"int64","description":"Creation date as epoch millis","example":1717000000000},"symbol":{"type":"string","description":"Trading symbol","example":"BTCUSDT"},"side":{"type":"string","description":"Option side (CALL/PUT)","enum":["PUT","CALL"],"example":"CALL"},"strikePrice":{"type":"string","description":"Strike price","example":50000},"underlying":{"type":"string","description":"Underlying asset","example":"BTC"},"minQty":{"type":"string","description":"Minimum order quantity","example":0.01},"maxQty":{"type":"string","description":"Maximum order quantity","example":100},"stepQty":{"type":"string","description":"Order quantity step","example":0.01},"priceScale":{"type":"integer","format":"int32","description":"Number of decimal places for price","example":2},"quantityScale":{"type":"integer","format":"int32","description":"Number of decimal places for quantity","example":4},"quoteAsset":{"type":"string","description":"Quote asset","example":"USDT"},"bid":{"$ref":"#/components/schemas/QuoteDto","description":"Best bid quote"},"ask":{"$ref":"#/components/schemas/QuoteDto","description":"Best ask quote"},"indexPrice":{"type":"string","description":"Current index price","example":50500.0},"deleted":{"type":"boolean","description":"Whether the exchange info is deleted","example":false}}},"OptionsExchangesCollectionDto":{"type":"object","properties":{"call":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeInfoDto"}},"put":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeInfoDto"}}}},"QuoteDto":{"type":"object","description":"Quote data transfer object","properties":{"price":{"type":"string","description":"Quote price","example":50000},"qty":{"type":"string","description":"Quote quantity","example":0.01}}},"InstrumentTypeDto":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}}},"EasyOptionSearchDto":{"type":"object","properties":{"search":{"type":"string","description":"Search query string","example":"BTCUSDT"},"pageNumber":{"type":"integer","format":"int32","default":0,"description":"Page number (zero-based)","example":0},"pageSize":{"type":"integer","format":"int32","default":40,"description":"Page size (number of items per page)","example":40},"wl":{"type":"integer","format":"int32","description":"Whitelist filter value","example":1},"sortByField":{"type":"string","description":"Field to sort by","example":"symbol"},"sortByDirection":{"type":"string","description":"Sort direction (ASC or DESC)","enum":["ASC","DESC"],"example":"ASC"},"id":{"type":"integer","format":"int64","description":"Option ID"},"accountId":{"type":"integer","format":"int64","description":"Account ID"},"cardId":{"type":"integer","format":"int64","description":"Card ID"},"positionId":{"type":"integer","format":"int64","description":"Position ID"},"orderId":{"type":"integer","format":"int64","description":"Order ID"},"type":{"type":"string","description":"Option type (UP_DOWN, TOUCH)"},"status":{"type":"string","description":"Option status (ACTIVE, CLOSED)"},"direction":{"type":"string","description":"Direction (UP, DOWN)"},"investmentCurrency":{"type":"string","description":"Investment currency"},"optionSymbol":{"type":"string","description":"Option symbol"},"optionSymbolContains":{"type":"string","description":"Option symbol contains (pattern match)"},"investmentAmountMin":{"type":"number","description":"Minimum investment amount"},"investmentAmountMax":{"type":"number","description":"Maximum investment amount"},"targetPriceMin":{"type":"number","description":"Minimum target price"},"targetPriceMax":{"type":"number","description":"Maximum target price"},"triggerPriceMin":{"type":"number","description":"Minimum trigger price"},"triggerPriceMax":{"type":"number","description":"Maximum trigger price"},"qtyMin":{"type":"number","description":"Minimum quantity"},"qtyMax":{"type":"number","description":"Maximum quantity"},"entryPriceMin":{"type":"number","description":"Minimum entry price"},"entryPriceMax":{"type":"number","description":"Maximum entry price"},"openTimeFrom":{"type":"string","format":"date-time","description":"Open time from","example":"2024-01-01T00:00:00"},"openTimeTo":{"type":"string","format":"date-time","description":"Open time to","example":"2024-01-31T23:59:59"},"closeTimeFrom":{"type":"string","format":"date-time","description":"Close time from","example":"2024-01-01T00:00:00"},"closeTimeTo":{"type":"string","format":"date-time","description":"Close time to","example":"2024-01-31T23:59:59"},"triggerTimeFrom":{"type":"string","format":"date-time","description":"Trigger time from","example":"2024-01-01T00:00:00"},"triggerTimeTo":{"type":"string","format":"date-time","description":"Trigger time to","example":"2024-01-31T23:59:59"}}},"EasyOptionDto":{"type":"object","properties":{"id":{"type":"string","description":"Option unique identifier"},"accountId":{"type":"integer","format":"int64","description":"Account ID associated with the option"},"cardId":{"type":"integer","format":"int64","description":"Card ID associated with the option"},"type":{"type":"string","description":"Type of the option","enum":["UP_DOWN","TOUCH"]},"status":{"type":"string","description":"Status of the option","enum":["PENDING","ACTIVE","TRIGGERED","CLOSING","CLOSED","EXPIRED"]},"direction":{"type":"string","description":"Direction of the option","enum":["UP","DOWN"]},"investmentAmount":{"type":"number","description":"Investment amount"},"investmentCurrency":{"type":"string","description":"Currency of the investment"},"targetPrice":{"type":"number","description":"Target price for the option"},"triggerPrice":{"type":"number","description":"Trigger price for the option"},"optionSymbol":{"type":"string","description":"Symbol of the option"},"positionId":{"type":"string","description":"Position ID related to the option"},"orderId":{"type":"string","description":"Order ID related to the option"},"qty":{"type":"number","description":"Quantity of the option"},"entryPrice":{"type":"number","description":"Entry price of the option"},"openTime":{"type":"integer","format":"int64","description":"Open time (epoch millis)"},"closeTime":{"type":"integer","format":"int64","description":"Close time (epoch millis)"},"triggerTime":{"type":"integer","format":"int64","description":"Trigger time (epoch millis)"},"cardName":{"type":"string","description":"Card name associated with the option"},"fee":{"type":"string","description":"Fee paid","example":0.5},"closePrice":{"type":"string","description":"Close price","example":51000},"pl":{"type":"string","description":"Trade Profit/Loss","example":100},"plClosed":{"type":"string","description":"Trade Profit/Loss closed","example":100}}},"PagedResultEasyOptionDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/EasyOptionDto"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"empty":{"type":"boolean"},"numberOfElements":{"type":"integer","format":"int32"}}},"EasyOptionCardSearchDto":{"type":"object","properties":{"search":{"type":"string","description":"Search query string","example":"BTCUSDT"},"pageNumber":{"type":"integer","format":"int32","default":0,"description":"Page number (zero-based)","example":0},"pageSize":{"type":"integer","format":"int32","default":40,"description":"Page size (number of items per page)","example":40},"wl":{"type":"integer","format":"int32","description":"Whitelist filter value","example":1},"sortByField":{"type":"string","description":"Field to sort by","example":"symbol"},"sortByDirection":{"type":"string","description":"Sort direction (ASC or DESC)","enum":["ASC","DESC"],"example":"ASC"},"type":{"type":"string"},"direction":{"type":"string"},"active":{"type":"string"},"underlying":{"type":"string"},"underlyingContains":{"type":"string"},"titleContains":{"type":"string"}}},"EasyOptionCardDto":{"type":"object","description":"Easy Option Card data transfer object","properties":{"id":{"type":"integer","format":"int64","description":"Card unique identifier","example":1},"type":{"type":"string","description":"Option type","enum":["UP_DOWN","TOUCH"],"example":"CALL"},"underlying":{"type":"string","description":"Underlying asset symbol","example":"BTCUSDT","maxLength":2147483647,"minLength":3},"direction":{"type":"string","description":"Trade direction","enum":["UP","DOWN"],"example":"BULLISH"},"targetPrice":{"type":"number","description":"Target price for the option","example":50000.0,"minimum":0.0},"triggerPrice":{"type":"number","description":"Trigger price for the option","example":49000.0},"optionSymbol":{"type":"string","description":"Option symbol","example":"BTC-250418-50000-C"},"expiryDate":{"type":"string","format":"date-time","description":"Expiry date in ISO 8601 format","example":"2026-04-18T11:18"},"tradingIdea":{"type":"string","description":"Trading idea or rationale","example":"BTC is expected to rally after halving","maxLength":255,"minLength":0},"autoGenerated":{"type":"boolean","description":"Whether the card was auto-generated","example":false},"active":{"type":"boolean","description":"Whether the card is active","example":true},"title":{"type":"string","description":"Card title","example":"BTC Bull Run","maxLength":100,"minLength":0},"description":{"type":"string","description":"Card description","example":"Bitcoin expected to break resistance at 50k","maxLength":255,"minLength":0},"currentAskPrice":{"type":"number","description":"Current ask price for the option","example":1200.5},"currentOptionSymbol":{"type":"string","description":"Current option symbol being traded","example":"BTC-250418-50000-C"}},"required":["direction","expiryDate","targetPrice","title","type","underlying"]},"CmcContractDto":{"type":"object","description":"CoinMarketCap option contract data transfer object","properties":{"ticker_id":{"type":"string","description":"Option contract symbol","example":"BTC-260708-70000-C"},"base_currency":{"type":"string","description":"Base currency of the underlying","example":"BTC"},"quote_currency":{"type":"string","description":"Quote currency","example":"USDT"},"product_type":{"type":"string","description":"Product type","example":"Options"},"contract_type":{"type":"string","description":"Contract type","example":"Vanilla"},"contract_price":{"type":"number","description":"Contract price = contract amount x last premium","example":4.2},"contract_price_currency":{"type":"string","description":"Currency of the contract price","example":"USDT"},"last_price":{"type":"number","description":"Last traded premium price","example":420.0},"base_volume":{"type":"number","description":"24h traded volume in base currency","example":1250.0},"quote_volume":{"type":"number","description":"24h traded volume in quote currency","example":525000.0},"high":{"type":"number","description":"24h high premium price","example":450.0},"low":{"type":"number","description":"24h low premium price","example":395.0},"bid":{"type":"number","description":"Best bid premium price","example":415.0},"ask":{"type":"number","description":"Best ask premium price","example":425.0},"index_price":{"type":"number","description":"Current index price of the underlying","example":63530.22},"open_interest":{"type":"number","description":"Open interest in contracts","example":8600},"open_interest_usd":{"type":"number","description":"Open interest value in USD","example":5463598.92},"creation_timestamp":{"type":"integer","format":"int64","description":"Contract creation date as epoch millis","example":1751932800000},"expiry_timestamp":{"type":"integer","format":"int64","description":"Contract expiry date as epoch millis","example":1783497600000}}},"ContestInfoDto":{"type":"object","description":"DTO containing information about a contest.","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the contest"},"status":{"type":"string","description":"Current status of the contest (e.g., active, ended, upcoming)"},"pricePool":{"type":"string","description":"Prize pool for the contest"},"name":{"type":"string","description":"Name of the contest"},"currency":{"type":"string","description":"Currency used in the contest"},"startTime":{"type":"string","format":"date-time","description":"Start time of the contest in ISO format"},"endTime":{"type":"string","format":"date-time","description":"End time of the contest in ISO format"},"lastJoinTime":{"type":"string","format":"date-time","description":"Last allowed join time in ISO format"},"topReturn":{"type":"string","description":"Top return achieved in the contest"},"participants":{"type":"integer","format":"int32","description":"Number of participants in the contest"},"enabled":{"type":"boolean","description":"Whether the contest is enabled"},"initialDeposit":{"type":"number","description":"Initial deposit amount for participants"},"prizeDistributionBuckets":{"type":"array","description":"Prize distribution buckets (prize amounts)","items":{"type":"number"}},"minTotalTrades":{"type":"integer","format":"int32","description":"Minimum number of total trades required"},"minActiveTradingDays":{"type":"integer","format":"int32","description":"Minimum number of active trading days required"},"minNetPerformancePercent":{"type":"number","description":"Minimum net performance percentage required"},"maxTotalDrawdownPercent":{"type":"number","description":"Maximum allowed total drawdown percentage"},"maxDailyDrawdownPercent":{"type":"number","description":"Maximum allowed daily drawdown percentage"},"maxSingleTradePnlPercent":{"type":"number","description":"Maximum allowed single trade PnL percentage"},"profitRatioRuleEnabled":{"type":"boolean","description":"Whether profit ratio rule is enabled"},"minPremiumPercentPerTrade":{"type":"number","description":"Minimum premium percentage per trade"},"minTradeHoldMinutes":{"type":"integer","format":"int32","description":"Minimum time to hold a trade in minutes"},"minExpiryHoldPercent":{"type":"number","description":"Minimum expiry hold percentage"},"minExpiryHours":{"type":"integer","format":"int32","description":"Minimum number of hours until expiry"}}},"ContestsResult":{"type":"object","description":"DTO representing categorized lists of contests for an account.","properties":{"active":{"type":"array","description":"List of active contests","items":{"$ref":"#/components/schemas/ContestInfoDto"}},"upcomming":{"type":"array","description":"List of upcoming contests","items":{"$ref":"#/components/schemas/ContestInfoDto"}},"ended":{"type":"array","description":"List of ended contests","items":{"$ref":"#/components/schemas/ContestInfoDto"}}}},"ContestLeaderboardEntryDto":{"type":"object","description":"Contest leaderboard entry with participant performance data","properties":{"id":{"type":"integer","format":"int64","description":"Contest account info ID","example":1},"rank":{"type":"integer","format":"int32","description":"Current rank in the contest","example":1},"nickname":{"type":"string","description":"Participant's nickname or display name","example":"TradingPro123"},"netPerformance":{"type":"number","description":"Net performance percentage","example":25.5},"totalTradesCount":{"type":"integer","format":"int32","description":"Total number of trades","example":25},"tradingDaysCount":{"type":"integer","format":"int32","description":"Number of active trading days","example":10},"maxDrawdown":{"type":"number","description":"Maximum drawdown percentage","example":8.5},"maxDayDrawdown":{"type":"number","description":"Maximum daily drawdown percentage","example":4.2},"joinTime":{"type":"string","format":"date-time","description":"Join time in ISO format"},"contestStatus":{"type":"string","description":"Contest participation status","example":"IN_PROGRESS,NOT_QUALIFIED,COMPLETED"}}},"AccountDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int32"},"commonName":{"type":"string","maxLength":255,"minLength":2},"currency":{"type":"string","maxLength":6,"minLength":3},"balance":{"type":"number","readOnly":true},"blockedBalance":{"type":"number","readOnly":true},"accountType":{"type":"string","minLength":1},"accountStatus":{"type":"string","minLength":1},"positionType":{"type":"string","minLength":1},"wl":{"type":"integer","format":"int32"},"level":{"type":"integer","format":"int32"},"internal":{"type":"boolean"},"inOutStatus":{"type":"string"},"mmBookingAccountId":{"type":"integer","format":"int64"},"equity":{"type":"number"},"tradingFeeRate":{"type":"number"},"totalPositionsCost":{"type":"number"},"balances":{"type":"array","items":{"$ref":"#/components/schemas/CcyBalanceDto"},"readOnly":true}},"required":["accountStatus","accountType","commonName","currency","positionType","userId"]},"CcyBalanceDto":{"type":"object","properties":{"curency":{"type":"string"},"balance":{"type":"number"},"blockedBalance":{"type":"number"}}},"AccountTotalPnLDto":{"type":"object","description":"Total PnL data for a specific account across all closed/exercised positions","properties":{"totalPremium":{"type":"string","description":"Sum of premium totals for all positions (received/paid premiums)","example":1234.56},"totalExercisePl":{"type":"string","description":"Sum of exercise P&L for all positions","example":-234.56},"totalRealizedPnl":{"type":"string","description":"Total realized P&L (premiumTotal + exercisePl)","example":1000.0},"totalFee":{"type":"string","description":"Total fees paid for all positions","example":12.34},"positionCount":{"type":"integer","format":"int64","description":"Count of closed/exercised positions for this account","example":42},"averagePnlPerPosition":{"type":"string","description":"Average PnL per position (computed)","example":23.81}}},"SwaggerCredentials":{"type":"object","properties":{"clientId":{"type":"string"},"privateKey":{"type":"string"}}}}}}