mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-22 21:59:44 +03:00
feat: updated order scheme
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@orionprotocol/sdk",
|
"name": "@orionprotocol/sdk",
|
||||||
"version": "0.23.0-rc9",
|
"version": "0.23.0-rc10",
|
||||||
"description": "Orion Protocol SDK",
|
"description": "Orion Protocol SDK",
|
||||||
"main": "./lib/index.cjs",
|
"main": "./lib/index.cjs",
|
||||||
"module": "./lib/index.js",
|
"module": "./lib/index.js",
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ export const orderUpdateSchema = z.object({
|
|||||||
t: z.number(), // update time
|
t: z.number(), // update time
|
||||||
C: z.string().optional(), // trigger condition
|
C: z.string().optional(), // trigger condition
|
||||||
E: z.enum(executionTypes).optional(),
|
E: z.enum(executionTypes).optional(),
|
||||||
|
bf: z.number().optional(),
|
||||||
|
bF: z.string().optional(),
|
||||||
c: subOrderSchema.array(),
|
c: subOrderSchema.array(),
|
||||||
})
|
})
|
||||||
.transform((val) => ({
|
.transform((val) => ({
|
||||||
@@ -49,6 +51,8 @@ export const orderUpdateSchema = z.object({
|
|||||||
status: o.S,
|
status: o.S,
|
||||||
liquidated: o.l,
|
liquidated: o.l,
|
||||||
executionType: o.E,
|
executionType: o.E,
|
||||||
|
bridgeFee: o.bf,
|
||||||
|
bridgeFeeAsset: o.bF,
|
||||||
triggerCondition: o.C,
|
triggerCondition: o.C,
|
||||||
subOrders: o.c.map((so) => ({
|
subOrders: o.c.map((so) => ({
|
||||||
pair: so.P,
|
pair: so.P,
|
||||||
@@ -74,6 +78,8 @@ export const fullOrderSchema = z.object({
|
|||||||
p: z.number(), // price
|
p: z.number(), // price
|
||||||
F: z.string().toUpperCase(), // fee asset
|
F: z.string().toUpperCase(), // fee asset
|
||||||
f: z.number(), // fee
|
f: z.number(), // fee
|
||||||
|
bf: z.number().optional(),
|
||||||
|
bF: z.string().optional(),
|
||||||
l: z.boolean().optional(), // is liquidation order
|
l: z.boolean().optional(), // is liquidation order
|
||||||
L: z.number().optional(), // stop limit price,
|
L: z.number().optional(), // stop limit price,
|
||||||
o: z.boolean(), // internal only
|
o: z.boolean(), // internal only
|
||||||
@@ -97,6 +103,8 @@ export const fullOrderSchema = z.object({
|
|||||||
settledAmount: o.A,
|
settledAmount: o.A,
|
||||||
feeAsset: o.F,
|
feeAsset: o.F,
|
||||||
fee: o.f,
|
fee: o.f,
|
||||||
|
bridgeFee: o.bf,
|
||||||
|
bridgeFeeAsset: o.bF,
|
||||||
liquidated: o.l,
|
liquidated: o.l,
|
||||||
stopPrice: o.L,
|
stopPrice: o.L,
|
||||||
status: o.S,
|
status: o.S,
|
||||||
|
|||||||
Reference in New Issue
Block a user