About openocean
OpenOcean Skill is a script-only adapter for Starchild users who need swap quotes and trades. It supports quote retrieval, gas-price lookup, and Ethereum mainnet swaps through the Starchild wallet runtime, with allowance checks and balance-delta verification.
Key features
- 01Fetch gas prices and swap quotes
- 02Execute swaps through Starchild wallet
- 03Check and request ERC20 approval
- 04Verify results by balance change
Use cases
- 01Review a quote before a token swap
- 02Swap ETH and ERC20 tokens on Ethereum mainnet
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ starchild-ai-agent/ official-skills --skill openoceanAfter installing, type/openoceanin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
__init__.py_trade_report.pyexports.pyDetails
From the project READMEOpenOcean Skill (Starchild Adapter)
Use this skill when user asks to:
- get OpenOcean quote
- execute swap via OpenOcean route
- run OpenOcean trade through Starchild wallet
Runtime Mode
Script-only. Does not register tools.
Imports:
from skills.openocean.exports import openocean_gas_price, openocean_quote, openocean_swap
Functions
openocean_gas_price(chain='ethereum')openocean_quote(chain, in_token, out_token, amount_wei, slippage='1')openocean_swap(chain, in_token, out_token, amount_wei, slippage='1', verify_timeout_seconds=90, poll_interval_seconds=5)
Current Scope
- Ethereum mainnet execution path tested (ETH -> ERC20 and ERC20 -> ETH)
- Uses Starchild wallet runtime (
/agent/transfer) to broadcast - Built-in ERC20 approval flow (checks allowance and sends approve when needed)
- Verifies result by balance delta (works when tx hash is delayed)
Safety Checklist
- First call
openocean_quoteand show output. - Confirm amount and slippage with user.
- Execute with small amount first.
- Require verification result (
verified_by_balance_delta=true) before claiming success.
Comments
Markdown supported