[#32] Erstellungszeit für Transactionsettings eingefügt
This commit is contained in:
parent
83d22f970d
commit
8fcecb1919
@ -31,6 +31,12 @@ export default class TransactionSettings extends Serializable{
|
||||
*/
|
||||
apiID = "";
|
||||
|
||||
/**
|
||||
* creation time
|
||||
* @type {number}
|
||||
*/
|
||||
timestamp = 0;
|
||||
|
||||
/**
|
||||
* @param {number} price default 0
|
||||
* @param {number} quantity default 0
|
||||
@ -39,6 +45,7 @@ export default class TransactionSettings extends Serializable{
|
||||
super();
|
||||
this.orderPrice = price;
|
||||
this.orderQuantity = quantity;
|
||||
this.timestamp = Date.now();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -51,6 +58,7 @@ export default class TransactionSettings extends Serializable{
|
||||
obj.quantity = this.quantity;
|
||||
obj.price = this.price;
|
||||
obj.apiID = this.apiID;
|
||||
obj.timestamp = this.timestamp;
|
||||
|
||||
return JSON.stringify(obj);
|
||||
}
|
||||
@ -68,6 +76,7 @@ export default class TransactionSettings extends Serializable{
|
||||
obj.quantity = tmpObj.quantity;
|
||||
obj.price = tmpObj.price;
|
||||
obj.apiID = tmpObj.apiID;
|
||||
obj.timestamp = tmpObj.timestamp;
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user