Skip to content

Commit 9979e89

Browse files
committed
WIP-searcher-guide-refactor
1 parent bc60b80 commit 9979e89

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

pages/express-relay/integrate-as-searcher.mdx

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,47 @@ The server responds with opportunities in the following format:
8080
"version": "v1" // Opportunity format version
8181
}
8282
```
83-
</Steps>
8483

8584

86-
### Submit bids on opportunities to the auction server.
85+
86+
### Submit bids on opportunities to the auction server.
87+
88+
Searchers can submit bids on opportunities to the auction server via an HTTP POST or through a WebSocket connection.
89+
90+
<Tabs items={['HTTP', 'Websocket']}>
91+
92+
<Tabs.Tab>
93+
Searchers can submit bids through an HTTP POST call to the `/v1/bids` endpoint. This endpoint accepts a JSON payload containing the details of the bid.
94+
95+
```bash copy
96+
{
97+
"chain_id": "op_sepolia",
98+
"permission_key": "0x00000000000000000000000087ee27c5ae396b28a825968b277fece0720f5907000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000",
99+
"target_contract": "0x87ee27c5ae396b28a825968b277fece0720f5907"
100+
"target_calldata": "0xeadb38050000000000000000000000000000000000000000000000000000000000000064",
101+
"amount": "10",
102+
}
103+
```
104+
</Tabs.Tab>
105+
<Tabs.Tab>
106+
107+
Searchers can submit bids via Websocket to avoid additional network round-trips and get notified about changes to the bid status.
108+
109+
```bash copy
110+
```
111+
112+
A successful response to a bid submission has the following schema:
113+
114+
```bash copy
115+
{
116+
"id": "1", // websocket request id
117+
"status": "success",
118+
"result": {
119+
"id": "beedbeed-b346-4fa1-8fab-2541a9e1872d", //bid id
120+
"status": "OK"
121+
}
122+
}
123+
```
124+
</Tabs.Tab>
125+
</Tabs>
126+
</Steps>

0 commit comments

Comments
 (0)