basePath: /api/v1 definitions: api_internal_handler_schemas.AgentLeaderboardEntry: properties: buy_volume: type: integer completed_orders: type: integer completed_volume: type: integer deployed_orders: type: integer rank: type: integer raw_address: type: string sell_volume: type: integer total_orders: type: integer type: object api_internal_handler_schemas.AgentLeaderboardResponse: properties: agents: items: $ref: '#/definitions/api_internal_handler_schemas.AgentLeaderboardEntry' type: array coin_id: type: integer decimals: type: integer symbol: type: string type: object api_internal_handler_schemas.BatchContextRequest: properties: status: type: string wallet_addresses: items: type: string maxItems: 1000 minItems: 1 type: array required: - wallet_addresses type: object api_internal_handler_schemas.BatchContextResponse: properties: results: additionalProperties: $ref: '#/definitions/api_internal_handler_schemas.BatchContextWalletResult' type: object type: object api_internal_handler_schemas.BatchContextWalletResult: properties: deployed_totals: {} orders: {} type: object api_internal_handler_schemas.CandleItem: properties: c: type: string h: type: string l: type: string o: type: string t: type: integer v: type: integer type: object api_internal_handler_schemas.CandlesResponse: properties: candles: items: $ref: '#/definitions/api_internal_handler_schemas.CandleItem' type: array from_decimals: type: integer from_symbol: type: string interval: type: string to_decimals: type: integer to_symbol: type: string type: object api_internal_handler_schemas.CoinPriceCoinInfo: properties: decimals: type: integer id: type: integer name: type: string symbol: type: string type: object api_internal_handler_schemas.CoinPricePair: properties: ask_order_count: type: integer ask_total_amount: type: integer best_ask: type: string best_bid: type: string bid_order_count: type: integer bid_total_amount: type: integer counter_coin_decimals: type: integer counter_coin_id: type: integer counter_coin_symbol: type: string mid_price: type: string spread: type: string type: object api_internal_handler_schemas.CoinPriceResponse: properties: coin: $ref: '#/definitions/api_internal_handler_schemas.CoinPriceCoinInfo' pairs: items: $ref: '#/definitions/api_internal_handler_schemas.CoinPricePair' type: array type: object api_internal_handler_schemas.OrderBookLevel: properties: cumulative_amount: type: integer cumulative_value: type: string order_count: type: integer price_rate: type: string total_amount: type: integer total_value: type: string type: object api_internal_handler_schemas.OrderBookResponse: properties: asks: items: $ref: '#/definitions/api_internal_handler_schemas.OrderBookLevel' type: array bids: items: $ref: '#/definitions/api_internal_handler_schemas.OrderBookLevel' type: array from_decimals: type: integer from_symbol: type: string mid_price: type: string spread: type: string to_decimals: type: integer to_symbol: type: string type: object api_internal_handler_schemas.OrderDeployedTotalsItem: properties: coin_id: type: integer name: type: string symbol: type: string total_amount: type: integer type: object api_internal_handler_schemas.OrderDeployedTotalsResponse: properties: totals: items: $ref: '#/definitions/api_internal_handler_schemas.OrderDeployedTotalsItem' type: array wallet_address: type: string type: object api_internal_handler_schemas.OrderStatsResponse: properties: by_status: additionalProperties: format: int64 type: integer type: object closed: description: cancelled + completed + failed + closed type: integer open: description: created + deployed + pending_match type: integer total: type: integer wallet_address: type: string type: object api_internal_handler_schemas.PeriodStats: properties: by_status: additionalProperties: $ref: '#/definitions/api_internal_handler_schemas.StatusStats' type: object filled: $ref: '#/definitions/api_internal_handler_schemas.StatusStats' open: $ref: '#/definitions/api_internal_handler_schemas.StatusStats' period: type: string total_orders: type: integer total_volume: type: integer type: object api_internal_handler_schemas.StatusStats: properties: count: type: integer volume: type: integer type: object api_internal_handler_schemas.TradingStatsResponse: properties: from_decimals: type: integer from_symbol: type: string periods: items: $ref: '#/definitions/api_internal_handler_schemas.PeriodStats' type: array to_decimals: type: integer to_symbol: type: string type: object host: api.open4dev.xyz info: contact: {} description: open4dev api title: API version: "1.0" paths: /coins: get: consumes: - application/json description: Get coins list parameters: - description: Offset in: query name: offset type: integer - description: Limit in: query name: limit type: integer - description: Sort (id, name, symbol, cnt_orders; prefix with - for desc) in: query name: sort type: string - description: Order (asc, desc) in: query name: order type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: {} "500": description: Internal Server Error schema: {} summary: Get coins list tags: - coins /coins/{id}: get: consumes: - application/json description: Get coin by ID parameters: - description: Coin ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get coin by ID tags: - coins /coins/price: get: consumes: - application/json description: |- Returns order book price summary for a coin across all its trading pairs. Coin can be identified by name, symbol, or jetton minter address. Returns best ask, best bid, mid-price, and spread for each pair. Response is cached for 30 seconds. parameters: - description: Coin name (e.g. AgentM) in: query name: name type: string - description: Coin symbol (e.g. AGENTM) in: query name: symbol type: string - description: Jetton minter address in: query name: jetton_minter type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.CoinPriceResponse' "400": description: Bad Request schema: additionalProperties: true type: object "404": description: Not Found schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get coin price from order book tags: - coins /orders: get: consumes: - application/json description: Get order list with pagination and sorting parameters: - description: Offset in: query name: offset type: integer - description: Limit in: query name: limit type: integer - description: Sort (id, created_at, deployed_at, status, type, amount, price_rate; prefix with - for desc) in: query name: sort type: string - description: Order (asc, desc) in: query name: order type: string - description: From coin ID in: query name: from_coin_id type: integer - description: To coin ID in: query name: to_coin_id type: integer - description: Owner raw address in: query name: owner_raw_address type: string - description: Status (created, deployed, cancelled, completed, failed, pending_match, closed) in: query name: status type: string - description: Min amount format: int64 in: query name: min_amount type: integer - description: Max amount format: int64 in: query name: max_amount type: integer - description: Min price rate (numeric string) in: query name: min_price_rate type: string - description: Max price rate (numeric string) in: query name: max_price_rate type: string - description: Min slippage format: int64 in: query name: min_slippage type: integer - description: Max slippage format: int64 in: query name: max_slippage type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get order list tags: - orders /orders/{id}: get: consumes: - application/json description: Get order by ID parameters: - description: Order ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object "404": description: Not Found schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get order by ID tags: - orders /orders/agent-leaderboard: get: consumes: - application/json description: Returns aggregated trading stats per agent (wallet) for orders involving the given coin, sorted by completed volume parameters: - description: Coin symbol (e.g. AGNT, TON, NOT) in: query name: coin_symbol type: string - description: Jetton minter raw address (use 'ton' for TON) in: query name: jetton_minter type: string - description: Limit (default 50, max 200) in: query name: limit type: integer - description: Offset (default 0) in: query name: offset type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.AgentLeaderboardResponse' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get agent leaderboard for a coin tags: - orders /orders/batch-context: post: consumes: - application/json description: Batch endpoint that returns deployed orders and deployed totals for up to 1000 wallet addresses. parameters: - description: Batch request in: body name: body required: true schema: $ref: '#/definitions/api_internal_handler_schemas.BatchContextRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.BatchContextResponse' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get orders and deployed totals for multiple wallets in one call tags: - orders /orders/book: get: consumes: - application/json description: |- Returns aggregated price levels (asks and bids) for deployed orders of a given pair. Pair can be specified by symbols (from_symbol + to_symbol) or by jetton minter addresses (from_jetton_minter + to_jetton_minter). Use "ton" for native TON. Asks = orders selling from_coin for to_coin, sorted by price_rate ASC (best ask first). Bids = orders selling to_coin for from_coin, sorted by price_rate DESC (best bid first). Amounts are returned in human-readable format (adjusted for token decimals). parameters: - description: From coin symbol (e.g. TON, USDT) in: query name: from_symbol type: string - description: To coin symbol in: query name: to_symbol type: string - description: From jetton minter address (use 'ton' for native TON) in: query name: from_jetton_minter type: string - description: To jetton minter address (use 'ton' for native TON) in: query name: to_jetton_minter type: string - description: Max number of price levels per side (default 10, max 50). When more unique prices exist, levels are automatically aggregated into buckets. in: query name: limit type: integer - description: Drop individual orders whose USD value is below this amount (default 40). Only applied when one side is a USD stablecoin (USDT/USDC/USDâ‚®); ignored for other pairs. Pass 0 to disable. in: query name: min_order_usd type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.OrderBookResponse' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get order book for a trading pair tags: - orders /orders/candles: get: consumes: - application/json description: |- Builds OHLCV candles from completed orders. Intervals: 1m, 5m, 15m, 1h, 4h, 1d. Pair can be specified by symbols or jetton minter addresses. parameters: - description: From coin symbol (e.g. TON, AGNT) in: query name: from_symbol type: string - description: To coin symbol in: query name: to_symbol type: string - description: From jetton minter address in: query name: from_jetton_minter type: string - description: To jetton minter address in: query name: to_jetton_minter type: string - description: 'Candle interval: 1m, 5m, 15m, 1h, 4h, 1d' in: query name: interval required: true type: string - description: Max candles (default 500, max 1000) in: query name: limit type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.CandlesResponse' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get OHLCV candles for a trading pair tags: - orders /orders/deployed-totals: get: consumes: - application/json description: Sum of order amounts grouped by token (from_coin) for orders with status deployed parameters: - description: Wallet raw address (e.g. EQ...) in: query name: wallet_address required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.OrderDeployedTotalsResponse' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get deployed order totals by token (wallet address) tags: - orders /orders/stats: get: consumes: - application/json description: Get order counts by status (created, deployed, cancelled, completed, failed, pending_match, closed) for a wallet parameters: - description: Wallet raw address (e.g. EQ...) in: query name: wallet_address required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.OrderStatsResponse' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get order statistics by wallet address tags: - orders /orders/trading-stats: get: consumes: - application/json description: |- Returns order counts and volumes grouped by status for 1h, 24h, 7d, 30d periods. Pair can be specified by symbols or jetton minter addresses (same as order book). parameters: - description: From coin symbol (e.g. TON, USDT) in: query name: from_symbol type: string - description: To coin symbol in: query name: to_symbol type: string - description: From jetton minter address in: query name: from_jetton_minter type: string - description: To jetton minter address in: query name: to_jetton_minter type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api_internal_handler_schemas.TradingStatsResponse' "400": description: Bad Request schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get trading statistics for a pair tags: - orders /vaults: get: consumes: - application/json description: Get vaults list parameters: - description: Offset in: query name: offset type: integer - description: Limit in: query name: limit type: integer - description: Sort (id, factory_id, created_at, type; prefix with - for desc) in: query name: sort type: string - description: Order (asc, desc) in: query name: order type: string - description: Filter by jetton minter address in: query name: jetton_minter_address type: string - description: Filter by type (jetton, ton) in: query name: type type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: {} "500": description: Internal Server Error schema: {} summary: Get vaults list tags: - vaults /vaults/{id}: get: consumes: - application/json description: Get vault by ID parameters: - description: Vault ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: true type: object "404": description: Not Found schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: true type: object summary: Get vault by ID tags: - vaults securityDefinitions: Bearer: in: header name: Authorization type: apiKey swagger: "2.0"