Relay
SupportGet in TouchTry Relay
Relay PlatformAPI ReferenceRelayKitRelay ProtocolChangelog

Getting Started

What is Relay?How Relay Works

Solutions

Payment Service ProvidersWallets & Wallet ProvidersMultichain AppsChainsCommerce & Payments

Use Cases

Bridging & OnboardingSwapsCall Execution

Features

App FeesFee SponsorshipDeposit AddressesGas Top-UpGasless ExecutionFast FillGasless SwapsPrice StabilizationRouting Integration Models

Security

Transaction ScreeningUnsupported ExchangesBug Bounty ProgramMEV protectionCommunity SupportContract Audits

Resources

Supported ChainsIntegrating using AISupportBrand Assets

API Reference

API OverviewQuickstartApps, API keys, and Rate LimitsAccess TokensUnderstanding Step ExecutionWallet DetectionCost & Fee StructureRefundsInput ValidationTrade TypesSurplus & ShortageHandling Quote ErrorsHandling Rate LimitsHandling Execution ErrorsContract CompatibilityBridging Integration GuideCall Execution Integration GuideTransaction IndexingBase Builder CodesSmart Accounts in RelayTestnet SupportSolana SupportBitcoin SupportHyperliquid SupportLighter SupportDeep LinkingWebsocketsWebhooksMigrating to Requests v3Migrating to Currencies v2Migrating to Token Price v2Supported ChainsContract AddressesSupported Tokens & RoutesTroubleshootingGet QuoteSubmit PermitGet StatusGet RequestsGet Published RequestsGet ChainsGet Chains LiquidityGet CurrenciesGet Currency ClassificationsGet Token PriceTransactions IndexTransactions SingleDeposit Address ReindexGet App Fee BalancesGet Balance EventsClaim App FeesGet UsageFast FillGet Swap SourcesCreate Access TokenExecute Gasless TxsAttest DepositGet Recovery BalancesRequest WithdrawalGet Withdrawal StatusGet Requests (v2)Get PriceGet ConfigGet Execution StatusGet Currencies (v1)Get Token Price (v1)Get Quote

RelayKit

OverviewInstallationcreateClientgetQuoteexecutegetAppFeesclaimAppFeesfastFillexecuteGaslessBatchAdaptersTypescript API TypingsChain UtilsInstallationuseQuoteuseRelayChainsuseRequestsuseTokenListuseTokenPriceuseExecutionStatusInstallationRelayKitProviderSwapWidgetThemingTroubleshooting

Protocol

Relay ProtocolHow It WorksThe Relay ChainDepositoryDeposit AddressesOracleHubAllocatorSecurity CouncilSecurity & AuditsFor AppsProgrammatic WithdrawalsWithdrawing with a SafeOperate a Third-Party Relay OracleAddressesEVM Depository ReferenceSVM Depository ReferenceOverviewArchitectureSecurityRelay Vaults BackendBridgingInteracting with Relay VaultsWithdrawing from Relay VaultsRelayPoolFactoryRelayPoolRelayPoolNativeGatewayRelayBridgeFactoryRelayBridge

Changelog

Changelog
## Documentation Index Fetch the complete documentation index at: https://docs.relay.link/llms.txt Use this file to discover all available pages before exploring further.
## Agent Instructions To quote bridges and swaps, look up chains and tokens, or track Relay transactions from an agent, use the Relay MCP server: npx -y @relayprotocol/relay-mcp. It is read-only and does not sign or broadcast transactions. Setup: https://docs.relay.link/resources/developing-with-ai.md For Relay Protocol's trust model, security architecture, and audits, see https://docs.relay.link/references/protocol/security.md. For address screening, see https://docs.relay.link/security/transaction-screening.md.

Lighter Support

How to deposit to and withdraw from Lighter using the Relay API

Relay supports depositing and withdrawing to Lighter from any supported chain. You can try depositing today using the Relay App (note: withdrawing is not yet supported in the app). This document details how to integrate Lighter into your application.

Prerequisites

Before you can bridge funds to Lighter, you must first set up an account on lighter.exchange. Once your account is created, you can retrieve your account index to use as the recipient for deposits.

API Access

Lighter can be accessed using the standard Relay API flow. To get started, review the **execution steps** documentation. When you're ready to execute deposits or withdrawals, refer to the **Get Quote** API endpoint.

