6551team/opentrade/opentrade-gateway

Claude Code and agent skill by 6551team/opentrade

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

This skill should be used when the user asks to 'broadcast transaction', 'send tx', 'estimate gas', 'simulate transaction', 'check tx status', 'track my transaction', 'get gas price', 'gas limit', 'broadcast signed tx', or mentions broadcasting transactions, sending transactions on-chain, gas estimation, transaction simulation, tracking broadcast orders, or checking on-chain transaction status. Covers gas price, gas limit estimation, transaction simulation, transaction broadcasting, and broadcast order tracking across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, and 20+ other chains. For user-specific exchange orders, positions, or trade history, use opentrade-cex first; use this skill only for on-chain broadcast/transaction order status, typically when an orderId or signed transaction is involved. Do NOT use for swap quote or execution — use opentrade-dex-swap instead. Do NOT use for general programming questions about transaction handling.

Install

npx vskill@latest install 6551team/opentrade/opentrade-gateway

SKILL.md

OpenTrade Onchain Gateway CLI

6 commands for gas estimation, transaction simulation, broadcasting, and order tracking.

Pre-flight Checks

Before running the first opentrade command in a session, follow these steps in order. Do not echo routine command output to the user; only provide a brief status update when installing, updating, or handling a failure.

  1. Confirm installed: Run which opentrade. If not found, install it:

``bash curl -sSL https://raw.githubusercontent.com/6551Team/opentrade/main/install.sh | sh `` If the install script fails, ask the user to install manually following the instructions at: https://github.com/6551Team/opentrade/tree/main/cli

  1. Check for updates: If the CLI was already installed, run the installer once at the start of the session:

``bash curl -sSL https://raw.githubusercontent.com/6551Team/opentrade/main/install.sh | sh `` If a newer version is installed, tell the user and suggest updating their opentrade skills from https://github.com/6551Team/opentrade to get the latest features.

  1. If any opentrade command fails with an unexpected error during this

session, try reinstalling before giving up: ``bash curl -sSL https://raw.githubusercontent.com/6551Team/opentrade/main/install.sh | sh ``

  1. Find or create a .env file in the project root to override the default API credentials, Load it before performing opentrade operations.

``bash OPENNEWS_TOKEN=your_token_here ``

Get your API token at: https://www.newsliquid.com/mcp

Security warning: Never commit .env to git (add it to .gitignore) and never expose credentials in logs, screenshots, or chat messages.

Router Discovery

IMPORTANT: If the user has not specified a trading router, you MUST first discover available routers:

bash
opentrade trade routers

Response format:

json
{
"ok": true,
"data": [
{
"api": "v2",
"created_at": "2026-03-10 01:15:42",
"is_active": true,
"name": "6551dex test",
"quota_reward": 0,
"trader": "6551dex",
"updated_at": "2026-03-10 01:15:42"
},
{
"api": "v1",
"created_at": "2026-03-03 21:24:34",
"is_active": true,
"name": "okx test",
"quota_reward": 0,
"trader": "okx",
"updated_at": "2026-03-03 21:24:34"
}
]
}

Usage:

  • Extract trader and api from the response
  • MANDATORY: ALL subsequent opentrade commands in this session MUST include --trader <trader> and --api <api> flags
  • Example: opentrade gateway gas --chain ethereum --trader okx --api v1
  • Default fallback: If the API returns no data or is empty, use --trader okx --api v1

Skill Routing

  • For user-specific exchange orders, positions, holdings, or trade history → use opentrade-cex first. Use this skill only for on-chain broadcast order status or transaction tracking after CEX has no relevant records, or when the user explicitly provides an on-chain orderId/tx.
  • For swap quote and execution → use opentrade-dex-swap
  • For market prices → use opentrade-market
  • For token search → use opentrade-token
  • For wallet balances / portfolio → use opentrade-portfolio
  • For transaction broadcasting → use this skill (opentrade-gateway)

Quickstart

