Stableyard Intent Engine

Cross-chain intent execution by Stableyard. Get quotes, create orders, and track status across 7 chains. All endpoints are prefixed with /v1.

Base URLhttps://intent-api.gasyard.fi
Contents

Quick Start

Three API calls to bridge tokens cross-chain:

1

Get a quote

POST /v1/quote with source/dest chain, token, amount

2

Create an order

POST /v1/order — returns deposit address or pre-built transaction calldata

3

Execute deposit & track

Broadcast the transaction, then poll GET /v1/order/:id for status

# 1. Get quote
curl -X POST https://intent-api.gasyard.fi/v1/quote \
  -H "Content-Type: application/json" \
  -d '{
    "sourceChainId": 1,
    "destChainId": 8453,
    "sourceToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "destToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "sourceAmount": "1000000000",
    "recipient": "0xYourAddress"
  }'

# 2. Create order (use quoteId from step 1)
curl -X POST https://intent-api.gasyard.fi/v1/order \
  -H "Content-Type: application/json" \
  -d '{
    "sourceChainId": 1,
    "destChainId": 8453,
    "sourceToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "destToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "sourceAmount": "1000000000",
    "recipient": "0xYourAddress",
    "preferredProvider": "gasyard"
  }'

# 3. Track status
curl https://intent-api.gasyard.fi/v1/order/0xOrderId

Authentication

Public endpoints (quote, order, status) require no authentication. For enterprise access with higher rate limits and partner tracking, include your API key in the X-API-Key header.

curl -H "X-API-Key: your-api-key" https://intent-api.gasyard.fi/v1/quote ...

Rate limits: 10 req/min for order creation, 100 req/min globally. Enterprise keys get higher limits.

Configuration

Get Quote

Fetches quotes from all providers (Stableyard, Relay, NEAR Intents) and returns the best route with alternatives. Handles direct bridges, swaps, and composite routes automatically.

Request Body
sourceChainIdnumberRequired

Source chain network ID (e.g. 1 for Ethereum)

destChainIdnumberRequired

Destination chain network ID (e.g. 8453 for Base)

sourceTokenstringRequired

Source token contract address

destTokenstringRequired

Destination token contract address

sourceAmountstringRequired

Amount in raw units (e.g. "1000000000" for 1000 USDC)

recipientstringRequired

Recipient address on destination chain

slippageBpsnumber

Slippage tolerance in basis points. Default: 50 (0.5%)

providersstring[]

Filter providers. Options: "gasyard", "relay", "near_intents"

// Request
{
  "sourceChainId": 42161,
  "destChainId": 8453,
  "sourceToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
  "destToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "sourceAmount": "500000000",
  "recipient": "0xYourAddress",
  "slippageBps": 50
}

// Response
{
  "success": true,
  "quoteId": "0x...",
  "expiresAt": 1709500000,
  "routeType": "direct",
  "tokenIn": {
    "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "symbol": "USDC",
    "decimals": 6,
    "amount": { "raw": "500000000", "formatted": "500.00", "usd": "500.00" },
    "chain": { "chainId": 5, "networkChainId": 42161, "name": "Arbitrum" }
  },
  "tokenOut": {
    "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "symbol": "USDC",
    "decimals": 6,
    "amount": { "raw": "499600000", "formatted": "499.60", "usd": "499.60" },
    "minimumReceived": { "raw": "497100000", "formatted": "497.10" }
  },
  "fees": {
    "total": { "raw": "400000", "formatted": "0.40" },
    "breakdown": [
      { "label": "Bridge Fee", "percent": "0.08%", "usd": "$0.40" }
    ]
  },
  "estimatedTime": { "seconds": 15, "display": "~15s" },
  "route": {
    "provider": "gasyard",
    "providerDisplayName": "Gasyard",
    "isNative": true,
    "type": "direct",
    "tierLabel": "Fast"
  },
  "alternatives": [
    {
      "provider": "relay",
      "providerDisplayName": "Relay",
      "outputAmount": { "raw": "499500000", "formatted": "499.50" },
      "estimatedTime": { "seconds": 15, "display": "~15s" }
    }
  ]
}

Create Order

Creates an order and returns either a deposit address or pre-built transaction calldata. The response includes everything needed to execute the deposit on-chain.

Request Body
sourceChainIdnumberRequired

Source chain network ID

destChainIdnumberRequired

Destination chain network ID

sourceTokenstringRequired

Source token address

destTokenstringRequired

Destination token address

sourceAmountstringRequired

Amount in raw units

recipientstringRequired

Recipient address on destination chain

slippageBpsnumber

Slippage in bps. Default: 50

preferredProviderstring

Preferred provider from quote (e.g. "gasyard", "relay")

executionModestring

For composite routes: "standard", "atomic", or "boosted"

callDatastring

Action intent calldata (for DeFi actions like Aave supply)

privateboolean

Hide order from public list and mask details. Default: false

// Response — Gateway deposit (pre-built transactions)
{
  "success": true,
  "quoteId": "0x...",
  "orderId": "0x...",
  "status": "awaiting_deposit",
  "routeType": "direct",
  "deposit": {
    "type": "gasyard",
    "address": "0xDepositAddress",
    "gatewayAddress": "0x0d0Acb314084917cB1cF76f332DE8BCF3Cd98B37",
    "chainId": 1,
    "token": { "address": "0x...", "symbol": "USDC", "decimals": 6 },
    "amount": { "raw": "500000000", "formatted": "500.00" },
    "methods": [
      {
        "type": "gateway",
        "gatewayAddress": "0x0d0Acb314084917cB1cF76f332DE8BCF3Cd98B37",
        "transactions": [
          { "type": "approve", "to": "0xTokenAddr", "data": "0x...", "value": "0", "chainId": 1 },
          { "type": "deposit", "to": "0xGateway", "data": "0x...", "value": "0", "chainId": 1 }
        ]
      },
      {
        "type": "deposit_address",
        "address": "0xDepositAddress",
        "instructions": ["Send exactly 500 USDC to the address above"]
      }
    ]
  },
  "quote": {
    "tokenIn": { "symbol": "USDC", "amount": { "raw": "500000000" } },
    "tokenOut": { "symbol": "USDC", "amount": { "raw": "499600000" } },
    "estimatedTime": { "seconds": 15, "display": "~15s" }
  }
}

