Merge pull request #95 from orionprotocol/task/OP-3783-update-pools-endpoints

OP-3783 Update pools endpoints
This commit is contained in:
Dmitry
2023-04-19 10:36:19 +03:00
committed by GitHub
4 changed files with 11 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.18.18",
"version": "0.18.17-rc1",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -6,8 +6,8 @@ const futuresTradeInfoSchema = z.object({
id: z.string(), // trade info request UUID, set by client side
S: z.string(), // sender
i: z.string(), // instrument
bp: z.number().nullable(), // buy price
sp: z.number().nullable(), // sell price
bp: z.number().optional(), // buy price
sp: z.number().optional(), // sell price
bpw: z.number(), // buy power
spw: z.number(), // sell power
ma: z.number(), // min amount

View File

@@ -1,8 +1,8 @@
import { z } from 'zod';
const governancePoolSchema = z.object({
base_apr: z.union([z.null(), z.number()]),
max_apr: z.union([z.null(), z.number()]),
min_apr: z.string(),
max_apr: z.string(),
tvl: z.string(),
lp_supply: z.string(),
lp_staked: z.string(),

View File

@@ -2,22 +2,24 @@ import { z } from 'zod';
const governancePoolsSchema = z.array(
z.object({
slug: z.string(),
identifier: z.string(),
chain: z.string(),
platform: z.string(),
logo: z.string(),
pair: z.string(),
lp_address: z.string(),
lp_staked: z.string(),
lp_staked_with_boost: z.string(),
lp_total_supply: z.string(),
lp_supply: z.string(),
lp_price_in_usd: z.string(),
farm_address: z.string(),
pool_tokens: z.tuple([z.string(), z.string()]),
pool_rewards: z.array(z.string()),
tvl: z.string(),
base_apr: z.union([z.null(), z.number()]),
max_apr: z.union([z.null(), z.number()]),
reward_per_period: z.string(),
min_apr: z.string(),
max_apr: z.string(),
reward_per_period: z.array(z.string()),
weight: z.string(),
liquidity: z.string(),
})