[!TIP] If you're integrating via the SDK, the Lighter wallet adapter wraps this flow — it resolves the user's Lighter account index, manages the API key lifecycle, and submits the L2 transfer on your behalf.

Lighter-specific API Parameters

ParameterInputDescription
toChainId / fromChainId3586256Lighter Chain ID. Use toChainId for deposits and fromChainId for withdrawals.
recipientLighter account indexThe Lighter account index to credit — not a wallet address.
userLighter account indexOn withdrawals, the Lighter account index to debit.

These parameters are specific to Lighter interactions. All other standard API parameters remain required.

[!WARNING] The recipient parameter must be your Lighter account index, not your wallet address. See below for how to retrieve your account index.

Getting Your Lighter Account Index

To deposit to Lighter, you need to use your Lighter account index as the recipient parameter. You can retrieve this using the Lighter API's accountsByL1Address endpoint:

curl 'https://mainnet.zklighter.elliot.ai/api/v1/accountsByL1Address?l1_address=YOUR_WALLET_ADDRESS'

Replace YOUR_WALLET_ADDRESS with your Ethereum wallet address. The response will include your accountIndex, which you should use as the recipient in your quote request.

For more details, see the Lighter API documentation.

How to deposit

[!WARNING] Starting October 2, 2026, POST /quote/v2 will require a valid API key on every request. Pass your key in the x-api-key header — see API keys and Rate Limits. Requests that include a referrer already require the key today. quote/v2 remains fully supported for authenticated requests.
curl 'https://api.relay.link/quote/v2' \
  -H 'content-type: application/json' \
  -d '{
    "user": "0x03508bB71268BBA25ECaCC8F620e01866650532c",
    "originChainId": 8453,
    "destinationChainId": 3586256,
    "originCurrency": "0x0000000000000000000000000000000000000000",
    "destinationCurrency": "0",
    "recipient": "509564",
    "tradeType": "EXACT_INPUT",
    "amount": "1000000000000000000"
  }'
{
   "steps":[
      {
         "id":"deposit",
         "action":"Confirm transaction in your wallet",
         "description":"Depositing funds to the depository contract",
         "kind":"transaction",
         "items":[
            {
               "status":"incomplete",
               "data":{
                  "from":"0xf3d63166f0ca56c3c1a3508fce03ff0cf3fb691e",
                  "to":"0x4cd00e387622c35bddb9b4c962c136462338bc31",
                  "data":"0x49290c1c000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691eb86a968b9c157fc6ab0e30ac13b7c9e8fe5ed28007b43da606737bca5f00cf6d",
                  "value":"1000000000000000000",
                  "chainId":8453,
                  "gas":"32713",
                  "maxFeePerGas":"6500000",
                  "maxPriorityFeePerGas":"1000000"
               },
               "check":{
                  "endpoint":"/intents/status/v3?requestId=0x63bf829d9cead2d0dc94113cc368cdc2e2f25f4a9d5c24d4123002e83cf504c1",
                  "method":"GET"
               }
            }
         ],
         "requestId":"0x63bf829d9cead2d0dc94113cc368cdc2e2f25f4a9d5c24d4123002e83cf504c1",
         "depositAddress":""
      }
   ],
   "fees":{
      "gas":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"160689399841",
         "amountFormatted":"0.000000160689399841",
         "amountUsd":"0.000372",
         "minimumAmount":"160689399841"
      },
      "relayer":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"703637317433828",
         "amountFormatted":"0.000703637317433828",
         "amountUsd":"1.630976",
         "minimumAmount":"703637317433828"
      },
      "relayerGas":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"0",
         "amountFormatted":"0.0",
         "amountUsd":"0",
         "minimumAmount":"0"
      },
      "relayerService":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"703637317433828",
         "amountFormatted":"0.000703637317433828",
         "amountUsd":"1.630976",
         "minimumAmount":"703637317433828"
      },
      "app":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"0",
         "amountFormatted":"0.0",
         "amountUsd":"0",
         "minimumAmount":"0"
      },
      "subsidized":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"0",
         "amountFormatted":"0.0",
         "amountUsd":"0",
         "minimumAmount":"0"
      }
   },
   "details":{
      "operation":"swap",
      "sender":"0xf3d63166f0ca56c3c1a3508fce03ff0cf3fb691e",
      "recipient":"509564",
      "currencyIn":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"1000000000000000000",
         "amountFormatted":"1.0",
         "amountUsd":"2317.921203",
         "minimumAmount":"1000000000000000000"
      },
      "currencyOut":{
         "currency":{
            "chainId":3586256,
            "address":"0",
            "symbol":"USDC (Perp)",
            "name":"USD Coin (Perp)",
            "decimals":6,
            "metadata":{
               "logoURI":"https://ethereum-optimism.github.io/data/USDC/logo.png",
               "verified":true
            }
         },
         "amount":"2312305224",
         "amountFormatted":"2312.305224",
         "amountUsd":"2311.766457",
         "minimumAmount":"2266059120"
      },
      "refundCurrency":{
         "currency":{
            "chainId":8453,
            "address":"0x0000000000000000000000000000000000000000",
            "symbol":"ETH",
            "name":"Ether",
            "decimals":18,
            "metadata":{
               "logoURI":"https://assets.relay.link/icons/1/light.png",
               "verified":true
            }
         },
         "amount":"1000000000000000000",
         "amountFormatted":"1.0",
         "amountUsd":"2317.921203",
         "minimumAmount":"1000000000000000000"
      },
      "totalImpact":{
         "usd":"-6.154746",
         "percent":"-0.27"
      },
      "swapImpact":{
         "usd":"-4.523770",
         "percent":"-0.20"
      },
      "expandedPriceImpact":{
         "swap":{
            "usd":"-4.743994"
         },
         "execution":{
            "usd":"-0.02"
         },
         "relay":{
            "usd":"-1.390752"
         },
         "app":{
            "usd":"0"
         },
         "sponsored":{
            "usd":"0"
         }
      },
      "rate":"2312.305224",
      "slippageTolerance":{
         "origin":{
            "usd":"0.000000",
            "value":"0",
            "percent":"0.00"
         },
         "destination":{
            "usd":"46.004152",
            "value":"46246104",
            "percent":"1.99"
         }
      },
      "timeEstimate":2,
      "userBalance":"0",
      "isFixedRate":false,
      "route":{
         "origin":{
            "inputCurrency":{
               "currency":{
                  "chainId":8453,
                  "address":"0x0000000000000000000000000000000000000000",
                  "symbol":"ETH",
                  "name":"Ether",
                  "decimals":18,
                  "metadata":{
                     "logoURI":"https://assets.relay.link/icons/1/light.png",
                     "verified":true
                  }
               },
               "amount":"1000000000000000000",
               "amountFormatted":"1.0",
               "amountUsd":"2317.921203",
               "minimumAmount":"1000000000000000000"
            },
            "outputCurrency":{
               "currency":{
                  "chainId":8453,
                  "address":"0x0000000000000000000000000000000000000000",
                  "symbol":"ETH",
                  "name":"Ether",
                  "decimals":18,
                  "metadata":{
                     "logoURI":"https://assets.relay.link/icons/1/light.png",
                     "verified":true
                  }
               },
               "amount":"1000000000000000000",
               "amountFormatted":"1.0",
               "amountUsd":"2317.921203",
               "minimumAmount":"1000000000000000000"
            },
            "router":"relay"
         },
         "destination":{
            "inputCurrency":{
               "currency":{
                  "chainId":3586256,
                  "address":"0",
                  "symbol":"USDC (Perp)",
                  "name":"USD Coin (Perp)",
                  "decimals":6,
                  "metadata":{
                     "logoURI":"https://ethereum-optimism.github.io/data/USDC/logo.png",
                     "verified":true
                  }
               },
               "amount":"2312305224",
               "amountFormatted":"2312.305224",
               "amountUsd":"2311.766457",
               "minimumAmount":"2266059120"
            },
            "outputCurrency":{
               "currency":{
                  "chainId":3586256,
                  "address":"0",
                  "symbol":"USDC (Perp)",
                  "name":"USD Coin (Perp)",
                  "decimals":6,
                  "metadata":{
                     "logoURI":"https://ethereum-optimism.github.io/data/USDC/logo.png",
                     "verified":true
                  }
               },
               "amount":"2312305224",
               "amountFormatted":"2312.305224",
               "amountUsd":"2311.766457",
               "minimumAmount":"2266059120"
            },
            "router":"relay"
         }
      }
   },
   "protocol":{
      "v2":{
         "orderId":"0xb86a968b9c157fc6ab0e30ac13b7c9e8fe5ed28007b43da606737bca5f00cf6d",
         "orderData":{
            "version":"v1",
            "solverChainId":"base",
            "solver":"0xf70da97812cb96acdf810712aa562db8dfa3dbef",
            "salt":"0xa1fc4e8df304b84b48fe04ec56e5e131e3a2dff4760d792845069edadd1c30f3",
            "inputs":[
               {
                  "payment":{
                     "chainId":"base",
                     "currency":"0x0000000000000000000000000000000000000000",
                     "amount":"1000000000000000000",
                     "weight":"1"
                  },
                  "refunds":[
                     {
                        "chainId":"base",
                        "recipient":"0xf3d63166f0ca56c3c1a3508fce03ff0cf3fb691e",
                        "currency":"0x0000000000000000000000000000000000000000",
                        "minimumAmount":"0",
                        "deadline":1777644048,
                        "extraData":"0x000000000000000000000000b92fe925dc43a0ecde6c8b1a2709c170ec4fff4f"
                     },
                     {
                        "chainId":"lighter",
                        "recipient":"509564",
                        "currency":"0",
                        "minimumAmount":"0",
                        "deadline":1777644048,
                        "extraData":"0x"
                     }
                  ]
               }
            ],
            "output":{
               "chainId":"lighter",
               "payments":[
                  {
                     "recipient":"509564",
                     "currency":"0",
                     "minimumAmount":"2266059120",
                     "expectedAmount":"2312305224"
                  }
               ],
               "calls":[
                  
               ],
               "deadline":1777644048,
               "extraData":"0x"
            },
            "fees":[
               
            ]
         },
         "paymentDetails":{
            "chainId":"base",
            "depository":"0x4cd00e387622c35bddb9b4c962c136462338bc31",
            "currency":"0x0000000000000000000000000000000000000000",
            "amount":"1000000000000000000"
         }
      }
   }
}

