mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-29 17:17:56 +03:00
multiple exchanges in suborder
This commit is contained in:
@@ -87,6 +87,7 @@ const subOrderSchema = baseOrderSchema.extend({
|
||||
message: `subOrder.parentOrderId must be a hex string, got ${value}`,
|
||||
})),
|
||||
exchange: z.string(),
|
||||
exchanges: z.string().array().optional(),
|
||||
brokerAddress: brokerAddressSchema,
|
||||
tradesInfo: z.record(
|
||||
z.string().uuid(),
|
||||
|
||||
@@ -23,6 +23,7 @@ const subOrderSchema = z.object({
|
||||
A: z.number(), // settled amount
|
||||
p: z.number(), // avg weighed settlement price
|
||||
e: z.string(), // exchange
|
||||
es: z.string().array().optional(), // exchanges
|
||||
b: z.string(), // broker address
|
||||
S: z.enum(subOrderStatuses), // status
|
||||
o: z.boolean(), // internal only
|
||||
@@ -52,6 +53,7 @@ export const orderUpdateSchema = z.object({
|
||||
subOrders: o.c.map((so) => ({
|
||||
pair: so.P,
|
||||
exchange: so.e,
|
||||
exchanges: so.es,
|
||||
id: so.i,
|
||||
amount: so.a,
|
||||
settledAmount: so.A,
|
||||
@@ -106,6 +108,7 @@ export const fullOrderSchema = z.object({
|
||||
subOrders: o.c.map((so) => ({
|
||||
pair: so.P,
|
||||
exchange: so.e,
|
||||
exchangs: so.es,
|
||||
id: so.i,
|
||||
amount: so.a,
|
||||
settledAmount: so.A,
|
||||
|
||||
Reference in New Issue
Block a user