{ "openapi": "3.1.0", "info": { "title": "Hummingbot API", "description": "API for managing Hummingbot trading instances", "version": "1.0.1" }, "paths": { "/accounts": { "get": { "tags": [ "Accounts" ], "summary": "List Accounts", "description": "Get a list of all account names in the system.\n\nReturns:\n List of account names", "operationId": "list_accounts_accounts_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response List Accounts Accounts Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/accounts/{account_name}/credentials": { "get": { "tags": [ "Accounts" ], "summary": "List Account Credentials", "description": "Get a list of all connectors that have credentials configured for a specific account.\n\nArgs:\n account_name: Name of the account to list credentials for\n\nReturns:\n List of connector names that have credentials configured\n\nRaises:\n HTTPException: 404 if account not found", "operationId": "list_account_credentials_accounts__account_name__credentials_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" }, "title": "Response List Account Credentials Accounts Account Name Credentials Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/accounts/add-account": { "post": { "tags": [ "Accounts" ], "summary": "Add Account", "description": "Create a new account with default configuration files.\n\nArgs:\n account_name: Name of the new account to create\n\nReturns:\n Success message when account is created\n\nRaises:\n HTTPException: 400 if account already exists", "operationId": "add_account_accounts_add_account_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "query", "required": true, "schema": { "type": "string", "title": "Account Name" } } ], "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/accounts/delete-account": { "post": { "tags": [ "Accounts" ], "summary": "Delete Account", "description": "Delete an account and all its associated credentials.\n\nArgs:\n account_name: Name of the account to delete\n\nReturns:\n Success message when account is deleted\n\nRaises:\n HTTPException: 400 if trying to delete master account, 404 if account not found", "operationId": "delete_account_accounts_delete_account_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "query", "required": true, "schema": { "type": "string", "title": "Account Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/accounts/delete-credential/{account_name}/{connector_name}": { "post": { "tags": [ "Accounts" ], "summary": "Delete Credential", "description": "Delete a specific connector credential for an account.\n\nArgs:\n account_name: Name of the account\n connector_name: Name of the connector to delete credentials for\n\nReturns:\n Success message when credential is deleted\n\nRaises:\n HTTPException: 404 if credential not found", "operationId": "delete_credential_accounts_delete_credential__account_name___connector_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Name" } }, { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/accounts/add-credential/{account_name}/{connector_name}": { "post": { "tags": [ "Accounts" ], "summary": "Add Credential", "description": "Add or update connector credentials (API keys) for a specific account and connector.\n\nArgs:\n account_name: Name of the account\n connector_name: Name of the connector\n credentials: Dictionary containing the connector credentials\n\nReturns:\n Success message when credentials are added\n\nRaises:\n HTTPException: 400 if there's an error adding the credentials", "operationId": "add_credential_accounts_add_credential__account_name___connector_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Name" } }, { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Credentials" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/accounts/gateway/wallets": { "get": { "tags": [ "Accounts" ], "summary": "List Gateway Wallets", "description": "List all wallets managed by Gateway.\nGateway manages its own encrypted wallet storage.\n\nReturns:\n List of wallet information from Gateway\n\nRaises:\n HTTPException: 503 if Gateway unavailable", "operationId": "list_gateway_wallets_accounts_gateway_wallets_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/accounts/gateway/add-wallet": { "post": { "tags": [ "Accounts" ], "summary": "Add Gateway Wallet", "description": "Add an existing wallet to Gateway using its private key.\nGateway handles encryption and storage internally.\n\nArgs:\n wallet_credential: Wallet credentials (chain, private_key, and optional set_default)\n\nReturns:\n Wallet information from Gateway including address\n\nRaises:\n HTTPException: 503 if Gateway unavailable, 400 on validation error", "operationId": "add_gateway_wallet_accounts_gateway_add_wallet_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayWalletCredential" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/accounts/gateway/wallet/set-default": { "post": { "tags": [ "Accounts" ], "summary": "Set Default Gateway Wallet", "description": "Set the default wallet for a chain in Gateway.\n\nWhen multiple wallets are configured for a chain, this endpoint allows\nswitching which wallet is used as the default for operations.\n\nArgs:\n request: Contains chain and wallet address to set as default\n\nReturns:\n Dict with success status and updated wallet info.\n\nExample: POST /accounts/gateway/wallet/set-default\n{\n \"chain\": \"solana\",\n \"address\": \"82SggYRE2Vo4jN4a2pk3aQ4SET4ctafZJGbowmCqyHx5\"\n}", "operationId": "set_default_gateway_wallet_accounts_gateway_wallet_set_default_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetDefaultWalletRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Set Default Gateway Wallet Accounts Gateway Wallet Set Default Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/accounts/gateway/{chain}/{address}": { "delete": { "tags": [ "Accounts" ], "summary": "Remove Gateway Wallet", "description": "Remove a wallet from Gateway.\n\nArgs:\n chain: Blockchain chain (e.g., 'solana', 'ethereum')\n address: Wallet address to remove\n\nReturns:\n Success message\n\nRaises:\n HTTPException: 503 if Gateway unavailable", "operationId": "remove_gateway_wallet_accounts_gateway__chain___address__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "chain", "in": "path", "required": true, "schema": { "type": "string", "title": "Chain" } }, { "name": "address", "in": "path", "required": true, "schema": { "type": "string", "title": "Address" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/connectors": { "get": { "tags": [ "Connectors" ], "summary": "Available Connectors", "description": "Get a list of all available connectors.\n\nReturns:\n List of connector names supported by the system (excludes DEX providers which use Gateway networks)", "operationId": "available_connectors_connectors_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response Available Connectors Connectors Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/connectors/{connector_name}/config-map": { "get": { "tags": [ "Connectors" ], "summary": "Get Connector Config Map", "description": "Get configuration fields required for a specific connector with type information.\n\nArgs:\n connector_name: Name of the connector to get config map for\n\nReturns:\n Dictionary mapping field names to their type information.\n Each field contains:\n - type: The expected data type (e.g., \"str\", \"SecretStr\", \"int\")\n - required: Whether the field is required", "operationId": "get_connector_config_map_connectors__connector_name__config_map_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": true }, "title": "Response Get Connector Config Map Connectors Connector Name Config Map Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/connectors/{connector_name}/trading-rules": { "get": { "tags": [ "Connectors" ], "summary": "Get Trading Rules", "description": "Get trading rules for a connector, optionally filtered by trading pairs.\n\nThis endpoint uses the MarketDataService to access non-trading connector instances,\nwhich means no authentication or account setup is required.\n\nArgs:\n request: FastAPI request object\n connector_name: Name of the connector (e.g., 'binance', 'binance_perpetual')\n trading_pairs: Optional list of trading pairs to filter by (e.g., ['BTC-USDT', 'ETH-USDT'])\n\nReturns:\n Dictionary mapping trading pairs to their trading rules\n\nRaises:\n HTTPException: 404 if connector not found, 500 for other errors", "operationId": "get_trading_rules_connectors__connector_name__trading_rules_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } }, { "name": "trading_pairs", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Filter by specific trading pairs", "title": "Trading Pairs" }, "description": "Filter by specific trading pairs" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/connectors/{connector_name}/order-types": { "get": { "tags": [ "Connectors" ], "summary": "Get Supported Order Types", "description": "Get order types supported by a specific connector.\n\nThis endpoint uses the MarketDataService to access non-trading connector instances,\nwhich means no authentication or account setup is required.\n\nArgs:\n request: FastAPI request object\n connector_name: Name of the connector (e.g., 'binance', 'binance_perpetual')\n\nReturns:\n List of supported order types (LIMIT, MARKET, LIMIT_MAKER)\n\nRaises:\n HTTPException: 404 if connector not found, 500 for other errors", "operationId": "get_supported_order_types_connectors__connector_name__order_types_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/portfolio/state": { "post": { "tags": [ "Portfolio" ], "summary": "Get Portfolio State", "description": "Get the current state of all or filtered accounts portfolio.\n\nArgs:\n filter_request: JSON payload with filtering criteria including:\n - account_names: Optional list of account names to filter by\n - connector_names: Optional list of connector names to filter by\n - skip_gateway: If True, skip Gateway wallet balance updates for faster CEX-only queries\n - refresh: If True, refresh balances before returning. If False (default), return cached state\n\nReturns:\n Dict containing account states with connector balances and token information", "operationId": "get_portfolio_state_portfolio_state_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioStateFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "additionalProperties": { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, "type": "object" }, "type": "object", "title": "Response Get Portfolio State Portfolio State Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/portfolio/history": { "post": { "tags": [ "Portfolio" ], "summary": "Get Portfolio History", "description": "Get the historical state of all or filtered accounts portfolio with pagination and interval sampling.\n\nThe interval parameter allows you to control data granularity:\n- 5m: Raw data (default, collected every 5 minutes)\n- 15m: One data point every 15 minutes\n- 30m: One data point every 30 minutes\n- 1h: One data point every hour\n- 4h: One data point every 4 hours\n- 12h: One data point every 12 hours\n- 1d: One data point every day\n\nUsing larger intervals significantly reduces response size and improves performance.\n\nArgs:\n filter_request: JSON payload with filtering criteria (account_names, connector_names,\n start_time, end_time, limit, cursor, interval)\n\nReturns:\n Paginated response with historical portfolio data sampled at the requested interval", "operationId": "get_portfolio_history_portfolio_history_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioHistoryFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/portfolio/distribution": { "post": { "tags": [ "Portfolio" ], "summary": "Get Portfolio Distribution", "description": "Get portfolio distribution by tokens with percentages across all or filtered accounts.\n\nArgs:\n filter_request: JSON payload with filtering criteria\n \nReturns:\n Dictionary with token distribution including percentages, values, and breakdown by accounts/connectors", "operationId": "get_portfolio_distribution_portfolio_distribution_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioDistributionFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/portfolio/accounts-distribution": { "get": { "tags": [ "Portfolio" ], "summary": "Get Accounts Distribution", "description": "Get portfolio distribution by accounts with percentages.\n\nReturns:\n Dictionary with account distribution including percentages, values, and breakdown by connectors", "operationId": "get_accounts_distribution_portfolio_accounts_distribution_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/trading/orders": { "post": { "tags": [ "Trading" ], "summary": "Place Trade", "description": "Place a buy or sell order using a specific account and connector.\n\nArgs:\n trade_request: Trading request with account, connector, trading pair, type, amount, etc.\n accounts_service: Injected accounts service\n\nReturns:\n TradeResponse with order ID and trading details\n\nRaises:\n HTTPException: 400 for invalid parameters, 404 for account/connector not found, 500 for trade execution errors", "operationId": "place_trade_trading_orders_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TradeRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TradeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/trading/{account_name}/{connector_name}/orders/{client_order_id}/cancel": { "post": { "tags": [ "Trading" ], "summary": "Cancel Order", "description": "Cancel a specific order by its client order ID.\n\nArgs:\n account_name: Name of the account\n connector_name: Name of the connector\n client_order_id: Client order ID to cancel\n trading_pair: Trading pair for the order\n accounts_service: Injected accounts service\n\nReturns:\n Success message with cancelled order ID\n\nRaises:\n HTTPException: 404 if account/connector not found, 500 for cancellation errors", "operationId": "cancel_order_trading__account_name___connector_name__orders__client_order_id__cancel_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Name" } }, { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } }, { "name": "client_order_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Client Order Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/trading/positions": { "post": { "tags": [ "Trading" ], "summary": "Get Positions", "description": "Get current positions across all or filtered perpetual connectors.\n\nThis endpoint fetches real-time position data directly from the connectors,\nincluding unrealized PnL, leverage, funding fees, and margin information.\n\nArgs:\n filter_request: JSON payload with filtering criteria\n\nReturns:\n Paginated response with position data and pagination metadata\n\nRaises:\n HTTPException: 500 if there's an error fetching positions", "operationId": "get_positions_trading_positions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositionFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/trading/orders/active": { "post": { "tags": [ "Trading" ], "summary": "Get Active Orders", "description": "Get active (in-flight) orders across all or filtered accounts and connectors.\n\nThis endpoint fetches real-time active orders directly from the connectors' in_flight_orders property,\nproviding current order status, fill amounts, and other live order data.\n\nArgs:\n filter_request: JSON payload with filtering criteria\n\nReturns:\n Paginated response with active order data and pagination metadata\n\nRaises:\n HTTPException: 500 if there's an error fetching orders", "operationId": "get_active_orders_trading_orders_active_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActiveOrderFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/trading/orders/search": { "post": { "tags": [ "Trading" ], "summary": "Get Orders", "description": "Get historical order data across all or filtered accounts from the database/registry.\n\nArgs:\n filter_request: JSON payload with filtering criteria\n\nReturns:\n Paginated response with historical order data and pagination metadata", "operationId": "get_orders_trading_orders_search_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/trading/trades": { "post": { "tags": [ "Trading" ], "summary": "Get Trades", "description": "Get trade history across all or filtered accounts with complex filtering.\n\nArgs:\n filter_request: JSON payload with filtering criteria\n\nReturns:\n Paginated response with trade data and pagination metadata", "operationId": "get_trades_trading_trades_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TradeFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/trading/{account_name}/{connector_name}/position-mode": { "post": { "tags": [ "Trading" ], "summary": "Set Position Mode", "description": "Set position mode for a perpetual connector.\n\nArgs:\n account_name: Name of the account\n connector_name: Name of the perpetual connector\n position_mode: Position mode to set (HEDGE or ONEWAY)\n\nReturns:\n Success message with status\n\nRaises:\n HTTPException: 400 if not a perpetual connector or invalid position mode", "operationId": "set_position_mode_trading__account_name___connector_name__position_mode_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Name" } }, { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositionModeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Trading" ], "summary": "Get Position Mode", "description": "Get current position mode for a perpetual connector.\n\nArgs:\n account_name: Name of the account\n connector_name: Name of the perpetual connector\n\nReturns:\n Dictionary with current position mode, connector name, and account name\n\nRaises:\n HTTPException: 400 if not a perpetual connector", "operationId": "get_position_mode_trading__account_name___connector_name__position_mode_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Name" } }, { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/trading/{account_name}/{connector_name}/leverage": { "post": { "tags": [ "Trading" ], "summary": "Set Leverage", "description": "Set leverage for a specific trading pair on a perpetual connector.\n\nArgs:\n account_name: Name of the account\n connector_name: Name of the perpetual connector\n request: Leverage request with trading pair and leverage value\n accounts_service: Injected accounts service\n\nReturns:\n Dictionary with success status and message\n\nRaises:\n HTTPException: 400 for invalid parameters or non-perpetual connector, 404 for account/connector not found, 500 for execution errors", "operationId": "set_leverage_trading__account_name___connector_name__leverage_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "account_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Account Name" } }, { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeverageRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/trading/funding-payments": { "post": { "tags": [ "Trading" ], "summary": "Get Funding Payments", "description": "Get funding payment history across all or filtered perpetual connectors.\n\nThis endpoint retrieves historical funding payment records including\nfunding rates, payment amounts, and position data at time of payment.\n\nArgs:\n filter_request: JSON payload with filtering criteria\n\nReturns:\n Paginated response with funding payment data and pagination metadata\n\nRaises:\n HTTPException: 500 if there's an error fetching funding payments", "operationId": "get_funding_payments_trading_funding_payments_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FundingPaymentFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/candles": { "post": { "tags": [ "Market Data" ], "summary": "Get Candles", "description": "Get real-time candles data for a specific trading pair.\n\nThis endpoint uses the MarketDataProvider to get or create a candles feed that will\nautomatically start and maintain real-time updates. Subsequent requests with the same\nconfiguration will reuse the existing feed for up-to-date data.\n\nArgs:\n request: FastAPI request object\n candles_config: Configuration for the candles including connector, trading_pair, interval, and max_records\n\nReturns:\n Real-time candles data or error message", "operationId": "get_candles_market_data_candles_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CandlesConfigRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/historical-candles": { "post": { "tags": [ "Market Data" ], "summary": "Get Historical Candles", "description": "Get historical candles data for a specific trading pair.\n\nArgs:\n config: Configuration for historical candles including connector, trading pair, interval, start and end time\n\nReturns:\n Historical candles data or error message", "operationId": "get_historical_candles_market_data_historical_candles_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HistoricalCandlesConfig" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/active-feeds": { "get": { "tags": [ "Market Data" ], "summary": "Get Active Feeds", "description": "Get information about currently active market data feeds.\n\nArgs:\n request: FastAPI request object to access application state\n \nReturns:\n Dictionary with active feeds information including last access times and expiration", "operationId": "get_active_feeds_market_data_active_feeds_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/settings": { "get": { "tags": [ "Market Data" ], "summary": "Get Market Data Settings", "description": "Get current market data settings for debugging.\n\nReturns:\n Dictionary with current market data configuration including cleanup and timeout settings", "operationId": "get_market_data_settings_market_data_settings_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/available-candle-connectors": { "get": { "tags": [ "Market Data" ], "summary": "Get Available Candle Connectors", "description": "Get list of available connectors that support candle data feeds.\n\nReturns:\n List of connector names that can be used for fetching candle data", "operationId": "get_available_candle_connectors_market_data_available_candle_connectors_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/prices": { "post": { "tags": [ "Market Data" ], "summary": "Get Prices", "description": "Get current prices for specified trading pairs from a connector.\n\nArgs:\n request: Price request with connector name and trading pairs\n market_data_manager: Injected market data feed manager\n \nReturns:\n Current prices for the specified trading pairs\n \nRaises:\n HTTPException: 500 if there's an error fetching prices", "operationId": "get_prices_market_data_prices_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PricesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/funding-info": { "post": { "tags": [ "Market Data" ], "summary": "Get Funding Info", "description": "Get funding information for a perpetual trading pair.\n\nArgs:\n request: Funding info request with connector name and trading pair\n market_data_manager: Injected market data feed manager\n \nReturns:\n Funding information including rates, timestamps, and prices\n \nRaises:\n HTTPException: 400 for non-perpetual connectors, 500 for other errors", "operationId": "get_funding_info_market_data_funding_info_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FundingInfoRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FundingInfoResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/order-book": { "post": { "tags": [ "Market Data" ], "summary": "Get Order Book", "description": "Get order book snapshot with specified depth.\n\nArgs:\n request: Order book request with connector, trading pair, and depth\n market_data_manager: Injected market data feed manager\n \nReturns:\n Order book snapshot with bids and asks\n \nRaises:\n HTTPException: 500 if there's an error fetching order book", "operationId": "get_order_book_market_data_order_book_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderBookRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderBookResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/order-book/price-for-volume": { "post": { "tags": [ "Market Data" ], "summary": "Get Price For Volume", "description": "Get the price required to fill a specific volume on the order book.\n\nArgs:\n request: Request with connector, trading pair, volume, and side\n market_data_manager: Injected market data feed manager\n \nReturns:\n Order book query result with price and volume information", "operationId": "get_price_for_volume_market_data_order_book_price_for_volume_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceForVolumeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderBookQueryResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/order-book/volume-for-price": { "post": { "tags": [ "Market Data" ], "summary": "Get Volume For Price", "description": "Get the volume available at a specific price level on the order book.\n\nArgs:\n request: Request with connector, trading pair, price, and side\n market_data_manager: Injected market data feed manager\n \nReturns:\n Order book query result with volume information", "operationId": "get_volume_for_price_market_data_order_book_volume_for_price_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VolumeForPriceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderBookQueryResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/order-book/price-for-quote-volume": { "post": { "tags": [ "Market Data" ], "summary": "Get Price For Quote Volume", "description": "Get the price required to fill a specific quote volume on the order book.\n\nArgs:\n request: Request with connector, trading pair, quote volume, and side\n market_data_manager: Injected market data feed manager\n \nReturns:\n Order book query result with price and volume information", "operationId": "get_price_for_quote_volume_market_data_order_book_price_for_quote_volume_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceForQuoteVolumeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderBookQueryResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/order-book/quote-volume-for-price": { "post": { "tags": [ "Market Data" ], "summary": "Get Quote Volume For Price", "description": "Get the quote volume available at a specific price level on the order book.\n\nArgs:\n request: Request with connector, trading pair, price, and side\n market_data_manager: Injected market data feed manager\n \nReturns:\n Order book query result with quote volume information", "operationId": "get_quote_volume_for_price_market_data_order_book_quote_volume_for_price_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuoteVolumeForPriceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderBookQueryResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/order-book/vwap-for-volume": { "post": { "tags": [ "Market Data" ], "summary": "Get Vwap For Volume", "description": "Get the VWAP (Volume Weighted Average Price) for a specific volume on the order book.\n\nArgs:\n request: Request with connector, trading pair, volume, and side\n market_data_manager: Injected market data feed manager\n \nReturns:\n Order book query result with VWAP information", "operationId": "get_vwap_for_volume_market_data_order_book_vwap_for_volume_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VWAPForVolumeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderBookQueryResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/trading-pair/add": { "post": { "tags": [ "Market Data" ], "summary": "Add Trading Pair", "description": "Initialize order book for a trading pair.\n\nThis endpoint dynamically adds a trading pair to a connector's order book tracker.\nIt uses the best available connector (trading connectors are preferred over data connectors).\n\nArgs:\n request: Request with connector name, trading pair, optional account name, and timeout\n\nReturns:\n TradingPairResponse with success status and message\n\nRaises:\n HTTPException: 500 if initialization fails", "operationId": "add_trading_pair_market_data_trading_pair_add_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddTradingPairRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TradingPairResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/trading-pair/remove": { "post": { "tags": [ "Market Data" ], "summary": "Remove Trading Pair", "description": "Remove a trading pair from order book tracking.\n\nThis endpoint removes a trading pair from a connector's order book tracker,\ncleaning up resources for pairs that are no longer needed.\n\nArgs:\n request: Request with connector name, trading pair, and optional account name\n\nReturns:\n TradingPairResponse with success status and message\n\nRaises:\n HTTPException: 500 if removal fails", "operationId": "remove_trading_pair_market_data_trading_pair_remove_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RemoveTradingPairRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TradingPairResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/market-data/order-book/diagnostics/{connector_name}": { "get": { "tags": [ "Market Data" ], "summary": "Get Order Book Diagnostics", "description": "Get diagnostics for a connector's order book tracker.\n\nReturns detailed information about the order book tracker status including:\n- Task status (running/crashed)\n- WebSocket connection status\n- Metrics (messages processed, latency, etc.)\n- Current order book state\n\nArgs:\n connector_name: The connector to diagnose (e.g., \"binance\")\n account_name: Optional account name for trading connectors\n\nReturns:\n Diagnostic information dictionary", "operationId": "get_order_book_diagnostics_market_data_order_book_diagnostics__connector_name__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } }, { "name": "account_name", "in": "query", "required": false, "schema": { "type": "string", "title": "Account Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/market-data/order-book/restart/{connector_name}": { "post": { "tags": [ "Market Data" ], "summary": "Restart Order Book Tracker", "description": "Restart the order book tracker for a connector.\n\nUse this endpoint when the order book is stale (WebSocket disconnected).\nThis will:\n1. Stop the existing order book tracker\n2. Restart it with the same trading pairs\n3. Wait for the WebSocket to reconnect\n\nArgs:\n connector_name: The connector to restart (e.g., \"binance\")\n account_name: Optional account name for trading connectors\n\nReturns:\n Restart status with success/failure and trading pairs", "operationId": "restart_order_book_tracker_market_data_order_book_restart__connector_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } }, { "name": "account_name", "in": "query", "required": false, "schema": { "type": "string", "title": "Account Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/executors/": { "post": { "tags": [ "Executors" ], "summary": "Create Executor", "description": "Create and start a new executor.\n\nSupported executor types:\n- **position_executor**: Single position with triple barrier (stop loss, take profit, time limit)\n- **grid_executor**: Grid trading with multiple levels\n- **dca_executor**: Dollar-cost averaging with multiple entry points\n- **twap_executor**: Time-weighted average price execution\n- **arbitrage_executor**: Cross-exchange arbitrage\n- **xemm_executor**: Cross-exchange market making\n- **order_executor**: Simple order execution\n- **lp_executor**: Liquidity provider position on CLMM DEXs (Meteora, Raydium, etc.)\n\nThe `executor_config` must include:\n- `type`: One of the executor types above\n- `connector_name`: Exchange connector (e.g., \"binance\", \"binance_perpetual\")\n- `trading_pair`: Trading pair (e.g., \"BTC-USDT\")\n- Additional type-specific configuration (see /executors/types/{type}/config for details)\n\nReturns the created executor ID and initial status.", "operationId": "create_executor_executors__post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExecutorRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExecutorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/executors/search": { "post": { "tags": [ "Executors" ], "summary": "List Executors", "description": "Get list of executors with optional filtering.\n\nReturns active executors from memory combined with completed executors from database.\n\nFilters:\n- `account_names`: Filter by specific accounts\n- `connector_names`: Filter by connectors\n- `trading_pairs`: Filter by trading pairs\n- `executor_types`: Filter by executor types\n- `status`: Filter by status (RUNNING, TERMINATED, etc.)\n\nReturns paginated list of executor summaries.", "operationId": "list_executors_executors_search_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutorFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/executors/summary": { "get": { "tags": [ "Executors" ], "summary": "Get Executors Summary", "description": "Get summary statistics for all executors.\n\nReturns aggregate information including:\n- Total active/completed executor counts\n- Total PnL and volume\n- Breakdown by executor type, connector, and status", "operationId": "get_executors_summary_executors_summary_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutorsSummaryResponse" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/executors/{executor_id}/logs": { "get": { "tags": [ "Executors" ], "summary": "Get Executor Logs", "description": "Get captured log entries for a specific executor.\n\nReturns log entries from the in-memory ring buffer. Only available for\nactive executors - logs are cleared when the executor completes.\n\nQuery parameters:\n- **level**: Filter by log level (ERROR, WARNING, INFO, DEBUG)\n- **limit**: Maximum entries to return (default 50)", "operationId": "get_executor_logs_executors__executor_id__logs_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "executor_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Executor Id" } }, { "name": "level", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Level" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutorLogsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/executors/types/available": { "get": { "tags": [ "Executors" ], "summary": "Get Available Executor Types", "description": "Get list of available executor types with descriptions.\n\nReturns information about each supported executor type.", "operationId": "get_available_executor_types_executors_types_available_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/executors/{executor_id}": { "get": { "tags": [ "Executors" ], "summary": "Get Executor", "description": "Get detailed information about a specific executor.\n\nChecks active executors in memory first, then falls back to database for completed executors.\n\nReturns full executor information including:\n- Current status and PnL\n- Full configuration\n- Executor-specific custom information", "operationId": "get_executor_executors__executor_id__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "executor_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Executor Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutorDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/executors/{executor_id}/stop": { "post": { "tags": [ "Executors" ], "summary": "Stop Executor", "description": "Stop an active executor.\n\nOptions:\n- `keep_position`: If true, keeps any open position (for position executors).\n If false, the executor will attempt to close all positions before stopping.\n\nReturns confirmation of the stop action.", "operationId": "stop_executor_executors__executor_id__stop_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "executor_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Executor Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StopExecutorRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StopExecutorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/executors/positions/summary": { "get": { "tags": [ "Executors" ], "summary": "Get Positions Summary", "description": "Get summary of all held positions from executors stopped with keep_position=True.\n\nReturns aggregate information including:\n- Total number of active position holds\n- Total realized PnL across all positions\n- Total unrealized PnL (when market rates are available)\n- List of all positions with breakeven prices and PnL", "operationId": "get_positions_summary_executors_positions_summary_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositionsSummaryResponse" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/executors/positions/{connector_name}/{trading_pair}": { "get": { "tags": [ "Executors" ], "summary": "Get Position Held", "description": "Get held position for a specific connector/trading pair.\n\nReturns the aggregated position from executors stopped with keep_position=True,\nincluding breakeven prices, matched/unmatched volume, realized PnL, and unrealized PnL.", "operationId": "get_position_held_executors_positions__connector_name___trading_pair__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } }, { "name": "trading_pair", "in": "path", "required": true, "schema": { "type": "string", "title": "Trading Pair" } }, { "name": "account_name", "in": "query", "required": false, "schema": { "type": "string", "default": "master_account", "title": "Account Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PositionHoldResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Executors" ], "summary": "Clear Position Held", "description": "Clear a held position (after manual close or full exit).\n\nThis removes the position from tracking but preserves historical data\nin completed executors.", "operationId": "clear_position_held_executors_positions__connector_name___trading_pair__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } }, { "name": "trading_pair", "in": "path", "required": true, "schema": { "type": "string", "title": "Trading Pair" } }, { "name": "account_name", "in": "query", "required": false, "schema": { "type": "string", "default": "master_account", "title": "Account Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/executors/types/{executor_type}/config": { "get": { "tags": [ "Executors" ], "summary": "Get Executor Config Schema", "description": "Get configuration schema for a specific executor type.\n\nReturns detailed information about each configuration field including:\n- **name**: Field name\n- **type**: Data type (str, int, Decimal, enum, etc.)\n- **description**: Field description\n- **required**: Whether the field is required\n- **default**: Default value if any\n- **constraints**: Validation constraints (min, max, pattern, etc.)\n- **enum_values**: Possible values for enum types\n\nAlso returns nested type definitions for complex fields.", "operationId": "get_executor_config_schema_executors_types__executor_type__config_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "executor_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Executor Type" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/controllers": { "get": { "tags": [ "Controllers" ], "summary": "List Controllers", "description": "List all controllers organized by type.\n\nDetects both single-file controllers (controller.py) and\npackage-style controllers (controller/controller.py).\n\nReturns:\n Dictionary mapping controller types to lists of controller names", "operationId": "list_controllers_controllers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object", "title": "Response List Controllers Controllers Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/controllers/configs": { "get": { "tags": [ "Controllers" ], "summary": "List Controller Configs", "description": "List all controller configurations with metadata.\n\nReturns:\n List of controller configuration objects with name, controller_name, controller_type, and other metadata", "operationId": "list_controller_configs_controllers_configs_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List Controller Configs Controllers Configs Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/controllers/configs/{config_name}": { "get": { "tags": [ "Controllers" ], "summary": "Get Controller Config", "description": "Get controller configuration by config name.\n\nArgs:\n config_name: Name of the configuration file to retrieve\n\nReturns:\n Dictionary with controller configuration\n\nRaises:\n HTTPException: 404 if configuration not found", "operationId": "get_controller_config_controllers_configs__config_name__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "config_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Controller Config Controllers Configs Config Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Controllers" ], "summary": "Create Or Update Controller Config", "description": "Create or update controller configuration.\n\nArgs:\n config_name: Name of the configuration file\n config: Configuration dictionary to save\n\nReturns:\n Success message when configuration is saved\n\nRaises:\n HTTPException: 400 if save error occurs", "operationId": "create_or_update_controller_config_controllers_configs__config_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "config_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Config" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Controllers" ], "summary": "Delete Controller Config", "description": "Delete controller configuration.\n\nArgs:\n config_name: Name of the configuration file to delete\n\nReturns:\n Success message when configuration is deleted\n\nRaises:\n HTTPException: 404 if configuration not found", "operationId": "delete_controller_config_controllers_configs__config_name__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "config_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/controllers/{controller_type}/{controller_name}": { "get": { "tags": [ "Controllers" ], "summary": "Get Controller", "description": "Get controller content by type and name.\n\nSupports both single-file controllers (controller.py) and\npackage-style controllers (controller/controller.py).\n\nArgs:\n controller_type: Type of the controller\n controller_name: Name of the controller\n\nReturns:\n Dictionary with controller name, type, and content\n\nRaises:\n HTTPException: 404 if controller not found", "operationId": "get_controller_controllers__controller_type___controller_name__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "controller_type", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ControllerType" } }, { "name": "controller_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Controller Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Get Controller Controllers Controller Type Controller Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Controllers" ], "summary": "Create Or Update Controller", "description": "Create or update a controller.\n\nIf controller exists as a package (folder), updates the file inside.\nOtherwise creates/updates as a single file.\n\nArgs:\n controller_type: Type of controller to create/update\n controller_name: Name of the controller (from URL path)\n controller: Controller object with content (and optional type for validation)\n\nReturns:\n Success message when controller is saved\n\nRaises:\n HTTPException: 400 if controller type mismatch or save error", "operationId": "create_or_update_controller_controllers__controller_type___controller_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "controller_type", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ControllerType" } }, { "name": "controller_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Controller Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Controller" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Controllers" ], "summary": "Delete Controller", "description": "Delete a controller.\n\nHandles both single-file and package-style controllers.\n\nArgs:\n controller_type: Type of the controller\n controller_name: Name of the controller to delete\n\nReturns:\n Success message when controller is deleted\n\nRaises:\n HTTPException: 404 if controller not found", "operationId": "delete_controller_controllers__controller_type___controller_name__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "controller_type", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ControllerType" } }, { "name": "controller_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Controller Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/controllers/{controller_type}/{controller_name}/config/template": { "get": { "tags": [ "Controllers" ], "summary": "Get Controller Config Template", "description": "Get controller configuration template with default values.\n\nArgs:\n controller_type: Type of the controller\n controller_name: Name of the controller\n\nReturns:\n Dictionary with configuration template and default values\n\nRaises:\n HTTPException: 404 if controller configuration class not found", "operationId": "get_controller_config_template_controllers__controller_type___controller_name__config_template_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "controller_type", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ControllerType" } }, { "name": "controller_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Controller Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/controllers/{controller_type}/{controller_name}/config/validate": { "post": { "tags": [ "Controllers" ], "summary": "Validate Controller Config", "description": "Validate controller configuration against the controller's config class.\n\nArgs:\n controller_type: Type of the controller\n controller_name: Name of the controller\n config: Configuration dictionary to validate\n\nReturns:\n Success message if configuration is valid\n\nRaises:\n HTTPException: 400 if validation fails", "operationId": "validate_controller_config_controllers__controller_type___controller_name__config_validate_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "controller_type", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/ControllerType" } }, { "name": "controller_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Controller Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Config" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/controllers/bots/{bot_name}/configs": { "get": { "tags": [ "Controllers" ], "summary": "Get Bot Controller Configs", "description": "Get all controller configurations for a specific bot.\n\nArgs:\n bot_name: Name of the bot to get configurations for\n\nReturns:\n List of controller configurations for the bot\n\nRaises:\n HTTPException: 404 if bot not found", "operationId": "get_bot_controller_configs_controllers_bots__bot_name__configs_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "title": "Response Get Bot Controller Configs Controllers Bots Bot Name Configs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/controllers/bots/{bot_name}/{controller_name}/config": { "post": { "tags": [ "Controllers" ], "summary": "Update Bot Controller Config", "description": "Update controller configuration for a specific bot.\n\nArgs:\n bot_name: Name of the bot\n controller_name: Name of the controller to update\n config: Configuration dictionary to update with\n\nReturns:\n Success message when configuration is updated\n\nRaises:\n HTTPException: 404 if bot or controller not found, 400 if update error", "operationId": "update_bot_controller_config_controllers_bots__bot_name___controller_name__config_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } }, { "name": "controller_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Controller Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Config" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/scripts": { "get": { "tags": [ "Scripts" ], "summary": "List Scripts", "description": "List all available scripts.\n\nReturns:\n List of script names (without .py extension)", "operationId": "list_scripts_scripts_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response List Scripts Scripts Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/scripts/configs": { "get": { "tags": [ "Scripts" ], "summary": "List Script Configs", "description": "List all script configurations with metadata.\n\nReturns:\n List of script configuration objects with name, script_file_name, and other metadata", "operationId": "list_script_configs_scripts_configs_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List Script Configs Scripts Configs Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/scripts/configs/{config_name}": { "get": { "tags": [ "Scripts" ], "summary": "Get Script Config", "description": "Get script configuration by config name.\n\nArgs:\n config_name: Name of the configuration file to retrieve\n \nReturns:\n Dictionary with script configuration\n \nRaises:\n HTTPException: 404 if configuration not found", "operationId": "get_script_config_scripts_configs__config_name__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "config_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Script Config Scripts Configs Config Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Scripts" ], "summary": "Create Or Update Script Config", "description": "Create or update script configuration.\n\nArgs:\n config_name: Name of the configuration file\n config: Configuration dictionary to save\n \nReturns:\n Success message when configuration is saved\n \nRaises:\n HTTPException: 400 if save error occurs", "operationId": "create_or_update_script_config_scripts_configs__config_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "config_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Config" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Scripts" ], "summary": "Delete Script Config", "description": "Delete script configuration.\n\nArgs:\n config_name: Name of the configuration file to delete\n \nReturns:\n Success message when configuration is deleted\n \nRaises:\n HTTPException: 404 if configuration not found", "operationId": "delete_script_config_scripts_configs__config_name__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "config_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/scripts/{script_name}": { "get": { "tags": [ "Scripts" ], "summary": "Get Script", "description": "Get script content by name.\n\nArgs:\n script_name: Name of the script to retrieve\n \nReturns:\n Dictionary with script name and content\n \nRaises:\n HTTPException: 404 if script not found", "operationId": "get_script_scripts__script_name__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "script_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Script Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Get Script Scripts Script Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Scripts" ], "summary": "Create Or Update Script", "description": "Create or update a script.\n\nArgs:\n script_name: Name of the script (from URL path)\n script: Script object with content\n \nReturns:\n Success message when script is saved\n \nRaises:\n HTTPException: 400 if save error occurs", "operationId": "create_or_update_script_scripts__script_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "script_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Script Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Script" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Scripts" ], "summary": "Delete Script", "description": "Delete a script.\n\nArgs:\n script_name: Name of the script to delete\n \nReturns:\n Success message when script is deleted\n \nRaises:\n HTTPException: 404 if script not found", "operationId": "delete_script_scripts__script_name__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "script_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Script Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/scripts/{script_name}/config/template": { "get": { "tags": [ "Scripts" ], "summary": "Get Script Config Template", "description": "Get script configuration template with default values.\n\nArgs:\n script_name: Name of the script to get template for\n \nReturns:\n Dictionary with configuration template and default values\n \nRaises:\n HTTPException: 404 if script configuration class not found", "operationId": "get_script_config_template_scripts__script_name__config_template_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "script_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Script Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Script Config Template Scripts Script Name Config Template Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/bot-orchestration/status": { "get": { "tags": [ "Bot Orchestration" ], "summary": "Get Active Bots Status", "description": "Get the status of all active bots.\n\nArgs:\n bots_manager: Bot orchestrator service dependency\n\nReturns:\n Dictionary with status and data containing all active bot statuses", "operationId": "get_active_bots_status_bot_orchestration_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/bot-orchestration/mqtt": { "get": { "tags": [ "Bot Orchestration" ], "summary": "Get Mqtt Status", "description": "Get MQTT connection status and discovered bots.\n\nArgs:\n bots_manager: Bot orchestrator service dependency\n\nReturns:\n Dictionary with MQTT connection status, discovered bots, and broker information", "operationId": "get_mqtt_status_bot_orchestration_mqtt_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/bot-orchestration/{bot_name}/status": { "get": { "tags": [ "Bot Orchestration" ], "summary": "Get Bot Status", "description": "Get the status of a specific bot.\n\nArgs:\n bot_name: Name of the bot to get status for\n bots_manager: Bot orchestrator service dependency\n\nReturns:\n Dictionary with bot status information\n\nRaises:\n HTTPException: 404 if bot not found", "operationId": "get_bot_status_bot_orchestration__bot_name__status_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/bot-orchestration/{bot_name}/history": { "get": { "tags": [ "Bot Orchestration" ], "summary": "Get Bot History", "description": "Get trading history for a bot with optional parameters.\n\nArgs:\n bot_name: Name of the bot to get history for\n days: Number of days of history to retrieve (0 for all)\n verbose: Whether to include verbose output\n precision: Decimal precision for numerical values\n timeout: Timeout in seconds for the operation\n bots_manager: Bot orchestrator service dependency\n\nReturns:\n Dictionary with bot trading history", "operationId": "get_bot_history_bot_orchestration__bot_name__history_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } }, { "name": "days", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Days" } }, { "name": "verbose", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Verbose" } }, { "name": "precision", "in": "query", "required": false, "schema": { "type": "integer", "title": "Precision" } }, { "name": "timeout", "in": "query", "required": false, "schema": { "type": "number", "default": 30, "title": "Timeout" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/bot-orchestration/start-bot": { "post": { "tags": [ "Bot Orchestration" ], "summary": "Start Bot", "description": "Start a bot with the specified configuration.\n\nArgs:\n action: StartBotAction containing bot configuration parameters\n bots_manager: Bot orchestrator service dependency\n db_manager: Database manager dependency\n\nReturns:\n Dictionary with status and response from bot start operation", "operationId": "start_bot_bot_orchestration_start_bot_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartBotAction" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/bot-orchestration/stop-bot": { "post": { "tags": [ "Bot Orchestration" ], "summary": "Stop Bot", "description": "Stop a bot with the specified configuration.\n\nArgs:\n action: StopBotAction containing bot stop parameters\n bots_manager: Bot orchestrator service dependency\n db_manager: Database manager dependency\n\nReturns:\n Dictionary with status and response from bot stop operation", "operationId": "stop_bot_bot_orchestration_stop_bot_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StopBotAction" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/bot-orchestration/bot-runs": { "get": { "tags": [ "Bot Orchestration" ], "summary": "Get Bot Runs", "description": "Get bot runs with optional filtering.\n\nArgs:\n bot_name: Filter by bot name\n account_name: Filter by account name\n strategy_type: Filter by strategy type (script or controller)\n strategy_name: Filter by strategy name\n run_status: Filter by run status (CREATED, RUNNING, STOPPED, ERROR)\n deployment_status: Filter by deployment status (DEPLOYED, FAILED, ARCHIVED)\n limit: Maximum number of results to return\n offset: Number of results to skip\n db_manager: Database manager dependency\n\nReturns:\n List of bot runs with their details", "operationId": "get_bot_runs_bot_orchestration_bot_runs_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "bot_name", "in": "query", "required": false, "schema": { "type": "string", "title": "Bot Name" } }, { "name": "account_name", "in": "query", "required": false, "schema": { "type": "string", "title": "Account Name" } }, { "name": "strategy_type", "in": "query", "required": false, "schema": { "type": "string", "title": "Strategy Type" } }, { "name": "strategy_name", "in": "query", "required": false, "schema": { "type": "string", "title": "Strategy Name" } }, { "name": "run_status", "in": "query", "required": false, "schema": { "type": "string", "title": "Run Status" } }, { "name": "deployment_status", "in": "query", "required": false, "schema": { "type": "string", "title": "Deployment Status" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/bot-orchestration/bot-runs/{bot_run_id}": { "get": { "tags": [ "Bot Orchestration" ], "summary": "Get Bot Run By Id", "description": "Get a specific bot run by ID.\n\nArgs:\n bot_run_id: ID of the bot run\n db_manager: Database manager dependency\n\nReturns:\n Bot run details\n\nRaises:\n HTTPException: 404 if bot run not found", "operationId": "get_bot_run_by_id_bot_orchestration_bot_runs__bot_run_id__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "bot_run_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Bot Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/bot-orchestration/bot-runs/stats": { "get": { "tags": [ "Bot Orchestration" ], "summary": "Get Bot Run Stats", "description": "Get statistics about bot runs.\n\nArgs:\n db_manager: Database manager dependency\n\nReturns:\n Bot run statistics", "operationId": "get_bot_run_stats_bot_orchestration_bot_runs_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/bot-orchestration/stop-and-archive-bot/{bot_name}": { "post": { "tags": [ "Bot Orchestration" ], "summary": "Stop And Archive Bot", "description": "Gracefully stop a bot and archive its data in the background.\nThis initiates a background task that will:\n1. Stop the bot trading process via MQTT\n2. Wait 15 seconds for graceful shutdown\n3. Monitor and stop the Docker container\n4. Archive the bot data (locally or to S3)\n5. Remove the container\n\nReturns immediately with a success message while the process continues in the background.", "operationId": "stop_and_archive_bot_bot_orchestration_stop_and_archive_bot__bot_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "bot_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Bot Name" } }, { "name": "skip_order_cancellation", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Skip Order Cancellation" } }, { "name": "archive_locally", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Archive Locally" } }, { "name": "s3_bucket", "in": "query", "required": false, "schema": { "type": "string", "title": "S3 Bucket" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/bot-orchestration/deploy-v2-controllers": { "post": { "tags": [ "Bot Orchestration" ], "summary": "Deploy V2 Controllers", "description": "Deploy a V2 strategy with controllers by generating the script config and creating the instance.\nThis endpoint simplifies the deployment process for V2 controller strategies.\n\nArgs:\n deployment: V2ControllerDeployment configuration\n docker_manager: Docker service dependency\n\nReturns:\n Dictionary with deployment response and generated configuration details\n\nRaises:\n HTTPException: 500 if deployment fails", "operationId": "deploy_v2_controllers_bot_orchestration_deploy_v2_controllers_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/V2ControllerDeployment" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/bot-orchestration/deploy-v2-script": { "post": { "tags": [ "Bot Orchestration" ], "summary": "Deploy V2 Script", "description": "Deploy a V2 script bot with optional script configuration.\nThis endpoint creates and starts a Hummingbot instance running the specified script.\n\nArgs:\n deployment: V2ScriptDeployment configuration containing instance name, credentials,\n optional script name and configuration\n docker_manager: Docker service dependency\n db_manager: Database manager dependency\n\nReturns:\n Dictionary with deployment response including instance details\n\nRaises:\n HTTPException: 500 if deployment fails", "operationId": "deploy_v2_script_bot_orchestration_deploy_v2_script_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/V2ScriptDeployment" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/archived-bots": { "get": { "tags": [ "Archived Bots" ], "summary": "List Databases", "description": "List all available database files in the system.\n\nReturns:\n List of database file paths", "operationId": "list_databases_archived_bots_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response List Databases Archived Bots Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/archived-bots/{db_path}/status": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Status", "description": "Get status information for a specific database.\n\nArgs:\n db_path: Path to the database file\n \nReturns:\n Database status including table health", "operationId": "get_database_status_archived_bots__db_path__status_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/archived-bots/{db_path}/summary": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Summary", "description": "Get a summary of database contents including basic statistics.\n\nArgs:\n db_path: Full path to the database file\n \nReturns:\n Summary statistics of the database contents", "operationId": "get_database_summary_archived_bots__db_path__summary_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/archived-bots/{db_path}/performance": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Performance", "description": "Get trade-based performance analysis for a bot database.\n\nArgs:\n db_path: Full path to the database file\n \nReturns:\n Trade-based performance metrics with rolling calculations", "operationId": "get_database_performance_archived_bots__db_path__performance_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/archived-bots/{db_path}/trades": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Trades", "description": "Get trade history from a database.\n\nArgs:\n db_path: Full path to the database file\n limit: Maximum number of trades to return\n offset: Offset for pagination\n \nReturns:\n List of trades with pagination info", "operationId": "get_database_trades_archived_bots__db_path__trades_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Limit number of trades returned", "default": 100, "title": "Limit" }, "description": "Limit number of trades returned" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "description": "Offset for pagination", "default": 0, "title": "Offset" }, "description": "Offset for pagination" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/archived-bots/{db_path}/orders": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Orders", "description": "Get order history from a database.\n\nArgs:\n db_path: Full path to the database file\n limit: Maximum number of orders to return\n offset: Offset for pagination\n status: Optional status filter\n \nReturns:\n List of orders with pagination info", "operationId": "get_database_orders_archived_bots__db_path__orders_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Limit number of orders returned", "default": 100, "title": "Limit" }, "description": "Limit number of orders returned" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "description": "Offset for pagination", "default": 0, "title": "Offset" }, "description": "Offset for pagination" }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by order status", "title": "Status" }, "description": "Filter by order status" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/archived-bots/{db_path}/executors": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Executors", "description": "Get executor data from a database.\n\nArgs:\n db_path: Full path to the database file\n \nReturns:\n List of executors with their configurations and results", "operationId": "get_database_executors_archived_bots__db_path__executors_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/archived-bots/{db_path}/positions": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Positions", "description": "Get position data from a database.\n\nArgs:\n db_path: Full path to the database file\n limit: Maximum number of positions to return\n offset: Offset for pagination\n \nReturns:\n List of positions with pagination info", "operationId": "get_database_positions_archived_bots__db_path__positions_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "description": "Limit number of positions returned", "default": 100, "title": "Limit" }, "description": "Limit number of positions returned" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "description": "Offset for pagination", "default": 0, "title": "Offset" }, "description": "Offset for pagination" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/archived-bots/{db_path}/controllers": { "get": { "tags": [ "Archived Bots" ], "summary": "Get Database Controllers", "description": "Get controller data from a database.\n\nArgs:\n db_path: Full path to the database file\n \nReturns:\n List of controllers that were running with their configurations", "operationId": "get_database_controllers_archived_bots__db_path__controllers_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "db_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Db Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/backtesting/run-backtesting": { "post": { "tags": [ "Backtesting" ], "summary": "Run Backtesting", "description": "Run a backtesting simulation with the provided configuration.\n\nArgs:\n backtesting_config: Configuration for the backtesting including start/end time,\n resolution, trade cost, and controller config\n \nReturns:\n Dictionary containing executors, processed data, and results from the backtest\n \nRaises:\n Returns error dictionary if backtesting fails", "operationId": "run_backtesting_backtesting_run_backtesting_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BacktestingConfig" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/rate-oracle/sources": { "get": { "tags": [ "Rate Oracle" ], "summary": "Get Available Sources", "description": "Get list of all available rate oracle sources.\n\nReturns:\n List of available source names that can be configured", "operationId": "get_available_sources_rate_oracle_sources_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Response Get Available Sources Rate Oracle Sources Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/rate-oracle/config": { "get": { "tags": [ "Rate Oracle" ], "summary": "Get Rate Oracle Config", "description": "Get current rate oracle configuration.\n\nReturns the current rate_oracle_source and global_token settings,\nalong with the list of available sources.\n\nReturns:\n Current rate oracle configuration and available sources", "operationId": "get_rate_oracle_config_rate_oracle_config_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateOracleConfigResponse" } } } } }, "security": [ { "HTTPBasic": [] } ] }, "put": { "tags": [ "Rate Oracle" ], "summary": "Update Rate Oracle Config", "description": "Update rate oracle configuration.\n\nUpdates rate_oracle_source and/or global_token settings. Changes are:\n1. Applied to the running RateOracle instance immediately\n2. Persisted to conf_client.yml\n\nArgs:\n update_request: Configuration updates to apply\n\nReturns:\n Updated configuration with success status", "operationId": "update_rate_oracle_config_rate_oracle_config_put", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateOracleConfigUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateOracleConfigUpdateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/rate-oracle/rates": { "post": { "tags": [ "Rate Oracle" ], "summary": "Get Rates", "description": "Get rates for specified trading pairs.\n\nUses the configured rate oracle source to fetch current rates.\n\nArgs:\n rate_request: List of trading pairs to get rates for\n\nReturns:\n Rates for the requested trading pairs", "operationId": "get_rates_rate_oracle_rates_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/rate-oracle/rate/{trading_pair}": { "get": { "tags": [ "Rate Oracle" ], "summary": "Get Single Rate", "description": "Get rate for a single trading pair.\n\nArgs:\n trading_pair: Trading pair in format BASE-QUOTE (e.g., BTC-USDT)\n\nReturns:\n Rate for the specified trading pair", "operationId": "get_single_rate_rate_oracle_rate__trading_pair__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "trading_pair", "in": "path", "required": true, "schema": { "type": "string", "title": "Trading Pair" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SingleRateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/rate-oracle/rate-async/{trading_pair}": { "get": { "tags": [ "Rate Oracle" ], "summary": "Get Rate Async", "description": "Get rate for a trading pair using async fetch (direct from exchange).\n\nThis bypasses the cached prices and fetches directly from the source.\nUseful when cached data may be stale or not yet initialized.\n\nArgs:\n trading_pair: Trading pair in format BASE-QUOTE (e.g., BTC-USDT)\n\nReturns:\n Rate for the specified trading pair", "operationId": "get_rate_async_rate_oracle_rate_async__trading_pair__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "trading_pair", "in": "path", "required": true, "schema": { "type": "string", "title": "Trading Pair" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SingleRateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/rate-oracle/prices": { "get": { "tags": [ "Rate Oracle" ], "summary": "Get Cached Prices", "description": "Get all cached prices from the rate oracle.\n\nReturns the complete price dictionary that the rate oracle has fetched\nfrom its configured source.\n\nReturns:\n Dictionary of all cached prices", "operationId": "get_cached_prices_rate_oracle_prices_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/docker/running": { "get": { "tags": [ "Docker" ], "summary": "Is Docker Running", "description": "Check if Docker daemon is running.\n\nArgs:\n docker_service: Docker service dependency\n \nReturns:\n Dictionary indicating if Docker is running", "operationId": "is_docker_running_docker_running_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/docker/available-images": { "get": { "tags": [ "Docker" ], "summary": "Available Images", "description": "Get available Docker images matching the specified name.\n\nArgs:\n image_name: Name pattern to search for in image tags\n docker_service: Docker service dependency\n \nReturns:\n Dictionary with list of available image tags", "operationId": "available_images_docker_available_images_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "image_name", "in": "query", "required": false, "schema": { "type": "string", "title": "Image Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/docker/active-containers": { "get": { "tags": [ "Docker" ], "summary": "Active Containers", "description": "Get all currently active (running) Docker containers.\n\nArgs:\n name_filter: Optional filter to match container names (case-insensitive)\n docker_service: Docker service dependency\n \nReturns:\n List of active container information", "operationId": "active_containers_docker_active_containers_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "name_filter", "in": "query", "required": false, "schema": { "type": "string", "title": "Name Filter" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/docker/exited-containers": { "get": { "tags": [ "Docker" ], "summary": "Exited Containers", "description": "Get all exited (stopped) Docker containers.\n\nArgs:\n name_filter: Optional filter to match container names (case-insensitive)\n docker_service: Docker service dependency\n \nReturns:\n List of exited container information", "operationId": "exited_containers_docker_exited_containers_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "name_filter", "in": "query", "required": false, "schema": { "type": "string", "title": "Name Filter" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/docker/clean-exited-containers": { "post": { "tags": [ "Docker" ], "summary": "Clean Exited Containers", "description": "Remove all exited Docker containers to free up space.\n\nArgs:\n docker_service: Docker service dependency\n \nReturns:\n Response from cleanup operation", "operationId": "clean_exited_containers_docker_clean_exited_containers_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/docker/remove-container/{container_name}": { "post": { "tags": [ "Docker" ], "summary": "Remove Container", "description": "Remove a Hummingbot container and optionally archive its bot data.\n\nNOTE: This endpoint only works with Hummingbot containers (names starting with 'hummingbot-')\nas it archives bot-specific data from the bots/instances directory.\n\nArgs:\n container_name: Name of the Hummingbot container to remove\n archive_locally: Whether to archive data locally (default: True)\n s3_bucket: S3 bucket name for cloud archiving (optional)\n docker_service: Docker service dependency\n bot_archiver: Bot archiver service dependency\n \nReturns:\n Response from container removal operation\n \nRaises:\n HTTPException: 400 if container is not a Hummingbot container\n HTTPException: 500 if archiving fails", "operationId": "remove_container_docker_remove_container__container_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "container_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Container Name" } }, { "name": "archive_locally", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Archive Locally" } }, { "name": "s3_bucket", "in": "query", "required": false, "schema": { "type": "string", "title": "S3 Bucket" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/docker/stop-container/{container_name}": { "post": { "tags": [ "Docker" ], "summary": "Stop Container", "description": "Stop a running Docker container.\n\nArgs:\n container_name: Name of the container to stop\n docker_service: Docker service dependency\n \nReturns:\n Response from container stop operation", "operationId": "stop_container_docker_stop_container__container_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "container_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Container Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/docker/start-container/{container_name}": { "post": { "tags": [ "Docker" ], "summary": "Start Container", "description": "Start a stopped Docker container.\n\nArgs:\n container_name: Name of the container to start\n docker_service: Docker service dependency\n \nReturns:\n Response from container start operation", "operationId": "start_container_docker_start_container__container_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "container_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Container Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/docker/pull-image": { "post": { "tags": [ "Docker" ], "summary": "Pull Image", "description": "Initiate Docker image pull as background task.\nReturns immediately with task status for monitoring.\n\nArgs:\n image: DockerImage object containing the image name to pull\n docker_service: Docker service dependency\n \nReturns:\n Status of the pull operation initiation", "operationId": "pull_image_docker_pull_image_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DockerImage" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/docker/pull-status": { "get": { "tags": [ "Docker" ], "summary": "Get Pull Status", "description": "Get status of all pull operations.\n\nArgs:\n docker_service: Docker service dependency\n \nReturns:\n Dictionary with all pull operations and their statuses", "operationId": "get_pull_status_docker_pull_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/status": { "get": { "tags": [ "Gateway" ], "summary": "Get Gateway Status", "description": "Get Gateway container status.", "operationId": "get_gateway_status_gateway_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayStatus" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/start": { "post": { "tags": [ "Gateway" ], "summary": "Start Gateway", "description": "Start Gateway container.", "operationId": "start_gateway_gateway_start_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayConfig" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/stop": { "post": { "tags": [ "Gateway" ], "summary": "Stop Gateway", "description": "Stop Gateway container.", "operationId": "stop_gateway_gateway_stop_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/restart": { "post": { "tags": [ "Gateway" ], "summary": "Restart Gateway", "description": "Restart Gateway container.\n\nIf config is provided, the container will be removed and recreated with new configuration.\nIf no config is provided, the container will be stopped and started with existing configuration.", "operationId": "restart_gateway_gateway_restart_post", "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/GatewayConfig" }, { "type": "null" } ], "title": "Config" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/logs": { "get": { "tags": [ "Gateway" ], "summary": "Get Gateway Logs", "description": "Get Gateway container logs.", "operationId": "get_gateway_logs_gateway_logs_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "tail", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 10000, "minimum": 1, "default": 100, "title": "Tail" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/connectors": { "get": { "tags": [ "Gateway" ], "summary": "List Connectors", "description": "List all available DEX connectors with their configurations.\n\nReturns connector details including name, trading types, chain, and networks.\nAll fields normalized to snake_case.", "operationId": "list_connectors_gateway_connectors_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Connectors Gateway Connectors Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/connectors/{connector_name}": { "get": { "tags": [ "Gateway" ], "summary": "Get Connector Config", "description": "Get configuration for a specific DEX connector.\n\nArgs:\n connector_name: Connector name (e.g., 'meteora', 'raydium')", "operationId": "get_connector_config_gateway_connectors__connector_name__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Connector Config Gateway Connectors Connector Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Gateway" ], "summary": "Update Connector Config", "description": "Update configuration for a DEX connector.\n\nArgs:\n connector_name: Connector name (e.g., 'meteora', 'raydium')\n config_updates: Dict with path-value pairs to update.\n Keys can be in snake_case (e.g., {\"slippage_pct\": 0.5})\n or camelCase (e.g., {\"slippagePct\": 0.5})", "operationId": "update_connector_config_gateway_connectors__connector_name__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Connector Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Config Updates" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Connector Config Gateway Connectors Connector Name Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/chains": { "get": { "tags": [ "Gateway" ], "summary": "List Chains", "description": "List all available blockchain chains and their networks.\n\nThis also serves as the networks list endpoint.", "operationId": "list_chains_gateway_chains_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Chains Gateway Chains Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/pools": { "get": { "tags": [ "Gateway" ], "summary": "List Pools", "description": "List all liquidity pools for a connector and network.\n\nReturns normalized data with snake_case fields and trading_pair.", "operationId": "list_pools_gateway_pools_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector_name", "in": "query", "required": true, "schema": { "type": "string", "description": "DEX connector (e.g., 'meteora', 'raydium')", "title": "Connector Name" }, "description": "DEX connector (e.g., 'meteora', 'raydium')" }, { "name": "network", "in": "query", "required": true, "schema": { "type": "string", "description": "Network (e.g., 'mainnet-beta')", "title": "Network" }, "description": "Network (e.g., 'mainnet-beta')" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "title": "Response List Pools Gateway Pools Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Gateway" ], "summary": "Add Pool", "description": "Add a custom liquidity pool.\n\nArgs:\n pool_request: Pool details (connector, type, network, base, quote, address)", "operationId": "add_pool_gateway_pools_post", "security": [ { "HTTPBasic": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddPoolRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Add Pool Gateway Pools Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/pools/{address}": { "delete": { "tags": [ "Gateway" ], "summary": "Delete Pool", "description": "Delete a liquidity pool from Gateway's pool list.\n\nArgs:\n address: Pool contract address to remove\n connector_name: DEX connector (e.g., 'meteora', 'raydium', 'uniswap')\n network: Network name (e.g., 'mainnet-beta', 'mainnet')\n pool_type: Pool type (e.g., 'clmm', 'amm')\n\nExample: DELETE /gateway/pools/2sf5NYcY...?connector_name=meteora&network=mainnet-beta&pool_type=clmm", "operationId": "delete_pool_gateway_pools__address__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "address", "in": "path", "required": true, "schema": { "type": "string", "title": "Address" } }, { "name": "connector_name", "in": "query", "required": true, "schema": { "type": "string", "description": "DEX connector (e.g., 'meteora', 'raydium', 'uniswap')", "title": "Connector Name" }, "description": "DEX connector (e.g., 'meteora', 'raydium', 'uniswap')" }, { "name": "network", "in": "query", "required": true, "schema": { "type": "string", "description": "Network name (e.g., 'mainnet-beta', 'mainnet')", "title": "Network" }, "description": "Network name (e.g., 'mainnet-beta', 'mainnet')" }, { "name": "pool_type", "in": "query", "required": true, "schema": { "type": "string", "description": "Pool type (e.g., 'clmm', 'amm')", "title": "Pool Type" }, "description": "Pool type (e.g., 'clmm', 'amm')" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Pool Gateway Pools Address Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/networks": { "get": { "tags": [ "Gateway" ], "summary": "List Networks", "description": "List all available networks across all chains.\n\nReturns a flattened list of network IDs in the format 'chain-network'.\nThis is the primary interface for network discovery.", "operationId": "list_networks_gateway_networks_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Networks Gateway Networks Get" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/networks/{network_id}": { "get": { "tags": [ "Gateway" ], "summary": "Get Network Config", "description": "Get configuration for a specific network.\n\nArgs:\n network_id: Network ID in format 'chain-network' (e.g., 'solana-mainnet-beta', 'ethereum-mainnet')\n\nExample: GET /gateway/networks/solana-mainnet-beta", "operationId": "get_network_config_gateway_networks__network_id__get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Network Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Network Config Gateway Networks Network Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Gateway" ], "summary": "Update Network Config", "description": "Update configuration for a specific network.\n\nArgs:\n network_id: Network ID in format 'chain-network' (e.g., 'solana-mainnet-beta')\n config_updates: Dict with path-value pairs to update.\n Keys can be in snake_case (e.g., {\"node_url\": \"https://...\"})\n or camelCase (e.g., {\"nodeURL\": \"https://...\"})\n\nExample: POST /gateway/networks/solana-mainnet-beta", "operationId": "update_network_config_gateway_networks__network_id__post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Network Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Config Updates" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Network Config Gateway Networks Network Id Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/networks/{network_id}/tokens": { "get": { "tags": [ "Gateway" ], "summary": "Get Network Tokens", "description": "Get available tokens for a network.\n\nArgs:\n network_id: Network ID in format 'chain-network' (e.g., 'solana-mainnet-beta')\n search: Filter tokens by symbol or name\n\nExample: GET /gateway/networks/solana-mainnet-beta/tokens?search=USDC", "operationId": "get_network_tokens_gateway_networks__network_id__tokens_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Network Id" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Network Tokens Gateway Networks Network Id Tokens Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Gateway" ], "summary": "Add Network Token", "description": "Add a custom token to Gateway's token list for a specific network.\n\nArgs:\n network_id: Network ID in format 'chain-network' (e.g., 'solana-mainnet-beta', 'ethereum-mainnet')\n token_request: Token details (address, symbol, name, decimals)\n\nExample: POST /gateway/networks/ethereum-mainnet/tokens\n{\n \"address\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"symbol\": \"USDC\",\n \"name\": \"USD Coin\",\n \"decimals\": 6\n}\n\nNote: After adding a token, restart Gateway for changes to take effect.", "operationId": "add_network_token_gateway_networks__network_id__tokens_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Network Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddTokenRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Add Network Token Gateway Networks Network Id Tokens Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/networks/{network_id}/tokens/{token_address}": { "delete": { "tags": [ "Gateway" ], "summary": "Delete Network Token", "description": "Delete a custom token from Gateway's token list for a specific network.\n\nArgs:\n network_id: Network ID in format 'chain-network' (e.g., 'solana-mainnet-beta', 'ethereum-mainnet')\n token_address: Token contract address to delete\n\nExample: DELETE /gateway/networks/solana-mainnet-beta/tokens/9QFfgxdSqH5zT7j6rZb1y6SZhw2aFtcQu2r6BuYpump\n\nNote: After deleting a token, restart Gateway for changes to take effect.", "operationId": "delete_network_token_gateway_networks__network_id__tokens__token_address__delete", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Network Id" } }, { "name": "token_address", "in": "path", "required": true, "schema": { "type": "string", "title": "Token Address" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Network Token Gateway Networks Network Id Tokens Token Address Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/wallets/create": { "post": { "tags": [ "Gateway" ], "summary": "Create Wallet", "description": "Create a new wallet in Gateway.\n\nArgs:\n request: Contains chain and set_default flag\n\nReturns:\n Dict with address and chain of the created wallet.\n\nExample: POST /gateway/wallets/create\n{\n \"chain\": \"solana\",\n \"set_default\": true\n}", "operationId": "create_wallet_gateway_wallets_create_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWalletRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Create Wallet Gateway Wallets Create Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/wallets/show-private-key": { "post": { "tags": [ "Gateway" ], "summary": "Show Private Key", "description": "Show private key for a wallet.\n\nWARNING: This endpoint exposes sensitive information. Use with caution.\n\nArgs:\n request: Contains chain, address, and passphrase\n\nReturns:\n Dict with privateKey field.\n\nExample: POST /gateway/wallets/show-private-key\n{\n \"chain\": \"solana\",\n \"address\": \"\",\n \"passphrase\": \"\"\n}", "operationId": "show_private_key_gateway_wallets_show_private_key_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShowPrivateKeyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Show Private Key Gateway Wallets Show Private Key Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/wallets/send": { "post": { "tags": [ "Gateway" ], "summary": "Send Transaction", "description": "Send a native token transaction.\n\nArgs:\n request: Contains chain, network, sender address, recipient address, and amount\n\nReturns:\n Dict with transaction signature/hash.\n\nExample: POST /gateway/wallets/send\n{\n \"chain\": \"solana\",\n \"network\": \"mainnet-beta\",\n \"address\": \"\",\n \"to_address\": \"\",\n \"amount\": \"0.001\"\n}", "operationId": "send_transaction_gateway_wallets_send_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendTransactionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Send Transaction Gateway Wallets Send Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/swap/quote": { "post": { "tags": [ "Gateway Swaps" ], "summary": "Get Swap Quote", "description": "Get a price quote for a swap via router (Jupiter, 0x).\n\nExample:\n connector: 'jupiter'\n network: 'solana-mainnet-beta'\n trading_pair: 'SOL-USDC'\n side: 'BUY'\n amount: 1\n slippage_pct: 1\n\nReturns:\n Quote with price, expected output amount, and gas estimate", "operationId": "get_swap_quote_gateway_swap_quote_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwapQuoteRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwapQuoteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/swap/execute": { "post": { "tags": [ "Gateway Swaps" ], "summary": "Execute Swap", "description": "Execute a swap transaction via router (Jupiter, 0x).\n\nExample:\n connector: 'jupiter'\n network: 'solana-mainnet-beta'\n trading_pair: 'SOL-USDC'\n side: 'BUY'\n amount: 1\n slippage_pct: 1\n wallet_address: (optional, uses default if not provided)\n\nReturns:\n Transaction hash and swap details", "operationId": "execute_swap_gateway_swap_execute_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwapExecuteRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwapExecuteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/swaps/{transaction_hash}/status": { "get": { "tags": [ "Gateway Swaps" ], "summary": "Get Swap Status", "description": "Get status of a specific swap by transaction hash.\n\nArgs:\n transaction_hash: Transaction hash of the swap\n\nReturns:\n Swap details including current status", "operationId": "get_swap_status_gateway_swaps__transaction_hash__status_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "transaction_hash", "in": "path", "required": true, "schema": { "type": "string", "title": "Transaction Hash" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/swaps/search": { "post": { "tags": [ "Gateway Swaps" ], "summary": "Search Swaps", "description": "Search swap history with filters.\n\nArgs:\n network: Filter by network (e.g., 'solana-mainnet-beta')\n connector: Filter by connector (e.g., 'jupiter')\n wallet_address: Filter by wallet address\n trading_pair: Filter by trading pair (e.g., 'SOL-USDC')\n status: Filter by status (SUBMITTED, CONFIRMED, FAILED)\n start_time: Start timestamp (unix seconds)\n end_time: End timestamp (unix seconds)\n limit: Max results (default 50, max 1000)\n offset: Pagination offset\n\nReturns:\n Paginated list of swaps", "operationId": "search_swaps_gateway_swaps_search_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Network" } }, { "name": "connector", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Connector" } }, { "name": "wallet_address", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address" } }, { "name": "trading_pair", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trading Pair" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Time" } }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "End Time" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/swaps/summary": { "get": { "tags": [ "Gateway Swaps" ], "summary": "Get Swaps Summary", "description": "Get swap summary statistics.\n\nArgs:\n network: Filter by network\n wallet_address: Filter by wallet address\n start_time: Start timestamp (unix seconds)\n end_time: End timestamp (unix seconds)\n\nReturns:\n Summary statistics including volume, fees, success rate", "operationId": "get_swaps_summary_gateway_swaps_summary_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Network" } }, { "name": "wallet_address", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address" } }, { "name": "start_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Time" } }, { "name": "end_time", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "End Time" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/clmm/pool-info": { "get": { "tags": [ "Gateway CLMM" ], "summary": "Get Clmm Pool Info", "description": "Get detailed information about a CLMM pool by pool address.\n\nArgs:\n connector: CLMM connector (e.g., 'meteora', 'raydium')\n network: Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')\n pool_address: Pool contract address\n\nExample:\n GET /gateway/clmm/pool-info?connector=meteora&network=solana-mainnet-beta&pool_address=2sf5NYcY4zUPXUSmG6f66mskb24t5F8S11pC1Nz5nQT3\n\nReturns:\n Pool information including liquidity, price, bins (for Meteora), etc.\n All field names are returned in snake_case format.\n\nNote:\n For Raydium connector, uses Raydium API directly instead of Gateway.", "operationId": "get_clmm_pool_info_gateway_clmm_pool_info_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector", "in": "query", "required": true, "schema": { "type": "string", "title": "Connector" } }, { "name": "network", "in": "query", "required": true, "schema": { "type": "string", "title": "Network" } }, { "name": "pool_address", "in": "query", "required": true, "schema": { "type": "string", "title": "Pool Address" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMPoolInfoResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/clmm/pools": { "get": { "tags": [ "Gateway CLMM" ], "summary": "Get Clmm Pools", "description": "Get list of available CLMM pools for a connector.\n\nCurrently supports: meteora\n\nArgs:\n connector: CLMM connector (e.g., 'meteora')\n page: Page number (default: 0)\n limit: Results per page (default: 50, max: 100)\n search_term: Search term to filter pools (optional)\n sort_key: Sort by field (volume, tvl, feetvlratio, etc.)\n order_by: Sort order (asc, desc)\n include_unknown: Include pools with unverified tokens\n\nExample:\n GET /gateway/clmm/pools?connector=meteora&search_term=SOL&limit=20\n\nReturns:\n List of available pools with trading pairs, addresses, liquidity, volume, APR, etc.", "operationId": "get_clmm_pools_gateway_clmm_pools_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "connector", "in": "query", "required": true, "schema": { "type": "string", "title": "Connector" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Page number", "default": 0, "title": "Page" }, "description": "Page number" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Results per page (max 100)", "default": 50, "title": "Limit" }, "description": "Results per page (max 100)" }, { "name": "search_term", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search term to filter pools", "title": "Search Term" }, "description": "Search term to filter pools" }, { "name": "sort_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Sort key (volume, tvl, etc.)", "default": "volume", "title": "Sort Key" }, "description": "Sort key (volume, tvl, etc.)" }, { "name": "order_by", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Sort order (asc, desc)", "default": "desc", "title": "Order By" }, "description": "Sort order (asc, desc)" }, { "name": "include_unknown", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include pools with unverified tokens", "default": true, "title": "Include Unknown" }, "description": "Include pools with unverified tokens" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMPoolListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/clmm/open": { "post": { "tags": [ "Gateway CLMM" ], "summary": "Open Clmm Position", "description": "Open a NEW CLMM position with initial liquidity.\n\nExample:\n connector: 'meteora'\n network: 'solana-mainnet-beta'\n pool_address: '2sf5NYcY4zUPXUSmG6f66mskb24t5F8S11pC1Nz5nQT3'\n lower_price: 150\n upper_price: 250\n base_token_amount: 0.01\n quote_token_amount: 2\n slippage_pct: 1\n wallet_address: (optional)\n extra_params: {\"strategyType\": 0} # Meteora-specific\n\nReturns:\n Transaction hash and position address", "operationId": "open_clmm_position_gateway_clmm_open_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMOpenPositionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMOpenPositionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/clmm/add": { "post": { "tags": [ "Gateway CLMM" ], "summary": "Add Liquidity To Clmm Position", "description": "Add MORE liquidity to an EXISTING CLMM position.\n\nExample:\n connector: 'meteora'\n network: 'solana-mainnet-beta'\n position_address: '...'\n base_token_amount: 0.5\n quote_token_amount: 50.0\n slippage_pct: 1\n wallet_address: (optional)\n\nReturns:\n Transaction hash", "operationId": "add_liquidity_to_clmm_position_gateway_clmm_add_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMAddLiquidityRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/clmm/remove": { "post": { "tags": [ "Gateway CLMM" ], "summary": "Remove Liquidity From Clmm Position", "description": "Remove SOME liquidity from a CLMM position (partial removal).\n\nExample:\n connector: 'meteora'\n network: 'solana-mainnet-beta'\n position_address: '...'\n percentage: 50\n wallet_address: (optional)\n\nReturns:\n Transaction hash", "operationId": "remove_liquidity_from_clmm_position_gateway_clmm_remove_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMRemoveLiquidityRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/clmm/close": { "post": { "tags": [ "Gateway CLMM" ], "summary": "Close Clmm Position", "description": "CLOSE a CLMM position completely (removes all liquidity and collects pending fees).\n\nExample:\n connector: 'meteora'\n network: 'solana-mainnet-beta'\n position_address: '...'\n wallet_address: (optional)\n\nReturns:\n Transaction hash and collected fee amounts", "operationId": "close_clmm_position_gateway_clmm_close_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMClosePositionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMCollectFeesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/clmm/collect-fees": { "post": { "tags": [ "Gateway CLMM" ], "summary": "Collect Fees From Clmm Position", "description": "Collect accumulated fees from a CLMM liquidity position.\n\nExample:\n connector: 'meteora'\n network: 'solana-mainnet-beta'\n position_address: '...'\n wallet_address: (optional)\n\nReturns:\n Transaction hash and collected fee amounts", "operationId": "collect_fees_from_clmm_position_gateway_clmm_collect_fees_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMCollectFeesRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMCollectFeesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/clmm/positions_owned": { "post": { "tags": [ "Gateway CLMM" ], "summary": "Get Clmm Positions Owned", "description": "Get all CLMM liquidity positions owned by a wallet for a specific pool.\n\nExample:\n connector: 'meteora'\n network: 'solana-mainnet-beta'\n pool_address: '2sf5NYcY4zUPXUSmG6f66mskb24t5F8S11pC1Nz5nQT3'\n wallet_address: (optional, uses default if not provided)\n\nReturns:\n List of CLMM position information for the specified pool", "operationId": "get_clmm_positions_owned_gateway_clmm_positions_owned_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLMMPositionsOwnedRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/CLMMPositionInfo" }, "type": "array", "title": "Response Get Clmm Positions Owned Gateway Clmm Positions Owned Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] } ] } }, "/gateway/clmm/positions/{position_address}/events": { "get": { "tags": [ "Gateway CLMM" ], "summary": "Get Clmm Position Events", "description": "Get event history for a CLMM position.\n\nArgs:\n position_address: Position NFT address\n event_type: Filter by event type (OPEN, ADD_LIQUIDITY, REMOVE_LIQUIDITY, COLLECT_FEES, CLOSE)\n limit: Max events to return\n\nReturns:\n List of position events", "operationId": "get_clmm_position_events_gateway_clmm_positions__position_address__events_get", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "position_address", "in": "path", "required": true, "schema": { "type": "string", "title": "Position Address" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/gateway/clmm/positions/search": { "post": { "tags": [ "Gateway CLMM" ], "summary": "Search Clmm Positions", "description": "Search CLMM positions with filters.\n\nArgs:\n network: Filter by network (e.g., 'solana-mainnet-beta')\n connector: Filter by connector (e.g., 'meteora')\n wallet_address: Filter by wallet address\n trading_pair: Filter by trading pair (e.g., 'SOL-USDC')\n status: Filter by status (OPEN, CLOSED)\n position_addresses: Filter by specific position addresses (list of addresses)\n limit: Max results (default 50, max 1000)\n offset: Pagination offset\n refresh: If True, refresh position data from Gateway before returning (default False)\n\nReturns:\n Paginated list of positions", "operationId": "search_clmm_positions_gateway_clmm_positions_search_post", "security": [ { "HTTPBasic": [] } ], "parameters": [ { "name": "network", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Network" } }, { "name": "connector", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Connector" } }, { "name": "wallet_address", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address" } }, { "name": "trading_pair", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trading Pair" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "position_addresses", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "title": "Position Addresses" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Offset" } }, { "name": "refresh", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Refresh" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/": { "get": { "summary": "Root", "description": "API root endpoint returning basic information.", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "ActiveOrderFilterRequest": { "properties": { "limit": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Limit", "description": "Number of items per page", "default": 100 }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor", "description": "Cursor for next page" }, "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" }, "trading_pairs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Trading Pairs", "description": "List of trading pairs to filter by" } }, "type": "object", "title": "ActiveOrderFilterRequest", "description": "Request model for filtering active orders" }, "AddPoolRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "DEX connector name (e.g., 'raydium', 'meteora')" }, "type": { "type": "string", "title": "Type", "description": "Pool type ('clmm' or 'amm')" }, "network": { "type": "string", "title": "Network", "description": "Network name (e.g., 'mainnet-beta')" }, "address": { "type": "string", "title": "Address", "description": "Pool contract address" }, "base": { "type": "string", "title": "Base", "description": "Base token symbol" }, "quote": { "type": "string", "title": "Quote", "description": "Quote token symbol" }, "base_address": { "type": "string", "title": "Base Address", "description": "Base token contract address" }, "quote_address": { "type": "string", "title": "Quote Address", "description": "Quote token contract address" }, "fee_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Fee Pct", "description": "Pool fee percentage (e.g., 0.25)" } }, "type": "object", "required": [ "connector_name", "type", "network", "address", "base", "quote", "base_address", "quote_address" ], "title": "AddPoolRequest", "description": "Request to add a liquidity pool" }, "AddTokenRequest": { "properties": { "address": { "type": "string", "title": "Address", "description": "Token contract address" }, "symbol": { "type": "string", "title": "Symbol", "description": "Token symbol" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name", "description": "Token name (defaults to symbol)" }, "decimals": { "type": "integer", "title": "Decimals", "description": "Number of decimals for the token" } }, "type": "object", "required": [ "address", "symbol", "decimals" ], "title": "AddTokenRequest", "description": "Request to add a custom token to Gateway" }, "AddTradingPairRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector (e.g., 'binance', 'binance_perpetual')" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair to add (e.g., 'BTC-USDT')" }, "account_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Account Name", "description": "Optional account name for trading connector preference" }, "timeout": { "type": "number", "maximum": 120, "minimum": 1, "title": "Timeout", "description": "Timeout in seconds for order book initialization", "default": 30 } }, "type": "object", "required": [ "connector_name", "trading_pair" ], "title": "AddTradingPairRequest", "description": "Request model for adding a trading pair to order book tracking" }, "BacktestingConfig": { "properties": { "start_time": { "type": "integer", "title": "Start Time", "default": 1735689600 }, "end_time": { "type": "integer", "title": "End Time", "default": 1738368000 }, "backtesting_resolution": { "type": "string", "title": "Backtesting Resolution", "default": "1m" }, "trade_cost": { "type": "number", "title": "Trade Cost", "default": 0.0006 }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "string" } ], "title": "Config" } }, "type": "object", "required": [ "config" ], "title": "BacktestingConfig" }, "CLMMAddLiquidityRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "CLMM connector (e.g., 'meteora', 'raydium', 'uniswap')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')" }, "position_address": { "type": "string", "title": "Position Address", "description": "Existing position address to add liquidity to" }, "base_token_amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Base Token Amount", "description": "Amount of base token to add" }, "quote_token_amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Quote Token Amount", "description": "Amount of quote token to add" }, "slippage_pct": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Slippage Pct", "description": "Maximum slippage percentage (default: 1.0)", "default": 1 }, "wallet_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address", "description": "Wallet address (optional, uses default if not provided)" } }, "type": "object", "required": [ "connector", "network", "position_address" ], "title": "CLMMAddLiquidityRequest", "description": "Request to add MORE liquidity to an EXISTING CLMM position" }, "CLMMClosePositionRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "CLMM connector (e.g., 'meteora', 'raydium', 'uniswap')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')" }, "position_address": { "type": "string", "title": "Position Address", "description": "Position address to close" }, "wallet_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address", "description": "Wallet address (optional, uses default if not provided)" } }, "type": "object", "required": [ "connector", "network", "position_address" ], "title": "CLMMClosePositionRequest", "description": "Request to CLOSE a CLMM position completely (removes all liquidity and closes position)" }, "CLMMCollectFeesRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "CLMM connector (e.g., 'meteora', 'raydium', 'uniswap')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')" }, "position_address": { "type": "string", "title": "Position Address", "description": "Position address to collect fees from" }, "wallet_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address", "description": "Wallet address (optional, uses default if not provided)" } }, "type": "object", "required": [ "connector", "network", "position_address" ], "title": "CLMMCollectFeesRequest", "description": "Request to collect fees from a CLMM position" }, "CLMMCollectFeesResponse": { "properties": { "transaction_hash": { "type": "string", "title": "Transaction Hash", "description": "Transaction hash" }, "position_address": { "type": "string", "title": "Position Address", "description": "Position address" }, "base_fee_collected": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Base Fee Collected", "description": "Base token fees collected" }, "quote_fee_collected": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Quote Fee Collected", "description": "Quote token fees collected" }, "status": { "type": "string", "title": "Status", "description": "Transaction status", "default": "submitted" } }, "type": "object", "required": [ "transaction_hash", "position_address" ], "title": "CLMMCollectFeesResponse", "description": "Response after collecting fees" }, "CLMMOpenPositionRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "CLMM connector (e.g., 'meteora', 'raydium', 'uniswap')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')" }, "pool_address": { "type": "string", "title": "Pool Address", "description": "Pool contract address" }, "lower_price": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Lower Price", "description": "Lower price for position range" }, "upper_price": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Upper Price", "description": "Upper price for position range" }, "base_token_amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Base Token Amount", "description": "Amount of base token to add" }, "quote_token_amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Quote Token Amount", "description": "Amount of quote token to add" }, "slippage_pct": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Slippage Pct", "description": "Maximum slippage percentage (default: 1.0)", "default": 1 }, "wallet_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address", "description": "Wallet address (optional, uses default if not provided)" }, "extra_params": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extra Params", "description": "Additional connector-specific parameters" } }, "type": "object", "required": [ "connector", "network", "pool_address", "lower_price", "upper_price" ], "title": "CLMMOpenPositionRequest", "description": "Request to open a new CLMM position with initial liquidity" }, "CLMMOpenPositionResponse": { "properties": { "transaction_hash": { "type": "string", "title": "Transaction Hash", "description": "Transaction hash" }, "position_address": { "type": "string", "title": "Position Address", "description": "Address of the newly created position" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "pool_address": { "type": "string", "title": "Pool Address", "description": "Pool address" }, "lower_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Lower Price", "description": "Lower price bound" }, "upper_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Upper Price", "description": "Upper price bound" }, "status": { "type": "string", "title": "Status", "description": "Transaction status", "default": "submitted" } }, "type": "object", "required": [ "transaction_hash", "position_address", "trading_pair", "pool_address", "lower_price", "upper_price" ], "title": "CLMMOpenPositionResponse", "description": "Response after opening a new CLMM position" }, "CLMMPoolBin": { "properties": { "binId": { "type": "integer", "title": "Binid", "description": "Bin identifier" }, "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "Price at this bin" }, "baseTokenAmount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Basetokenamount", "description": "Base token amount in bin" }, "quoteTokenAmount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Quotetokenamount", "description": "Quote token amount in bin" } }, "type": "object", "required": [ "binId", "price", "baseTokenAmount", "quoteTokenAmount" ], "title": "CLMMPoolBin", "description": "Individual bin in a CLMM pool (e.g., Meteora)", "example": { "base_token_amount": 19656.740028, "bin_id": -374, "price": 0.47366592950616504, "quote_token_amount": 18197.718539 } }, "CLMMPoolInfoResponse": { "properties": { "address": { "type": "string", "title": "Address", "description": "Pool address" }, "baseTokenAddress": { "type": "string", "title": "Basetokenaddress", "description": "Base token contract address" }, "quoteTokenAddress": { "type": "string", "title": "Quotetokenaddress", "description": "Quote token contract address" }, "binStep": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Binstep", "description": "Bin step (Meteora DLMM only)" }, "feePct": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Feepct", "description": "Pool fee percentage" }, "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "Current pool price" }, "baseTokenAmount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Basetokenamount", "description": "Total base token liquidity" }, "quoteTokenAmount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Quotetokenamount", "description": "Total quote token liquidity" }, "activeBinId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Activebinid", "description": "Currently active bin ID (Meteora DLMM only)" }, "dynamicFeePct": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Dynamicfeepct", "description": "Dynamic fee percentage" }, "minBinId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Minbinid", "description": "Minimum bin ID (Meteora-specific)" }, "maxBinId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Maxbinid", "description": "Maximum bin ID (Meteora-specific)" }, "bins": { "items": { "$ref": "#/components/schemas/CLMMPoolBin" }, "type": "array", "title": "Bins", "description": "List of bins with liquidity" } }, "type": "object", "required": [ "address", "baseTokenAddress", "quoteTokenAddress", "feePct", "price", "baseTokenAmount", "quoteTokenAmount" ], "title": "CLMMPoolInfoResponse", "description": "Response with detailed CLMM pool information", "example": { "active_bin_id": -374, "address": "5hbf9JP8k5zdrZp9pokPypFQoBse5mGCmW6nqodurGcd", "base_token_address": "METvsvVRapdj9cFLzq4Tr43xK4tAjQfwX76z3n6mWQL", "base_token_amount": 8645709.142366, "bin_step": 20, "bins": [], "dynamic_fee_pct": 0.2, "fee_pct": 0.2, "max_bin_id": 21835, "min_bin_id": -21835, "price": 0.47366592950616504, "quote_token_address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "quote_token_amount": 1095942.335132 } }, "CLMMPoolListItem": { "properties": { "address": { "type": "string", "title": "Address", "description": "Pool address" }, "name": { "type": "string", "title": "Name", "description": "Pool name (e.g., 'SOL-USDC')" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair derived from tokens" }, "mint_x": { "type": "string", "title": "Mint X", "description": "Base token mint address" }, "mint_y": { "type": "string", "title": "Mint Y", "description": "Quote token mint address" }, "bin_step": { "type": "integer", "title": "Bin Step", "description": "Bin step size" }, "current_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Current Price", "description": "Current pool price" }, "liquidity": { "type": "string", "title": "Liquidity", "description": "Total liquidity in pool" }, "reserve_x": { "type": "string", "title": "Reserve X", "description": "Base token reserves" }, "reserve_y": { "type": "string", "title": "Reserve Y", "description": "Quote token reserves" }, "reserve_x_amount": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Reserve X Amount", "description": "Base token reserves as decimal amount" }, "reserve_y_amount": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Reserve Y Amount", "description": "Quote token reserves as decimal amount" }, "base_fee_percentage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Fee Percentage", "description": "Base fee percentage" }, "max_fee_percentage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Max Fee Percentage", "description": "Maximum fee percentage" }, "protocol_fee_percentage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Protocol Fee Percentage", "description": "Protocol fee percentage" }, "apr": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Apr", "description": "Annual percentage rate" }, "apy": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Apy", "description": "Annual percentage yield" }, "farm_apr": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Farm Apr", "description": "Farming annual percentage rate" }, "farm_apy": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Farm Apy", "description": "Farming annual percentage yield" }, "volume_24h": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Volume 24H", "description": "24h trading volume" }, "fees_24h": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Fees 24H", "description": "24h fees collected" }, "today_fees": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Today Fees", "description": "Today's fees collected" }, "cumulative_trade_volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cumulative Trade Volume", "description": "Cumulative trade volume" }, "cumulative_fee_volume": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cumulative Fee Volume", "description": "Cumulative fee volume" }, "volume": { "anyOf": [ { "$ref": "#/components/schemas/TimeBasedMetrics" }, { "type": "null" } ], "description": "Volume across different time periods" }, "fees": { "anyOf": [ { "$ref": "#/components/schemas/TimeBasedMetrics" }, { "type": "null" } ], "description": "Fees across different time periods" }, "fee_tvl_ratio": { "anyOf": [ { "$ref": "#/components/schemas/TimeBasedMetrics" }, { "type": "null" } ], "description": "Fee-to-TVL ratio across different time periods" }, "reward_mint_x": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reward Mint X", "description": "Base token reward mint address" }, "reward_mint_y": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reward Mint Y", "description": "Quote token reward mint address" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags", "description": "Pool tags" }, "is_verified": { "type": "boolean", "title": "Is Verified", "description": "Whether tokens are verified", "default": false }, "is_blacklisted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Blacklisted", "description": "Whether pool is blacklisted" }, "hide": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Hide", "description": "Whether pool should be hidden" }, "launchpad": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Launchpad", "description": "Associated launchpad" } }, "type": "object", "required": [ "address", "name", "trading_pair", "mint_x", "mint_y", "bin_step", "current_price", "liquidity", "reserve_x", "reserve_y" ], "title": "CLMMPoolListItem", "description": "Individual pool item in CLMM pool listing" }, "CLMMPoolListResponse": { "properties": { "pools": { "items": { "$ref": "#/components/schemas/CLMMPoolListItem" }, "type": "array", "title": "Pools", "description": "List of available pools" }, "total": { "type": "integer", "title": "Total", "description": "Total number of pools" }, "page": { "type": "integer", "title": "Page", "description": "Current page number" }, "limit": { "type": "integer", "title": "Limit", "description": "Results per page" } }, "type": "object", "required": [ "pools", "total", "page", "limit" ], "title": "CLMMPoolListResponse", "description": "Response with list of available CLMM pools" }, "CLMMPositionInfo": { "properties": { "position_address": { "type": "string", "title": "Position Address", "description": "Position address" }, "pool_address": { "type": "string", "title": "Pool Address", "description": "Pool address" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "base_token": { "type": "string", "title": "Base Token", "description": "Base token symbol" }, "quote_token": { "type": "string", "title": "Quote Token", "description": "Quote token symbol" }, "base_token_amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Base Token Amount", "description": "Base token amount in position" }, "quote_token_amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Quote Token Amount", "description": "Quote token amount in position" }, "current_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Current Price", "description": "Current pool price" }, "lower_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Lower Price", "description": "Lower price bound" }, "upper_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Upper Price", "description": "Upper price bound" }, "base_fee_amount": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Base Fee Amount", "description": "Base token uncollected fees" }, "quote_fee_amount": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Quote Fee Amount", "description": "Quote token uncollected fees" }, "lower_bin_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Lower Bin Id", "description": "Lower bin ID (Meteora)" }, "upper_bin_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Upper Bin Id", "description": "Upper bin ID (Meteora)" }, "in_range": { "type": "boolean", "title": "In Range", "description": "Whether position is currently in range" } }, "type": "object", "required": [ "position_address", "pool_address", "trading_pair", "base_token", "quote_token", "base_token_amount", "quote_token_amount", "current_price", "lower_price", "upper_price", "in_range" ], "title": "CLMMPositionInfo", "description": "Information about a CLMM liquidity position" }, "CLMMPositionsOwnedRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "CLMM connector (e.g., 'meteora', 'raydium', 'uniswap')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')" }, "pool_address": { "type": "string", "title": "Pool Address", "description": "Pool contract address to filter positions" }, "wallet_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address", "description": "Wallet address (optional, uses default if not provided)" } }, "type": "object", "required": [ "connector", "network", "pool_address" ], "title": "CLMMPositionsOwnedRequest", "description": "Request to get all CLMM positions owned by a wallet for a specific pool" }, "CLMMRemoveLiquidityRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "CLMM connector (e.g., 'meteora', 'raydium', 'uniswap')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')" }, "position_address": { "type": "string", "title": "Position Address", "description": "Position address to remove liquidity from" }, "percentage": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Percentage", "description": "Percentage of liquidity to remove (0-100)" }, "wallet_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address", "description": "Wallet address (optional, uses default if not provided)" } }, "type": "object", "required": [ "connector", "network", "position_address", "percentage" ], "title": "CLMMRemoveLiquidityRequest", "description": "Request to remove SOME liquidity from a CLMM position (partial removal)" }, "CandlesConfigRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name" }, "trading_pair": { "type": "string", "title": "Trading Pair" }, "interval": { "type": "string", "title": "Interval", "default": "1m" }, "max_records": { "type": "integer", "title": "Max Records", "default": 500 } }, "type": "object", "required": [ "connector_name", "trading_pair" ], "title": "CandlesConfigRequest", "description": "The CandlesConfig class is a data class that stores the configuration of a Candle object.\nIt has the following attributes:\n- connector: str\n- trading_pair: str\n- interval: str\n- max_records: int" }, "Controller": { "properties": { "content": { "type": "string", "title": "Content", "description": "Controller source code" }, "type": { "anyOf": [ { "$ref": "#/components/schemas/ControllerType" }, { "type": "null" } ], "description": "Controller type (optional for flexibility)" } }, "type": "object", "required": [ "content" ], "title": "Controller", "description": "Controller file content" }, "ControllerType": { "type": "string", "enum": [ "directional_trading", "market_making", "generic" ], "title": "ControllerType", "description": "Types of controllers available" }, "CreateExecutorRequest": { "properties": { "account_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Account Name", "description": "Account name to use (defaults to master_account)" }, "executor_config": { "additionalProperties": true, "type": "object", "title": "Executor Config", "description": "Executor configuration. Must include 'type' field and executor-specific parameters." } }, "type": "object", "required": [ "executor_config" ], "title": "CreateExecutorRequest", "description": "Request to create a new executor.", "examples": [ { "description": "Create a position executor with triple barrier", "summary": "Position Executor", "value": { "account_name": "master_account", "executor_config": { "amount": "0.01", "connector_name": "binance_perpetual", "leverage": 10, "side": "BUY", "trading_pair": "BTC-USDT", "triple_barrier_config": { "stop_loss": "0.02", "take_profit": "0.04", "time_limit": 3600 }, "type": "position_executor" } } }, { "description": "Create an LP position on a CLMM DEX", "summary": "LP Executor", "value": { "account_name": "master_account", "executor_config": { "base_amount": "0", "connector_name": "solana-mainnet-beta", "extra_params": { "strategyType": 0 }, "keep_position": false, "lower_price": "80", "lp_provider": "meteora/clmm", "pool_address": "HTvjzsfX3yU6BUodCjZ5vZkUrAxMDTrBs3CJaq43ashR", "quote_amount": "10.0", "side": 1, "type": "lp_executor", "upper_price": "100" } } } ] }, "CreateExecutorResponse": { "properties": { "executor_id": { "type": "string", "title": "Executor Id", "description": "Unique executor identifier" }, "executor_type": { "type": "string", "title": "Executor Type", "description": "Type of executor created" }, "connector_name": { "type": "string", "title": "Connector Name", "description": "Connector name" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "status": { "type": "string", "title": "Status", "description": "Initial status" }, "created_at": { "type": "string", "title": "Created At", "description": "Creation timestamp (ISO format)" } }, "type": "object", "required": [ "executor_id", "executor_type", "connector_name", "trading_pair", "status", "created_at" ], "title": "CreateExecutorResponse", "description": "Response after creating an executor." }, "CreateWalletRequest": { "properties": { "chain": { "type": "string", "title": "Chain", "description": "Blockchain chain (e.g., 'solana', 'ethereum')" }, "set_default": { "type": "boolean", "title": "Set Default", "description": "Set as default wallet for this chain", "default": true } }, "type": "object", "required": [ "chain" ], "title": "CreateWalletRequest", "description": "Request to create a new wallet in Gateway" }, "DockerImage": { "properties": { "image_name": { "type": "string", "title": "Image Name", "description": "Docker image name with optional tag (e.g., 'hummingbot/hummingbot:latest')" } }, "type": "object", "required": [ "image_name" ], "title": "DockerImage" }, "ExecutorDetailResponse": { "properties": { "executor_id": { "type": "string", "title": "Executor Id", "description": "Unique executor identifier" }, "executor_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Executor Type", "description": "Type of executor" }, "account_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Account Name", "description": "Account name" }, "connector_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Connector Name", "description": "Connector name" }, "trading_pair": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trading Pair", "description": "Trading pair" }, "side": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Side", "description": "Trade side (BUY/SELL) if applicable" }, "status": { "type": "string", "title": "Status", "description": "Current status (RUNNING, TERMINATED, etc.)" }, "is_active": { "type": "boolean", "title": "Is Active", "description": "Whether the executor is active" }, "is_trading": { "type": "boolean", "title": "Is Trading", "description": "Whether the executor has open trades" }, "timestamp": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Timestamp", "description": "Creation timestamp (Unix)" }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At", "description": "Creation timestamp (ISO format)" }, "close_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Close Type", "description": "How the executor was closed (if applicable)" }, "close_timestamp": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Close Timestamp", "description": "Close timestamp (Unix)" }, "controller_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Controller Id", "description": "ID of the controller that spawned this executor" }, "net_pnl_quote": { "type": "number", "title": "Net Pnl Quote", "description": "Net PnL in quote currency" }, "net_pnl_pct": { "type": "number", "title": "Net Pnl Pct", "description": "Net PnL percentage" }, "cum_fees_quote": { "type": "number", "title": "Cum Fees Quote", "description": "Cumulative fees in quote currency" }, "filled_amount_quote": { "type": "number", "title": "Filled Amount Quote", "description": "Total filled amount in quote currency" }, "error_count": { "type": "integer", "title": "Error Count", "description": "Number of ERROR-level log entries captured", "default": 0 }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error", "description": "Most recent error message, if any" }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config", "description": "Full executor configuration" }, "custom_info": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Custom Info", "description": "Executor-specific custom information" } }, "type": "object", "required": [ "executor_id", "executor_type", "account_name", "connector_name", "trading_pair", "status", "is_active", "is_trading", "net_pnl_quote", "net_pnl_pct", "cum_fees_quote", "filled_amount_quote" ], "title": "ExecutorDetailResponse", "description": "Detailed response for a single executor.", "example": { "account_name": "master_account", "connector_name": "binance_perpetual", "created_at": "2024-01-15T10:30:00Z", "cum_fees_quote": 1.25, "executor_id": "abc123...", "executor_type": "position_executor", "filled_amount_quote": 5000, "is_active": true, "is_trading": true, "net_pnl_pct": 2.5, "net_pnl_quote": 125.5, "side": "BUY", "status": "RUNNING", "timestamp": 1705315800, "trading_pair": "BTC-USDT" } }, "ExecutorFilterRequest": { "properties": { "limit": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Limit", "description": "Number of items per page", "default": 100 }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor", "description": "Cursor for next page" }, "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "Filter by account names" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "Filter by connector names" }, "trading_pairs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Trading Pairs", "description": "Filter by trading pairs" }, "executor_types": { "anyOf": [ { "items": { "type": "string", "enum": [ "position_executor", "grid_executor", "dca_executor", "arbitrage_executor", "twap_executor", "xemm_executor", "order_executor", "lp_executor" ] }, "type": "array" }, { "type": "null" } ], "title": "Executor Types", "description": "Filter by executor types" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status", "description": "Filter by status (RUNNING, TERMINATED, etc.)" } }, "type": "object", "title": "ExecutorFilterRequest", "description": "Request to filter and list executors." }, "ExecutorLogEntry": { "properties": { "timestamp": { "type": "string", "title": "Timestamp", "description": "ISO-format timestamp" }, "level": { "type": "string", "title": "Level", "description": "Log level (DEBUG, INFO, WARNING, ERROR)" }, "message": { "type": "string", "title": "Message", "description": "Log message" }, "exc_info": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Exc Info", "description": "Exception traceback if present" } }, "type": "object", "required": [ "timestamp", "level", "message" ], "title": "ExecutorLogEntry", "description": "A single log entry from an executor." }, "ExecutorLogsResponse": { "properties": { "executor_id": { "type": "string", "title": "Executor Id", "description": "Executor identifier" }, "logs": { "items": { "$ref": "#/components/schemas/ExecutorLogEntry" }, "type": "array", "title": "Logs", "description": "Log entries" }, "total_count": { "type": "integer", "title": "Total Count", "description": "Total number of log entries (before limit)" } }, "type": "object", "required": [ "executor_id", "logs", "total_count" ], "title": "ExecutorLogsResponse", "description": "Response for executor log entries." }, "ExecutorsSummaryResponse": { "properties": { "total_active": { "type": "integer", "title": "Total Active", "description": "Number of active executors" }, "total_pnl_quote": { "type": "number", "title": "Total Pnl Quote", "description": "Total PnL across active executors" }, "total_volume_quote": { "type": "number", "title": "Total Volume Quote", "description": "Total volume across active executors" }, "by_type": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Type", "description": "Executor count by type" }, "by_connector": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Connector", "description": "Executor count by connector" }, "by_status": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Status", "description": "Executor count by status" } }, "type": "object", "required": [ "total_active", "total_pnl_quote", "total_volume_quote", "by_type", "by_connector", "by_status" ], "title": "ExecutorsSummaryResponse", "description": "Summary of active executors.", "example": { "by_connector": { "binance": 1, "binance_perpetual": 4 }, "by_status": { "RUNNING": 5 }, "by_type": { "grid_executor": 2, "position_executor": 3 }, "total_active": 5, "total_pnl_quote": 1234.56, "total_volume_quote": 50000 } }, "FundingInfoRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair to get funding info for" } }, "type": "object", "required": [ "connector_name", "trading_pair" ], "title": "FundingInfoRequest", "description": "Request model for getting funding info" }, "FundingInfoResponse": { "properties": { "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "funding_rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Funding Rate", "description": "Current funding rate" }, "next_funding_time": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Next Funding Time", "description": "Next funding time timestamp" }, "mark_price": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Mark Price", "description": "Mark price" }, "index_price": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Index Price", "description": "Index price" } }, "type": "object", "required": [ "trading_pair", "funding_rate", "next_funding_time", "mark_price", "index_price" ], "title": "FundingInfoResponse", "description": "Response for funding info" }, "FundingPaymentFilterRequest": { "properties": { "limit": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Limit", "description": "Number of items per page", "default": 100 }, "start_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Time", "description": "Start time as Unix timestamp in milliseconds" }, "end_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "End Time", "description": "End time as Unix timestamp in milliseconds" }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor", "description": "Cursor for next page" }, "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" }, "trading_pair": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trading Pair", "description": "Filter by trading pair" } }, "type": "object", "title": "FundingPaymentFilterRequest", "description": "Request model for filtering funding payments" }, "GatewayConfig": { "properties": { "passphrase": { "type": "string", "title": "Passphrase", "description": "Gateway passphrase for configuration encryption" }, "image": { "type": "string", "title": "Image", "description": "Docker image for Gateway", "default": "hummingbot/gateway:latest" }, "port": { "type": "integer", "title": "Port", "description": "Port for Gateway API", "default": 15888 }, "dev_mode": { "type": "boolean", "title": "Dev Mode", "description": "Enable development mode", "default": true } }, "type": "object", "required": [ "passphrase" ], "title": "GatewayConfig", "description": "Configuration for Gateway container deployment" }, "GatewayStatus": { "properties": { "running": { "type": "boolean", "title": "Running", "description": "Whether Gateway container is running" }, "container_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Container Id", "description": "Container ID if running" }, "image": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image", "description": "Image used for the container" }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At", "description": "Container creation timestamp" }, "port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Port", "description": "Port Gateway is running on" } }, "type": "object", "required": [ "running" ], "title": "GatewayStatus", "description": "Status information for Gateway instance" }, "GatewayWalletCredential": { "properties": { "chain": { "type": "string", "title": "Chain", "description": "Blockchain chain (e.g., 'solana', 'ethereum')" }, "private_key": { "type": "string", "title": "Private Key", "description": "Wallet private key" }, "set_default": { "type": "boolean", "title": "Set Default", "description": "Set as default wallet for this chain", "default": true } }, "type": "object", "required": [ "chain", "private_key" ], "title": "GatewayWalletCredential", "description": "Credentials for adding an existing wallet to Gateway" }, "GlobalTokenConfig": { "properties": { "global_token_name": { "type": "string", "title": "Global Token Name", "description": "The token to use as global quote (e.g., USDT, USD, BTC)", "default": "USDT" }, "global_token_symbol": { "type": "string", "title": "Global Token Symbol", "description": "Symbol to display for the global token", "default": "$" } }, "type": "object", "title": "GlobalTokenConfig", "description": "Global token configuration for displaying values." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HistoricalCandlesConfig": { "properties": { "connector_name": { "type": "string", "title": "Connector Name" }, "trading_pair": { "type": "string", "title": "Trading Pair" }, "interval": { "type": "string", "title": "Interval" }, "start_time": { "type": "integer", "title": "Start Time" }, "end_time": { "type": "integer", "title": "End Time" } }, "type": "object", "required": [ "connector_name", "trading_pair", "interval", "start_time", "end_time" ], "title": "HistoricalCandlesConfig" }, "LeverageRequest": { "properties": { "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair (e.g., BTC-USDT)" }, "leverage": { "type": "integer", "maximum": 125, "minimum": 1, "title": "Leverage", "description": "Leverage value (typically 1-125)" } }, "type": "object", "required": [ "trading_pair", "leverage" ], "title": "LeverageRequest", "description": "Request model for setting leverage on perpetual connectors" }, "OrderBookLevel": { "properties": { "price": { "type": "number", "title": "Price", "description": "Price level" }, "amount": { "type": "number", "title": "Amount", "description": "Amount at this price level" } }, "type": "object", "required": [ "price", "amount" ], "title": "OrderBookLevel", "description": "Single order book level" }, "OrderBookQueryResult": { "properties": { "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "is_buy": { "type": "boolean", "title": "Is Buy", "description": "Query side (buy/sell)" }, "query_volume": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Query Volume", "description": "Queried volume" }, "query_price": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Query Price", "description": "Queried price" }, "result_price": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Result Price", "description": "Resulting price" }, "result_volume": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Result Volume", "description": "Resulting volume" }, "result_quote_volume": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Result Quote Volume", "description": "Resulting quote volume" }, "average_price": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Average Price", "description": "Average/VWAP price" }, "timestamp": { "type": "number", "title": "Timestamp", "description": "Query timestamp" } }, "type": "object", "required": [ "trading_pair", "is_buy", "timestamp" ], "title": "OrderBookQueryResult", "description": "Response for order book query operations" }, "OrderBookRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "depth": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Depth", "description": "Number of price levels to return", "default": 10 } }, "type": "object", "required": [ "connector_name", "trading_pair" ], "title": "OrderBookRequest", "description": "Request model for getting order book data" }, "OrderBookResponse": { "properties": { "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "bids": { "items": { "$ref": "#/components/schemas/OrderBookLevel" }, "type": "array", "title": "Bids", "description": "Bid levels (highest to lowest)" }, "asks": { "items": { "$ref": "#/components/schemas/OrderBookLevel" }, "type": "array", "title": "Asks", "description": "Ask levels (lowest to highest)" }, "timestamp": { "type": "number", "title": "Timestamp", "description": "Snapshot timestamp" } }, "type": "object", "required": [ "trading_pair", "bids", "asks", "timestamp" ], "title": "OrderBookResponse", "description": "Response for order book data" }, "OrderFilterRequest": { "properties": { "limit": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Limit", "description": "Number of items per page", "default": 100 }, "start_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Time", "description": "Start time as Unix timestamp in milliseconds" }, "end_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "End Time", "description": "End time as Unix timestamp in milliseconds" }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor", "description": "Cursor for next page" }, "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" }, "trading_pairs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Trading Pairs", "description": "List of trading pairs to filter by" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status", "description": "Order status filter" } }, "type": "object", "title": "OrderFilterRequest", "description": "Request model for filtering orders with multiple criteria" }, "PaginatedResponse": { "properties": { "data": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Data" }, "pagination": { "additionalProperties": true, "type": "object", "title": "Pagination" } }, "type": "object", "required": [ "data", "pagination" ], "title": "PaginatedResponse", "description": "Generic paginated response.", "example": { "data": [], "pagination": { "has_more": true, "limit": 100, "next_cursor": "2024-01-10T12:00:00", "total_count": 500 } } }, "PortfolioDistributionFilterRequest": { "properties": { "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" } }, "type": "object", "title": "PortfolioDistributionFilterRequest", "description": "Request model for filtering portfolio distribution" }, "PortfolioHistoryFilterRequest": { "properties": { "limit": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Limit", "description": "Number of items per page", "default": 100 }, "start_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Time", "description": "Start time as Unix timestamp in milliseconds" }, "end_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "End Time", "description": "End time as Unix timestamp in milliseconds" }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor", "description": "Cursor for next page" }, "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" }, "interval": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Interval", "description": "Data sampling interval: 5m, 15m, 30m, 1h, 4h, 12h, 1d. Default is 5m (raw data)", "default": "5m" } }, "type": "object", "title": "PortfolioHistoryFilterRequest", "description": "Request model for filtering portfolio history" }, "PortfolioStateFilterRequest": { "properties": { "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" }, "skip_gateway": { "type": "boolean", "title": "Skip Gateway", "description": "Skip Gateway wallet balance updates for faster CEX-only queries", "default": false }, "refresh": { "type": "boolean", "title": "Refresh", "description": "If True, refresh balances before returning. If False, return cached state", "default": false } }, "type": "object", "title": "PortfolioStateFilterRequest", "description": "Request model for filtering portfolio state" }, "PositionFilterRequest": { "properties": { "limit": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Limit", "description": "Number of items per page", "default": 100 }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor", "description": "Cursor for next page" }, "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" } }, "type": "object", "title": "PositionFilterRequest", "description": "Request model for filtering positions" }, "PositionHoldResponse": { "properties": { "trading_pair": { "type": "string", "title": "Trading Pair" }, "connector_name": { "type": "string", "title": "Connector Name" }, "account_name": { "type": "string", "title": "Account Name" }, "buy_amount_base": { "type": "number", "title": "Buy Amount Base" }, "buy_amount_quote": { "type": "number", "title": "Buy Amount Quote" }, "sell_amount_base": { "type": "number", "title": "Sell Amount Base" }, "sell_amount_quote": { "type": "number", "title": "Sell Amount Quote" }, "net_amount_base": { "type": "number", "title": "Net Amount Base" }, "buy_breakeven_price": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Buy Breakeven Price" }, "sell_breakeven_price": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Sell Breakeven Price" }, "matched_amount_base": { "type": "number", "title": "Matched Amount Base" }, "unmatched_amount_base": { "type": "number", "title": "Unmatched Amount Base" }, "position_side": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Position Side" }, "realized_pnl_quote": { "type": "number", "title": "Realized Pnl Quote" }, "unrealized_pnl_quote": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Unrealized Pnl Quote" }, "executor_count": { "type": "integer", "title": "Executor Count" }, "executor_ids": { "items": { "type": "string" }, "type": "array", "title": "Executor Ids" }, "last_updated": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Updated" } }, "type": "object", "required": [ "trading_pair", "connector_name", "account_name", "buy_amount_base", "buy_amount_quote", "sell_amount_base", "sell_amount_quote", "net_amount_base", "buy_breakeven_price", "sell_breakeven_price", "matched_amount_base", "unmatched_amount_base", "position_side", "realized_pnl_quote", "executor_count", "executor_ids", "last_updated" ], "title": "PositionHoldResponse", "description": "API response model for PositionHold." }, "PositionModeRequest": { "properties": { "position_mode": { "type": "string", "title": "Position Mode", "description": "Position mode (HEDGE or ONEWAY)" } }, "type": "object", "required": [ "position_mode" ], "title": "PositionModeRequest", "description": "Request model for setting position mode on perpetual connectors" }, "PositionsSummaryResponse": { "properties": { "total_positions": { "type": "integer", "title": "Total Positions", "description": "Number of active position holds" }, "total_realized_pnl": { "type": "number", "title": "Total Realized Pnl", "description": "Total realized PnL across all positions" }, "total_unrealized_pnl": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Total Unrealized Pnl", "description": "Total unrealized PnL (None if no rates available)" }, "positions": { "items": { "$ref": "#/components/schemas/PositionHoldResponse" }, "type": "array", "title": "Positions", "description": "List of position holds" } }, "type": "object", "required": [ "total_positions", "total_realized_pnl", "positions" ], "title": "PositionsSummaryResponse", "description": "Summary of all held positions." }, "PriceForQuoteVolumeRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "is_buy": { "type": "boolean", "title": "Is Buy", "description": "True for buy side, False for sell side" }, "quote_volume": { "type": "number", "title": "Quote Volume", "description": "Quote volume to query price for" } }, "type": "object", "required": [ "connector_name", "trading_pair", "is_buy", "quote_volume" ], "title": "PriceForQuoteVolumeRequest", "description": "Request model for getting price for a specific quote volume" }, "PriceForVolumeRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "is_buy": { "type": "boolean", "title": "Is Buy", "description": "True for buy side, False for sell side" }, "volume": { "type": "number", "title": "Volume", "description": "Volume to query price for" } }, "type": "object", "required": [ "connector_name", "trading_pair", "is_buy", "volume" ], "title": "PriceForVolumeRequest", "description": "Request model for getting price for a specific volume" }, "PriceRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pairs": { "items": { "type": "string" }, "type": "array", "title": "Trading Pairs", "description": "List of trading pairs to get prices for" } }, "type": "object", "required": [ "connector_name", "trading_pairs" ], "title": "PriceRequest", "description": "Request model for getting prices" }, "PricesResponse": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "Connector name" }, "prices": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Prices", "description": "Trading pair to price mapping" }, "timestamp": { "type": "number", "title": "Timestamp", "description": "Response timestamp" } }, "type": "object", "required": [ "connector", "prices", "timestamp" ], "title": "PricesResponse", "description": "Response for prices data" }, "QuoteVolumeForPriceRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "is_buy": { "type": "boolean", "title": "Is Buy", "description": "True for buy side, False for sell side" }, "price": { "type": "number", "title": "Price", "description": "Price to query quote volume for" } }, "type": "object", "required": [ "connector_name", "trading_pair", "is_buy", "price" ], "title": "QuoteVolumeForPriceRequest", "description": "Request model for getting quote volume at a specific price" }, "RateOracleConfig": { "properties": { "rate_oracle_source": { "$ref": "#/components/schemas/RateOracleSourceConfig", "description": "Rate oracle source configuration" }, "global_token": { "$ref": "#/components/schemas/GlobalTokenConfig", "description": "Global token configuration" } }, "type": "object", "title": "RateOracleConfig", "description": "Complete rate oracle configuration." }, "RateOracleConfigResponse": { "properties": { "rate_oracle_source": { "$ref": "#/components/schemas/RateOracleSourceConfig", "description": "Current rate oracle source configuration" }, "global_token": { "$ref": "#/components/schemas/GlobalTokenConfig", "description": "Current global token configuration" }, "available_sources": { "items": { "type": "string" }, "type": "array", "title": "Available Sources", "description": "List of available rate oracle sources" } }, "type": "object", "required": [ "rate_oracle_source", "global_token", "available_sources" ], "title": "RateOracleConfigResponse", "description": "Response for rate oracle configuration GET endpoint." }, "RateOracleConfigUpdateRequest": { "properties": { "rate_oracle_source": { "anyOf": [ { "$ref": "#/components/schemas/RateOracleSourceConfig" }, { "type": "null" } ], "description": "New rate oracle source configuration (optional)" }, "global_token": { "anyOf": [ { "$ref": "#/components/schemas/GlobalTokenConfig" }, { "type": "null" } ], "description": "New global token configuration (optional)" } }, "type": "object", "title": "RateOracleConfigUpdateRequest", "description": "Request model for updating rate oracle configuration." }, "RateOracleConfigUpdateResponse": { "properties": { "success": { "type": "boolean", "title": "Success", "description": "Whether the update was successful" }, "message": { "type": "string", "title": "Message", "description": "Status message" }, "config": { "$ref": "#/components/schemas/RateOracleConfig", "description": "Updated configuration" } }, "type": "object", "required": [ "success", "message", "config" ], "title": "RateOracleConfigUpdateResponse", "description": "Response for rate oracle configuration update." }, "RateOracleSourceConfig": { "properties": { "name": { "$ref": "#/components/schemas/RateOracleSourceEnum", "description": "The rate oracle source to use for price data", "default": "binance" } }, "type": "object", "title": "RateOracleSourceConfig", "description": "Rate oracle source configuration." }, "RateOracleSourceEnum": { "type": "string", "enum": [ "binance", "binance_us", "coin_gecko", "coin_cap", "kucoin", "ascend_ex", "gate_io", "coinbase_advanced_trade", "cube", "dexalot", "hyperliquid", "derive", "tegro" ], "title": "RateOracleSourceEnum", "description": "Available rate oracle sources." }, "RateRequest": { "properties": { "trading_pairs": { "items": { "type": "string" }, "type": "array", "title": "Trading Pairs", "description": "List of trading pairs to get rates for (e.g., ['BTC-USDT', 'ETH-USDT'])" } }, "type": "object", "required": [ "trading_pairs" ], "title": "RateRequest", "description": "Request for getting rates." }, "RateResponse": { "properties": { "source": { "type": "string", "title": "Source", "description": "Rate oracle source used" }, "quote_token": { "type": "string", "title": "Quote Token", "description": "Quote token used" }, "rates": { "additionalProperties": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "type": "object", "title": "Rates", "description": "Mapping of trading pairs to their rates (None if rate not found)" } }, "type": "object", "required": [ "source", "quote_token", "rates" ], "title": "RateResponse", "description": "Response containing rates for trading pairs." }, "RemoveTradingPairRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair to remove" }, "account_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Account Name", "description": "Optional account name for trading connector preference" } }, "type": "object", "required": [ "connector_name", "trading_pair" ], "title": "RemoveTradingPairRequest", "description": "Request model for removing a trading pair from order book tracking" }, "Script": { "properties": { "content": { "type": "string", "title": "Content", "description": "Script source code" } }, "type": "object", "required": [ "content" ], "title": "Script", "description": "Script file content" }, "SendTransactionRequest": { "properties": { "chain": { "type": "string", "title": "Chain", "description": "Blockchain chain (e.g., 'solana', 'ethereum')" }, "network": { "type": "string", "title": "Network", "description": "Network (e.g., 'mainnet-beta', 'mainnet')" }, "address": { "type": "string", "title": "Address", "description": "Sender wallet address" }, "to_address": { "type": "string", "title": "To Address", "description": "Recipient address" }, "amount": { "type": "string", "title": "Amount", "description": "Amount to send (in native token units)" } }, "type": "object", "required": [ "chain", "network", "address", "to_address", "amount" ], "title": "SendTransactionRequest", "description": "Request to send a native token transaction" }, "SetDefaultWalletRequest": { "properties": { "chain": { "type": "string", "title": "Chain", "description": "Blockchain chain (e.g., 'solana', 'ethereum')" }, "address": { "type": "string", "title": "Address", "description": "Wallet address to set as default" } }, "type": "object", "required": [ "chain", "address" ], "title": "SetDefaultWalletRequest", "description": "Request to set the default wallet for a chain" }, "ShowPrivateKeyRequest": { "properties": { "chain": { "type": "string", "title": "Chain", "description": "Blockchain chain (e.g., 'solana', 'ethereum')" }, "address": { "type": "string", "title": "Address", "description": "Wallet address" }, "passphrase": { "type": "string", "title": "Passphrase", "description": "Gateway passphrase for decryption" } }, "type": "object", "required": [ "chain", "address", "passphrase" ], "title": "ShowPrivateKeyRequest", "description": "Request to show private key for a wallet" }, "SingleRateResponse": { "properties": { "trading_pair": { "type": "string", "title": "Trading Pair", "description": "The trading pair" }, "rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Rate", "description": "The rate (None if not found)" }, "source": { "type": "string", "title": "Source", "description": "Rate oracle source used" }, "quote_token": { "type": "string", "title": "Quote Token", "description": "Quote token used" } }, "type": "object", "required": [ "trading_pair", "rate", "source", "quote_token" ], "title": "SingleRateResponse", "description": "Response for a single trading pair rate." }, "StartBotAction": { "properties": { "bot_name": { "type": "string", "title": "Bot Name", "description": "Name of the bot instance to act upon" }, "log_level": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Log Level", "description": "Logging level (DEBUG, INFO, WARNING, ERROR)" }, "script": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Script", "description": "Script name to run (without .py extension)" }, "conf": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Conf", "description": "Configuration file name (without .yml extension)" }, "async_backend": { "type": "boolean", "title": "Async Backend", "description": "Whether to run in async backend mode", "default": false } }, "type": "object", "required": [ "bot_name" ], "title": "StartBotAction", "description": "Action to start a bot" }, "StopBotAction": { "properties": { "bot_name": { "type": "string", "title": "Bot Name", "description": "Name of the bot instance to act upon" }, "skip_order_cancellation": { "type": "boolean", "title": "Skip Order Cancellation", "description": "Whether to skip cancelling open orders when stopping", "default": false }, "async_backend": { "type": "boolean", "title": "Async Backend", "description": "Whether to run in async backend mode", "default": false } }, "type": "object", "required": [ "bot_name" ], "title": "StopBotAction", "description": "Action to stop a bot" }, "StopExecutorRequest": { "properties": { "keep_position": { "type": "boolean", "title": "Keep Position", "description": "Whether to keep the position open (for position executors)", "default": false } }, "type": "object", "title": "StopExecutorRequest", "description": "Request to stop an executor." }, "StopExecutorResponse": { "properties": { "executor_id": { "type": "string", "title": "Executor Id", "description": "Executor identifier" }, "status": { "type": "string", "title": "Status", "description": "New status (usually 'stopping')" }, "keep_position": { "type": "boolean", "title": "Keep Position", "description": "Whether position was kept open" } }, "type": "object", "required": [ "executor_id", "status", "keep_position" ], "title": "StopExecutorResponse", "description": "Response after stopping an executor." }, "SwapExecuteRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "DEX router connector (e.g., 'jupiter', '0x')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair (e.g., 'SOL-USDC')" }, "side": { "type": "string", "title": "Side", "description": "Trade side: 'BUY' or 'SELL'" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount to swap" }, "slippage_pct": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Slippage Pct", "description": "Maximum slippage percentage (default: 1.0)", "default": 1 }, "wallet_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Wallet Address", "description": "Wallet address (optional, uses default if not provided)" } }, "type": "object", "required": [ "connector", "network", "trading_pair", "side", "amount" ], "title": "SwapExecuteRequest", "description": "Request to execute a swap" }, "SwapExecuteResponse": { "properties": { "transaction_hash": { "type": "string", "title": "Transaction Hash", "description": "Transaction hash" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "side": { "type": "string", "title": "Side", "description": "Trade side" }, "amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "description": "Amount swapped" }, "status": { "type": "string", "title": "Status", "description": "Transaction status", "default": "submitted" } }, "type": "object", "required": [ "transaction_hash", "trading_pair", "side", "amount" ], "title": "SwapExecuteResponse", "description": "Response after executing swap" }, "SwapQuoteRequest": { "properties": { "connector": { "type": "string", "title": "Connector", "description": "DEX router connector (e.g., 'jupiter', '0x')" }, "network": { "type": "string", "title": "Network", "description": "Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta', 'ethereum-mainnet')" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair in BASE-QUOTE format (e.g., 'SOL-USDC')" }, "side": { "type": "string", "title": "Side", "description": "Trade side: 'BUY' or 'SELL'" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount to swap (in base token for SELL, quote token for BUY)" }, "slippage_pct": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Slippage Pct", "description": "Maximum slippage percentage (default: 1.0)", "default": 1 } }, "type": "object", "required": [ "connector", "network", "trading_pair", "side", "amount" ], "title": "SwapQuoteRequest", "description": "Request for swap price quote" }, "SwapQuoteResponse": { "properties": { "base": { "type": "string", "title": "Base", "description": "Base token symbol" }, "quote": { "type": "string", "title": "Quote", "description": "Quote token symbol" }, "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "Quoted price (base/quote)" }, "amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "description": "Amount specified in request (BUY: base amount to receive, SELL: base amount to sell)" }, "amount_in": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Amount In", "description": "Actual input amount (BUY: quote to spend, SELL: base to sell)" }, "amount_out": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Amount Out", "description": "Actual output amount (BUY: base to receive, SELL: quote to receive)" }, "expected_amount": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Expected Amount", "description": "Deprecated: use amount_out instead" }, "slippage_pct": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Slippage Pct", "description": "Applied slippage percentage" }, "gas_estimate": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Gas Estimate", "description": "Estimated gas cost" } }, "type": "object", "required": [ "base", "quote", "price", "amount", "slippage_pct" ], "title": "SwapQuoteResponse", "description": "Response with swap quote details" }, "TimeBasedMetrics": { "properties": { "min_30": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Min 30", "description": "30 minute metric" }, "hour_1": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Hour 1", "description": "1 hour metric" }, "hour_2": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Hour 2", "description": "2 hour metric" }, "hour_4": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Hour 4", "description": "4 hour metric" }, "hour_12": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Hour 12", "description": "12 hour metric" }, "hour_24": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Hour 24", "description": "24 hour metric" } }, "type": "object", "title": "TimeBasedMetrics", "description": "Time-based metrics (volume, fees, fee-to-TVL ratio) for different time periods" }, "TradeFilterRequest": { "properties": { "limit": { "type": "integer", "maximum": 1000, "minimum": 1, "title": "Limit", "description": "Number of items per page", "default": 100 }, "start_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Time", "description": "Start time as Unix timestamp in milliseconds" }, "end_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "End Time", "description": "End time as Unix timestamp in milliseconds" }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor", "description": "Cursor for next page" }, "account_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Account Names", "description": "List of account names to filter by" }, "connector_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Connector Names", "description": "List of connector names to filter by" }, "trading_pairs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Trading Pairs", "description": "List of trading pairs to filter by" }, "trade_types": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Trade Types", "description": "List of trade types to filter by (BUY/SELL)" } }, "type": "object", "title": "TradeFilterRequest", "description": "Request model for filtering trades" }, "TradeRequest": { "properties": { "account_name": { "type": "string", "title": "Account Name", "description": "Name of the account to trade with" }, "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector/exchange" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair (e.g., BTC-USDT)" }, "trade_type": { "type": "string", "enum": [ "BUY", "SELL" ], "title": "Trade Type", "description": "Whether to buy or sell" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount to trade" }, "order_type": { "type": "string", "enum": [ "LIMIT", "MARKET", "LIMIT_MAKER" ], "title": "Order Type", "description": "Type of order", "default": "LIMIT" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Price", "description": "Price for limit orders" }, "position_action": { "type": "string", "enum": [ "OPEN", "CLOSE" ], "title": "Position Action", "description": "Position action for perpetual contracts (OPEN/CLOSE)", "default": "OPEN" } }, "type": "object", "required": [ "account_name", "connector_name", "trading_pair", "trade_type", "amount" ], "title": "TradeRequest", "description": "Request model for placing trades" }, "TradeResponse": { "properties": { "order_id": { "type": "string", "title": "Order Id", "description": "Client order ID assigned by the connector" }, "account_name": { "type": "string", "title": "Account Name", "description": "Account used for the trade" }, "connector_name": { "type": "string", "title": "Connector Name", "description": "Connector used for the trade" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "trade_type": { "type": "string", "title": "Trade Type", "description": "Trade type" }, "amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "description": "Trade amount" }, "order_type": { "type": "string", "title": "Order Type", "description": "Order type" }, "price": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Price", "description": "Order price" }, "status": { "type": "string", "title": "Status", "description": "Order status", "default": "submitted" } }, "type": "object", "required": [ "order_id", "account_name", "connector_name", "trading_pair", "trade_type", "amount", "order_type", "price" ], "title": "TradeResponse", "description": "Response model for trade execution" }, "TradingPairResponse": { "properties": { "success": { "type": "boolean", "title": "Success", "description": "Whether the operation succeeded" }, "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair that was added/removed" }, "message": { "type": "string", "title": "Message", "description": "Status message" } }, "type": "object", "required": [ "success", "connector_name", "trading_pair", "message" ], "title": "TradingPairResponse", "description": "Response model for trading pair management operations" }, "V2ControllerDeployment": { "properties": { "instance_name": { "type": "string", "title": "Instance Name", "description": "Unique name for the bot instance" }, "credentials_profile": { "type": "string", "title": "Credentials Profile", "description": "Name of the credentials profile to use" }, "controllers_config": { "items": { "type": "string" }, "type": "array", "title": "Controllers Config", "description": "List of controller configuration files to use (without .yml extension)" }, "max_global_drawdown_quote": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Max Global Drawdown Quote", "description": "Maximum allowed global drawdown in quote usually USDT" }, "max_controller_drawdown_quote": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Max Controller Drawdown Quote", "description": "Maximum allowed per-controller drawdown in quote usually USDT" }, "image": { "type": "string", "title": "Image", "description": "Docker image for the Hummingbot instance", "default": "hummingbot/hummingbot:latest" }, "script_config": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Script Config", "description": "Generated script configuration file name" }, "headless": { "type": "boolean", "title": "Headless", "description": "Run in headless mode (no UI)", "default": false } }, "type": "object", "required": [ "instance_name", "credentials_profile", "controllers_config" ], "title": "V2ControllerDeployment", "description": "Configuration for deploying a bot with controllers" }, "V2ScriptDeployment": { "properties": { "instance_name": { "type": "string", "title": "Instance Name", "description": "Unique name for the bot instance" }, "credentials_profile": { "type": "string", "title": "Credentials Profile", "description": "Name of the credentials profile to use" }, "image": { "type": "string", "title": "Image", "description": "Docker image for the Hummingbot instance", "default": "hummingbot/hummingbot:latest" }, "script": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Script", "description": "Script name to run (without .py extension)" }, "script_config": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Script Config", "description": "Script configuration file name (without .yml extension)" }, "headless": { "type": "boolean", "title": "Headless", "description": "Run in headless mode (no UI)", "default": false } }, "type": "object", "required": [ "instance_name", "credentials_profile" ], "title": "V2ScriptDeployment", "description": "Configuration for deploying a bot with a script" }, "VWAPForVolumeRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "is_buy": { "type": "boolean", "title": "Is Buy", "description": "True for buy side, False for sell side" }, "volume": { "type": "number", "title": "Volume", "description": "Volume to calculate VWAP for" } }, "type": "object", "required": [ "connector_name", "trading_pair", "is_buy", "volume" ], "title": "VWAPForVolumeRequest", "description": "Request model for getting VWAP for a specific volume" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "VolumeForPriceRequest": { "properties": { "connector_name": { "type": "string", "title": "Connector Name", "description": "Name of the connector" }, "trading_pair": { "type": "string", "title": "Trading Pair", "description": "Trading pair" }, "is_buy": { "type": "boolean", "title": "Is Buy", "description": "True for buy side, False for sell side" }, "price": { "type": "number", "title": "Price", "description": "Price to query volume for" } }, "type": "object", "required": [ "connector_name", "trading_pair", "is_buy", "price" ], "title": "VolumeForPriceRequest", "description": "Request model for getting volume at a specific price" } }, "securitySchemes": { "HTTPBasic": { "type": "http", "scheme": "basic" } } }, "servers": [ { "url": "http://localhost:8000", "description": "Local development server" } ] }