Skip to content

Commit 8ec2a65

Browse files
committed
fix indentations
1 parent fd8c370 commit 8ec2a65

File tree

1 file changed

+23
-19
lines changed
  • pages/express-relay/integrate-as-searcher

1 file changed

+23
-19
lines changed

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

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,41 @@ Searchers can also directly fetch available opportunities via HTTP or subscribe
2424
<Tabs items={['Typescript', 'Python', 'HTTP', 'WebSocket']}>
2525

2626
<Tabs.Tab>
27+
2728
```typescript
2829
import { Client, Opportunity } from "@pythnetwork/express-relay-js";
2930

3031
latestChainUpdate: Record<string, SvmChainUpdate> = {}
3132

3233
const handleOpportunity = async (opportunity: Opportunity) => {
33-
console.log("Received opportunity");
34-
// Implement your opportunity handler here
34+
console.log("Received opportunity");
35+
// Implement your opportunity handler here
3536
};
3637

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

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

5051
async function main() {
51-
await client.subscribeChains(["solana"]);
52+
await client.subscribeChains(["solana"]);
5253
}
5354

5455
main();
5556

56-
````
57+
```
5758

5859
</Tabs.Tab>
5960
<Tabs.Tab>
61+
6062
```python copy
6163
import asyncio
6264
from express_relay.client import (
@@ -89,7 +91,7 @@ async def main():
8991

9092
if __name__ == "__main__":
9193
asyncio.run(main())
92-
````
94+
```
9395

9496
</Tabs.Tab>
9597
<Tabs.Tab>
@@ -143,6 +145,7 @@ The server responds with opportunities in the following format:
143145
The `order` field includes the [Limo](https://solscan.io/account/LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF) program
144146
order data that can be decoded using the SDKs provided or the program anchor idl. It includes all the necessary information
145147
to fill the limit order:
148+
146149
- Maker address
147150
- Input token and amount (what the maker is selling)
148151
- Output token and amount (what the maker is buying in exchange for the input token)
@@ -304,13 +307,14 @@ The bid you construct will look like
304307
```
305308

306309
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
310+
311+
- It should contain an Express Relay `SubmitBid` instruction that specifies the amount you are bidding, the permission details, and the deadline.
312+
This instruction can be created via the SDKs.
313+
- The deadline specified in the `SubmitBid` instruction should be at least 5 seconds in the future.
314+
- 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
315+
advertised via websocket.
316+
- It should contain valid signatures for all signers except the relayer
317+
- It should pass simulation
314318

315319
### Submit Bids on Opportunities to Express Relay
316320

0 commit comments

Comments
 (0)