Skip to content

Commit 40287f6

Browse files
authored
[price-service] Make the README better (#560)
* Make the README better * Now fix p2wrelay * Space in docker compose
1 parent 8d73d07 commit 40287f6

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

price_service/server/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,19 @@ both the price service and spy. To run the mainnet docker compose file run
3535
the following command:
3636

3737
```
38-
docker-compose up -f docker-compose.mainnet.yaml
38+
docker compose -f docker-compose.mainnet.yaml up
39+
```
40+
41+
Now your own instance of the price service is up and running! Running the following command should give you the Pyth price of ETH/USD :
42+
43+
```
44+
curl localhost:4200/api/latest_price_feeds?ids[]=0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace
45+
```
46+
47+
If everything is working, you should get an output like this :
48+
49+
```
50+
[{"ema_price":{"conf":"52359655","expo":-8,"price":"169041770000","publish_time":1675365813},"id":"ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace","price":{"conf":"64041644","expo":-8,"price":"167043958356","publish_time":1675365813}}]
3951
```
4052

4153
The compose files use a public release of Pyth price service and spy. If you wish to change the

price_service/server/docker-compose.mainnet.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ services:
4141
REMOVE_EXPIRED_VALUES_INTERVAL_SECONDS: "60"
4242
CACHE_TTL_SECONDS: "300"
4343
DB_API_ENDPOINT: "https://web-api.pyth.network"
44+
ports:
45+
- "4200:4200"
4446
healthcheck:
4547
test:
4648
[

price_service/server/docker-compose.testnet.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ services:
4141
REMOVE_EXPIRED_VALUES_INTERVAL_SECONDS: "60"
4242
CACHE_TTL_SECONDS: "300"
4343
DB_API_ENDPOINT: "https://web-api.pyth.network"
44+
ports:
45+
- "4200:4200"
4446
healthcheck:
4547
test:
4648
[

0 commit comments

Comments
 (0)