|
| 1 | +--- |
| 2 | +title: "Integrate as a Searcher" |
| 3 | +description: >- |
| 4 | + Integrate once and access all existing and future opportunities across integrated DeFi protocols through Express Relay's bidding system. |
| 5 | +--- |
| 6 | + |
| 7 | +import { IntegrationCard } from "../../../../src/components/IntegrationCard"; |
| 8 | +import { Code } from "@phosphor-icons/react/dist/ssr"; |
| 9 | + |
| 10 | +# How to Integrate Express Relay as a Searcher |
| 11 | + |
| 12 | +Express Relay allows searchers to integrate once and access all existing and future opportunities across integrated DeFi protocols. Searchers **bid** on these opportunities exposed by Express Relay. |
| 13 | + |
| 14 | +Express Relay exposes different endpoints for interaction, which can be used directly via HTTP, WebSocket, or one of the SDKs for convenience. |
| 15 | + |
| 16 | +## What is a Searcher? |
| 17 | + |
| 18 | +Searchers are sophisticated actors who monitor blockchain networks for profitable opportunities such as arbitrage, liquidations, and MEV extraction. With Express Relay, searchers can: |
| 19 | + |
| 20 | +- **Access unified opportunities** across multiple integrated DeFi protocols |
| 21 | +- **Compete in fair auctions** for the right to fulfill user transactions |
| 22 | +- **Capture value** while providing better execution for users |
| 23 | + |
| 24 | +## Integration Methods |
| 25 | + |
| 26 | +Express Relay provides multiple ways for searchers to integrate: |
| 27 | + |
| 28 | +- **Direct API integration** using HTTP and WebSocket endpoints |
| 29 | +- **SDK integration** with [Typescript](https://github.com/pyth-network/per/tree/main/sdk/js) and [Python](https://github.com/pyth-network/per/tree/main/sdk/python) SDKs |
| 30 | +- **Real-time subscriptions** for opportunity monitoring |
| 31 | + |
| 32 | +## Integration Process |
| 33 | + |
| 34 | +Searchers can integrate with Express Relay in three key steps: |
| 35 | + |
| 36 | +### Step 1: Subscribe to New Opportunities |
| 37 | + |
| 38 | +Monitor opportunities across integrated DeFi protocols in real-time using Express Relay's WebSocket or HTTP endpoints. Opportunities include: |
| 39 | + |
| 40 | +- **Market orders** from integrated protocols requiring immediate execution |
| 41 | +- **Limit orders** on supported order book systems |
| 42 | +- **Liquidation opportunities** from lending and borrowing protocols |
| 43 | +- **Arbitrage opportunities** across different decentralized exchanges |
| 44 | + |
| 45 | +### Step 2: Construct and Submit Your Bid |
| 46 | + |
| 47 | +Analyze opportunities and construct competitive bids based on: |
| 48 | + |
| 49 | +- **Your execution strategy** and available capital |
| 50 | +- **Gas costs** and transaction efficiency considerations |
| 51 | +- **Expected profit margins** and risk assessment |
| 52 | +- **Competition** from other searchers in the auction |
| 53 | + |
| 54 | +Submit bids to Express Relay's auction system where the highest bidder wins the right to fulfill the opportunity. |
| 55 | + |
| 56 | +### Step 3: Execute Won Opportunities |
| 57 | + |
| 58 | +If your bid wins the auction, execute the opportunity by: |
| 59 | + |
| 60 | +- **Fulfilling the user's transaction** according to the opportunity parameters |
| 61 | +- **Capturing the bid amount** as compensation for providing the service |
| 62 | +- **Ensuring proper execution** to maintain reputation in the system |
| 63 | + |
| 64 | +## Supported Chains |
| 65 | + |
| 66 | +Searchers can currently integrate with Express Relay on **Solana Virtual Machine (SVM)** chains, with support for additional chains coming soon. |
| 67 | + |
| 68 | +## Getting Started |
| 69 | + |
| 70 | +Ready to integrate as a searcher? Start with our detailed integration guides: |
| 71 | + |
| 72 | +<div className="mt-8"> |
| 73 | + <IntegrationCard |
| 74 | + href="./svm" |
| 75 | + colorScheme="blue" |
| 76 | + title="Integrate with Express Relay on SVM Chains" |
| 77 | + description="Complete guide for integrating Express Relay on Solana Virtual Machine chains with code examples and best practices" |
| 78 | + icon={<Code size={16} />} |
| 79 | + /> |
| 80 | +</div> |
| 81 | + |
| 82 | +## Additional Resources |
| 83 | + |
| 84 | +Explore these resources to enhance your searcher integration: |
| 85 | + |
| 86 | +### API Documentation |
| 87 | + |
| 88 | +- **[WebSocket API Reference](./websocket-api-reference)** - Real-time opportunity streaming |
| 89 | +- **[HTTP API Reference](./http-api-reference)** - REST endpoints for opportunities and bidding |
| 90 | + |
| 91 | +### Technical Resources |
| 92 | + |
| 93 | +- **[Contract Addresses](./contract-addresses)** - Smart contract addresses across supported chains |
| 94 | +- **[Error Codes](./errors)** - Complete list of error codes and troubleshooting guide |
| 95 | + |
| 96 | +### Understanding Express Relay |
| 97 | + |
| 98 | +- **[How Express Relay Works](./how-express-relay-works)** - Deep dive into the auction mechanism and architecture |
0 commit comments