rain-sdk-v2 1.0.5 → 1.0.6

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.
package/README.md CHANGED
@@ -912,7 +912,11 @@ await rain.markNotificationAsRead({ notificationId: '...' }, accessToken);
912
912
 
913
913
  ```typescript
914
914
  // Get price data for a pool
915
- const prices = await rain.getPriceData({ poolId: '...', interval: '1h' });
915
+ const prices = await rain.getPriceData({
916
+ contractAddress: '0x...', // market contract address
917
+ side: 1, // 1 = YES, 2 = NO
918
+ filter: '1D', // '1H' | '6H' | '1D' | '1W' | '1M' | 'ALL'
919
+ });
916
920
  ```
917
921
 
918
922
  ### Pool Reviews
@@ -1,6 +1,6 @@
1
1
  import { buildHeaders, buildQuery, handleResponse } from './helpers.js';
2
2
  export async function getPriceData(params, config) {
3
- const qs = buildQuery({ subPool: params.subPool, side: params.side, filter: params.filter });
3
+ const qs = buildQuery({ contractAddress: params.contractAddress, side: params.side, filter: params.filter });
4
4
  const res = await fetch(`${config.apiUrl}/price-data/get-price-data${qs}`, {
5
5
  method: 'GET',
6
6
  headers: buildHeaders(config),
@@ -193,7 +193,7 @@ export interface PnlByPoolIdParams {
193
193
  poolId: string;
194
194
  }
195
195
  export interface PriceDataParams {
196
- subPool: string;
196
+ contractAddress: string;
197
197
  side: 1 | 2;
198
198
  filter?: '1H' | '6H' | '1D' | '1W' | '1M' | 'ALL';
199
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rain-sdk-v2",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "description": "Rain SDK V2 — TypeScript SDK for Rain prediction markets on Arbitrum. Market creation, trading, liquidity, order book, split/merge, dispute, and smart account support.",
6
6
  "main": "dist/index.js",