@pear-protocol/core-sdk 1.1.0 → 1.3.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.
@@ -113,6 +113,34 @@ class Core {
113
113
  });
114
114
  }
115
115
  };
116
+ ladders = {
117
+ list: async (query, headers) => {
118
+ return await this.client.fetch(`/ladders`, {
119
+ method: "GET",
120
+ headers,
121
+ query
122
+ });
123
+ },
124
+ create: async (body, headers) => {
125
+ return await this.client.fetch(`/ladders`, {
126
+ method: "POST",
127
+ headers,
128
+ body
129
+ });
130
+ },
131
+ get: async (ladderId, headers) => {
132
+ return await this.client.fetch(`/ladders/${ladderId}`, {
133
+ method: "GET",
134
+ headers
135
+ });
136
+ },
137
+ cancel: async (ladderId, headers) => {
138
+ return await this.client.fetch(`/ladders/${ladderId}/cancel`, {
139
+ method: "POST",
140
+ headers
141
+ });
142
+ }
143
+ };
116
144
  instruments = {
117
145
  list: async (query, headers) => {
118
146
  return await this.client.fetch(`/instruments`, {
@@ -305,6 +333,13 @@ class Core {
305
333
  body: this.withClientId(body)
306
334
  });
307
335
  },
336
+ reverse: async (positionId, body, headers) => {
337
+ return await this.client.fetch(`/trade/${positionId}/reverse`, {
338
+ method: "POST",
339
+ headers,
340
+ body
341
+ });
342
+ },
308
343
  closeAll: async (body, headers) => {
309
344
  return await this.client.fetch(`/trade/close-all`, {
310
345
  method: "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@pear-protocol/types": "^1.1.0",
28
+ "@pear-protocol/types": "^1.4.0",
29
29
  "@pear-protocol/utils": "^0.0.23",
30
30
  "qs": "^6.14.0"
31
31
  },