Skip to main content
This guide is for business partners integrating Owly at the tenant level. It explains how to create an API wallet for a target address, start a strategy instance, receive webhook events, and manage the strategy lifecycle through Owly’s external API.
All B2B endpoints are authenticated with tenant credentials. If you are looking for standard end-user product setup, start from Core Concepts and Quick Start.

Integration Flow

The recommended order is:
  1. Create or fetch an API wallet for the target address.
  2. Approve the returned public_key as the Hyperliquid API Agent and complete the effective Builder fee authorization.
  3. Optionally run source-check before copy trading, then start the Owly strategy instance.
  4. Save the returned bot identifier for later status and lifecycle calls.
  5. Receive webhook notifications if configured.

Base URL

Authentication

Every request must include these headers:

Response Format

Successful responses follow this envelope:
Error detail can be a string, an object containing fields such as code / message, or a validation-error list. Start failures may also return a top-level bot_name for follow-up queries. Do not match only a fixed English error message. For example, protocol-owned accounts cannot be added through the generic B2B wallet flow:
Common HTTP status codes:

Step 1: Create or Fetch an API Wallet

Endpoint

Request Body

Success Example

Owly securely stores the API wallet private key and does not return it to the partner.
The target must currently use unifiedAccount or dexAbstraction mode. Requests fail if the mode cannot be verified. This endpoint does not switch the target account mode. Important behavior:
  • Repeating the same request for the same target under the same tenant returns the existing wallet whenever possible.
  • If the target is already occupied by another tenant or another incompatible flow, the API returns 409.
  • After rotation, approve the returned public_key again and check the strategy status. Generating a replacement does not complete Hyperliquid authorization.
  • Retrying created=true with the same idempotency key returns the wallet from that rotation. Response created reports whether this call created a wallet; its meaning differs from the request flag.
Rotation request example:

Step 2: Set the API Agent on Hyperliquid

Use the public_key returned in Step 1 and set it as the API Agent for the target address on Hyperliquid. The partner completes these authorizations on Hyperliquid. Approve the effective Builder address and fee as well as the API Agent: startup verifies both. Builder settings may come from the account, an existing strategy, or tenant configuration, so confirm the integration settings instead of assuming one fee applies to every tenant.

Check Copy-Trading Sources

Use the same tenant headers and submit 1–20 EVM addresses:
Example success data:
This check requires sources to use unifiedAccount and checks historical orders when order-behavior risk checks are enabled. Rejection reasons include account_mode_not_unified, high_risk_order_behavior, or unavailable verification data. Risk metrics may be null. This result grants no authorization or execution guarantee; startup performs its own validation.

Step 3: Start the Strategy Instance

Endpoint

Request Body

Ordinary copy trading requires source; grid bots require a valid grid configuration. Perpetual grids require positive grid.total_invest, from which the server derives order size. See Grid Bot. Do not submit master-wallet or API-wallet private keys.

Webhook Precedence

config.alerts=null alone does not explicitly set config.alerts.webhook=null. Delivery also depends on the notification switch and event settings.

Success Example

The name field in the response is the bot_name used by the status, stop, and close endpoints. Persist it on your side.

Webhook Notifications

With notifications enabled and a valid webhook configured, Owly can deliver the configured strategy notifications to your callback endpoint. Webhook categories include:
  • trade event: trading-related events produced by the strategy instance
  • risk event: risk-control events produced by the strategy instance
  • status event: strategy state changes
Webhook handling expectations:
  • return 2xx to acknowledge successful receipt
  • design the receiver to be idempotent
  • assume retries and duplicate deliveries are possible
  • rely only on Owly’s external event fields and business semantics, not internal service names or internal state machines

Strategy Lifecycle Endpoints

Get Status

Success example:
data uses the strategy status structure. Successful start, stop, and close calls return this structure too: Check execution state, cleanup state, and errors together. state=running alone does not prove the strategy is placing orders normally.

Stop a Strategy

stop stops automated execution without running position-close cleanup. Check existing positions and orders separately. Example of a stopped status:

Close a Strategy

close requests strategy termination and its cleanup, including attempts to close positions and clear related orders. It does not withdraw funds or repay borrowing. Check cleanup_state and err_msg, and verify actual positions and orders. After a timeout or cleanup failure, query the current status before deciding what to do next. This example shows the response shape after completed cleanup; it does not guarantee every close request completes cleanup:

Common Errors

Errors may contain structured business codes or strings. A timeout does not prove that startup never happened: query the known bot_name before repeating an operation.

Minimal cURL Example

Create an API Wallet

Start a Strategy

Query Status

Integration Recommendations

  • Follow api-wallet -> Hyperliquid Agent + Builder approval -> optional source-check -> start.
  • Persist the returned bot_name immediately.
  • Make webhook consumers idempotent and retry-safe.
  • Treat webhook events as Owly business notifications and do not depend on Owly internal implementation details.
  • Reuse API Wallets by default. Request rotation with created=true and reuse the idempotency key for retries of that rotation.
  • If startup fails, check tenant credentials, account mode, Agent and Builder approvals, target ownership, and strategy configuration; inspect runtime and cleanup status too.