Loading...
Loading...
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 transaction status. Covers gas price, gas limit estimation, transaction simulation, transaction broadcasting, and order tracking across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, and 20+ other chains. Do NOT use for swap quote or execution — use opentrade-dex-swap instead. Do NOT use for general programming questions about transaction handling.
npx skill4agent add 6551team/opentrade opentrade-gatewayopentradewhich opentradecurl -sSL https://raw.githubusercontent.com/6551Team/openskills/main/skills/opentrade/install.sh | sh~/.opentrade/last_checkcached_ts=$(cat ~/.opentrade/last_check 2>/dev/null || true)
now=$(date +%s)cached_ts(now - cached_ts) < 43200curl -sSL https://raw.githubusercontent.com/6551Team/openskills/main/skills/opentrade/install.sh | shopentradecurl -sSL https://raw.githubusercontent.com/6551Team/openskills/main/skills/opentrade/install.sh | shOPEN_TOKEN=your_token_hereopentrade trade routers{
"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"
}
]
}traderapiopentrade--trader <trader>--api <api>opentrade gateway gas --chain ethereum --trader okx --api v1--trader okx --api v1opentrade-dex-swapopentrade-marketopentrade-tokenopentrade-portfolioopentrade-gateway# 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 | chainIndex |
|---|---|---|
| XLayer | | |
| Solana | | |
| Ethereum | | |
| Base | | |
| BSC | | |
| Arbitrum | | |
| # | Command | Description |
|---|---|---|
| 1 | | Get supported chains for gateway |
| 2 | | Get current gas prices for a chain |
| 3 | | Estimate gas limit for a transaction |
| 4 | | Simulate a transaction (dry-run) |
| 5 | | Broadcast a signed transaction |
| 6 | | Track broadcast order status |
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>tx.datatx.totx.valuetx.gas--signed-txorderId--order-idUser: "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>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>opentrade gateway gasopentrade gateway gas-limitopentrade gateway simulateopentrade gateway broadcastopentrade gateway ordersopentrade gateway chains--chain xlayer--signed-txopentrade gateway chains{
"code": "0",
"data": [
{ "chainId": "196", "chainName": "XLayer" },
{ "chainId": "1", "chainName": "Ethereum" },
{ "chainId": "501", "chainName": "Solana" }
],
"msg": ""
}opentrade gateway gas --chain <chain_name>--chainxlayerethereumsolanaopentrade gateway gas --chain xlayer{
"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": ""
}100000000 wei = 0.1 Gweiopentrade gateway gas-limit \
--from <sender_address> \
--to <recipient_address> \
--chain <chain_name> \
[--value <amount_in_wei>] \
[--data <hex_data>]--from--to--chain--value0--data0xopentrade gateway gas-limit \
--from 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb \
--to 0x1234567890abcdef1234567890abcdef12345678 \
--chain xlayer \
--value 1000000000000000000{
"code": "0",
"data": [
{
"gasLimit": "21000"
}
],
"msg": ""
}21000gasLimit × gasPriceopentrade 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>]--from--to--chain--value0--data0x--gas-limit--gas-priceopentrade gateway simulate \
--from 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb \
--to 0x1234567890abcdef1234567890abcdef12345678 \
--chain xlayer \
--value 1000000000000000000 \
--gas-limit 21000 \
--gas-price 100000000{
"code": "0",
"data": [
{
"executionResult": {
"used": 21000,
"success": true,
"gasLimit": 21000,
"gasUsed": 21000
}
}
],
"msg": ""
}{
"code": "0",
"data": [
{
"executionResult": {
"used": 0,
"success": false,
"error": "execution reverted: insufficient balance"
}
}
],
"msg": ""
}success: truesuccess: falseopentrade gateway broadcast \
--signed-tx <signed_transaction_hex> \
--address <sender_address> \
--chain <chain_name>--signed-tx--address--chainopentrade gateway broadcast \
--signed-tx 0xf86c808504a817c800825208941234567890abcdef1234567890abcdef12345678880de0b6b3a764000080820a96a0... \
--address 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb \
--chain xlayeropentrade gateway broadcast \
--signed-tx 4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aHwYbgByseGmZJYDUSi5McBJdm7f9YY9d8FU7XMWoLM1gCWmoL92aPQuGHafb \
--address YourSolanaWalletAddress \
--chain solana{
"code": "0",
"data": [
{
"orderId": "123456789",
"txHash": "0xabc123def456..."
}
],
"msg": ""
}opentrade gateway orders \
--address <wallet_address> \
--chain <chain_name> \
--order-id <order_id>--address--chain--order-idopentrade gateway orders \
--address 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb \
--chain xlayer \
--order-id 123456789{
"code": "0",
"data": [
{
"orderId": "123456789",
"txHash": "0xabc123def456...",
"txStatus": "2",
"chainId": "196",
"blockNumber": "12345678",
"timestamp": "1709876543"
}
],
"msg": ""
}012opentrade gateway gas --chain xlayer
# → Display: Normal: 0.1 Gwei, Fast: 0.1 Gwei, Slow: 0.1 Gweiopentrade gateway gas-limit \
--from 0xYourWallet \
--to 0xRecipient \
--chain ethereum \
--value 1000000000000000000
# → Display: Gas limit: 21000, Estimated cost: ~0.002 ETH ($5.50)opentrade gateway simulate \
--from 0xYourWallet \
--to 0xContract \
--chain xlayer \
--data 0xa9059cbb... \
--gas-limit 100000
# → Display: Simulation successful! Gas used: 65432opentrade gateway broadcast \
--signed-tx 0xf86c...signed \
--address 0xYourWallet \
--chain xlayer
# → Display:
# Transaction broadcast! Order ID: 123456789
# Tx Hash: 0xabc...defopentrade gateway orders --address 0xYourWallet --chain xlayer --order-id 123456789
# → Display:
# Order 123456789: Success (txStatus=2)
# Tx Hash: 0xabc...def
# Confirmed on-chain--signed-txopentrade gateway chains⚠️ Service is not available in your region. Please switch to a supported region and try again.--signed-txtxHash18.5 Gwei210001450001.5 ETHeip1559Protocol.suggestBaseFeeproposePriorityFeenormalethereum1solana501