In this example:

  • originChainId: 8453 - Depositing from Base
  • destinationChainId: 3586256 - Lighter chain ID
  • recipient: "509564" - Your Lighter account index (replace with your actual account index)

The response will include the execution steps required to complete the deposit. Follow the standard step execution flow to complete the transaction.

How to withdraw

curl 'https://api.relay.link/quote/v2' \
  -H 'content-type: application/json' \
  -d '{
    "user": "509564",
    "originChainId": 3586256,
    "destinationChainId": 8453,
    "originCurrency": "0",
    "destinationCurrency": "0x0000000000000000000000000000000000000000",
    "recipient": "0x03508bB71268BBA25ECaCC8F620e01866650532c",
    "tradeType": "EXACT_INPUT",
    "amount": "1000000"
  }'
{
    "steps": [
        {
            "id": "deposit",
            "action": "Confirm transaction in your wallet",
            "description": "Depositing funds to the depository contract",
            "kind": "transaction",
            "items": [
                {
                    "status": "incomplete",
                    "data": {
                        "action": {
                            "type": "transfer",
                            "parameters": {
                                "toAccountIndex": 723071,
                                "assetIndex": 3,
                                "fromRouteType": 0,
                                "toRouteType": 0,
                                "amount": 1000000,
                                "usdcFee": 3000000,
                                "memo": "0xfc88e4016659ca122b91dae1aedbb9038e09693a7ce33a1ed1a053d71bdb6aa2"
                            }
                        }
                    },
                    "check": {
                        "endpoint": "/intents/status/v3?requestId=0x67ef65da60de7815d1fa42546dbee934b97d67f18bf5eb536ab616449a436aa3",
                        "method": "GET"
                    }
                }
            ],
            "requestId": "0x67ef65da60de7815d1fa42546dbee934b97d67f18bf5eb536ab616449a436aa3",
            "depositAddress": ""
        }
    ],
    "fees": {
        "gas": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "3000000",
            "amountFormatted": "3.0",
            "amountUsd": "2.999505",
            "minimumAmount": "3000000"
        },
        "relayer": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "22319",
            "amountFormatted": "0.022319",
            "amountUsd": "0.022315",
            "minimumAmount": "22319"
        },
        "relayerGas": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "1518",
            "amountFormatted": "0.001518",
            "amountUsd": "0.001518",
            "minimumAmount": "1518"
        },
        "relayerService": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "20801",
            "amountFormatted": "0.020801",
            "amountUsd": "0.020798",
            "minimumAmount": "20801"
        },
        "app": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "0",
            "amountFormatted": "0.0",
            "amountUsd": "0",
            "minimumAmount": "0"
        },
        "subsidized": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "0",
            "amountFormatted": "0.0",
            "amountUsd": "0",
            "minimumAmount": "0"
        }
    },
    "details": {
        "operation": "swap",
        "sender": "509564",
        "recipient": "0x03508bB71268BBA25ECaCC8F620e01866650532c",
        "currencyIn": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "1000000",
            "amountFormatted": "1.0",
            "amountUsd": "0.999835",
            "minimumAmount": "1000000"
        },
        "currencyOut": {
            "currency": {
                "chainId": 8453,
                "address": "0x0000000000000000000000000000000000000000",
                "symbol": "ETH",
                "name": "Ether",
                "decimals": 18,
                "metadata": {
                    "logoURI": "https://assets.relay.link/icons/1/light.png",
                    "verified": true
                }
            },
            "amount": "422039092891785",
            "amountFormatted": "0.000422039092891785",
            "amountUsd": "0.977171",
            "minimumAmount": "404777693992511"
        },
        "refundCurrency": {
            "currency": {
                "chainId": 3586256,
                "address": "0",
                "symbol": "USDC (Perp)",
                "name": "USD Coin (Perp)",
                "decimals": 6,
                "metadata": {
                    "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                    "verified": true
                }
            },
            "amount": "1000000",
            "amountFormatted": "1.0",
            "amountUsd": "0.999835",
            "minimumAmount": "1000000"
        },
        "totalImpact": {
            "usd": "-0.022664",
            "percent": "-2.27"
        },
        "swapImpact": {
            "usd": "-0.000349",
            "percent": "-0.03"
        },
        "expandedPriceImpact": {
            "swap": {
                "usd": "-0.000548"
            },
            "execution": {
                "usd": "-0.021517"
            },
            "relay": {
                "usd": "-0.000599"
            },
            "app": {
                "usd": "0"
            },
            "sponsored": {
                "usd": "0"
            }
        },
        "rate": "0.000422039092891785",
        "slippageTolerance": {
            "origin": {
                "usd": "0.000000",
                "value": "0",
                "percent": "0.00"
            },
            "destination": {
                "usd": "0.039869",
                "value": "17261398899274",
                "percent": "4.08"
            }
        },
        "timeEstimate": 3,
        "userBalance": "0",
        "isFixedRate": false,
        "route": {
            "origin": {
                "inputCurrency": {
                    "currency": {
                        "chainId": 3586256,
                        "address": "0",
                        "symbol": "USDC (Perp)",
                        "name": "USD Coin (Perp)",
                        "decimals": 6,
                        "metadata": {
                            "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                            "verified": true
                        }
                    },
                    "amount": "1000000",
                    "amountFormatted": "1.0",
                    "amountUsd": "0.999835",
                    "minimumAmount": "1000000"
                },
                "outputCurrency": {
                    "currency": {
                        "chainId": 3586256,
                        "address": "0",
                        "symbol": "USDC (Perp)",
                        "name": "USD Coin (Perp)",
                        "decimals": 6,
                        "metadata": {
                            "logoURI": "https://ethereum-optimism.github.io/data/USDC/logo.png",
                            "verified": true
                        }
                    },
                    "amount": "1000000",
                    "amountFormatted": "1.0",
                    "amountUsd": "0.999835",
                    "minimumAmount": "1000000"
                },
                "router": "relay"
            },
            "destination": {
                "inputCurrency": {
                    "currency": {
                        "chainId": 8453,
                        "address": "0x0000000000000000000000000000000000000000",
                        "symbol": "ETH",
                        "name": "Ether",
                        "decimals": 18,
                        "metadata": {
                            "logoURI": "https://assets.relay.link/icons/1/light.png",
                            "verified": true
                        }
                    },
                    "amount": "422039092891785",
                    "amountFormatted": "0.000422039092891785",
                    "amountUsd": "0.977171",
                    "minimumAmount": "404777693992511"
                },
                "outputCurrency": {
                    "currency": {
                        "chainId": 8453,
                        "address": "0x0000000000000000000000000000000000000000",
                        "symbol": "ETH",
                        "name": "Ether",
                        "decimals": 18,
                        "metadata": {
                            "logoURI": "https://assets.relay.link/icons/1/light.png",
                            "verified": true
                        }
                    },
                    "amount": "422039092891785",
                    "amountFormatted": "0.000422039092891785",
                    "amountUsd": "0.977171",
                    "minimumAmount": "404777693992511"
                },
                "router": "relay"
            }
        }
    },
    "protocol": {
        "v2": {
            "orderId": "0xfc88e4016659ca122b91dae1aedbb9038e09693a7ce33a1ed1a053d71bdb6aa2",
            "orderData": {
                "version": "v1",
                "solverChainId": "base",
                "solver": "0xf70da97812cb96acdf810712aa562db8dfa3dbef",
                "salt": "0x686091e7a544ba90af1b4d25ee805b7520b7a1f76bea9097503d3565ef099c27",
                "inputs": [
                    {
                        "payment": {
                            "chainId": "lighter",
                            "currency": "0",
                            "amount": "1000000",
                            "weight": "1"
                        },
                        "refunds": [
                            {
                                "chainId": "lighter",
                                "recipient": "509564",
                                "currency": "0",
                                "minimumAmount": "0",
                                "deadline": 1777647416,
                                "extraData": "0x"
                            },
                            {
                                "chainId": "base",
                                "recipient": "0x03508bB71268BBA25ECaCC8F620e01866650532c",
                                "currency": "0x0000000000000000000000000000000000000000",
                                "minimumAmount": "0",
                                "deadline": 1777647416,
                                "extraData": "0x000000000000000000000000b92fe925dc43a0ecde6c8b1a2709c170ec4fff4f"
                            }
                        ]
                    }
                ],
                "output": {
                    "chainId": "base",
                    "payments": [
                        {
                            "recipient": "0x03508bB71268BBA25ECaCC8F620e01866650532c",
                            "currency": "0x0000000000000000000000000000000000000000",
                            "minimumAmount": "404777693992511",
                            "expectedAmount": "422039092891785"
                        }
                    ],
                    "calls": [],
                    "deadline": 1777647416,
                    "extraData": "0x000000000000000000000000b92fe925dc43a0ecde6c8b1a2709c170ec4fff4f"
                },
                "fees": []
            },
            "paymentDetails": {
                "chainId": "lighter",
                "depository": "723071",
                "currency": "0",
                "amount": "1000000"
            }
        }
    }
}

