Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pythnetwork/price-service-client

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pythnetwork/price-service-client - npm Package Compare versions

Comparing version 1.8.1 to 1.8.2

4

package.json
{
"name": "@pythnetwork/price-service-client",
"version": "1.8.1",
"version": "1.8.2",
"description": "Pyth price service client",

@@ -59,3 +59,3 @@ "author": {

},
"gitHead": "2b51cffdc7e782995e7c267d2fc3b0a8a24e1c60"
"gitHead": "f36e868ef6dceff3647256f063a72d3d83eef612"
}
# Price Service Client
[Pyth Network](https://pyth.network/) provides real-time pricing data in a variety of asset classes, including cryptocurrency, equities, FX and commodities.
These prices are available either via HTTP or WebSocket from Pyth's [price service](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/server).
This library is a client for interacting with the price service, allowing your application to consume Pyth real-time prices in on- and off-chain Javascript/Typescript applications.
These prices are available either via HTTP or WebSocket from [Hermes](https://github.com/pyth-network/pyth-crosschain/tree/main/hermes).
This library is a client for interacting with Hermes, allowing your application to consume Pyth real-time prices in on- and off-chain Javascript/Typescript applications.

@@ -27,3 +27,3 @@ ## Installation

const connection = new PriceServiceConnection(
"https://xc-testnet.pyth.network",
"https://hermes-beta.pyth.network",
{

@@ -36,3 +36,3 @@ priceFeedRequestConfig: {

}
); // See Price Service endpoints section below for other endpoints
); // See Hermes endpoints section below for other endpoints

@@ -72,3 +72,3 @@ const priceIds = [

On-chain applications will need to submit the price updates returned by the price service to the Pyth contract on their blockchain.
On-chain applications will need to submit the price updates returned by Hermes to the Pyth contract on their blockchain.
These applications should pass the `binary: true` option to the constructor as shown above, to ensure that all methods on `PriceServiceConnection` return the required information.

@@ -86,12 +86,7 @@ This option will add a `vaa` field to `PriceFeed` that represents a signed price update.

```bash
npm run example -- --endpoint https://xc-testnet.pyth.network --price-ids 0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b 0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6
npm run example -- --endpoint https://hermes-beta.pyth.network --price-ids 0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b 0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6
```
## Price Service endpoints
## Hermes endpoints
Public endpoints for the Price Service are provided for both mainnet and testnet. These can be used regardless of which network you deploy your own contracts to as long as it is a Pyth supported network. For example, you can use the testnet Price Service whether you are deploying your contract to the BNB or Polygon testnet.
| network | url |
| ------- | ------------------------------- |
| mainnet | https://xc-mainnet.pyth.network |
| testnet | https://xc-testnet.pyth.network |
You can find the list of Hermes public endpoints [here](https://docs.pyth.network/documentation/pythnet-price-feeds/hermes#public-endpoints).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc