{"openapi":"3.1.0","info":{"title":"Hummingbot API","description":"API for managing Hummingbot trading instances","version":"1.0.1"},"paths":{"/docker/running":{"get":{"tags":["Docker"],"summary":"Is Docker Running","description":"Check if the Docker daemon is running and accessible.\n\nPings the Docker daemon to verify connectivity. This is useful for health checks\nand to verify Docker is available before attempting container operations.\n\nUse this endpoint before performing Docker operations to ensure the daemon is\nresponsive, or as part of a system health check routine.","operationId":"is_docker_running_docker_running_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Is Docker Running Docker Running Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/docker/available-images":{"get":{"tags":["Docker"],"summary":"Available Images","description":"List locally available Docker images, optionally filtered by name.\n\nRetrieves all Docker images that have been pulled to the local system. Can be filtered\nto show only images matching a specific name pattern (e.g., \"hummingbot\" to show only\nHummingbot images).\n\nUse this endpoint to discover what images are available for creating new bot containers,\nor to verify that a specific image version has been pulled.","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":{"type":"array","items":{},"title":"Response Available Images Docker Available Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/docker/active-containers":{"get":{"tags":["Docker"],"summary":"Active Containers","description":"List all currently running Docker containers.\n\nRetrieves information about all Docker containers in the \"running\" state. Can be\nfiltered by container name to show only specific containers (e.g., all Hummingbot\nbot containers).\n\nUse this endpoint to monitor running bots, check container health, or get container\nIDs for management operations.","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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Active Containers Docker Active Containers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/docker/exited-containers":{"get":{"tags":["Docker"],"summary":"Exited Containers","description":"List all stopped (exited) Docker containers.\n\nRetrieves information about all Docker containers in the \"exited\" state. These are\ncontainers that have been stopped or have completed execution. Can be filtered by\ncontainer name.\n\nUse this endpoint to find stopped bots that may need to be restarted, cleaned up,\nor have their logs inspected.","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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Exited Containers Docker Exited Containers Get"}}}},"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 (stopped) Docker containers.\n\nPerforms a bulk cleanup of all containers in the \"exited\" state. This frees up\ndisk space and cleans up the container list. This operation is irreversible -\ncontainer logs and state will be permanently deleted.\n\nWarning: This removes ALL exited containers, not just Hummingbot containers.\nFor selective removal, use the remove-container endpoint instead.\n\nUse this endpoint for periodic cleanup of old containers to free disk space\nand reduce clutter in container listings.","operationId":"clean_exited_containers_docker_clean_exited_containers_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Clean Exited Containers Docker Clean Exited Containers Post"}}}}},"security":[{"HTTPBasic":[]}]}},"/docker/remove-container/{container_name}":{"post":{"tags":["Docker"],"summary":"Remove Container","description":"Remove a Hummingbot container and archive its trading data.\n\nStops and removes the specified Hummingbot container, then archives the bot's\ninstance data (configurations, logs, database) either locally or to S3. This\nensures trading history is preserved before container removal.\n\nImportant: This endpoint ONLY works with Hummingbot containers (names must start\nwith \"hummingbot-\"). For general container removal, use Docker CLI directly.\n\nUse this endpoint when decommissioning a bot to ensure its data is safely\narchived before cleanup.","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":{"type":"object","additionalProperties":true,"title":"Response Remove Container Docker Remove Container Container Name Post"}}}},"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\nSends a stop signal to the specified container, allowing it to gracefully shut down.\nThe container will move to the \"exited\" state but will not be removed. Use this\nto pause trading activity without losing container state.\n\nUse this endpoint to temporarily stop a bot (e.g., during maintenance) while\npreserving the ability to restart it quickly.","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":{"type":"object","additionalProperties":true,"title":"Response Stop Container Docker Stop Container Container Name Post"}}}},"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\nRestarts a previously stopped container. The container will resume with its\nexisting configuration and state. This is faster than creating a new container\nas no initialization is required.\n\nUse this endpoint to resume a bot that was previously stopped, or to restart\na bot that exited unexpectedly.","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":{"type":"object","additionalProperties":true,"title":"Response Start Container Docker Start Container Container Name Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/docker/pull-image":{"post":{"tags":["Docker"],"summary":"Pull Image","description":"Start downloading a Docker image in the background.\n\nInitiates an asynchronous pull operation for the specified Docker image. The pull\nruns in the background, allowing the API to remain responsive. Use the /pull-status\nendpoint to monitor progress.\n\nUse this endpoint to download new Hummingbot versions or other required images\nbefore creating containers.","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":{"additionalProperties":true,"type":"object","title":"Response Pull Image Docker Pull Image Post"}}}},"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 the status of all Docker image pull operations.\n\nReturns the current status of all image pulls that have been initiated, including\ncompleted, in-progress, and failed operations. Use this to monitor download progress\nafter calling /pull-image.\n\nUse this endpoint to track image download progress and verify completion before\ncreating containers with newly pulled images.","operationId":"get_pull_status_docker_pull_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Pull Status Docker Pull Status Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/gateway/status":{"get":{"tags":["Gateway"],"summary":"Get Gateway Status","description":"Get Gateway container status.\n\nRetrieves the current running status and configuration of the Gateway Docker container.\nUse this endpoint to verify Gateway is online before making DEX trading requests.","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.\n\nStarts the Gateway Docker container with the specified configuration. Gateway provides\nconnectivity to decentralized exchanges (DEXs) like Jupiter, Uniswap, Meteora, and Raydium.","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":{"additionalProperties":true,"type":"object","title":"Response Start Gateway Gateway Start Post"}}}},"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.\n\nGracefully stops the running Gateway Docker container. Any pending transactions\nshould be completed before stopping. Wallet keys remain encrypted and persistent.","operationId":"stop_gateway_gateway_stop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stop Gateway Gateway Stop Post"}}}}},"security":[{"HTTPBasic":[]}]}},"/gateway/restart":{"post":{"tags":["Gateway"],"summary":"Restart Gateway","description":"Restart Gateway container.\n\nRestarts the Gateway Docker container. Required after configuration changes (e.g., updating\nRPC URLs, adding tokens, modifying connector settings) for changes to take effect.","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":{"additionalProperties":true,"type":"object","title":"Response Restart Gateway Gateway Restart Post"}}}},"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.\n\nRetrieves recent log output from the Gateway Docker container. Useful for debugging\nconnection issues, transaction failures, or monitoring Gateway activity.","operationId":"get_gateway_logs_gateway_logs_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"tail","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Number of log lines to retrieve (1-10000)","default":100,"title":"Tail"},"description":"Number of log lines to retrieve (1-10000)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Gateway Logs Gateway Logs Get"}}}},"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.\n\nReturns all configured DEX connectors with their supported trading types, chains, and networks.\nUse this to discover which DEXs are available for swaps and liquidity operations.\n\nSupported Connectors:\n - jupiter: Solana swap aggregator (Router)\n - uniswap: Ethereum/L2 AMM and CLMM\n - meteora: Solana CLMM (DLMM)\n - raydium: Solana AMM and CLMM","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\nRetrieves the current configuration settings for a DEX connector including\nslippage settings, gas limits, and other connector-specific parameters.","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\nModifies connector settings such as slippage tolerance, gas limits, and other\nconnector-specific parameters. Gateway restart is required for changes to take effect.","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\nReturns all blockchains supported by Gateway with their available networks.\nUse this to discover which chains are configured for DEX trading.\n\nSupported Chains:\n - solana: Solana blockchain (networks: mainnet-beta, devnet)\n - ethereum: Ethereum mainnet and testnets\n - polygon: Polygon PoS (networks: mainnet, mumbai)\n - arbitrum: Arbitrum L2 (networks: mainnet, goerli)","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 all configured liquidity pools for the specified DEX connector and network.\nPools are pre-registered in Gateway's configuration and can be used for CLMM operations.","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\nRegisters a new liquidity pool in Gateway's configuration. This allows the pool\nto be used for CLMM position operations (open, close, collect fees).","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 configuration.\n\nRemoves a registered pool from Gateway. This prevents the pool from being used\nfor future CLMM operations. Does not affect any existing on-chain positions.","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 all configured networks in the format 'chain-network'.\nThis is the primary interface for discovering available networks for DEX operations.","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\nRetrieves the current configuration for a network including RPC endpoints,\ngas settings, and other chain-specific parameters.","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\nModifies network settings such as RPC endpoints, gas configuration, and other\nchain-specific parameters. Gateway restart is required for changes to take effect.","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\nReturns all tokens registered in Gateway for the specified network. Tokens can be\nfiltered by symbol or name. Use this to discover available tokens for swaps.","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"}],"description":"Filter tokens by symbol or name (case-insensitive)","title":"Search"},"description":"Filter tokens by symbol or name (case-insensitive)"}],"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.\n\nRegisters a new token in Gateway's configuration for the specified network.\nThis enables the token to be used in swap operations. Gateway restart required\nfor 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.\n\nRemoves a token from Gateway's configuration for the specified network.\nDoes not affect any existing positions or balances. Gateway restart required\nfor 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\nGenerates a new wallet keypair for the specified blockchain and stores it encrypted\nin Gateway. The wallet can be used for DEX trading operations (swaps, liquidity).","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\nDecrypts and returns the private key for a wallet stored in Gateway.\nUse this to export wallets or for manual signing operations.\n\nWARNING: This endpoint exposes sensitive information. Handle the response\nsecurely and never log or expose the private key.","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\nTransfers native tokens (SOL, ETH, etc.) from a Gateway wallet to another address.\nUse this for simple transfers of the chain's native currency.","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":[]}]}},"/accounts":{"get":{"tags":["Accounts"],"summary":"List Accounts","description":"List all account names in the system.\n\nRetrieves a list of all trading accounts that have been created in the system.\nEach account can have multiple exchange connectors (API credentials) associated with it.\nUse this endpoint to discover available accounts before querying their credentials or balances.\n\nThe 'master_account' is always present and is the default account created during system setup.\nAdditional accounts can be created to organize trading across different strategies or portfolios.","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":"List all configured exchange connectors for an account.\n\nRetrieves the names of all exchange connectors that have API credentials configured\nfor the specified account. Each connector represents a connection to a centralized\nexchange (CEX) like Binance, Kraken, or OKX.\n\nUse this endpoint to see which exchanges an account can trade on before placing orders\nor checking balances.","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 trading account.\n\nCreates a new account with default configuration files copied from the master_account.\nThe new account will have its own isolated directory for storing exchange credentials\nand configuration settings.\n\nUse this endpoint to organize trading across different strategies, risk profiles,\nor to separate paper trading from live trading credentials.\n\nAfter creating an account, use POST /accounts/add-credential/{account_name}/{connector_name}\nto add exchange API credentials to the new account.","operationId":"add_account_accounts_add_account_post","security":[{"HTTPBasic":[]}],"parameters":[{"name":"account_name","in":"query","required":true,"schema":{"type":"string","description":"Name for the new account. Must be unique and not already exist.","title":"Account Name"},"description":"Name for the new account. Must be unique and not already exist.","example":"my_trading_account"}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Add Account Accounts Add Account Post"}}}},"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\nPermanently removes an account and all of its stored exchange credentials.\nThis operation:\n1. Stops all active connectors for the account\n2. Removes the account from the in-memory state\n3. Deletes the account's credentials directory and all files within it\n\nWARNING: This action is irreversible. All API credentials stored for this account\nwill be permanently deleted. Ensure you have backups of any credentials you may need.\n\nThe 'master_account' cannot be deleted as it is required for system operation.","operationId":"delete_account_accounts_delete_account_post","security":[{"HTTPBasic":[]}],"parameters":[{"name":"account_name","in":"query","required":true,"schema":{"type":"string","description":"Name of the account to delete. Cannot be 'master_account'.","title":"Account Name"},"description":"Name of the account to delete. Cannot be 'master_account'.","example":"old_strategy_account"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Account Accounts Delete Account Post"}}}},"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 exchange credentials for a specific connector.\n\nRemoves the API credentials for a specific exchange connector from an account.\nThis operation:\n1. Stops the connector if it's currently running\n2. Removes the connector from the in-memory account state\n3. Deletes the encrypted credentials file from disk\n4. Clears the connector from the internal cache\n\nUse this endpoint to revoke access to an exchange or when rotating API keys\n(delete old credentials, then add new ones).","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":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Credential Accounts Delete Credential Account Name Connector Name Post"}}}},"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 exchange API credentials for a connector.\n\nStores encrypted API credentials for a specific exchange connector and validates\nthem by initializing a connection to the exchange. This operation:\n1. Encrypts and saves the credentials to a YAML file\n2. Initializes the connector to validate the credentials work\n3. Sets up price tracking for tokens in the account's portfolio\n4. Updates the account state with current balances\n\nIf credential validation fails (e.g., invalid API key), the credentials are\nautomatically deleted and an error is returned.\n\nThe required credential fields vary by connector. Use GET /connectors/{connector_name}/config\nto see the required fields for a specific connector.\n\nCommon credential patterns:\n- Binance: binance_api_key, binance_api_secret\n- Kraken: kraken_api_key, kraken_secret_key\n- OKX: okx_api_key, okx_secret_key, okx_passphrase","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,"description":"Exchange API credentials. Required fields vary by connector.","title":"Credentials"},"example":{"binance_api_key":"your_api_key_here","binance_api_secret":"your_api_secret_here"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Add Credential Accounts Add Credential Account Name Connector Name Post"}}}},"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 blockchain wallets managed by Gateway.\n\nRetrieves all wallets that have been added to the Gateway service for DEX trading.\nGateway manages its own encrypted wallet storage, separate from CEX exchange credentials.\n\nEach wallet entry includes:\n- The blockchain chain (e.g., 'solana', 'ethereum')\n- All wallet addresses registered for that chain\n\nThese wallets are used for:\n- DEX trading via swap aggregators (Jupiter, Uniswap)\n- CLMM liquidity provision (Raydium, Meteora, Orca)\n- On-chain token transfers\n\nWallets are associated with the 'master_account' for balance tracking purposes.","operationId":"list_gateway_wallets_accounts_gateway_wallets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Gateway Wallets Accounts Gateway Wallets Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/accounts/gateway/add-wallet":{"post":{"tags":["Accounts"],"summary":"Add Gateway Wallet","description":"Add a blockchain wallet to Gateway for DEX trading.\n\nImports an existing wallet by providing its private key. Gateway encrypts the\nprivate key and stores it securely. The wallet is automatically set as the\ndefault wallet for its chain.\n\nSECURITY WARNING: The private key is transmitted to the Gateway service over\nyour local network. Ensure Gateway is running locally or over a secure connection.\n\nSupported chains:\n- solana: For Jupiter swaps, Raydium/Meteora/Orca CLMM\n- ethereum: For Uniswap swaps and liquidity provision\n- Additional EVM chains as configured in Gateway\n\nAfter adding a wallet, its balances will be automatically tracked in the\n'master_account' under the key '{chain}-{network}' (e.g., 'solana-mainnet-beta').","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":{"additionalProperties":true,"type":"object","title":"Response Add Gateway Wallet Accounts Gateway Add Wallet 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 blockchain wallet from Gateway.\n\nDeletes a wallet from Gateway's encrypted storage. This operation:\n1. Removes the encrypted private key from Gateway's storage\n2. Clears the wallet's balance data from the account state\n\nWARNING: This action is irreversible. Ensure you have backed up the wallet's\nprivate key before removing it, as it cannot be recovered from Gateway.\n\nAfter removal, the wallet can no longer be used for DEX trading through this\nsystem. Any pending transactions should be completed before removing the wallet.","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":{"type":"object","additionalProperties":true,"title":"Response Remove Gateway Wallet Accounts Gateway Chain Address Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors":{"get":{"tags":["Connectors"],"summary":"Available Connectors","description":"List all available exchange connectors.\n\nReturns a list of all connector names that are supported by the Hummingbot system.\nThese connectors can be used to connect to centralized exchanges (CEX) for trading.\nEach connector corresponds to a specific exchange or trading platform.\n\nUse this endpoint to:\n- Discover which exchanges are supported\n- Validate connector names before configuration\n- Display available options in UI dropdowns\n\nCommon connectors include:\n- Spot: binance, bybit, kucoin, gate_io, okx, htx, kraken\n- Perpetual: binance_perpetual, bybit_perpetual, gate_io_perpetual, okx_perpetual","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 the configuration schema for a specific connector.\n\nReturns the list of configuration fields required to set up a connector,\nincluding field names, data types, and whether each field is required.\nUse this to understand what credentials and settings are needed before\nadding a new exchange connection.\n\nMost connectors require API key and secret at minimum. Some exchanges\nrequire additional fields like passphrase (Kucoin, OKX) or account type.","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 and limits for a connector's trading pairs.\n\nReturns the trading rules (minimum order size, price increments, etc.) for all\nor specific trading pairs on a connector. This information is essential for\norder validation before placing trades.\n\nThis endpoint uses public market data and does not require authentication.\nRules are fetched directly from the exchange.\n\nTrading rules typically include:\n- Minimum/maximum order sizes\n- Price and quantity precision (decimal places)\n- Minimum notional value\n- Order type support","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":{"type":"object","additionalProperties":{"type":"object","additionalProperties":true},"title":"Response Get Trading Rules Connectors Connector Name Trading Rules Get"}}}},"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 the order types supported by a specific connector.\n\nReturns a list of order types that can be used when placing trades on this connector.\nDifferent exchanges support different order types, so check this endpoint before\nattempting to place orders with specific order types.\n\nThis endpoint uses public market data and does not require authentication.\n\nCommon order types:\n- LIMIT: Order at a specific price, executes when market reaches that price\n- MARKET: Order executed immediately at current market price\n- LIMIT_MAKER: Limit order that will be rejected if it would immediately match (maker-only)","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":{"$ref":"#/components/schemas/ConnectorOrderTypesResponse"}}}},"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\nRetrieves real-time portfolio balances across all configured accounts and connectors.\nBy default, returns cached state for fast responses. Use the `refresh` parameter to\nfetch live balances from exchanges (slower but more accurate).\n\nUse this endpoint to:\n- View current holdings across all accounts and exchanges\n- Monitor portfolio value in real-time\n- Filter by specific accounts or connectors for focused analysis\n- Get CEX-only balances quickly by skipping Gateway wallet lookups","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 historical portfolio snapshots with pagination and configurable time intervals.\n\nRetrieves historical portfolio state data stored in the database. Portfolio snapshots\nare collected every 5 minutes and stored for analysis. Use this endpoint to track\nportfolio performance over time, analyze PnL, or generate reports.\n\nThe interval parameter controls data granularity for performance optimization:\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 query performance.\nFor long time ranges (weeks/months), use 4h or 1d intervals.","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 token with percentage breakdowns.\n\nAnalyzes the portfolio and groups holdings by token symbol across all accounts\nand connectors. Each token shows its total value, percentage of portfolio,\nand detailed breakdown by account and connector.\n\nUse this endpoint to:\n- Understand asset allocation across your portfolio\n- Identify token concentration risks\n- View where each token is held (which accounts/exchanges)\n- Generate portfolio composition reports","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":{"additionalProperties":true,"type":"object","title":"Response Get Portfolio Distribution Portfolio Distribution Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBasic":[]}]}},"/portfolio/accounts-distribution":{"post":{"tags":["Portfolio"],"summary":"Get Accounts Distribution","description":"Get portfolio distribution grouped by account with percentage breakdowns.\n\nAnalyzes the portfolio from an account-centric view, showing the total value\nand percentage of portfolio held in each account. Includes breakdown by\nconnector within each account.\n\nUse this endpoint to:\n- Compare holdings across different accounts\n- Monitor account-level allocation\n- Identify which exchanges hold the most capital\n- Generate account allocation reports","operationId":"get_accounts_distribution_portfolio_accounts_distribution_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsDistributionFilterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Accounts Distribution Portfolio Accounts Distribution Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBasic":[]}]}},"/trading/orders":{"post":{"tags":["Trading"],"summary":"Place Trade","description":"Place a buy or sell order on a centralized exchange.\n\nSubmit a new order to buy or sell an asset through a configured account and connector.\nSupports spot trading (BUY/SELL) and perpetual futures trading with position actions (OPEN/CLOSE).\nFor market orders, the price is fetched automatically from the market data feed.\nFor limit orders, a price must be specified.\n\nThe order is submitted asynchronously to the exchange. The returned order_id can be used\nto track the order status via the /orders/active or /orders/search endpoints, or to\ncancel the order via the cancel endpoint.","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 an active order by its client order ID.\n\nRequest cancellation of an existing open order on the exchange. The cancellation is\nsubmitted asynchronously - a successful response indicates the cancellation request\nwas sent, not that the order has been cancelled. The order may still be filled if\na matching trade occurs before the cancellation is processed.\n\nUse the /orders/active endpoint to verify the order has been cancelled, or listen\nfor order status updates via the MQTT message broker.","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":{"type":"object","additionalProperties":true,"title":"Response Cancel Order Trading Account Name Connector Name Orders Client Order Id Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trading/positions":{"post":{"tags":["Trading"],"summary":"Get Positions","description":"Get current open positions from perpetual futures connectors.\n\nFetches real-time position data directly from perpetual connectors (e.g., binance_perpetual).\nReturns detailed information about each open position including entry price, current PnL,\nleverage, liquidation price, and margin information.\n\nOnly perpetual connectors (those with \"_perpetual\" in the name) are queried. Spot connectors\nare automatically excluded as they don't have positions.\n\nThe response uses cursor-based pagination for efficient traversal of large position lists.","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 currently active (in-flight) orders from exchange connectors.\n\nFetches real-time order data directly from the connectors' in-flight order tracking.\nThis shows orders that are currently open, pending, or partially filled on the exchanges.\nUnlike /orders/search which queries historical data, this endpoint provides live order state.\n\nActive orders include those in states: PENDING_CREATE, OPEN, PARTIALLY_FILLED, PENDING_CANCEL.\nOrders that are fully filled, cancelled, or failed will not appear here (use /orders/search instead).\n\nThe response uses cursor-based pagination. Orders are sorted by client_order_id for consistency.","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":"Search historical orders from the order registry database.\n\nQueries the persistent order database to retrieve historical order records. Unlike /orders/active\nwhich shows live in-flight orders, this endpoint retrieves completed, cancelled, and failed orders\nfrom the database. Useful for order history analysis, trade reconciliation, and reporting.\n\nOrders are returned sorted by timestamp (most recent first). The response supports cursor-based\npagination and time-range filtering for efficient querying of large order histories.","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 execution history (fills) from the database.\n\nRetrieves historical trade fills - the actual executions that occurred when orders were\nmatched on exchanges. Each trade represents a fill event, which may be a partial or\ncomplete fill of an order. Multiple trades can be associated with a single order.\n\nTrades are returned sorted by timestamp (most recent first). Supports time-range filtering\nand cursor-based pagination for efficient querying of large trade histories.\n\nUse this endpoint for:\n- Trade history reporting and analysis\n- PnL calculations\n- Fee tracking\n- Reconciliation with exchange records","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 the position mode for a perpetual futures connector.\n\nConfigure whether the connector operates in HEDGE mode (separate long/short positions)\nor ONEWAY mode (net position only). This setting affects how positions are managed:\n\n- **HEDGE mode**: Allows simultaneous long and short positions on the same trading pair.\n Each direction is tracked separately. Useful for hedging strategies.\n\n- **ONEWAY mode**: Only one position direction at a time per trading pair.\n Opening a position in the opposite direction closes the existing position first.\n\nImportant: Position mode can typically only be changed when there are no open positions\non the connector. Some exchanges may have additional restrictions.","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":{"type":"object","additionalProperties":true,"title":"Response Set Position Mode Trading Account Name Connector Name Position Mode Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Trading"],"summary":"Get Position Mode","description":"Get the current position mode for a perpetual futures connector.\n\nRetrieves the current position mode setting (HEDGE or ONEWAY) for the specified\nperpetual connector. This is useful for:\n\n- Verifying the current mode before placing trades\n- Checking mode after attempting to change it\n- Building UI displays showing account configuration","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":{"type":"object","additionalProperties":true,"title":"Response Get Position Mode Trading Account Name Connector Name Position Mode Get"}}}},"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 the leverage multiplier for a trading pair on a perpetual connector.\n\nConfigure the leverage used for margin trading on a specific trading pair. Higher leverage\namplifies both gains and losses, and increases liquidation risk. The leverage setting\napplies to new positions opened on the specified trading pair.\n\nLeverage requirements:\n- Must be a positive integer between 1 and the exchange's maximum (typically 125)\n- Different trading pairs may have different maximum leverage limits\n- Changing leverage may fail if it would cause existing positions to exceed margin requirements\n\nNote: This endpoint is only available for perpetual futures connectors. Spot connectors\ndo not support leverage.","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":{"type":"object","additionalProperties":true,"title":"Response Set Leverage Trading Account Name Connector Name Leverage Post"}}}},"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 from perpetual futures connectors.\n\nRetrieves historical funding payment records for perpetual futures positions. Funding payments\nare periodic payments exchanged between long and short position holders to keep the perpetual\ncontract price aligned with the spot price.\n\nFunding payments occur at fixed intervals (typically every 8 hours) and can be positive\n(you receive payment) or negative (you pay). The payment amount depends on:\n- Your position size\n- The funding rate at the payment time\n- Your position direction (long or short)\n\nOnly perpetual connectors (those with \"_perpetual\" in the name) are queried. Supports\ntime-range filtering and cursor-based pagination for large histories.","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":[]}]}},"/gateway/swap/quote":{"post":{"tags":["Gateway Swaps"],"summary":"Get Swap Quote","description":"Get a price quote for a token swap.\n\nFetches a real-time price quote from the specified DEX aggregator without executing\na transaction. Use this to preview swap outcomes before executing.\n\nSupported Connectors:\n - jupiter: Solana's leading swap aggregator (routes across multiple DEXs)\n - 0x: Ethereum/L2 swap aggregator","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 token swap transaction.\n\nExecutes a swap on the specified DEX aggregator. The transaction is signed and\nsubmitted to the blockchain. Swap details are recorded in the database for tracking.\n\nSupported Connectors:\n - jupiter: Solana's leading swap aggregator\n - 0x: Ethereum/L2 swap aggregator","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\nRetrieves the recorded details and current status of a swap transaction.\nUse this to check if a swap has been confirmed on-chain.","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":{"type":"object","additionalProperties":true,"title":"Response Get Swap Status Gateway Swaps Transaction Hash Status Get"}}}},"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\nQueries the swap history database with optional filters for network, connector,\nwallet, trading pair, status, and time range. Results are paginated.","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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Search Swaps Gateway Swaps Search Post"}}}},"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\nCalculates aggregate statistics for swaps matching the specified filters.\nUseful for dashboards and analytics.","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":{"type":"object","additionalProperties":true,"title":"Response Get Swaps Summary Gateway Swaps Summary Get"}}}},"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.\n\nRetrieves comprehensive pool data including current price, liquidity distribution,\nfee structure, and bin information (for DLMM pools like Meteora).\n\nSupported Connectors:\n - meteora: Solana DLMM pools (returns bin data)\n - raydium: Solana CLMM pools (via Raydium API)\n - uniswap: Ethereum/L2 V3 pools","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.\n\nRetrieves a paginated list of CLMM pools from the connector's API with comprehensive\nmetrics including volume, TVL, APR, and fee data. Use this to discover pools for\nopening liquidity positions.\n\nSupported Connectors:\n - meteora: Solana DLMM pools (full pool listing with metrics)","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 (0-indexed)","default":0,"title":"Page"},"description":"Page number (0-indexed)"},{"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 by token symbols","title":"Search Term"},"description":"Search term to filter pools by token symbols"},{"name":"sort_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field: volume, tvl, feetvlratio, apr","default":"volume","title":"Sort Key"},"description":"Sort field: volume, tvl, feetvlratio, apr"},{"name":"order_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order: asc or desc","default":"desc","title":"Order By"},"description":"Sort order: asc or desc"},{"name":"include_unknown","in":"query","required":false,"schema":{"type":"boolean","description":"Include pools with unverified/unknown tokens","default":true,"title":"Include Unknown"},"description":"Include pools with unverified/unknown 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 liquidity position.\n\nCreates a new concentrated liquidity position in the specified pool with the given\nprice range and initial liquidity. The position is tracked in the database for\nmonitoring and management.\n\nSupported Connectors:\n - meteora: Solana DLMM (Dynamic Liquidity Market Maker)\n - raydium: Solana CLMM\n - uniswap: Ethereum/L2 Uniswap V3","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/close":{"post":{"tags":["Gateway CLMM"],"summary":"Close Clmm Position","description":"Close a CLMM position completely.\n\nRemoves all liquidity from the position, collects any pending fees, and closes\nthe position NFT. This is a permanent action - the position cannot be reopened.\n\nSupported Connectors:\n - meteora: Solana DLMM\n - raydium: Solana CLMM\n - uniswap: Ethereum/L2 Uniswap V3","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 position.\n\nWithdraws all pending trading fees earned by the position without removing liquidity.\nThe position remains open and continues earning fees.\n\nSupported Connectors:\n - meteora: Solana DLMM\n - raydium: Solana CLMM\n - uniswap: Ethereum/L2 Uniswap V3","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 positions owned by a wallet for a specific pool.\n\nQueries the blockchain directly via Gateway to get all positions owned by a wallet\nin the specified pool. Returns real-time position data including current liquidity\nand pending fees.\n\nSupported Connectors:\n - meteora: Solana DLMM\n - raydium: Solana CLMM\n - uniswap: Ethereum/L2 Uniswap V3","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\nRetrieves all recorded events for a position including opens, closes, fee collections,\nand liquidity changes. Events are stored when operations are executed via this API.","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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Clmm Position Events Gateway Clmm Positions Position Address Events Get"}}}},"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 in the database.\n\nQueries database-tracked positions with optional filters. Optionally refreshes\nposition data from Gateway before returning results. This provides historical\ntracking and persistence for positions created via this API.","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"}],"description":"Filter by specific position addresses","title":"Position Addresses"},"description":"Filter by specific 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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Search Clmm Positions Gateway Clmm Positions Search Post"}}}},"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\nRetrieves real-time status information for all bots currently being managed by the\norchestrator. This includes bots that are running, starting, or stopping. Use this\nendpoint to get a comprehensive overview of your bot fleet.\n\nThe status data includes performance metrics, trading state, and health information\nfor each bot that has been discovered via MQTT and is actively communicating with\nthe orchestrator.","operationId":"get_active_bots_status_bot_orchestration_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Active Bots Status Bot Orchestration Status Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/bot-orchestration/mqtt":{"get":{"tags":["Bot Orchestration"],"summary":"Get Mqtt Status","description":"Get MQTT connection status and discovered bots.\n\nReturns comprehensive information about the MQTT message broker connection used\nfor bot communication. This includes connection health, broker details, and lists\nof bots that have been discovered through MQTT heartbeats versus bots that are\nactively being managed.\n\nUse this endpoint to:\n- Diagnose connectivity issues between the API and bot instances\n- Verify that deployed bots are properly communicating via MQTT\n- Check broker configuration and connection state\n\nThe difference between discovered_bots and active_bots:\n- discovered_bots: Bots that have sent MQTT heartbeat messages (may include orphaned bots)\n- active_bots: Bots that are actively being managed by this orchestrator instance","operationId":"get_mqtt_status_bot_orchestration_mqtt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Mqtt Status Bot Orchestration Mqtt Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/bot-orchestration/{bot_name}/status":{"get":{"tags":["Bot Orchestration"],"summary":"Get Bot Status","description":"Get the status of a specific bot.\n\nRetrieves detailed real-time status information for a single bot instance.\nThis includes the bot's current trading state, performance metrics, active\norders, and health indicators.\n\nUse this endpoint when you need detailed information about a specific bot\nrather than an overview of all bots. The response includes more detailed\nperformance data than the bulk status endpoint.","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":{"type":"object","additionalProperties":true,"title":"Response Get Bot Status Bot Orchestration Bot Name Status Get"}}}},"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\nRetrieves the complete trading history for a specified bot, including all\nexecuted trades, order fills, and performance data. The history is fetched\nfrom the bot instance via MQTT and can be filtered by time period.\n\nThis endpoint is useful for:\n- Analyzing trading performance over specific time periods\n- Generating reports on bot activity\n- Debugging trading behavior by reviewing historical trades\n\nNote: This operation may take several seconds for bots with extensive history.\nThe timeout parameter can be adjusted for bots with large datasets.","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.0,"title":"Timeout"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Bot History Bot Orchestration Bot Name History Get"}}}},"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\nSends a start command to an existing bot instance via MQTT. The bot must have\nalready been deployed (using deploy-v2-script or deploy-v2-controllers) and be\nin a stopped state. This endpoint initiates the trading script execution within\nthe bot container.\n\nUse this endpoint to:\n- Resume a stopped bot with the same or different configuration\n- Start a deployed bot for the first time after deployment\n- Change the running script or configuration of a stopped bot\n\nThe start command is sent asynchronously via MQTT. The response indicates whether\nthe command was successfully sent, not whether the bot has fully started.","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":{"additionalProperties":true,"type":"object","title":"Response Start Bot Bot Orchestration Start Bot Post"}}}},"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\nSends a stop command to a running bot instance via MQTT. This gracefully stops\nthe trading script, optionally cancels open orders, and updates the bot run\nrecord in the database with final performance status.\n\nImportant: This endpoint only stops the trading script within the container.\nThe Docker container continues running and can be restarted with start-bot.\nTo completely remove a bot and archive its data, use stop-and-archive-bot instead.\n\nThe endpoint captures the bot's final performance status before stopping, which\nis then persisted to the database for historical tracking.","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":{"additionalProperties":true,"type":"object","title":"Response Stop Bot Bot Orchestration Stop Bot Post"}}}},"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\nRetrieves historical bot run records from the database with flexible filtering\noptions. Each bot run represents a deployment lifecycle from creation through\nstopping and archival. Use this endpoint to analyze historical bot activity,\ntrack performance across runs, and audit bot operations.\n\nBot runs are created when deploying a bot (deploy-v2-script or deploy-v2-controllers)\nand updated when the bot is stopped or archived. The records persist even after\nthe bot container is removed.","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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Bot Runs Bot Orchestration Bot Runs Get"}}}},"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\nRetrieves complete details for a single bot run record by its unique database ID.\nUse this endpoint when you have a specific run ID (e.g., from a previous query\nor from logs) and need the full details including deployment configuration and\nfinal performance status.","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":{"type":"object","additionalProperties":true,"title":"Response Get Bot Run By Id Bot Orchestration Bot Runs Bot Run Id Get"}}}},"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\nReturns aggregated statistics across all bot run records. Use this endpoint\nto get a high-level overview of bot operations including counts by status,\ntotal runs, and deployment success rates.\n\nThis is useful for monitoring dashboards and operational reporting.","operationId":"get_bot_run_stats_bot_orchestration_bot_runs_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Bot Run Stats Bot Orchestration Bot Runs Stats Get"}}}}},"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.\n\nThis is the recommended way to fully decommission a bot. Unlike the stop-bot\nendpoint which only stops the trading script, this endpoint performs a complete\nshutdown and cleanup:\n\n1. Captures final performance status before stopping\n2. Stops the bot trading process via MQTT command\n3. Waits 15 seconds for graceful shutdown\n4. Monitors and stops the Docker container\n5. Archives all bot data (logs, databases, configs) locally or to S3\n6. Removes the Docker container\n7. Updates the bot run record to ARCHIVED status\n\nThe operation runs in the background and returns immediately. The entire process\ntypically takes 20-30 seconds to complete.\n\nUse this endpoint when:\n- Permanently removing a bot that is no longer needed\n- Freeing up server resources after a bot completes its task\n- Archiving bot data for compliance or analysis purposes","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":{"type":"object","additionalProperties":true,"title":"Response Stop And Archive Bot Bot Orchestration Stop And Archive Bot Bot Name Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bot-orchestration/deploy-v2-script":{"post":{"tags":["Bot Orchestration"],"summary":"Deploy V2 Script","description":"Deploy a new Hummingbot instance with a V2 script.\n\nCreates a new Docker container running Hummingbot configured with a specified\nscript and optional script configuration. The container is automatically started\nand begins executing the trading strategy.\n\nThis is the primary method for deploying custom scripts. For controller-based\nstrategies, use deploy-v2-controllers instead.\n\nThe deployment process:\n1. Creates a new Docker container from the specified Hummingbot image\n2. Mounts necessary volumes (configs, credentials, scripts)\n3. Sets up MQTT communication for bot control\n4. Creates a bot run record in the database for tracking\n5. Starts the container with the specified script (if auto-start enabled)","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":{"additionalProperties":true,"type":"object","title":"Response Deploy V2 Script Bot Orchestration Deploy V2 Script Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBasic":[]}]}},"/bot-orchestration/deploy-v2-controllers":{"post":{"tags":["Bot Orchestration"],"summary":"Deploy V2 Controllers","description":"Deploy a V2 strategy with controllers.\n\nThis is the recommended method for deploying multi-controller trading strategies.\nThe endpoint automatically:\n1. Generates a unique timestamped instance name to prevent conflicts\n2. Creates the script configuration file combining all specified controllers\n3. Deploys a new Docker container with the v2_with_controllers.py script\n4. Creates a bot run record for tracking\n\nControllers are pre-configured strategy components that can be combined to create\nsophisticated trading strategies. Examples include:\n- DMan Maker: Directional market making with inventory management\n- Grid Strategy: Grid-based trading for ranging markets\n- XEMM: Cross-exchange market making\n\nThe generated instance name follows the format: {instance_name}-{YYYYMMDD-HHMMSS}\nto ensure uniqueness across deployments.","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":{"additionalProperties":true,"type":"object","title":"Response Deploy V2 Controllers Bot Orchestration Deploy V2 Controllers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBasic":[]}]}},"/controllers":{"get":{"tags":["Controllers"],"summary":"List Controllers","description":"List all available V2 strategy controllers organized by type.\n\nRetrieves all controller Python files from the controllers directory, organized by their\ntype (directional_trading, market_making, generic). Controllers are the core strategy\ncomponents in Hummingbot V2 that define trading logic and can be composed together.\n\nUse this endpoint to discover available controllers before creating configurations\nor to verify that a custom controller has been properly deployed.","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 saved controller configurations with their metadata.\n\nRetrieves all YAML configuration files from the conf/controllers directory. Each configuration\ndefines parameters for a specific controller that can be used when launching trading bots.\nConfigurations are reusable and can be assigned to multiple bot instances.\n\nUse this endpoint to browse available configurations, verify configuration deployment,\nor to list configurations before editing or deleting them.","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 a specific controller configuration by its name.\n\nRetrieves the full configuration content from a YAML file in the conf/controllers directory.\nThe configuration contains all parameters needed to instantiate and run a controller,\nincluding trading pair, connector, amounts, and strategy-specific settings.\n\nUse this endpoint to inspect configuration details before launching a bot or to\nretrieve current settings before making modifications.","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 a new controller configuration or update an existing one.\n\nSaves the provided configuration dictionary as a YAML file in the conf/controllers directory.\nIf a configuration with the same name exists, it will be overwritten. The configuration\nshould include all required fields for the target controller type.\n\nUse this endpoint to create new strategy configurations, update existing ones,\nor import configurations from external sources.","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":{"type":"object","additionalProperties":true,"title":"Response Create Or Update Controller Config Controllers Configs Config Name Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Controllers"],"summary":"Delete Controller Config","description":"Delete a controller configuration file.\n\nPermanently removes the specified configuration YAML file from the conf/controllers directory.\nThis action cannot be undone. The configuration will no longer be available for use\nwith new bot instances.\n\nNote: Deleting a configuration does not affect bots that are already running with\na copy of this configuration. Running bots maintain their own configuration state.","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":{"type":"object","additionalProperties":true,"title":"Response Delete Controller Config Controllers Configs Config Name Delete"}}}},"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 the Python source code of a specific controller.\n\nRetrieves the full source code content of a controller file from the controllers directory.\nControllers are Python classes that implement trading logic and extend the base controller\nclasses provided by Hummingbot V2.\n\nUse this endpoint to inspect controller implementations, review strategy logic,\nor retrieve code for modification before re-uploading.","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 a new controller or update an existing one.\n\nSaves the provided Python source code as a controller file in the appropriate type directory.\nIf a controller with the same name exists, it will be overwritten. The controller code\nshould be a valid Python module that implements the appropriate controller base class.\n\nUse this endpoint to deploy custom controllers, update existing strategy implementations,\nor import controllers from external sources.\n\nNote: After uploading a new controller, you may need to restart the API server for\nthe controller to be properly loaded into the Python runtime.","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":{"type":"object","additionalProperties":true,"title":"Response Create Or Update Controller Controllers Controller Type Controller Name Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Controllers"],"summary":"Delete Controller","description":"Delete a controller Python file.\n\nPermanently removes the specified controller file from the controllers directory.\nThis action cannot be undone. Any configurations referencing this controller\nwill become invalid.\n\nWarning: Ensure no running bots are using this controller before deletion.\nConfigurations that reference a deleted controller will fail to load.","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":{"type":"object","additionalProperties":true,"title":"Response Delete Controller Controllers Controller Type Controller Name Delete"}}}},"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 the configuration template for a controller with field metadata.\n\nDynamically loads the controller's Python module and extracts its configuration class\n(typically a Pydantic model). Returns all configuration fields with their default values,\ntypes, and whether they are required.\n\nUse this endpoint to discover what configuration parameters a controller accepts\nbefore creating a new configuration. This is especially useful for dynamically\nbuilding configuration forms in UI applications.","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":{"type":"object","additionalProperties":true,"title":"Response Get Controller Config Template Controllers Controller Type Controller Name Config Template Get"}}}},"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 a configuration dictionary against a controller's configuration schema.\n\nDynamically loads the controller's configuration class and attempts to instantiate\nit with the provided configuration values. This validates all field types, required\nfields, and any custom validators defined in the configuration model.\n\nUse this endpoint to pre-validate configurations before saving them, ensuring\nthey will work correctly when used to launch a bot.","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":{"type":"object","additionalProperties":true,"title":"Response Validate Controller Config Controllers Controller Type Controller Name Config Validate Post"}}}},"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 deployed to a specific bot instance.\n\nRetrieves all YAML configuration files from the bot's local conf/controllers directory.\nEach bot instance maintains its own copy of controller configurations, which may differ\nfrom the global configurations in conf/controllers.\n\nUse this endpoint to inspect what controllers a specific bot is configured to run,\nor to audit configuration differences between bot instances.","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 a controller configuration for a specific bot instance.\n\nMerges the provided configuration values with the existing configuration for the\nspecified controller on the bot. Only the fields provided in the request body\nare updated; existing fields not included in the request are preserved.\n\nUse this endpoint to modify controller parameters on a running bot, such as\nadjusting position sizes, spread parameters, or other trading settings.\n\nNote: Changes take effect based on the bot's configuration reload behavior.\nSome changes may require the controller to be restarted to take effect.","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":{"type":"object","additionalProperties":true,"title":"Response Update Bot Controller Config Controllers Bots Bot Name Controller Name Config Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scripts":{"get":{"tags":["Scripts"],"summary":"List Scripts","description":"List all available V1 strategy scripts.\n\nRetrieves all Python script files from the scripts directory. Scripts are the V1\nstrategy format in Hummingbot that run as standalone strategy implementations.\nUnlike V2 controllers, scripts contain both the strategy logic and configuration\nin a single file.\n\nUse this endpoint to discover available scripts before creating configurations\nor to verify that a custom script has been properly deployed.","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 saved script configurations with their metadata.\n\nRetrieves all YAML configuration files from the conf/scripts directory. Each configuration\ndefines parameters for a V1 script including the script file to use, controller configurations,\ncandle data requirements, and market connections.\n\nUse this endpoint to browse available configurations, verify configuration deployment,\nor list configurations before editing or deleting them.","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 a specific script configuration by its name.\n\nRetrieves the full configuration content from a YAML file in the conf/scripts directory.\nThe configuration contains all parameters needed to run a script, including the script\nfile name, controller references, candle data settings, and market connections.\n\nUse this endpoint to inspect configuration details before launching a bot or to\nretrieve current settings before making modifications.","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 a new script configuration or update an existing one.\n\nSaves the provided configuration dictionary as a YAML file in the conf/scripts directory.\nIf a configuration with the same name exists, it will be overwritten. The configuration\nshould include the script file name and any required parameters.\n\nUse this endpoint to create new strategy configurations, update existing ones,\nor import configurations from external sources.","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":{"type":"object","additionalProperties":true,"title":"Response Create Or Update Script Config Scripts Configs Config Name Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Scripts"],"summary":"Delete Script Config","description":"Delete a script configuration file.\n\nPermanently removes the specified configuration YAML file from the conf/scripts directory.\nThis action cannot be undone. The configuration will no longer be available for use\nwith new bot instances.\n\nNote: Deleting a configuration does not affect bots that are already running with\na copy of this configuration. Running bots maintain their own configuration state.","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":{"type":"object","additionalProperties":true,"title":"Response Delete Script Config Scripts Configs Config Name Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scripts/{script_name}":{"get":{"tags":["Scripts"],"summary":"Get Script","description":"Get the Python source code of a specific script.\n\nRetrieves the full source code content of a script file from the scripts directory.\nScripts are V1 strategy implementations that contain both trading logic and can be\nrun directly by Hummingbot.\n\nUse this endpoint to inspect script implementations, review strategy logic,\nor retrieve code for modification before re-uploading.","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 a new script or update an existing one.\n\nSaves the provided Python source code as a script file in the scripts directory.\nIf a script with the same name exists, it will be overwritten. The script code\nshould be a valid Python module that implements the ScriptStrategyBase class.\n\nUse this endpoint to deploy custom scripts, update existing strategy implementations,\nor import scripts from external sources.\n\nNote: After uploading a new script, you may need to restart the API server for\nthe script to be properly loaded into the Python runtime.","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":{"type":"object","additionalProperties":true,"title":"Response Create Or Update Script Scripts Script Name Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Scripts"],"summary":"Delete Script","description":"Delete a script Python file.\n\nPermanently removes the specified script file from the scripts directory.\nThis action cannot be undone. Any configurations referencing this script\nwill become invalid.\n\nWarning: Ensure no running bots are using this script before deletion.\nConfigurations that reference a deleted script will fail to load.","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":{"type":"object","additionalProperties":true,"title":"Response Delete Script Scripts Script Name Delete"}}}},"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 the configuration template for a script with default values.\n\nDynamically loads the script's Python module and extracts its configuration class\n(if defined). Returns all configuration fields with their default values. This is\nuseful for discovering what parameters a script accepts.\n\nUse this endpoint to discover what configuration parameters a script accepts\nbefore creating a new configuration. This is especially useful for dynamically\nbuilding configuration forms in UI applications.","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"}}}}}}},"/market-data/candles":{"post":{"tags":["Market Data"],"summary":"Get Candles","description":"Get real-time OHLCV candles data for a specific trading pair.\n\nRetrieves candlestick (OHLCV) data from a live market data feed. The feed is created\non first request and maintained for subsequent requests, providing near real-time\ndata with automatic updates from the exchange.\n\nThe endpoint manages feed lifecycle automatically:\n- First request: Creates and starts a new WebSocket feed to the exchange\n- Subsequent requests: Reuses the existing feed for immediate data access\n- Inactive feeds are automatically cleaned up after the configured timeout period","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":{"additionalProperties":true,"type":"object","title":"Response Get Candles Market Data Candles Post"}}}},"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 OHLCV candles data for a specific time range.\n\nFetches historical candlestick data from the exchange for backtesting, analysis,\nor charting purposes. Unlike the /candles endpoint, this retrieves data for a\nspecific historical time range rather than maintaining a live feed.\n\nThe data is fetched directly from the exchange's historical data API, so availability\ndepends on the exchange's data retention policies. Most exchanges provide several\nyears of historical data for major trading pairs.","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":{"additionalProperties":true,"type":"object","title":"Response Get Historical Candles Market Data Historical Candles Post"}}}},"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 all currently active market data feeds.\n\nReturns status information about all candle feeds currently maintained in memory.\nUse this endpoint to monitor resource usage, debug connectivity issues, or understand\nwhich market data streams are active.\n\nEach active feed represents a WebSocket connection to an exchange that consumes\nserver resources. Feeds are automatically cleaned up after a period of inactivity\n(configurable via feed_timeout setting).","operationId":"get_active_feeds_market_data_active_feeds_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Active Feeds Market Data Active Feeds Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/market-data/settings":{"get":{"tags":["Market Data"],"summary":"Get Market Data Settings","description":"Get current market data service configuration settings.\n\nReturns the current configuration values that control how market data feeds\nare managed, including cleanup intervals and timeout periods. Useful for\ndebugging and understanding the server's market data management behavior.\n\nThese settings affect all market data feeds and determine:\n- How often the system checks for and removes inactive feeds\n- How long a feed can remain idle before being cleaned up","operationId":"get_market_data_settings_market_data_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Market Data Settings Market Data Settings Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/market-data/available-candle-connectors":{"get":{"tags":["Market Data"],"summary":"Get Available Candle Connectors","description":"Get list of all exchange connectors that support candle (OHLCV) data feeds.\n\nReturns the names of all connectors that have implemented candle data fetching.\nUse this to discover which exchanges can be used with the /candles and\n/historical-candles endpoints.\n\nNot all exchange connectors support candle data. This endpoint helps you\ndetermine which connectors are available for candlestick chart data and\ntechnical analysis.","operationId":"get_available_candle_connectors_market_data_available_candle_connectors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Available Candle Connectors Market Data Available Candle Connectors Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/market-data/prices":{"post":{"tags":["Market Data"],"summary":"Get Prices","description":"Get current mid prices for one or more trading pairs.\n\nFetches real-time mid prices (average of best bid and best ask) for the specified\ntrading pairs from a single exchange connector. This is the fastest way to get\ncurrent price data for multiple pairs simultaneously.\n\nMid price is calculated as: (best_bid + best_ask) / 2\n\nThis provides a fair market price that's commonly used for:\n- Portfolio valuation\n- Price displays and charts\n- Strategy calculations\n- Triggering price alerts","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 rate information for a perpetual futures trading pair.\n\nRetrieves current funding rate data for perpetual futures contracts. Funding rates\nare periodic payments exchanged between long and short position holders to keep\nthe perpetual price aligned with the spot price.\n\nUnderstanding funding rates:\n- Positive rate: Longs pay shorts (market is bullish, longs are penalized)\n- Negative rate: Shorts pay longs (market is bearish, shorts are penalized)\n- Rate is typically applied every 8 hours (exchange-dependent)\n- Rate is expressed as a decimal (0.0001 = 0.01% = 1 basis point)\n\nIMPORTANT: This endpoint only works with perpetual futures connectors.\nThe connector_name must contain \"_perpetual\" (e.g., \"binance_perpetual\").","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 a snapshot of the order book for a trading pair.\n\nRetrieves the current state of the order book (limit order book / LOB) showing\nbuy orders (bids) and sell orders (asks) at various price levels. This data is\nessential for understanding market depth, liquidity, and potential slippage.\n\nOrder book terminology:\n- Bids: Buy orders, sorted highest to lowest (best bid first)\n- Asks: Sell orders, sorted lowest to highest (best ask first)\n- Spread: Difference between lowest ask and highest bid\n- Depth: Number of price levels on each side\n\nThe order book snapshot represents the market state at a specific moment.\nFor real-time order book tracking, make periodic requests.","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":"Calculate the price required to fill a specific base asset volume.\n\nAnalyzes the order book to determine the worst price you would pay (for buys)\nor receive (for sells) when executing a market order of the specified volume.\nThis helps estimate slippage and price impact before placing an order.\n\nHow it works:\n- For BUYS (is_buy=true): Walks up the ask side, accumulating volume\n- For SELLS (is_buy=false): Walks down the bid side, accumulating volume\n- Returns the price of the last level needed to fill the full volume\n\nUse cases:\n- Estimate slippage before executing a large order\n- Set realistic limit prices based on available liquidity\n- Compare execution costs across different venues","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":"Calculate cumulative volume available up to a specific price level.\n\nAnalyzes the order book to determine how much base asset volume is available\nbetween the best price and your specified price level. This helps understand\nmarket depth and liquidity at specific price points.\n\nHow it works:\n- For BUYS (is_buy=true): Sums ask volume from best ask up to the specified price\n- For SELLS (is_buy=false): Sums bid volume from best bid down to the specified price\n- Returns the total volume available within that price range\n\nUse cases:\n- Determine if enough liquidity exists at your target price\n- Understand market depth at specific price levels\n- Plan entry/exit points based on available volume","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":"Calculate the price required to spend/receive a specific quote currency amount.\n\nAnalyzes the order book to determine the execution price when you want to\ntrade a specific amount of quote currency (e.g., \"I want to spend exactly\n10,000 USDT on BTC\"). This is useful when you have a fixed budget in quote\ncurrency rather than a target base asset quantity.\n\nHow it works:\n- For BUYS (is_buy=true): Walks up asks until quote_volume USDT would be spent\n- For SELLS (is_buy=false): Walks down bids until quote_volume USDT would be received\n- Returns the price at which the full quote amount would be filled\n\nUse cases:\n- Execute trades with a fixed budget (\"buy $10,000 worth of BTC\")\n- DCA strategies with fixed investment amounts\n- Compare quote-based execution across venues","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":"Calculate cumulative quote volume available up to a specific price level.\n\nSimilar to volume-for-price but returns the result in quote currency terms.\nThis tells you how much quote currency (e.g., USDT) worth of orders exist\nbetween the best price and your target price level.\n\nHow it works:\n- For BUYS (is_buy=true): Sums (price * volume) for asks up to specified price\n- For SELLS (is_buy=false): Sums (price * volume) for bids down to specified price\n- Returns total quote value available within that range\n\nUse cases:\n- Understand market depth in dollar/USDT terms\n- Evaluate if sufficient quote liquidity exists for your trade size\n- Compare liquidity across different markets using a common denomination","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":"Calculate Volume Weighted Average Price (VWAP) for filling a specific volume.\n\nComputes the average price you would pay (for buys) or receive (for sells)\nwhen executing an order of the specified volume, weighted by the amount\nfilled at each price level. This is one of the most important metrics for\nunderstanding true execution cost.\n\nVWAP Calculation:\nVWAP = Sum(price_i * volume_i) / Sum(volume_i)\n\nThis differs from result_price (worst fill price) because it accounts for\nthe fact that most of your order may fill at better prices, with only the\ntail filling at worse prices.\n\nUse cases:\n- Calculate true expected execution cost for market orders\n- Benchmark algorithmic execution against market VWAP\n- Compare execution quality across different venues\n- Set realistic price expectations for large orders","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":[]}]}},"/rate-oracle/sources":{"get":{"tags":["Rate Oracle"],"summary":"Get Available Sources","description":"List all available rate oracle data sources.\n\nReturns the list of supported exchanges and data providers that can be used\nas rate oracle sources. The rate oracle fetches price data from the configured\nsource to convert between different quote currencies.\n\nUse this endpoint to discover available sources before configuring the rate oracle,\nor to verify that a specific exchange is supported.","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 the current rate oracle configuration.\n\nRetrieves the current rate oracle settings from conf_client.yml, including the\nconfigured price data source and global token settings. The global token is\nused for normalizing all values to a common quote currency (e.g., USD or USDT).\n\nUse this endpoint to check current settings before making changes, or to verify\nthat configuration updates were applied correctly.","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 the rate oracle configuration.\n\nModifies the rate oracle source and/or global token settings. Changes are applied\nimmediately to the running RateOracle instance and persisted to conf_client.yml\nfor future sessions.\n\nYou can update either the rate_oracle_source, global_token, or both in a single\nrequest. Only the fields provided will be updated.","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 exchange rates for multiple trading pairs.\n\nFetches the current exchange rates for a list of trading pairs using the configured\nrate oracle source. Rates are returned as the price of the base asset in terms of\nthe quote asset. Uses cached price data for fast responses.\n\nUse this endpoint to get rates for multiple pairs in a single request, which is\nmore efficient than making individual requests.","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 the exchange rate for a single trading pair.\n\nFetches the current exchange rate for a specific trading pair using cached price\ndata from the rate oracle. This is a synchronous lookup that uses previously\nfetched data, making it very fast.\n\nUse this endpoint for quick rate lookups when you only need a single pair.\nFor multiple pairs, use the POST /rates endpoint instead.","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 a fresh exchange rate directly from the source (bypasses cache).\n\nFetches the current exchange rate for a trading pair directly from the configured\nrate oracle source, bypassing any cached data. This is slower than the cached\nendpoint but guarantees fresh data.\n\nUse this endpoint when you need the most up-to-date rate and can tolerate\nslightly higher latency, or when the rate oracle cache hasn't been initialized yet.","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 set of prices that the rate oracle has fetched and cached\nfrom its configured source. This includes all trading pairs available from the\nsource exchange, not just those you've queried.\n\nUse this endpoint to explore available trading pairs, debug rate oracle issues,\nor pre-fetch all prices for client-side caching.","operationId":"get_cached_prices_rate_oracle_prices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Cached Prices Rate Oracle Prices Get"}}}}},"security":[{"HTTPBasic":[]}]}},"/backtesting/run-backtesting":{"post":{"tags":["Backtesting"],"summary":"Run Backtesting","description":"Run a historical backtesting simulation for a controller configuration.\n\nExecutes a complete backtesting simulation using historical market data to evaluate\nhow a trading strategy would have performed over a specified time period. The backtest\nsimulates trade execution, tracks positions, and calculates performance metrics.\n\nThe controller configuration can be provided either as a path to a YAML file or\nas a complete configuration dictionary. Historical candle data is automatically\nfetched for the required trading pairs and time period.\n\nUse this endpoint to evaluate strategy performance before deploying to live trading,\noptimize strategy parameters, or compare different configurations.","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":{"additionalProperties":true,"type":"object","title":"Response Run Backtesting Backtesting Run Backtesting Post"}}}},"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 archived bot database files.\n\nScans the system for SQLite database files from archived Hummingbot bot instances.\nThese databases contain historical trading data including orders, trades, executors,\nand controller configurations.\n\nUse this endpoint to discover available archived bots before querying their data,\nor to verify that a bot's data was properly archived after removal.","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":"Check the health status of a bot database.\n\nValidates the database structure and checks that all expected tables are present\nand accessible. This is useful for verifying database integrity before querying\ntrading data.\n\nUse this endpoint to verify a database is valid before running detailed queries,\nor to diagnose issues with corrupted or incomplete archives.","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":{"type":"object","additionalProperties":true,"title":"Response Get Database Status Archived Bots Db Path Status Get"}}}},"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 high-level summary of an archived bot's trading activity.\n\nRetrieves aggregate statistics from the database including total counts for\norders, trades, executors, positions, and controllers. Also identifies the\nunique trading pairs and exchanges used by the bot.\n\nUse this endpoint to get a quick overview of a bot's activity before\ndiving into detailed trade or order data.","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":{"type":"object","additionalProperties":true,"title":"Response Get Database Summary Archived Bots Db Path Summary Get"}}}},"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":"Calculate comprehensive trading performance metrics for an archived bot.\n\nAnalyzes all trades in the database to compute performance metrics including\nrealized and unrealized PnL, fees, volume, and net position. Returns both\nsummary statistics and detailed per-trade performance data with rolling\ncalculations.\n\nUse this endpoint to evaluate a bot's historical trading performance,\nanalyze profitability, or generate performance reports.","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":{"type":"object","additionalProperties":true,"title":"Response Get Database Performance Archived Bots Db Path Performance Get"}}}},"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 paginated trade fill history from an archived bot database.\n\nRetrieves trade execution records with details including price, amount, fees,\nand timestamps. Supports pagination for handling large trade histories.\n\nUse this endpoint to analyze individual trades, export trade data, or\nbuild detailed trade history reports.","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":"Maximum number of trades to return (1-1000)","default":100,"title":"Limit"},"description":"Maximum number of trades to return (1-1000)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","description":"Number of trades to skip for pagination","default":0,"title":"Offset"},"description":"Number of trades to skip for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Database Trades Archived Bots Db Path Trades Get"}}}},"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 paginated order history from an archived bot database.\n\nRetrieves order records with details including order type, status, amounts,\nand timestamps. Supports pagination and optional filtering by order status.\n\nUse this endpoint to analyze order patterns, review order fill rates, or\ninvestigate specific order outcomes.","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":"Maximum number of orders to return (1-1000)","default":100,"title":"Limit"},"description":"Maximum number of orders to return (1-1000)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","description":"Number of orders to skip for pagination","default":0,"title":"Offset"},"description":"Number of orders to skip for pagination"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by order status: OPEN, FILLED, CANCELLED, FAILED","title":"Status"},"description":"Filter by order status: OPEN, FILLED, CANCELLED, FAILED"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Database Orders Archived Bots Db Path Orders Get"}}}},"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 records from an archived bot database.\n\nRetrieves executor data showing the trading actions performed by V2 strategy\ncontrollers. Executors represent individual trading operations with their\nconfigurations, entry/exit details, and PnL results.\n\nUse this endpoint to analyze controller performance, review executor outcomes,\nor debug strategy behavior at the executor level.","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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Database Executors Archived Bots Db Path Executors Get"}}}},"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 paginated position history from an archived bot database.\n\nRetrieves position records tracking the bot's open and closed positions over time.\nPositions aggregate multiple orders and trades into logical position entries.\n\nUse this endpoint to analyze position sizing, holding periods, or track the\nbot's exposure over time.","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":"Maximum number of positions to return (1-1000)","default":100,"title":"Limit"},"description":"Maximum number of positions to return (1-1000)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","description":"Number of positions to skip for pagination","default":0,"title":"Offset"},"description":"Number of positions to skip for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Database Positions Archived Bots Db Path Positions Get"}}}},"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 configuration records from an archived bot database.\n\nRetrieves records of V2 strategy controllers that were running on the bot,\nincluding their configurations and performance summaries. This shows what\nstrategies were deployed and how they were configured.\n\nUse this endpoint to review what controllers were active, verify configuration\nsettings, or analyze controller-level performance.","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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Database Controllers Archived Bots Db Path Controllers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gateway-proxy/{path}":{"patch":{"tags":["Gateway Proxy"],"summary":"Forward To Gateway","description":"Forward request to Gateway server unchanged.\n\nTransparent proxy that forwards any request to the Gateway server. The request\nbody, headers, query parameters, and HTTP method are passed through unchanged.\nThe response from Gateway is returned unchanged to the client.\n\nThis endpoint supports all HTTP methods (GET, POST, PUT, DELETE, PATCH) and\nany path under /gateway-proxy/.","operationId":"forward_to_gateway_gateway_proxy__path__patch","security":[{"HTTPBasic":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Gateway Proxy"],"summary":"Forward To Gateway","description":"Forward request to Gateway server unchanged.\n\nTransparent proxy that forwards any request to the Gateway server. The request\nbody, headers, query parameters, and HTTP method are passed through unchanged.\nThe response from Gateway is returned unchanged to the client.\n\nThis endpoint supports all HTTP methods (GET, POST, PUT, DELETE, PATCH) and\nany path under /gateway-proxy/.","operationId":"forward_to_gateway_gateway_proxy__path__patch","security":[{"HTTPBasic":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Gateway Proxy"],"summary":"Forward To Gateway","description":"Forward request to Gateway server unchanged.\n\nTransparent proxy that forwards any request to the Gateway server. The request\nbody, headers, query parameters, and HTTP method are passed through unchanged.\nThe response from Gateway is returned unchanged to the client.\n\nThis endpoint supports all HTTP methods (GET, POST, PUT, DELETE, PATCH) and\nany path under /gateway-proxy/.","operationId":"forward_to_gateway_gateway_proxy__path__patch","security":[{"HTTPBasic":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Gateway Proxy"],"summary":"Forward To Gateway","description":"Forward request to Gateway server unchanged.\n\nTransparent proxy that forwards any request to the Gateway server. The request\nbody, headers, query parameters, and HTTP method are passed through unchanged.\nThe response from Gateway is returned unchanged to the client.\n\nThis endpoint supports all HTTP methods (GET, POST, PUT, DELETE, PATCH) and\nany path under /gateway-proxy/.","operationId":"forward_to_gateway_gateway_proxy__path__patch","security":[{"HTTPBasic":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Gateway Proxy"],"summary":"Forward To Gateway","description":"Forward request to Gateway server unchanged.\n\nTransparent proxy that forwards any request to the Gateway server. The request\nbody, headers, query parameters, and HTTP method are passed through unchanged.\nThe response from Gateway is returned unchanged to the client.\n\nThis endpoint supports all HTTP methods (GET, POST, PUT, DELETE, PATCH) and\nany path under /gateway-proxy/.","operationId":"forward_to_gateway_gateway_proxy__path__patch","security":[{"HTTPBasic":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gateway-proxy":{"get":{"tags":["Gateway Proxy"],"summary":"Gateway Root","description":"Gateway health check.\n\nChecks if the Gateway server is running and responsive by calling its root endpoint.\nUse this to verify Gateway connectivity before making other requests.","operationId":"gateway_root_gateway_proxy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBasic":[]}]}},"/":{"get":{"summary":"Root","description":"API root endpoint returning basic information.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccountsDistributionFilterRequest":{"properties":{"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter to specific accounts. If null/empty, includes all accounts in distribution.","examples":[["main_account"],["main_account","trading_account"]]},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter to specific connectors within each account. If null/empty, includes all connectors.","examples":[["binance"],["binance","binance_perpetual"]]}},"type":"object","title":"AccountsDistributionFilterRequest","description":"Request model for filtering portfolio distribution by account.\n\nUsed to query how the portfolio is distributed across different accounts,\nwith optional filtering by connector.\n\nExample:\n ```json\n {\n \"account_names\": [\"main_account\", \"trading_account\"],\n \"connector_names\": [\"binance\"]\n }\n ```"},"ActiveOrderFilterRequest":{"properties":{"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","description":"Maximum number of items to return per page. Range: 1-1000. Default: 100.","default":100},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor from a previous response's `next_cursor`. Omit for the first page. Pass the `next_cursor` value to fetch the next page."},"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter by account names. If omitted, queries all accounts."},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter by connector names (e.g., ['binance', 'binance_perpetual']). If omitted, queries all connectors."},"trading_pairs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trading Pairs","description":"Filter by trading pairs (e.g., ['BTC-USDT', 'ETH-USDT']). If omitted, queries all pairs."}},"type":"object","title":"ActiveOrderFilterRequest","description":"Request model for filtering currently active (in-flight) orders.\n\nUsed to query orders that are currently open or pending on exchanges.\nAll filters are optional - omitting a filter includes all values for that field.\n\nExample:\n ```json\n {\n \"account_names\": [\"main\"],\n \"connector_names\": [\"binance\"],\n \"trading_pairs\": [\"BTC-USDT\"],\n \"limit\": 50\n }\n ```"},"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"},"BacktestingConfig":{"properties":{"start_time":{"type":"integer","title":"Start Time","description":"Unix timestamp for backtest start time. Default: 2025-01-01 00:00:00 UTC","default":1735689600},"end_time":{"type":"integer","title":"End Time","description":"Unix timestamp for backtest end time. Default: 2025-02-01 00:00:00 UTC","default":1738368000},"backtesting_resolution":{"type":"string","title":"Backtesting Resolution","description":"Candle interval for simulation. Options: '1m', '5m', '15m', '1h', '4h', '1d'","default":"1m"},"trade_cost":{"type":"number","title":"Trade Cost","description":"Trading fee as decimal (e.g., 0.0006 = 0.06%). Applied to each trade execution","default":0.0006},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Config","description":"Controller configuration - either a config name (str) referencing a YAML file, or a complete configuration dictionary with controller parameters"}},"type":"object","required":["config"],"title":"BacktestingConfig","description":"Configuration for running a backtesting simulation."},"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.0},"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"},"CandlesConfigRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to fetch candles from (e.g., 'binance', 'kucoin', 'gate_io')","example":"binance"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair in standard format with hyphen separator (e.g., 'BTC-USDT', 'ETH-USDT')","example":"BTC-USDT"},"interval":{"type":"string","title":"Interval","description":"Candle time interval. Common values: '1m' (1 minute), '5m', '15m', '1h', '4h', '1d'. Available intervals vary by exchange.","default":"1m","example":"1h"},"max_records":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Max Records","description":"Maximum number of candles to return. Must be between 1 and 1000. Default is 500.","default":500,"example":100}},"type":"object","required":["connector_name","trading_pair"],"title":"CandlesConfigRequest","description":"Configuration request for fetching real-time candle (OHLCV) data.\n\nUsed to specify which exchange connector, trading pair, time interval,\nand number of candles to retrieve for real-time market data feeds."},"ConnectorOrderTypesResponse":{"properties":{"connector":{"type":"string","title":"Connector","description":"Name of the connector","examples":["binance","bybit","kucoin"]},"supported_order_types":{"items":{"type":"string"},"type":"array","title":"Supported Order Types","description":"List of order type names supported by this connector","examples":[["LIMIT","MARKET","LIMIT_MAKER"],["LIMIT","MARKET"]]}},"type":"object","required":["connector","supported_order_types"],"title":"ConnectorOrderTypesResponse","description":"Response containing the order types supported by a connector.\n\nDifferent exchanges support different order types. Check this before\nplacing orders to ensure the order type is supported.","example":{"connector":"binance","supported_order_types":["LIMIT","MARKET","LIMIT_MAKER"]}},"Controller":{"properties":{"content":{"type":"string","title":"Content","description":"Python source code for the controller. Should be a valid Python module implementing a controller class that extends the appropriate Hummingbot V2 base class."},"type":{"anyOf":[{"$ref":"#/components/schemas/ControllerType"},{"type":"null"}],"description":"Controller type for validation. If provided, must match the URL path controller_type. Optional - primarily used for client-side validation."}},"type":"object","required":["content"],"title":"Controller","description":"Request model for creating or updating a controller Python file."},"ControllerType":{"type":"string","enum":["directional_trading","market_making","generic"],"title":"ControllerType","description":"Types of V2 strategy controllers available in Hummingbot.\n\n- DIRECTIONAL_TRADING: Controllers for trend-following, signal-based, or momentum strategies\n- MARKET_MAKING: Controllers for market making, liquidity provision, and spread-based strategies\n- GENERIC: Controllers for other strategy types like arbitrage, cross-exchange, or custom logic"},"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":"Full Docker image name with optional tag. Format: 'repository/image:tag'. Examples: 'hummingbot/hummingbot:latest', 'hummingbot/hummingbot:1.28.0', 'hummingbot/gateway:latest'. If no tag is specified, 'latest' is assumed."}},"type":"object","required":["image_name"],"title":"DockerImage","description":"Docker image specification for pull operations."},"FundingInfoRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the perpetual futures connector (must contain '_perpetual', e.g., 'binance_perpetual', 'hyperliquid_perpetual')","example":"binance_perpetual"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Perpetual trading pair to get funding info for (e.g., 'BTC-USDT', 'ETH-USDT')","example":"BTC-USDT"}},"type":"object","required":["connector_name","trading_pair"],"title":"FundingInfoRequest","description":"Request model for fetching perpetual futures funding information.\n\nOnly valid for perpetual futures connectors (connector names containing '_perpetual').\nUse this to get current funding rates, next funding time, and reference prices."},"FundingInfoResponse":{"properties":{"trading_pair":{"type":"string","title":"Trading Pair","description":"Perpetual trading pair","example":"BTC-USDT"},"funding_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Funding Rate","description":"Current funding rate as a decimal (e.g., 0.0001 = 0.01%). Positive means longs pay shorts.","example":0.0001},"next_funding_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Next Funding Time","description":"Unix timestamp (in seconds) of the next funding payment. Funding is typically every 8 hours.","example":1704096000.0},"mark_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mark Price","description":"Current mark price used for liquidation calculations and funding rate computation","example":42155.25},"index_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Index Price","description":"Current index price (aggregate price from multiple spot exchanges) used as reference","example":42150.0}},"type":"object","required":["trading_pair"],"title":"FundingInfoResponse","description":"Response containing perpetual futures funding information.\n\nFunding rates are periodic payments between long and short position holders.\nA positive rate means longs pay shorts; a negative rate means shorts pay longs."},"FundingPaymentFilterRequest":{"properties":{"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","description":"Maximum number of items to return per page. Range: 1-1000. Default: 100.","default":100},"start_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Time","description":"Start of time range as Unix timestamp in milliseconds (inclusive). Example: 1704067200000 for 2024-01-01 00:00:00 UTC. If omitted, no lower bound."},"end_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Time","description":"End of time range as Unix timestamp in milliseconds (inclusive). Example: 1704153600000 for 2024-01-02 00:00:00 UTC. If omitted, no upper bound."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor from a previous response's `next_cursor`. Omit for the first page. Pass the `next_cursor` value to fetch the next page."},"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter by account names. If omitted, queries all accounts."},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter by perpetual connector names. If omitted, queries all perpetual connectors. Spot connectors are always excluded."},"trading_pair":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trading Pair","description":"Filter by a single trading pair (e.g., 'BTC-USDT'). If omitted, queries all pairs."}},"type":"object","title":"FundingPaymentFilterRequest","description":"Request model for filtering funding payment history from perpetual connectors.\n\nUsed to query historical funding payments (periodic payments between longs and shorts\nto keep perpetual prices aligned with spot). Supports time-range filtering.\n\nExample:\n ```json\n {\n \"account_names\": [\"main\"],\n \"connector_names\": [\"binance_perpetual\"],\n \"trading_pair\": \"BTC-USDT\",\n \"start_time\": 1704067200000,\n \"end_time\": 1704153600000,\n \"limit\": 100\n }\n ```"},"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 name. Supported chains: 'solana' (for Jupiter, Raydium, Meteora), 'ethereum' (for Uniswap), and other EVM chains configured in Gateway.","example":"solana"},"private_key":{"type":"string","title":"Private Key","description":"The wallet's private key. Format varies by chain: Solana: Base58-encoded (88 chars). Ethereum/EVM: Hex-encoded (64 chars, with or without 0x prefix).","example":"4wBqpZM9xrMqRQsC8gxEh..."},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network","description":"Network to use for this wallet. If not specified, uses the chain's default network. Examples: 'mainnet-beta' for Solana mainnet, 'mainnet' for Ethereum mainnet.","example":"mainnet-beta"}},"type":"object","required":["chain","private_key"],"title":"GatewayWalletCredential","description":"Credentials for importing a blockchain wallet into Gateway.\n\nUsed to add an existing wallet to Gateway for DEX trading. Gateway encrypts\nand stores the private key securely.\n\nExample:\n {\n \"chain\": \"solana\",\n \"private_key\": \"4wBqpZM9xrMqRQsC8gxEh...\"\n }"},"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 to set leverage for, in BASE-QUOTE format (e.g., 'BTC-USDT', 'ETH-USDC'). Must be a valid perpetual trading pair on the connector.","example":"BTC-USDT"},"leverage":{"type":"integer","maximum":125.0,"minimum":1.0,"title":"Leverage","description":"Leverage multiplier value. Valid range depends on the exchange and trading pair. Common ranges: 1-125 for Binance, 1-100 for OKX. Higher leverage = higher risk.","example":10}},"type":"object","required":["trading_pair","leverage"],"title":"LeverageRequest","description":"Request model for setting leverage on perpetual/futures connectors.\n\nLeverage determines the multiplier applied to your margin when opening positions.\nHigher leverage increases both potential profits and losses.\n\nExample:\n {\n \"trading_pair\": \"BTC-USDT\",\n \"leverage\": 10\n }"},"OrderBookLevel":{"properties":{"price":{"type":"number","title":"Price","description":"Price at this order book level","example":42150.0},"amount":{"type":"number","title":"Amount","description":"Total base asset amount available at this price level","example":2.5}},"type":"object","required":["price","amount"],"title":"OrderBookLevel","description":"Single price level in an order book.\n\nRepresents the total amount available at a specific price point."},"OrderBookQueryResult":{"properties":{"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair that was analyzed","example":"BTC-USDT"},"is_buy":{"type":"boolean","title":"Is Buy","description":"True if this was a buy-side query, False for sell-side","example":true},"query_volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Query Volume","description":"The base asset volume that was queried (if applicable)","example":5.0},"query_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Query Price","description":"The price level that was queried (if applicable)","example":42200.0},"result_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Result Price","description":"Resulting price from the query. For price-for-volume queries, this is the worst price needed to fill the order.","example":42175.5},"result_volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Result Volume","description":"Resulting base asset volume from the query. For volume-for-price queries, this is the total available liquidity.","example":5.0},"result_quote_volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Result Quote Volume","description":"Resulting quote currency volume. Total value in quote currency for the calculated order.","example":210877.5},"average_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Price","description":"Volume Weighted Average Price (VWAP). The average price across all price levels consumed.","example":42155.25},"timestamp":{"type":"number","title":"Timestamp","description":"Unix timestamp (in seconds) when the query was executed","example":1704067200.123}},"type":"object","required":["trading_pair","is_buy","timestamp"],"title":"OrderBookQueryResult","description":"Response containing results from order book analysis queries.\n\nDifferent fields are populated depending on the query type:\n- price-for-volume: result_price shows the worst fill price\n- volume-for-price: result_volume shows available liquidity\n- vwap: average_price shows the volume-weighted average price\n\nNote: If insufficient liquidity exists, result fields may be None."},"OrderBookRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to fetch order book from","example":"binance"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair to get order book for in hyphen-separated format","example":"BTC-USDT"},"depth":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Depth","description":"Number of price levels to return on each side (bids and asks). Higher values provide more market depth but larger responses.","default":10,"example":20}},"type":"object","required":["connector_name","trading_pair"],"title":"OrderBookRequest","description":"Request model for fetching an order book snapshot.\n\nOrder books show the current buy (bid) and sell (ask) orders at various price levels.\nUse depth to limit how many price levels are returned."},"OrderBookResponse":{"properties":{"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair for this order book","example":"BTC-USDT"},"bids":{"items":{"$ref":"#/components/schemas/OrderBookLevel"},"type":"array","title":"Bids","description":"List of bid (buy) orders sorted from highest to lowest price. First entry is the best bid.","example":[{"amount":1.5,"price":42150.0},{"amount":2.0,"price":42149.5}]},"asks":{"items":{"$ref":"#/components/schemas/OrderBookLevel"},"type":"array","title":"Asks","description":"List of ask (sell) orders sorted from lowest to highest price. First entry is the best ask.","example":[{"amount":1.2,"price":42151.0},{"amount":0.8,"price":42151.5}]},"timestamp":{"type":"number","title":"Timestamp","description":"Unix timestamp (in seconds) when this snapshot was taken","example":1704067200.123}},"type":"object","required":["trading_pair","bids","asks","timestamp"],"title":"OrderBookResponse","description":"Response containing an order book snapshot.\n\nBids are sorted from highest to lowest price (best bids first).\nAsks are sorted from lowest to highest price (best asks first).\nThe spread is the difference between the lowest ask and highest bid."},"OrderFilterRequest":{"properties":{"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","description":"Maximum number of items to return per page. Range: 1-1000. Default: 100.","default":100},"start_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Time","description":"Start of time range as Unix timestamp in milliseconds (inclusive). Example: 1704067200000 for 2024-01-01 00:00:00 UTC. If omitted, no lower bound."},"end_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Time","description":"End of time range as Unix timestamp in milliseconds (inclusive). Example: 1704153600000 for 2024-01-02 00:00:00 UTC. If omitted, no upper bound."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor from a previous response's `next_cursor`. Omit for the first page. Pass the `next_cursor` value to fetch the next page."},"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter by account names. If omitted, queries all accounts."},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter by connector names (e.g., ['binance', 'kucoin']). If omitted, queries all connectors."},"trading_pairs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trading Pairs","description":"Filter by trading pairs (e.g., ['BTC-USDT', 'ETH-USDT']). If omitted, queries all pairs."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Filter by order status. Valid values: 'SUBMITTED', 'OPEN', 'PARTIALLY_FILLED', 'FILLED', 'CANCELLED', 'FAILED'. If omitted, queries all statuses."}},"type":"object","title":"OrderFilterRequest","description":"Request model for searching historical orders with multiple filter criteria.\n\nSupports filtering by account, connector, trading pair, status, and time range.\nAll filters are optional - omitting a filter includes all values for that field.\n\nExample:\n ```json\n {\n \"account_names\": [\"main\", \"trading\"],\n \"connector_names\": [\"binance\"],\n \"trading_pairs\": [\"BTC-USDT\", \"ETH-USDT\"],\n \"status\": \"FILLED\",\n \"start_time\": 1704067200000,\n \"end_time\": 1704153600000,\n \"limit\": 100\n }\n ```"},"PaginatedResponse":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data","description":"Array of result items. Structure depends on the specific endpoint."},"pagination":{"additionalProperties":true,"type":"object","title":"Pagination","description":"Pagination metadata containing: `limit` (items per page), `has_more` (boolean, true if more results exist), `next_cursor` (string, pass to cursor param for next page, null if no more pages), `total_count` (total items matching the query across all pages)."}},"type":"object","required":["data","pagination"],"title":"PaginatedResponse","description":"Generic paginated response wrapper for list endpoints.\n\nContains the requested data items and pagination metadata for fetching additional pages.\n\nExample:\n ```json\n {\n \"data\": [\n {\"order_id\": \"abc123\", \"status\": \"FILLED\"},\n {\"order_id\": \"def456\", \"status\": \"OPEN\"}\n ],\n \"pagination\": {\n \"limit\": 100,\n \"has_more\": true,\n \"next_cursor\": \"1705123456789:def456\",\n \"total_count\": 500\n }\n }\n ```","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":"Filter to specific accounts. If null/empty, includes all accounts in distribution.","examples":[["main_account"],["main_account","trading_account"]]},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter to specific connectors. If null/empty, includes all connectors in distribution.","examples":[["binance"],["binance","bybit"]]}},"type":"object","title":"PortfolioDistributionFilterRequest","description":"Request model for filtering portfolio distribution by token.\n\nUsed to query how the portfolio is distributed across different tokens,\nwith optional filtering by account and connector.\n\nExample:\n ```json\n {\n \"account_names\": [\"main_account\", \"trading_account\"],\n \"connector_names\": [\"binance\", \"bybit\"]\n }\n ```"},"PortfolioHistoryFilterRequest":{"properties":{"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","description":"Maximum number of items to return per page. Range: 1-1000. Default: 100.","default":100},"start_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Time","description":"Start of time range as Unix timestamp in milliseconds (inclusive). Example: 1704067200000 for 2024-01-01 00:00:00 UTC. If omitted, no lower bound."},"end_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Time","description":"End of time range as Unix timestamp in milliseconds (inclusive). Example: 1704153600000 for 2024-01-02 00:00:00 UTC. If omitted, no upper bound."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor from a previous response's `next_cursor`. Omit for the first page. Pass the `next_cursor` value to fetch the next page."},"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter to specific accounts. If null/empty, returns history for all accounts.","examples":[["main_account"],["main_account","trading_account"]]},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter to specific connectors. If null/empty, returns history for all connectors.","examples":[["binance"],["binance","bybit"]]},"interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval","description":"Data sampling interval. Larger intervals reduce data volume. Valid values: '5m' (raw), '15m', '30m', '1h', '4h', '12h', '1d'","default":"5m","examples":["5m","1h","4h","1d"]}},"type":"object","title":"PortfolioHistoryFilterRequest","description":"Request model for querying historical portfolio snapshots.\n\nRetrieves historical portfolio state data with configurable time intervals\nfor data sampling. Larger intervals reduce response size and improve performance.\nPortfolio snapshots are collected every 5 minutes.\n\nExample:\n ```json\n {\n \"account_names\": [\"main_account\"],\n \"connector_names\": [\"binance\"],\n \"start_time\": 1704067200000,\n \"end_time\": 1704153600000,\n \"interval\": \"1h\",\n \"limit\": 100,\n \"cursor\": null\n }\n ```"},"PortfolioStateFilterRequest":{"properties":{"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter to specific accounts. If null/empty, returns all accounts.","examples":[["main_account"],["main_account","trading_account"]]},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter to specific connectors/exchanges. If null/empty, returns all connectors.","examples":[["binance"],["binance","bybit","kucoin"]]},"skip_gateway":{"type":"boolean","title":"Skip Gateway","description":"If true, skip Gateway (DEX) wallet balance updates. Significantly faster for CEX-only queries.","default":false},"refresh":{"type":"boolean","title":"Refresh","description":"If true, fetch fresh balances from exchanges (slower but accurate). If false, return cached state (faster).","default":false}},"type":"object","title":"PortfolioStateFilterRequest","description":"Request model for filtering and controlling portfolio state retrieval.\n\nControls which accounts and connectors to include in the portfolio state,\nand whether to return cached data or fetch fresh balances from exchanges.\n\nExample:\n ```json\n {\n \"account_names\": [\"main_account\"],\n \"connector_names\": [\"binance\", \"bybit\"],\n \"skip_gateway\": false,\n \"refresh\": true\n }\n ```"},"PositionFilterRequest":{"properties":{"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","description":"Maximum number of items to return per page. Range: 1-1000. Default: 100.","default":100},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor from a previous response's `next_cursor`. Omit for the first page. Pass the `next_cursor` value to fetch the next page."},"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter by account names. If omitted, queries all accounts."},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter by perpetual connector names (e.g., ['binance_perpetual', 'kucoin_perpetual']). If omitted, queries all perpetual connectors. Spot connectors are always excluded."}},"type":"object","title":"PositionFilterRequest","description":"Request model for filtering perpetual futures positions.\n\nUsed to query open positions from perpetual connectors. Only connectors with\n'_perpetual' in the name will be queried.\n\nExample:\n ```json\n {\n \"account_names\": [\"main\"],\n \"connector_names\": [\"binance_perpetual\"],\n \"limit\": 50\n }\n ```"},"PositionModeRequest":{"properties":{"position_mode":{"type":"string","title":"Position Mode","description":"Position mode for the perpetual connector. ONEWAY: Single direction positions only (long OR short). HEDGE: Can hold both long AND short positions on the same trading pair simultaneously.","example":"HEDGE"}},"type":"object","required":["position_mode"],"title":"PositionModeRequest","description":"Request model for setting position mode on perpetual/futures connectors.\n\nPosition mode determines how long and short positions are handled:\n- ONEWAY: Net position mode. Long and short positions offset each other.\n- HEDGE: Allows holding both long and short positions simultaneously on the same pair.\n\nNote: Position mode can only be changed when there are no open positions.\n\nExample:\n {\n \"position_mode\": \"HEDGE\"\n }"},"PriceForQuoteVolumeRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to query","example":"binance"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair to analyze in hyphen-separated format","example":"BTC-USDT"},"is_buy":{"type":"boolean","title":"Is Buy","description":"True to analyze buy side (asks), False to analyze sell side (bids). A buy order consumes asks; a sell order consumes bids.","example":true},"quote_volume":{"type":"number","exclusiveMinimum":0.0,"title":"Quote Volume","description":"Quote currency volume to fill (e.g., amount of USDT in BTC-USDT pair)","example":10000.0}},"type":"object","required":["connector_name","trading_pair","is_buy","quote_volume"],"title":"PriceForQuoteVolumeRequest","description":"Request model for getting the price required to fill a specific quote volume.\n\nUse this when you want to spend/receive a specific amount of quote currency\n(e.g., spend exactly 10000 USDT) and need to know the execution price."},"PriceForVolumeRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to query","example":"binance"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair to analyze in hyphen-separated format","example":"BTC-USDT"},"is_buy":{"type":"boolean","title":"Is Buy","description":"True to analyze buy side (asks), False to analyze sell side (bids). A buy order consumes asks; a sell order consumes bids.","example":true},"volume":{"type":"number","exclusiveMinimum":0.0,"title":"Volume","description":"Base asset volume to fill (e.g., amount of BTC in BTC-USDT pair)","example":5.0}},"type":"object","required":["connector_name","trading_pair","is_buy","volume"],"title":"PriceForVolumeRequest","description":"Request model for getting the price required to fill a specific base asset volume.\n\nUse this to estimate price impact and slippage for a given order size.\nThe result shows the worst price you'd pay/receive to fill the entire volume."},"PriceRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to fetch prices from (e.g., 'binance', 'kucoin', 'hyperliquid')","example":"binance"},"trading_pairs":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Trading Pairs","description":"List of trading pairs to get prices for. Use hyphen-separated format (e.g., 'BTC-USDT').","example":["BTC-USDT","ETH-USDT","SOL-USDT"]}},"type":"object","required":["connector_name","trading_pairs"],"title":"PriceRequest","description":"Request model for fetching current mid prices from an exchange.\n\nUse this to get real-time price data for one or more trading pairs\nfrom a specific exchange connector."},"PricesResponse":{"properties":{"connector":{"type":"string","title":"Connector","description":"Name of the exchange connector that provided the prices","example":"binance"},"prices":{"additionalProperties":{"type":"number"},"type":"object","title":"Prices","description":"Dictionary mapping trading pair names to their current mid prices","example":{"BTC-USDT":42150.5,"ETH-USDT":2250.75,"SOL-USDT":98.25}},"timestamp":{"type":"number","title":"Timestamp","description":"Unix timestamp (in seconds) when the response was generated","example":1704067200.123}},"type":"object","required":["connector","prices","timestamp"],"title":"PricesResponse","description":"Response containing current prices for multiple trading pairs.\n\nPrices are returned as a mapping from trading pair to mid price value."},"QuoteVolumeForPriceRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to query","example":"binance"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair to analyze in hyphen-separated format","example":"BTC-USDT"},"is_buy":{"type":"boolean","title":"Is Buy","description":"True to analyze buy side (asks), False to analyze sell side (bids). A buy order consumes asks; a sell order consumes bids.","example":true},"price":{"type":"number","exclusiveMinimum":0.0,"title":"Price","description":"Target price level to calculate cumulative quote volume up to","example":42200.0}},"type":"object","required":["connector_name","trading_pair","is_buy","price"],"title":"QuoteVolumeForPriceRequest","description":"Request model for getting the cumulative quote volume available up to a specific price.\n\nSimilar to VolumeForPriceRequest but returns the value in quote currency\n(e.g., USDT in BTC-USDT) instead of base currency."},"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."},"Script":{"properties":{"content":{"type":"string","title":"Content","description":"Python source code for the script. Should be a valid Python module implementing a strategy class that extends ScriptStrategyBase."}},"type":"object","required":["content"],"title":"Script","description":"Request model for creating or updating a V1 strategy script Python file."},"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"},"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. This should match the instance_name used when the bot was deployed (e.g., 'my-trading-bot-20240115-143022').","examples":["my-trading-bot-20240115-143022","dman-maker-btc"]},"log_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Log Level","description":"Logging verbosity level for the bot. Higher levels show more detail. Valid values: DEBUG (most verbose), INFO (standard), WARNING, ERROR (least verbose).","examples":["DEBUG","INFO","WARNING","ERROR"]},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script","description":"Name of the Python script to execute (without .py extension). The script must exist in the bot's scripts directory. Common scripts include 'v2_with_controllers' for controller-based strategies.","examples":["v2_with_controllers","simple_pmm","avellaneda_stoikov"]},"conf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conf","description":"Name of the script configuration file (without .yml extension). The configuration must exist in conf/scripts/ directory. Contains strategy parameters like trading pairs, order amounts, and spreads.","examples":["dman_maker_config","grid_btc_usdt_config"]},"async_backend":{"type":"boolean","title":"Async Backend","description":"When True, the start command is sent asynchronously and returns immediately. When False (default), waits for confirmation that the bot has started.","default":false}},"type":"object","required":["bot_name"],"title":"StartBotAction","description":"Action to start a bot's trading operations.\n\nThis action sends a start command to an existing bot container via MQTT.\nThe bot must already be deployed and in a stopped state.\n\nExample:\n {\n \"bot_name\": \"my-bot-20240115-143022\",\n \"log_level\": \"INFO\",\n \"script\": \"v2_with_controllers\",\n \"conf\": \"my_strategy_config\",\n \"async_backend\": true\n }"},"StopBotAction":{"properties":{"bot_name":{"type":"string","title":"Bot Name","description":"Name of the bot instance to act upon. This should match the instance_name used when the bot was deployed (e.g., 'my-trading-bot-20240115-143022').","examples":["my-trading-bot-20240115-143022","dman-maker-btc"]},"skip_order_cancellation":{"type":"boolean","title":"Skip Order Cancellation","description":"Controls whether to cancel open orders on the exchange when stopping. When False (default), all open orders are cancelled before stopping. When True, orders remain open on the exchange. Use True for quick stops or when you want to manually manage existing orders.","default":false},"async_backend":{"type":"boolean","title":"Async Backend","description":"When True, the stop command is sent asynchronously and returns immediately. When False (default), waits for confirmation that the bot has stopped.","default":false}},"type":"object","required":["bot_name"],"title":"StopBotAction","description":"Action to stop a bot's trading operations.\n\nThis action gracefully stops the trading script. The Docker container\ncontinues running and can be restarted with StartBotAction.\n\nExample:\n {\n \"bot_name\": \"my-bot-20240115-143022\",\n \"skip_order_cancellation\": false,\n \"async_backend\": false\n }"},"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.0},"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.0}},"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.0,"minimum":1.0,"title":"Limit","description":"Maximum number of items to return per page. Range: 1-1000. Default: 100.","default":100},"start_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Time","description":"Start of time range as Unix timestamp in milliseconds (inclusive). Example: 1704067200000 for 2024-01-01 00:00:00 UTC. If omitted, no lower bound."},"end_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Time","description":"End of time range as Unix timestamp in milliseconds (inclusive). Example: 1704153600000 for 2024-01-02 00:00:00 UTC. If omitted, no upper bound."},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor","description":"Pagination cursor from a previous response's `next_cursor`. Omit for the first page. Pass the `next_cursor` value to fetch the next page."},"account_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Account Names","description":"Filter by account names. If omitted, queries all accounts."},"connector_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Connector Names","description":"Filter by connector names (e.g., ['binance', 'kucoin']). If omitted, queries all connectors."},"trading_pairs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trading Pairs","description":"Filter by trading pairs (e.g., ['BTC-USDT', 'ETH-USDT']). If omitted, queries all pairs."},"trade_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trade Types","description":"Filter by trade direction: ['BUY'], ['SELL'], or ['BUY', 'SELL']. If omitted, queries both types."}},"type":"object","title":"TradeFilterRequest","description":"Request model for filtering trade execution history (fills).\n\nUsed to query historical trade fills - the actual executions when orders matched.\nSupports filtering by account, connector, trading pair, trade type, and time range.\n\nExample:\n ```json\n {\n \"account_names\": [\"main\"],\n \"connector_names\": [\"binance\"],\n \"trading_pairs\": [\"BTC-USDT\", \"ETH-USDT\"],\n \"trade_types\": [\"BUY\"],\n \"start_time\": 1704067200000,\n \"end_time\": 1704153600000,\n \"limit\": 100\n }\n ```"},"TradeRequest":{"properties":{"account_name":{"type":"string","title":"Account Name","description":"Name of the configured account to execute the trade. Must match an account in the configuration."},"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector (e.g., 'binance', 'binance_perpetual', 'kucoin', 'gate_io'). Use '_perpetual' suffix for futures trading."},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair in BASE-QUOTE format (e.g., 'BTC-USDT', 'ETH-USDC'). Must be a valid pair on the specified connector."},"trade_type":{"type":"string","enum":["BUY","SELL"],"title":"Trade Type","description":"Order direction. 'BUY' to purchase base asset, 'SELL' to sell base asset."},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount","description":"Quantity of base asset to trade. Must be positive and comply with exchange's minimum order size."},"order_type":{"type":"string","enum":["LIMIT","MARKET","LIMIT_MAKER"],"title":"Order Type","description":"Order execution type. 'LIMIT' requires a price. 'MARKET' executes at best available price. 'LIMIT_MAKER' is a limit order that will be rejected if it would immediately match.","default":"LIMIT"},"price":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price","description":"Order price for LIMIT and LIMIT_MAKER orders. Required for limit orders, ignored for market orders. Must comply with exchange's tick size requirements."},"position_action":{"type":"string","enum":["OPEN","CLOSE"],"title":"Position Action","description":"Position action for perpetual futures trading. 'OPEN' to enter a new position or add to existing. 'CLOSE' to reduce or exit a position. For spot trading, this is typically 'OPEN'.","default":"OPEN"}},"type":"object","required":["account_name","connector_name","trading_pair","trade_type","amount"],"title":"TradeRequest","description":"Request model for placing buy or sell orders.\n\nUsed to submit new orders to centralized exchanges through a configured account\nand connector. Supports spot trading and perpetual futures with position actions.\n\nExample:\n ```json\n {\n \"account_name\": \"main\",\n \"connector_name\": \"binance\",\n \"trading_pair\": \"BTC-USDT\",\n \"trade_type\": \"BUY\",\n \"amount\": \"0.001\",\n \"order_type\": \"LIMIT\",\n \"price\": \"42000.00\",\n \"position_action\": \"OPEN\"\n }\n ```"},"TradeResponse":{"properties":{"order_id":{"type":"string","title":"Order Id","description":"Client order ID assigned by the system. Use this ID to track, cancel, or query the order."},"account_name":{"type":"string","title":"Account Name","description":"Name of the account that placed the order."},"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector used for the order."},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair for the order (e.g., 'BTC-USDT')."},"trade_type":{"type":"string","title":"Trade Type","description":"Order direction: 'BUY' or 'SELL'."},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount","description":"Order quantity in base asset."},"order_type":{"type":"string","title":"Order Type","description":"Order type: 'LIMIT', 'MARKET', or 'LIMIT_MAKER'."},"price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price","description":"Order price. Null for market orders."},"status":{"type":"string","title":"Status","description":"Initial order status. 'submitted' indicates the order was sent to the exchange. Query /orders/active or /orders/search for updated 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 returned after placing an order.\n\nContains confirmation of the submitted order including the assigned order ID\nfor tracking. Note that a 'submitted' status means the order was sent to the\nexchange, not necessarily that it has been accepted or filled.\n\nExample:\n ```json\n {\n \"order_id\": \"buy-BTC-USDT-1705123456789\",\n \"account_name\": \"main\",\n \"connector_name\": \"binance\",\n \"trading_pair\": \"BTC-USDT\",\n \"trade_type\": \"BUY\",\n \"amount\": \"0.001\",\n \"order_type\": \"LIMIT\",\n \"price\": \"42000.00\",\n \"status\": \"submitted\"\n }\n ```"},"V2ControllerDeployment":{"properties":{"instance_name":{"type":"string","title":"Instance Name","description":"Base name for the bot instance. A timestamp will be appended automatically (e.g., 'my-bot' becomes 'my-bot-20240115-143022'). This ensures each deployment has a unique name even if the same base name is reused.","examples":["dman-maker","multi-controller","grid-strategy"]},"credentials_profile":{"type":"string","title":"Credentials Profile","description":"Name of the exchange credentials profile to use. The profile must exist in the credentials directory and contain valid API credentials for the exchanges used by the controllers.","examples":["binance_main","kucoin_trading","hyperliquid_account1"]},"controllers_config":{"items":{"type":"string"},"type":"array","title":"Controllers Config","description":"List of controller configuration file names (without .yml extension). Each configuration must exist in conf/controllers/ directory. Multiple controllers can be combined to run different strategies simultaneously on the same bot.","examples":[["dman_maker_btc_config"],["dman_maker_btc","dman_maker_eth","grid_sol"],["xemm_btc_binance_kucoin"]]},"max_global_drawdown_quote":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Global Drawdown Quote","description":"Maximum total drawdown allowed across ALL controllers in quote currency (typically USDT). When this threshold is exceeded, all controllers stop trading as a risk management measure. Set to None for no global limit.","examples":[1000.0,5000.0,10000.0]},"max_controller_drawdown_quote":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Controller Drawdown Quote","description":"Maximum drawdown allowed per individual controller in quote currency (typically USDT). When a single controller exceeds this threshold, only that controller stops while others continue. Set to None for no per-controller limit.","examples":[250.0,500.0,1000.0]},"image":{"type":"string","title":"Image","description":"Docker image to use for the Hummingbot instance. Version pinning is recommended for production deployments to ensure consistent behavior.","default":"hummingbot/hummingbot:latest","examples":["hummingbot/hummingbot:latest","hummingbot/hummingbot:1.26.0"]},"headless":{"type":"boolean","title":"Headless","description":"When True, runs the bot without the terminal UI. Recommended for production deployments where bots are managed entirely via API. Reduces memory and CPU usage.","default":false}},"type":"object","required":["instance_name","credentials_profile","controllers_config"],"title":"V2ControllerDeployment","description":"Configuration for deploying a Hummingbot instance with V2 controllers.\n\nControllers are modular strategy components that can be combined to create\nsophisticated trading strategies. This model simplifies deployment by\nautomatically generating the required script configuration.\n\nThe endpoint appends a timestamp to the instance_name to ensure uniqueness,\nresulting in names like 'my-bot-20240115-143022'.\n\nExample:\n {\n \"instance_name\": \"multi-strategy\",\n \"credentials_profile\": \"binance_main\",\n \"controllers_config\": [\"dman_maker_btc\", \"dman_maker_eth\"],\n \"max_global_drawdown_quote\": 1000.0,\n \"max_controller_drawdown_quote\": 300.0,\n \"image\": \"hummingbot/hummingbot:1.26.0\",\n \"headless\": true\n }"},"V2ScriptDeployment":{"properties":{"instance_name":{"type":"string","title":"Instance Name","description":"Unique name for the bot instance. This becomes the Docker container name and is used to identify the bot in all subsequent operations. Use descriptive names like 'btc-maker' or 'eth-arb'. Avoid special characters except hyphens.","examples":["my-scalping-bot","btc-usdt-maker","dman-eth"]},"credentials_profile":{"type":"string","title":"Credentials Profile","description":"Name of the exchange credentials profile to use. The profile must exist in the credentials directory (credentials/{profile_name}.yml). Contains API keys and secrets for exchange authentication.","examples":["binance_main","kucoin_trading","hyperliquid_account1"]},"image":{"type":"string","title":"Image","description":"Docker image to use for the Hummingbot instance. Use 'latest' for the most recent version or specify a tag for version pinning (recommended for production). Custom images can also be used if they're based on the official Hummingbot image.","default":"hummingbot/hummingbot:latest","examples":["hummingbot/hummingbot:latest","hummingbot/hummingbot:1.26.0","hummingbot/hummingbot:development"]},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script","description":"Name of the Python script to run (without .py extension). The script must exist in the scripts directory. If not specified, the bot starts without running a script and must be started manually via the start-bot endpoint.","examples":["v2_with_controllers","simple_pmm","avellaneda_stoikov","arbitrage_v2"]},"script_config":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Config","description":"Name of the script configuration file (without .yml extension). Must exist in conf/scripts/ directory. Contains strategy-specific parameters like trading pairs, order sizes, and spread settings. Required if the script needs configuration.","examples":["dman_maker_config","grid_btc_usdt","pmm_eth_config"]},"headless":{"type":"boolean","title":"Headless","description":"When True, runs the bot without the terminal UI. Reduces resource usage but removes the ability to interact with the bot directly via terminal. Recommended for production deployments that are fully managed via API.","default":false}},"type":"object","required":["instance_name","credentials_profile"],"title":"V2ScriptDeployment","description":"Configuration for deploying a Hummingbot instance with a V2 script.\n\nThis model defines all parameters needed to create and start a new bot\ncontainer running a custom trading script. The bot will be deployed as\na Docker container with all necessary volumes mounted.\n\nExample:\n {\n \"instance_name\": \"my-scalping-bot\",\n \"credentials_profile\": \"binance_main\",\n \"image\": \"hummingbot/hummingbot:1.26.0\",\n \"script\": \"v2_with_controllers\",\n \"script_config\": \"scalper_config\",\n \"headless\": false\n }"},"VWAPForVolumeRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to query","example":"binance"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair to analyze in hyphen-separated format","example":"BTC-USDT"},"is_buy":{"type":"boolean","title":"Is Buy","description":"True to analyze buy side (asks), False to analyze sell side (bids). A buy order consumes asks; a sell order consumes bids.","example":true},"volume":{"type":"number","exclusiveMinimum":0.0,"title":"Volume","description":"Base asset volume to calculate VWAP for","example":10.0}},"type":"object","required":["connector_name","trading_pair","is_buy","volume"],"title":"VWAPForVolumeRequest","description":"Request model for calculating Volume Weighted Average Price (VWAP) for a given volume.\n\nVWAP represents the average price you would pay/receive when filling\nan order of the specified size, accounting for orders at multiple price levels."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VolumeForPriceRequest":{"properties":{"connector_name":{"type":"string","title":"Connector Name","description":"Name of the exchange connector to query","example":"binance"},"trading_pair":{"type":"string","title":"Trading Pair","description":"Trading pair to analyze in hyphen-separated format","example":"BTC-USDT"},"is_buy":{"type":"boolean","title":"Is Buy","description":"True to analyze buy side (asks), False to analyze sell side (bids). A buy order consumes asks; a sell order consumes bids.","example":true},"price":{"type":"number","exclusiveMinimum":0.0,"title":"Price","description":"Target price level to calculate cumulative volume up to. For buys, this is the maximum price; for sells, the minimum price.","example":42200.0}},"type":"object","required":["connector_name","trading_pair","is_buy","price"],"title":"VolumeForPriceRequest","description":"Request model for getting the cumulative volume available up to a specific price.\n\nUse this to understand how much base asset liquidity exists between\nthe best price and your target price level."}},"securitySchemes":{"HTTPBasic":{"type":"http","scheme":"basic"}}}}