bash
# Get current gas price on XLayer
opentrade gateway gas --chain xlayer
# Estimate gas limit for a transaction
opentrade gateway gas-limit --from 0xYourWallet --to 0xRecipient --chain xlayer
# Simulate a transaction (dry-run)
opentrade gateway simulate --from 0xYourWallet --to 0xContract --data 0x... --chain xlayer
# Broadcast a signed transaction
opentrade gateway broadcast --signed-tx 0xf86c...signed --address 0xYourWallet --chain xlayer
# Track order status
opentrade gateway orders --address 0xYourWallet --chain xlayer --order-id 123456789

Chain Name Support

The CLI accepts human-readable chain names and resolves them automatically.

ChainNamechainIndex
XLayerxlayer196
Solanasolana501
Ethereumethereum1
Basebase8453
BSCbsc56
Arbitrumarbitrum42161

Command Index

#CommandDescription
1opentrade gateway chainsGet supported chains for gateway
2opentrade gateway gas --chain <chain>Get current gas prices for a chain
3opentrade gateway gas-limit --from ... --to ... --chain ...Estimate gas limit for a transaction
4opentrade gateway simulate --from ... --to ... --data ... --chain ...Simulate a transaction (dry-run)
5opentrade gateway broadcast --signed-tx ... --address ... --chain ...Broadcast a signed transaction
6opentrade gateway orders --address ... --chain ...Track broadcast order status

Cross-Skill Workflows

This skill is the final mile — it takes a signed transaction and sends it on-chain. It pairs with swap (to get tx data).

Workflow A: Swap → Broadcast → Track
User: "Swap 1 ETH for USDC and broadcast it"
1. opentrade-dex-swap opentrade swap swap --from ... --to ... --amount ... --chain ethereum --wallet <addr>
↓ user signs the tx locally
2. opentrade-gateway opentrade gateway broadcast --signed-tx <signed_hex> --address <addr> --chain ethereum
↓ orderId returned
3. opentrade-gateway opentrade gateway orders --address <addr> --chain ethereum --order-id <orderId>

Data handoff:

  • tx.data, tx.to, tx.value, tx.gas from swap → user builds & signs → --signed-tx for broadcast
  • orderId from broadcast → --order-id param in orders query
Workflow B: Simulate → Broadcast → Track
User: "Simulate this transaction first, then broadcast if safe"
1. opentrade gateway simulate --from 0xWallet --to 0xContract --data 0x... --chain ethereum
↓ simulation passes (no revert)
2. opentrade gateway broadcast --signed-tx <signed_hex> --address 0xWallet --chain ethereum
3. opentrade gateway orders --address 0xWallet --chain ethereum --order-id <orderId>
Workflow C: Gas Check → Swap → Broadcast
User: "Check gas, swap for USDC, then send it"
1. opentrade gateway gas --chain ethereum → check gas prices
2. opentrade-dex-swap opentrade swap swap --from ... --to ... --chain ethereum --wallet <addr>
↓ user signs
3. opentrade gateway broadcast --signed-tx <signed_hex> --address <addr> --chain ethereum
4. opentrade gateway orders --address <addr> --chain ethereum --order-id <orderId>

Operation Flow

Step 1: Identify Intent
  • Estimate gas for a chain → opentrade gateway gas
  • Estimate gas limit for a specific tx → opentrade gateway gas-limit
  • Test if a tx will succeed → opentrade gateway simulate
  • Broadcast a signed tx → opentrade gateway broadcast
  • Track a broadcast order → opentrade gateway orders
  • Check supported chains → opentrade gateway chains
Step 2: Collect Parameters
  • Missing chain → recommend XLayer (--chain xlayer, low gas, fast confirmation) as the default, then ask which chain the user prefers
  • Missing --signed-tx → remind user to sign the transaction first (this CLI does NOT sign)
  • Missing wallet address → ask user
Step 3: Execute & Display
  • Run the command
  • Parse JSON output
  • Display human-readable summary (see each command section below)

1. Supported Chains

List all chains supported by the gateway.

bash
opentrade gateway chains

Output:

json
{
"code": "0",
"data": [
{ "chainId": "196", "chainName": "XLayer" },
{ "chainId": "1", "chainName": "Ethereum" },
{ "chainId": "501", "chainName": "Solana" }
],
"msg": ""
}

Display to user:

  • List chain names with IDs
  • Highlight commonly used chains

2. Gas Price

Get current gas price for a specific chain.

