mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
cfdHistorySchema was updated
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.16.0-rc.4",
|
||||
"version": "0.16.0-rc.5",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/esm/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -1,15 +1,27 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
const cfdHistorySchema = z.array(z.object({
|
||||
const cfdHistoryItem = z.object({
|
||||
_id: z.string(),
|
||||
__v: z.number(),
|
||||
address: z.string(),
|
||||
instrument: z.string(),
|
||||
instrumentAddress: z.string(),
|
||||
balance: z.string(),
|
||||
position: z.string(),
|
||||
reason: z.string(),
|
||||
reason: z.enum(['WITHDRAW', 'DEPOSIT']),
|
||||
positionPrice: z.string(),
|
||||
fundingRate: z.string(),
|
||||
transactionHash: z.string(),
|
||||
blockNumber: z.number(),
|
||||
}));
|
||||
createdAt: z.number(),
|
||||
});
|
||||
|
||||
const cfdHistorySchema = z.object({
|
||||
success: z.boolean(),
|
||||
count: z.number(),
|
||||
total: z.number(),
|
||||
pagination: z.object({}),
|
||||
data: z.array(cfdHistoryItem),
|
||||
});
|
||||
|
||||
export default cfdHistorySchema;
|
||||
|
||||
Reference in New Issue
Block a user