// Response — Atomic swap+bridge (single user tx)
{
  "success": true,
  "status": "ready_to_execute",
  "execution": {
    "type": "atomic_swap_bridge",
    "approval": {
      "needed": true,
      "tokenAddress": "0x...",
      "spender": "0xParaSwapRouter",
      "amount": "1000000000000000000",
      "transaction": { "to": "0x...", "data": "0x...", "value": "0", "chainId": 8453 }
    },
    "transaction": { "to": "0xParaSwap", "data": "0x...", "value": "0", "chainId": 8453 }
  }
}

Order Status

Returns full order details including status, transactions, timing, and action intent info. Poll this endpoint to track order progress.

Status Codes
pending — awaiting deposit
in_progress — executing
completed — delivered
failed — execution failed
refunded — funds returned
// Response
{
  "success": true,
  "orderId": "0x...",
  "status": {
    "code": "completed",
    "display": "Completed",
    "isTerminal": true,
    "progress": 100
  },
  "tokenIn": {
    "symbol": "USDC",
    "amount": { "raw": "500000000", "formatted": "500.00", "usd": "500.00" },
    "chain": { "networkChainId": 42161, "name": "Arbitrum" }
  },
  "tokenOut": {
    "symbol": "USDC",
    "amount": {
      "expected": { "raw": "499600000", "formatted": "499.60" },
      "actual": { "raw": "499600000", "formatted": "499.60" }
    },
    "chain": { "networkChainId": 8453, "name": "Base" }
  },
  "transactions": {
    "deposit": { "hash": "0x...", "explorerUrl": "https://arbiscan.io/tx/0x..." },
    "destination": { "hash": "0x...", "explorerUrl": "https://basescan.org/tx/0x..." }
  },
  "timing": {
    "estimatedSeconds": 30,
    "actualSeconds": 12,
    "display": "12s",
    "fasterThanEstimate": true
  },
  "routeType": "direct",
  "route": { "provider": "gasyard", "providerDisplayName": "Gasyard" }
}

List Orders

Submit Transaction

Gasless Deposit

Trusted Orders

Credit-based cross-chain orders for trusted partners. The solver fronts liquidity on the destination chain immediately — the partner repays the source token within 5 minutes. Only stablecoins (USDC, USDT) are accepted as source tokens. A per-partner credit limit (default $500) prevents unbounded exposure.

Privacy

Any order can be made private by setting private: true on POST /v1/order or POST /v1/trusted-order. Trusted orders additionally support delayed execution for timing decorrelation.

Private Order Flag

Set private: true on any order — regular or trusted. Private orders are excluded from GET /v1/orders list responses. Direct lookup by orderId still works but returns masked details unless the owning partner API key is provided.

Masked Order Details

When a private order is queried via GET /v1/order/:id without the owning partner's API key, the response only includes status, chain IDs, and timestamps. Token addresses, amounts, recipient, and transaction hashes are hidden. Include the partner API key header to see full details.

// Masked response (no API key or wrong partner)
{
  "success": true,
  "orderId": "0xabc...123",
  "status": { "code": "completed", "display": "Completed", "isTerminal": true, "progress": 100 },
  "sourceChain": { "chainId": 8453, "name": "base" },
  "destChain": { "chainId": 42161, "name": "arbitrum" },
  "timestamps": { "created": "...", "completed": "...", "lastUpdated": "..." },
  "masked": true
}

Delayed Execution

Set delayMinutes (1–1440) on trusted orders to delay solver execution. The order sits in queue and becomes eligible for the solver only after the delay elapses. This breaks timing correlation between the partner's request and the on-chain execution. Maximum delay: 24 hours. Trusted orders only (stablecoins — no volatility risk).

Usage Example

# Regular private order
curl -X POST https://intent-api.gasyard.fi/v1/order \
  -H "Content-Type: application/json" \
  -d '{
    "sourceChainId": 1,
    "destChainId": 8453,
    "sourceToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "destToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "sourceAmount": "1000000000",
    "recipient": "0xYourAddress",
    "private": true
  }'

# Trusted private order with delayed execution
curl -X POST https://intent-api.gasyard.fi/v1/trusted-order \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-partner-key" \
  -d '{
    "sourceChainId": 8453,
    "destChainId": 42161,
    "sourceToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "destToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "sourceAmount": "500000000",
    "recipient": "0xRecipient",
    "private": true,
    "delayMinutes": 30
  }'

Supported Chains

ChainNetwork IDTypeGateway
Ethereum1EVM0x0d0A...B37
Base8453EVM0x0d0A...B37
Arbitrum42161EVM0x0d0A...B37
Polygon137EVM0x0d0A...B37
BSC56EVM0x0d0A...B37
Solana103Non-EVMA15j...tys
Movement2Non-EVM0xb52e...e0

Error Codes

HTTPCodeMeaning
400INVALID_PARAMSMissing or invalid request parameters
404NOT_FOUNDOrder or quote not found
404NO_QUOTESNo routes available for this pair
404SWAP_NOT_AVAILABLENo swap quote for this token pair
409QUOTE_USEDQuote already used for an order
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error — retry with backoff

All responses include meta.requestId for debugging. Include X-Request-Id header to set your own.