New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@yuants/data-model

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yuants/data-model - npm Package Compare versions

Comparing version 0.10.3 to 0.11.0

35

dist/data-model.d.ts

@@ -72,6 +72,11 @@ /**

/** 账户信息 @public */
/**
* 账户信息
*
* @public
*/
export declare interface IAccountInfo {
/**
* Account ID.
* Account ID
*
* 账户ID

@@ -86,3 +91,10 @@ */

/**
* Position information.
* Currency information
*
* 货币信息
*/
currencies: IAccountMoney[];
/**
* Position information
*
* 持仓信息

@@ -92,3 +104,4 @@ */

/**
* Unfilled orders.
* Unfilled orders
*
* 未成交的挂单

@@ -98,19 +111,11 @@ */

/**
* Timestamp when the account information was generated.
* Timestamp when the account information was generated
*
* 账户信息产生的时间戳
*
* (Used to handle conflicts: always accept the latest information)
* (用于处理冲突: 应当总是接受最新的信息)
*/
updated_at?: number;
/**
* Timestamp when the account information was generated.
* 账户信息产生的时间戳
*
* (Used to handle conflicts: always accept the latest information)
* (用于处理冲突: 应当总是接受最新的信息)
*
* @deprecated use updated_at instead
*/
timestamp_in_us?: number;
updated_at: number;
}

@@ -117,0 +122,0 @@

@@ -8,6 +8,4 @@ import { format } from 'date-fns';

*/
export const createEmptyAccountInfo = (account_id, currency, leverage = 1, initial_balance = 0) => ({
updated_at: 0,
account_id,
money: {
export const createEmptyAccountInfo = (account_id, currency, leverage = 1, initial_balance = 0) => {
const money = {
currency,

@@ -20,6 +18,12 @@ leverage,

free: 0,
},
positions: [],
orders: [],
});
};
return {
updated_at: 0,
account_id,
money: money,
currencies: [money],
positions: [],
orders: [],
};
};
/**

@@ -26,0 +30,0 @@ * Merge Positions by their product_id and direction

@@ -494,6 +494,11 @@ /**

}
/** 账户信息 @public */
/**
* 账户信息
*
* @public
*/
export interface IAccountInfo {
/**
* Account ID.
* Account ID
*
* 账户ID

@@ -508,3 +513,10 @@ */

/**
* Position information.
* Currency information
*
* 货币信息
*/
currencies: IAccountMoney[];
/**
* Position information
*
* 持仓信息

@@ -514,3 +526,4 @@ */

/**
* Unfilled orders.
* Unfilled orders
*
* 未成交的挂单

@@ -520,19 +533,11 @@ */

/**
* Timestamp when the account information was generated.
* Timestamp when the account information was generated
*
* 账户信息产生的时间戳
*
* (Used to handle conflicts: always accept the latest information)
* (用于处理冲突: 应当总是接受最新的信息)
*/
updated_at?: number;
/**
* Timestamp when the account information was generated.
* 账户信息产生的时间戳
*
* (Used to handle conflicts: always accept the latest information)
* (用于处理冲突: 应当总是接受最新的信息)
*
* @deprecated use updated_at instead
*/
timestamp_in_us?: number;
updated_at: number;
}

@@ -539,0 +544,0 @@ /**

@@ -11,6 +11,4 @@ "use strict";

*/
const createEmptyAccountInfo = (account_id, currency, leverage = 1, initial_balance = 0) => ({
updated_at: 0,
account_id,
money: {
const createEmptyAccountInfo = (account_id, currency, leverage = 1, initial_balance = 0) => {
const money = {
currency,

@@ -23,6 +21,12 @@ leverage,

free: 0,
},
positions: [],
orders: [],
});
};
return {
updated_at: 0,
account_id,
money: money,
currencies: [money],
positions: [],
orders: [],
};
};
exports.createEmptyAccountInfo = createEmptyAccountInfo;

@@ -29,0 +33,0 @@ /**

{
"name": "@yuants/data-model",
"version": "0.10.3",
"version": "0.11.0",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.js",

@@ -48,8 +48,7 @@ ## API Report File for "@yuants/data-model"

account_id: string;
currencies: IAccountMoney[];
money: IAccountMoney;
orders: IOrder[];
positions: IPosition[];
// @deprecated
timestamp_in_us?: number;
updated_at?: number;
updated_at: number;
}

@@ -56,0 +55,0 @@

{
"libraries/data-model/CHANGELOG.json": "bf6a1a3d9e7fb00bba63e1b584d40fd36a748c2b",
"libraries/data-model/CHANGELOG.md": "8cfc96d50778aa3d7e65185a6813b0947c578359",
"libraries/data-model/CHANGELOG.json": "a732a31d7370de161bd4132307c4723fd117ba85",
"libraries/data-model/CHANGELOG.md": "054a083cadd2d9660f430121c881e87a3cf30fb1",
"libraries/data-model/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",

@@ -8,8 +8,8 @@ "libraries/data-model/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",

"libraries/data-model/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
"libraries/data-model/etc/data-model.api.md": "cf67e1a57236bed5402a22089431ed7f513e9fba",
"libraries/data-model/package.json": "6f18ff75c180192dac4785007eb5b49c8d486f6e",
"libraries/data-model/etc/data-model.api.md": "d58e5146c6a578465f05accffda67ed42ead6818",
"libraries/data-model/package.json": "88a02d9c9057af773e19be11ec88d00bb4552b57",
"libraries/data-model/src/index.ts": "49fc2befb673b800db4cdba4235ab4ddb6736788",
"libraries/data-model/src/interfaces.ts": "cd65ed20ae3248b915b2388db87436568012df58",
"libraries/data-model/src/interfaces.ts": "2626db918251902c67410eaa856083bc571b3579",
"libraries/data-model/src/utils.test.ts": "d4a493922e5c87b47bf59b064fcb807a1411310c",
"libraries/data-model/src/utils.ts": "5a681568ee26f48ad374fca69dd09cc888fab2ca",
"libraries/data-model/src/utils.ts": "74491823898061ede7d578d5a0ec52bd5ceed1e8",
"libraries/data-model/tsconfig.json": "22f94ca28b507f8ddcc21b9053158eefd3f726a9",

@@ -16,0 +16,0 @@ "libraries/data-model/.rush/temp/shrinkwrap-deps.json": "a00ce04089fa5b11590b9acd9b46a96d16491a30",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc