Merge pull request #1094 from c9s/fix/maxapi/order-updated-at

FIX: use updated_at instead of created_at to convert MAX order to typ…
This commit is contained in:
kbearXD 2023-03-09 16:59:18 +08:00 committed by GitHub
commit 4586f68fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,7 @@ func toGlobalOrder(maxOrder max.Order) (*types.Order, error) {
Status: toGlobalOrderStatus(maxOrder.State, executedVolume, remainingVolume),
ExecutedQuantity: executedVolume,
CreationTime: types.Time(maxOrder.CreatedAt.Time()),
UpdateTime: types.Time(maxOrder.CreatedAt.Time()),
UpdateTime: types.Time(maxOrder.UpdatedAt.Time()),
IsMargin: isMargin,
IsIsolated: false, // isolated margin is not supported
}, nil

View File

@ -91,4 +91,5 @@ type Order struct {
GroupID uint32 `json:"group_id,omitempty"`
ClientOID string `json:"client_oid,omitempty"`
CreatedAt types.MillisecondTimestamp `json:"created_at"`
UpdatedAt types.MillisecondTimestamp `json:"updated_at"`
}