@pythnetwork/pyth-lazer-sdk 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,17 +70,17 @@ export declare class PythLazerClient {
70
70
  * @param params - Optional query parameters to filter symbols
71
71
  * @returns Promise resolving to array of symbol information
72
72
  */
73
- get_symbols(params?: SymbolsQueryParams): Promise<SymbolResponse[]>;
73
+ getSymbols(params?: SymbolsQueryParams): Promise<SymbolResponse[]>;
74
74
  /**
75
75
  * Queries the latest price endpoint to get current price data.
76
76
  * @param params - Parameters for the latest price request
77
77
  * @returns Promise resolving to JsonUpdate with current price data
78
78
  */
79
- get_latest_price(params: LatestPriceRequest): Promise<JsonUpdate>;
79
+ getLatestPrice(params: LatestPriceRequest): Promise<JsonUpdate>;
80
80
  /**
81
81
  * Queries the price endpoint to get historical price data at a specific timestamp.
82
82
  * @param params - Parameters for the price request including timestamp
83
83
  * @returns Promise resolving to JsonUpdate with price data at the specified time
84
84
  */
85
- get_price(params: PriceRequest): Promise<JsonUpdate>;
85
+ getPrice(params: PriceRequest): Promise<JsonUpdate>;
86
86
  }
@@ -161,7 +161,7 @@ class PythLazerClient {
161
161
  * @param params - Optional query parameters to filter symbols
162
162
  * @returns Promise resolving to array of symbol information
163
163
  */
164
- async get_symbols(params) {
164
+ async getSymbols(params) {
165
165
  const url = new URL(`${this.metadataServiceUrl}/v1/symbols`);
166
166
  if (params?.query) {
167
167
  url.searchParams.set("query", params.query);
@@ -185,11 +185,11 @@ class PythLazerClient {
185
185
  * @param params - Parameters for the latest price request
186
186
  * @returns Promise resolving to JsonUpdate with current price data
187
187
  */
188
- async get_latest_price(params) {
188
+ async getLatestPrice(params) {
189
189
  const url = `${this.priceServiceUrl}/v1/latest_price`;
190
190
  try {
191
191
  const body = JSON.stringify(params);
192
- this.logger.debug("get_latest_price", { url, body });
192
+ this.logger.debug("getLatestPrice", { url, body });
193
193
  const response = await this.authenticatedFetch(url, {
194
194
  method: "POST",
195
195
  headers: {
@@ -211,11 +211,11 @@ class PythLazerClient {
211
211
  * @param params - Parameters for the price request including timestamp
212
212
  * @returns Promise resolving to JsonUpdate with price data at the specified time
213
213
  */
214
- async get_price(params) {
214
+ async getPrice(params) {
215
215
  const url = `${this.priceServiceUrl}/v1/price`;
216
216
  try {
217
217
  const body = JSON.stringify(params);
218
- this.logger.debug("get_price", { url, body });
218
+ this.logger.debug("getPrice", { url, body });
219
219
  const response = await this.authenticatedFetch(url, {
220
220
  method: "POST",
221
221
  headers: {
@@ -37,6 +37,7 @@ export type JsonBinaryData = {
37
37
  };
38
38
  export type InvalidFeedSubscriptionDetails = {
39
39
  unknownIds: number[];
40
+ unknownSymbols: string[];
40
41
  unsupportedChannels: number[];
41
42
  unstable: number[];
42
43
  };
@@ -70,17 +70,17 @@ export declare class PythLazerClient {
70
70
  * @param params - Optional query parameters to filter symbols
71
71
  * @returns Promise resolving to array of symbol information
72
72
  */
73
- get_symbols(params?: SymbolsQueryParams): Promise<SymbolResponse[]>;
73
+ getSymbols(params?: SymbolsQueryParams): Promise<SymbolResponse[]>;
74
74
  /**
75
75
  * Queries the latest price endpoint to get current price data.
76
76
  * @param params - Parameters for the latest price request
77
77
  * @returns Promise resolving to JsonUpdate with current price data
78
78
  */
79
- get_latest_price(params: LatestPriceRequest): Promise<JsonUpdate>;
79
+ getLatestPrice(params: LatestPriceRequest): Promise<JsonUpdate>;
80
80
  /**
81
81
  * Queries the price endpoint to get historical price data at a specific timestamp.
82
82
  * @param params - Parameters for the price request including timestamp
83
83
  * @returns Promise resolving to JsonUpdate with price data at the specified time
84
84
  */
85
- get_price(params: PriceRequest): Promise<JsonUpdate>;
85
+ getPrice(params: PriceRequest): Promise<JsonUpdate>;
86
86
  }
@@ -156,7 +156,7 @@ export class PythLazerClient {
156
156
  * @param params - Optional query parameters to filter symbols
157
157
  * @returns Promise resolving to array of symbol information
158
158
  */
159
- async get_symbols(params) {
159
+ async getSymbols(params) {
160
160
  const url = new URL(`${this.metadataServiceUrl}/v1/symbols`);
161
161
  if (params?.query) {
162
162
  url.searchParams.set("query", params.query);
@@ -180,11 +180,11 @@ export class PythLazerClient {
180
180
  * @param params - Parameters for the latest price request
181
181
  * @returns Promise resolving to JsonUpdate with current price data
182
182
  */
183
- async get_latest_price(params) {
183
+ async getLatestPrice(params) {
184
184
  const url = `${this.priceServiceUrl}/v1/latest_price`;
185
185
  try {
186
186
  const body = JSON.stringify(params);
187
- this.logger.debug("get_latest_price", { url, body });
187
+ this.logger.debug("getLatestPrice", { url, body });
188
188
  const response = await this.authenticatedFetch(url, {
189
189
  method: "POST",
190
190
  headers: {
@@ -206,11 +206,11 @@ export class PythLazerClient {
206
206
  * @param params - Parameters for the price request including timestamp
207
207
  * @returns Promise resolving to JsonUpdate with price data at the specified time
208
208
  */
209
- async get_price(params) {
209
+ async getPrice(params) {
210
210
  const url = `${this.priceServiceUrl}/v1/price`;
211
211
  try {
212
212
  const body = JSON.stringify(params);
213
- this.logger.debug("get_price", { url, body });
213
+ this.logger.debug("getPrice", { url, body });
214
214
  const response = await this.authenticatedFetch(url, {
215
215
  method: "POST",
216
216
  headers: {
@@ -37,6 +37,7 @@ export type JsonBinaryData = {
37
37
  };
38
38
  export type InvalidFeedSubscriptionDetails = {
39
39
  unknownIds: number[];
40
+ unknownSymbols: string[];
40
41
  unsupportedChannels: number[];
41
42
  unstable: number[];
42
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pythnetwork/pyth-lazer-sdk",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Pyth Lazer SDK",
5
5
  "publishConfig": {
6
6
  "access": "public"