Overview

The Gasyard API enables programmatic access to cross-chain bridging. Get quotes, execute bridges, and track transactions.

Base URL

https://api.gasyard.fi

Authentication

All requests require an API key in the x-api-key header:
curl -H "x-api-key: YOUR_API_KEY" https://api.gasyard.fi/api/sdk/v2/config
Keep your API key secure. Do not expose it in client-side code or public repositories.
To obtain an API key, contact hi@gasyard.fi.

Quick Start

1

Get Configuration

Retrieve supported networks and tokens:
GET /api/sdk/v2/config
2

Request Quote

Get a quote with fees and transaction data:
GET /api/sdk/v2/quote?inputNetwork=1&outputNetwork=4&inputTokenAmount=1000000000000000000&sourceAddress=0x...&destinationAddress=0x...
3

Execute Transaction

Submit the transaction using the response data
4

Track Status

Monitor completion:
GET /api/sdk/v2/status?sourceHash=0x...

Endpoints

Response Format

Success

{
  "success": true,
  "data": { ... }
}

Error

{
  "success": false,
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "Description of the error"
  }
}

Error Codes

CodeHTTP StatusDescription
INVALID_PARAMETER400Missing or invalid request parameter
INSUFFICIENT_LIQUIDITY400Not enough liquidity for route
UNAUTHORIZED401Invalid or missing API key
NOT_FOUND404Resource not found
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error

Rate Limits

TierLimit
Standard100 requests/minute
EnterpriseCustom limits available

SDK

For easier integration, use the TypeScript SDK:
npm install gasyard-sdk
import { Gasyard } from 'gasyard-sdk';

const gasyard = new Gasyard({ apiKey: 'YOUR_API_KEY' });

const quote = await gasyard.getQuote({
  fromChain: 'ethereum',
  toChain: 'arbitrum',
  fromToken: 'ETH',
  toToken: 'USDC',
  amount: '1000000000000000000'
});
See the SDK documentation for complete usage guide.