pinion-trade

Get an unsigned swap transaction via 1inch aggregator on Base. Includes approval tx if needed. Costs $0.01 USDC via x402.

357 stars

Best use case

pinion-trade is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Get an unsigned swap transaction via 1inch aggregator on Base. Includes approval tx if needed. Costs $0.01 USDC via x402.

Teams using pinion-trade should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/trade/SKILL.md --create-dirs "https://raw.githubusercontent.com/chu2bard/pinion-os/main/skills/trade/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/trade/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How pinion-trade Compares

Feature / Agentpinion-tradeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Get an unsigned swap transaction via 1inch aggregator on Base. Includes approval tx if needed. Costs $0.01 USDC via x402.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Trade

Returns an unsigned token swap transaction from the 1inch aggregator on Base. If the source token needs approval, an approve transaction is included.

## Endpoint

```
POST https://pinionos.com/skill/trade
```

**Price:** $0.01 USDC per call (x402 on Base)

## Request Body

```json
{
  "src": "USDC",
  "dst": "ETH",
  "amount": "10",
  "from": "0x...",
  "slippage": 1
}
```

| Field    | Type   | Required | Description                                  |
|----------|--------|----------|----------------------------------------------|
| src      | string | yes      | Source token symbol (ETH, USDC, WETH, DAI, CBETH) |
| dst      | string | yes      | Destination token symbol                      |
| amount   | string | yes      | Amount to swap (human-readable)               |
| from     | string | yes      | Sender address (0x, 40 hex chars)             |
| slippage | number | no       | Slippage tolerance in percent (default: 1)    |

## Supported Tokens

ETH, USDC, WETH, DAI, CBETH

## Example Request

```bash
curl -X POST https://pinionos.com/skill/trade \
  -H "Content-Type: application/json" \
  -d '{"src":"USDC","dst":"ETH","amount":"10","from":"0x101C..."}'
```

The first request returns HTTP 402 with payment requirements. Sign a USDC `TransferWithAuthorization` (EIP-3009) and retry with the `X-PAYMENT` header.

## Example Response (with approval needed)

```json
{
  "approve": {
    "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "data": "0x095ea7b3...",
    "value": "0x0",
    "chainId": 8453
  },
  "swap": {
    "to": "0x111111125421ca6dc452d289314280a0f8842a65",
    "data": "0x...",
    "value": "0x0",
    "chainId": 8453
  },
  "srcToken": "USDC",
  "dstToken": "ETH",
  "amount": "10",
  "network": "base",
  "router": "0x111111125421ca6dc452d289314280a0f8842a65",
  "note": "Sign and broadcast the approve tx first, wait for confirmation, then sign and broadcast the swap tx.",
  "timestamp": "2026-02-16T12:00:00.000Z"
}
```

## When to Use

- Swap tokens on Base (e.g. USDC to ETH or ETH to USDC).
- Rebalance an agent's portfolio.
- Convert tokens before making a payment.

## Flow

1. Call this skill to get the unsigned tx(s).
2. If `approve` is present, sign and broadcast the approve tx first, then wait for confirmation.
3. Sign and broadcast the `swap` tx.

Related Skills

pinion-wallet

357
from chu2bard/pinion-os

Generate a fresh Ethereum keypair for Base. Useful for funding OpenClaw agents. Costs $0.01 USDC via x402.

pinion-tx

357
from chu2bard/pinion-os

Get decoded transaction details for any Base transaction hash. Costs $0.01 USDC via x402.

pinion-send

357
from chu2bard/pinion-os

Construct an unsigned ETH or USDC transfer transaction on Base. Client signs and broadcasts. Costs $0.01 USDC via x402.

pinion-price

357
from chu2bard/pinion-os

Get current USD price for any token on Base via Birdeye (CoinGecko fallback). Costs $0.01 USDC via x402.

pinion-fund

357
from chu2bard/pinion-os

Check wallet balances and get funding instructions for Base. ETH and USDC. Costs $0.01 USDC via x402.

pinion-chat

357
from chu2bard/pinion-os

Chat with the Pinion AI agent. Send a messages array, get an AI response with web search. Costs $0.01 USDC via x402.

pinion-broadcast

357
from chu2bard/pinion-os

Sign and broadcast an unsigned transaction on Base. Requires the sender's private key. Costs $0.01 USDC via x402.

pinion-balance

357
from chu2bard/pinion-os

Get ETH and USDC balances for any Ethereum address on Base. Costs $0.01 USDC via x402.

pinion-chain-intel

357
from chu2bard/pinion-os

On-chain intelligence, transactions and wallet tools on Base. 9 x402-paywalled skills at $0.01 USDC each.

customs-trade-compliance

144923
from affaan-m/everything-claude-code

海关文件、关税分类、关税优化、受限方筛查以及多司法管辖区法规合规的编码化专业知识。由拥有15年以上经验的贸易合规专家提供。包括HS分类逻辑、Incoterms应用、自贸协定利用以及罚款减免。适用于处理海关清关、关税分类、贸易合规、进出口文件或关税优化时使用。license: Apache-2.0

Trade & ComplianceClaude

customs-trade-compliance

31392
from sickn33/antigravity-awesome-skills

Codified expertise for customs documentation, tariff classification, duty optimisation, restricted party screening, and regulatory compliance across multiple jurisdictions.

Trade & ComplianceClaude

Export Compliance & Trade Controls

3891
from openclaw/skills

Analyze products, destinations, and end-users against US export control regulations (EAR, ITAR, OFAC sanctions). Generate classification recommendations, license requirements, and compliance checklists.

Regulatory Compliance