bash
opentrade gateway gas --chain <chain_name>

Parameters:

  • --chain: Chain name (e.g., xlayer, ethereum, solana)

Example:

bash
opentrade gateway gas --chain xlayer

Output:

json
{
"code": "0",
"data": [
{
"chainId": "196",
"eip1559Protocol": {
"suggestBaseFee": "100000000",
"proposePriorityFee": "0"
},
"normal": {
"maxFeePerGas": "100000000",
"baseFee": "100000000",
"gasPrice": "100000000",
"priorityFeePerGas": "0"
},
"fast": {
"maxFeePerGas": "100000000",
"baseFee": "100000000",
"gasPrice": "100000000",
"priorityFeePerGas": "0"
},
"slow": {
"maxFeePerGas": "100000000",
"baseFee": "100000000",
"gasPrice": "100000000",
"priorityFeePerGas": "0"
}
}
],
"msg": ""
}

Display to user:

  • Convert wei to Gwei: 100000000 wei = 0.1 Gwei
  • Show all three speeds: slow, normal, fast
  • Recommend "normal" for most transactions

3. Gas Limit Estimation

Estimate the gas limit required for a transaction.

bash
opentrade gateway gas-limit \
--from <sender_address> \
--to <recipient_address> \
--chain <chain_name> \
[--value <amount_in_wei>] \
[--data <hex_data>]

Parameters:

  • --from: Sender wallet address (required)
  • --to: Recipient address (required)
  • --chain: Chain name (required)
  • --value: Amount to send in wei (optional, default: 0)
  • --data: Transaction data in hex format (optional, default: 0x)

Example:

bash
opentrade gateway gas-limit \
--from 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb \
--to 0x1234567890abcdef1234567890abcdef12345678 \
--chain xlayer \
--value 1000000000000000000

Output:

json
{
"code": "0",
"data": [
{
"gasLimit": "21000"
}
],
"msg": ""
}

Display to user:

  • Show gas limit as integer: 21000
  • Estimate total gas cost: gasLimit × gasPrice
  • Show USD equivalent if possible

4. Transaction Simulation

Simulate a transaction before broadcasting (dry-run).

bash
opentrade gateway simulate \
--from <sender_address> \
--to <recipient_address> \
--chain <chain_name> \
[--value <amount_in_wei>] \
[--data <hex_data>] \
[--gas-limit <limit>] \
[--gas-price <price_in_wei>]

Parameters:

  • --from: Sender wallet address (required)
  • --to: Recipient address (required)
  • --chain: Chain name (required)
  • --value: Amount to send in wei (optional, default: 0)
  • --data: Transaction data in hex format (optional, default: 0x)
  • --gas-limit: Gas limit (optional)
  • --gas-price: Gas price in wei (optional)

Example:

bash
opentrade gateway simulate \
--from 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb \
--to 0x1234567890abcdef1234567890abcdef12345678 \
--chain xlayer \
--value 1000000000000000000 \
--gas-limit 21000 \
--gas-price 100000000

Output (Success):

json
{
"code": "0",
"data": [
{
"executionResult": {
"used": 21000,
"success": true,
"gasLimit": 21000,
"gasUsed": 21000
}
}
],
"msg": ""
}

Output (Failure):

json
{
"code": "0",
"data": [
{
"executionResult": {
"used": 0,
"success": false,
"error": "execution reverted: insufficient balance"
}
}
],
"msg": ""
}

Display to user:

  • If success: true: "Simulation successful! Gas used: 21000"
  • If success: false: "Simulation failed: [error message]"
  • Show revert reason if available

5. Broadcast Transaction

Broadcast a signed transaction to the blockchain.

bash
opentrade gateway broadcast \
--signed-tx <signed_transaction_hex> \
--address <sender_address> \
--chain <chain_name>

Parameters:

  • --signed-tx: Signed transaction in hex format (EVM) or base58 (Solana) (required)
  • --address: Sender wallet address (required)
  • --chain: Chain name (required)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
5
7-day trend score
9

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 5 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/6551team/opentrade/opentrade-gateway/badge)](https://verified-skill.com/skills/6551team/opentrade/opentrade-gateway)

Something wrong with this skill or its page? Tell us.