@pear-protocol/core-sdk 0.0.17 → 0.0.20

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.
@@ -66,6 +66,12 @@ class Core {
66
66
  headers,
67
67
  query
68
68
  });
69
+ },
70
+ provisionals: async (headers) => {
71
+ return await this.client.fetch(`/fills/provisionals-lite`, {
72
+ method: "GET",
73
+ headers
74
+ });
69
75
  }
70
76
  };
71
77
  funding = {
@@ -84,6 +90,13 @@ class Core {
84
90
  headers,
85
91
  query
86
92
  });
93
+ },
94
+ symbolToIdMap: async (query, headers) => {
95
+ return await this.client.fetch(`/instruments/symbol-to-id-map`, {
96
+ method: "GET",
97
+ headers,
98
+ query
99
+ });
87
100
  }
88
101
  };
89
102
  positions = {
@@ -93,6 +106,12 @@ class Core {
93
106
  headers,
94
107
  query
95
108
  });
109
+ },
110
+ openLite: async (headers) => {
111
+ return await this.client.fetch(`/positions/lite`, {
112
+ method: "GET",
113
+ headers
114
+ });
96
115
  }
97
116
  };
98
117
  prices = {
@@ -132,6 +151,36 @@ class Core {
132
151
  });
133
152
  }
134
153
  };
154
+ sync = {
155
+ since: async (body, headers) => {
156
+ return await this.client.fetch(`/sync/since`, {
157
+ method: "POST",
158
+ headers,
159
+ body
160
+ });
161
+ },
162
+ confirm: async (body, headers) => {
163
+ return await this.client.fetch(`/sync/confirm`, {
164
+ method: "POST",
165
+ headers,
166
+ body
167
+ });
168
+ },
169
+ reconcile: async (body, headers) => {
170
+ return await this.client.fetch(`/sync/reconcile`, {
171
+ method: "POST",
172
+ headers,
173
+ body
174
+ });
175
+ },
176
+ create: async (body, headers) => {
177
+ return await this.client.fetch(`/sync/create`, {
178
+ method: "POST",
179
+ headers,
180
+ body
181
+ });
182
+ }
183
+ };
135
184
  trade = {
136
185
  open: async (body, headers) => {
137
186
  return await this.client.fetch(`/trade/open`, {
@@ -226,9 +275,61 @@ class Core {
226
275
  });
227
276
  }
228
277
  };
278
+ misc = {
279
+ lighter: {
280
+ createApiKey: async (body, headers) => {
281
+ return await this.client.fetch(`/misc/lighter/create-api-key`, {
282
+ method: "POST",
283
+ headers,
284
+ body
285
+ });
286
+ },
287
+ changePubKey: async (body, headers) => {
288
+ return await this.client.fetch(`/misc/lighter/change-pub-key`, {
289
+ method: "POST",
290
+ headers,
291
+ body
292
+ });
293
+ },
294
+ prepareApproveIntegrator: async (body, headers) => {
295
+ return await this.client.fetch(
296
+ `/misc/lighter/prepare-approve-integrator`,
297
+ {
298
+ method: "POST",
299
+ headers,
300
+ body
301
+ }
302
+ );
303
+ },
304
+ submitApproveIntegrator: async (body, headers) => {
305
+ return await this.client.fetch(
306
+ `/misc/lighter/submit-approve-integrator`,
307
+ {
308
+ method: "POST",
309
+ headers,
310
+ body
311
+ }
312
+ );
313
+ },
314
+ createAuthToken: async (body, headers) => {
315
+ return await this.client.fetch(`/misc/lighter/create-auth-token`, {
316
+ method: "POST",
317
+ headers,
318
+ body
319
+ });
320
+ }
321
+ }
322
+ };
229
323
  statistics = {
230
- daily: async (query, headers) => {
231
- return await this.client.fetch(`/statistics/daily`, {
324
+ volume: async (query, headers) => {
325
+ return await this.client.fetch(`/statistics/volume`, {
326
+ method: "GET",
327
+ headers,
328
+ query
329
+ });
330
+ },
331
+ oi: async (query, headers) => {
332
+ return await this.client.fetch(`/statistics/oi`, {
232
333
  method: "GET",
233
334
  headers,
234
335
  query
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "0.0.17",
3
+ "version": "0.0.20",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -25,8 +25,8 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@pear-protocol/types": "0.0.15",
29
- "@pear-protocol/utils": "0.0.15",
28
+ "@pear-protocol/types": "^0.0.17",
29
+ "@pear-protocol/utils": "^0.0.17",
30
30
  "qs": "^6.14.0"
31
31
  },
32
32
  "devDependencies": {