The Quote API returns a transaction step with Lighter-specific execution data:

{
  "data": {
    "action": {
        "type": "transfer",
        "parameters": {
          "toAccountIndex": 723071,
          "assetIndex": 3,
          "fromRouteType": 0,
          "toRouteType": 0,
          "amount": 1000000,
          "usdcFee": 3000000,
          "memo": "0xfc88e4016659ca122b91dae1aedbb9038e09693a7ce33a1ed1a053d71bdb6aa2"
      }
    }
  }
}

The fields returned inside data.action are:

PropertyTypeDescription
typestringThe Lighter action to perform. For withdrawals this is always transfer.
toAccountIndexnumberThe Lighter account index to transfer funds to (the relayer's account that executes the fill).
assetIndexnumberIdentifier of the asset being transferred on Lighter (e.g. 3 for USDC).
fromRouteTypenumberThe route type to debit from on the sender's Lighter account.
toRouteTypenumberThe route type to credit on the recipient Lighter account.
amountnumberAmount of the asset to transfer, in the asset's smallest unit.
usdcFeenumberFee paid in USDC, in the asset's smallest unit, covering Lighter execution costs.
memostringHex-encoded Relay requestId used to correlate the Lighter transfer with the Relay order.

In order to interact with the Lighter API you must first request a Lighter API key which is scoped to the specific account. You'll then need to use the data returned by the Relay Quote API along with the API key from Lighter to send transactions. There is a binary used for signing which the SDK packages and lazily loads for you.

SDK

To use the SDK with Lighter, install and configure the Lighter wallet adapter.

yarn add @relayprotocol/relay-lighter-wallet-adapter @relayprotocol/relay-sdk viem

If you want the adapter to run its own bootstrap (fresh keygen, accountApiKey, or storage paths), you also need the Lighter SDK:

yarn add @relay-protocol/lighter-ts-sdk

For implementation details and code samples, see the Adapters documentation.

This documentation is built and hosted on Mintlify, a developer documentation platform.

PreviousHyperliquid SupportNextDeep Linking
Relay© 2026 Uneven Labs, Inc. All rights reserved.XGitHubSupport