Skip to content

Commit fd8c370

Browse files
committed
fix indentations
1 parent 2029c2c commit fd8c370

File tree

1 file changed

+27
-17
lines changed
  • pages/express-relay/integrate-as-searcher

1 file changed

+27
-17
lines changed

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

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ import { Client, Opportunity } from "@pythnetwork/express-relay-js";
3030
latestChainUpdate: Record<string, SvmChainUpdate> = {}
3131

3232
const handleOpportunity = async (opportunity: Opportunity) => {
33-
console.log("Received opportunity");
34-
// Implement your opportunity handler here
33+
console.log("Received opportunity");
34+
// Implement your opportunity handler here
3535
};
3636

3737
const svmChainUpdateHandler = async (update: SvmChainUpdate) {
38-
// Store chain updates to use when constructing the transaction
39-
latestChainUpdate[update.chainId] = update;
38+
// Store chain updates to use when constructing the transaction
39+
latestChainUpdate[update.chainId] = update;
4040
}
4141

4242
const client = new Client(
43-
{ baseUrl: "https://pyth-express-relay-mainnet.asymmetric.re" },
44-
undefined, // Default WebSocket options
45-
handleOpportunity,
46-
undefined,
47-
svmChainUpdateHandler
43+
{ baseUrl: "https://pyth-express-relay-mainnet.asymmetric.re" },
44+
undefined, // Default WebSocket options
45+
handleOpportunity,
46+
undefined,
47+
svmChainUpdateHandler
4848
);
4949

5050
async function main() {
51-
await client.subscribeChains(["solana"]);
51+
await client.subscribeChains(["solana"]);
5252
}
5353

5454
main();
@@ -142,7 +142,10 @@ The server responds with opportunities in the following format:
142142

143143
The `order` field includes the [Limo](https://solscan.io/account/LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF) program
144144
order data that can be decoded using the SDKs provided or the program anchor idl. It includes all the necessary information
145-
to fill the limit order: - Maker address - Input token and amount (what the maker is selling) - Output token and amount (what the maker is buying in exchange for the input token)
145+
to fill the limit order:
146+
- Maker address
147+
- Input token and amount (what the maker is selling)
148+
- Output token and amount (what the maker is buying in exchange for the input token)
146149

147150
<Callout type="info">
148151
Limo limit orders can also be filled partially in a linear fashion. For
@@ -300,9 +303,14 @@ The bid you construct will look like
300303
}
301304
```
302305

303-
The transaction submitted to the auction server as the bid should meet the following criteria: - It should contain an Express Relay `SubmitBid` instruction that specifies the amount you are bidding, the permission details, and the deadline.
304-
This instruction can be created via the SDKs. - The deadline specified in the `SubmitBid` instruction should be at least 5 seconds in the future. - It should contain an instruction to set the [transaction priority fee](https://solana.com/developers/guides/advanced/how-to-use-priority-fees#what-are-priority-fees). The priority fee should be at least as large the amount
305-
advertised via websocket. - It should contain valid signatures for all signers except the relayer - It should pass simulation
306+
The transaction submitted to the auction server as the bid should meet the following criteria:
307+
- It should contain an Express Relay `SubmitBid` instruction that specifies the amount you are bidding, the permission details, and the deadline.
308+
This instruction can be created via the SDKs.
309+
- The deadline specified in the `SubmitBid` instruction should be at least 5 seconds in the future.
310+
- It should contain an instruction to set the [transaction priority fee](https://solana.com/developers/guides/advanced/how-to-use-priority-fees#what-are-priority-fees). The priority fee should be at least as large the amount
311+
advertised via websocket.
312+
- It should contain valid signatures for all signers except the relayer
313+
- It should pass simulation
306314

307315
### Submit Bids on Opportunities to Express Relay
308316

@@ -331,7 +339,7 @@ const handleOpportunity = async (opportunity: Opportunity) => {
331339

332340
The code snippet below demonstrates how to submit a bid using the Python SDK:
333341

334-
```python {5} copy
342+
```python {8} copy
335343
import typing
336344
337345
async def generate_bid(opp: OpportunitySvm) -> BidSvm:
@@ -377,10 +385,12 @@ A successful response to a bid submission has the following schema:
377385

378386
```bash copy
379387
{
380-
"id": "1", // WebSocket request id
388+
// WebSocket request id
389+
"id": "1",
381390
"status": "success",
382391
"result": {
383-
"id": "beedbeed-b346-4fa1-8fab-2541a9e1872d", // Bid id
392+
// Bid id
393+
"id": "beedbeed-b346-4fa1-8fab-2541a9e1872d",
384394
"status": "OK"
385395
}
386396
}

0 commit comments

Comments
 (0)