[#32] Erstellungszeit für Transactionsettings eingefügt

This commit is contained in:
darkeye 2025-01-15 15:57:32 +01:00
parent 83d22f970d
commit 8fcecb1919

View File

@ -31,6 +31,12 @@ export default class TransactionSettings extends Serializable{
*/ */
apiID = ""; apiID = "";
/**
* creation time
* @type {number}
*/
timestamp = 0;
/** /**
* @param {number} price default 0 * @param {number} price default 0
* @param {number} quantity default 0 * @param {number} quantity default 0
@ -39,6 +45,7 @@ export default class TransactionSettings extends Serializable{
super(); super();
this.orderPrice = price; this.orderPrice = price;
this.orderQuantity = quantity; this.orderQuantity = quantity;
this.timestamp = Date.now();
} }
/** /**
@ -51,6 +58,7 @@ export default class TransactionSettings extends Serializable{
obj.quantity = this.quantity; obj.quantity = this.quantity;
obj.price = this.price; obj.price = this.price;
obj.apiID = this.apiID; obj.apiID = this.apiID;
obj.timestamp = this.timestamp;
return JSON.stringify(obj); return JSON.stringify(obj);
} }
@ -68,6 +76,7 @@ export default class TransactionSettings extends Serializable{
obj.quantity = tmpObj.quantity; obj.quantity = tmpObj.quantity;
obj.price = tmpObj.price; obj.price = tmpObj.price;
obj.apiID = tmpObj.apiID; obj.apiID = tmpObj.apiID;
obj.timestamp = tmpObj.timestamp;
return obj; return obj;
} }