@pear-protocol/core-sdk
Advanced tools
@@ -9,14 +9,11 @@ import { HttpTypes } from '@pear-protocol/types'; | ||
| linkEmail(body: HttpTypes.LinkEmailRequest, headers?: ClientHeaders): Promise<void>; | ||
| linkWallet(body: HttpTypes.LinkWalletRequest, headers?: ClientHeaders): Promise<{ | ||
| user: { | ||
| id: string; | ||
| role: "basic" | "pro"; | ||
| address: string | null; | ||
| }; | ||
| }>; | ||
| linkWallet(body: HttpTypes.LinkWalletRequest, headers?: ClientHeaders): Promise<void>; | ||
| login(body: HttpTypes.LoginRequest, headers?: ClientHeaders): Promise<{ | ||
| accessToken: string; | ||
| refreshToken: string; | ||
| user: { | ||
| id: string; | ||
| role: "basic" | "pro"; | ||
| address: string | null; | ||
| providerId: string | null; | ||
| loginMethod: "email" | "evm_wallet"; | ||
| }; | ||
@@ -34,3 +31,4 @@ }>; | ||
| role: "basic" | "pro"; | ||
| address: string | null; | ||
| providerId: string | null; | ||
| loginMethod: "email" | "evm_wallet"; | ||
| }>; | ||
@@ -37,0 +35,0 @@ refreshSession(headers?: ClientHeaders): Promise<void>; |
+58
-2
@@ -69,2 +69,8 @@ class Core { | ||
| }); | ||
| }, | ||
| provisionals: async (headers) => { | ||
| return await this.client.fetch(`/fills/provisionals-lite`, { | ||
| method: "GET", | ||
| headers | ||
| }); | ||
| } | ||
@@ -88,2 +94,9 @@ }; | ||
| }); | ||
| }, | ||
| symbolToIdMap: async (query, headers) => { | ||
| return await this.client.fetch(`/instruments/symbol-to-id-map`, { | ||
| method: "GET", | ||
| headers, | ||
| query | ||
| }); | ||
| } | ||
@@ -98,2 +111,8 @@ }; | ||
| }); | ||
| }, | ||
| openLite: async (headers) => { | ||
| return await this.client.fetch(`/positions/lite`, { | ||
| method: "GET", | ||
| headers | ||
| }); | ||
| } | ||
@@ -138,2 +157,32 @@ }; | ||
| }; | ||
| sync = { | ||
| since: async (body, headers) => { | ||
| return await this.client.fetch(`/sync/since`, { | ||
| method: "POST", | ||
| headers, | ||
| body | ||
| }); | ||
| }, | ||
| confirm: async (body, headers) => { | ||
| return await this.client.fetch(`/sync/confirm`, { | ||
| method: "POST", | ||
| headers, | ||
| body | ||
| }); | ||
| }, | ||
| reconcile: async (body, headers) => { | ||
| return await this.client.fetch(`/sync/reconcile`, { | ||
| method: "POST", | ||
| headers, | ||
| body | ||
| }); | ||
| }, | ||
| create: async (body, headers) => { | ||
| return await this.client.fetch(`/sync/create`, { | ||
| method: "POST", | ||
| headers, | ||
| body | ||
| }); | ||
| } | ||
| }; | ||
| trade = { | ||
@@ -279,4 +328,4 @@ open: async (body, headers) => { | ||
| statistics = { | ||
| daily: async (query, headers) => { | ||
| return await this.client.fetch(`/statistics/daily`, { | ||
| volume: async (query, headers) => { | ||
| return await this.client.fetch(`/statistics/volume`, { | ||
| method: "GET", | ||
@@ -286,2 +335,9 @@ headers, | ||
| }); | ||
| }, | ||
| oi: async (query, headers) => { | ||
| return await this.client.fetch(`/statistics/oi`, { | ||
| method: "GET", | ||
| headers, | ||
| query | ||
| }); | ||
| } | ||
@@ -288,0 +344,0 @@ }; |
+3
-3
| { | ||
| "name": "@pear-protocol/core-sdk", | ||
| "version": "0.0.18", | ||
| "version": "0.0.20", | ||
| "description": "Pear Protocol Core SDK", | ||
@@ -28,4 +28,4 @@ "private": false, | ||
| "dependencies": { | ||
| "@pear-protocol/types": "0.0.16", | ||
| "@pear-protocol/utils": "0.0.16", | ||
| "@pear-protocol/types": "^0.0.17", | ||
| "@pear-protocol/utils": "^0.0.17", | ||
| "qs": "^6.14.0" | ||
@@ -32,0 +32,0 @@ }, |
Sorry, the diff of this file is too big to display
111801
10.1%2976
8.65%63
14.55%+ Added
+ Added
- Removed
- Removed
Updated
Updated