feat: migrate timestamps to int64 and security improvements

- Convert all time.Time fields to int64 Unix milliseconds (UTC)
- Add PostgreSQL migration to convert timestamp columns to bigint
- Reduce Binance sync window from 7 days to 24 hours
- Fix dashboard trader name visibility (add nofx-text-main color)
- Add position value column to history table
- Remove hardcoded API keys from test files
This commit is contained in:
tinkle-community
2026-01-06 15:56:07 +08:00
parent 5c4c9cdc99
commit 799d8b9c2e
22 changed files with 1620 additions and 231 deletions

View File

@@ -7,6 +7,7 @@ import (
"nofx/store"
"os"
"path/filepath"
"time"
)
func main() {
@@ -83,7 +84,7 @@ func main() {
filledOrders++
// 检查 filled_at
if !order.FilledAt.IsZero() {
if order.FilledAt > 0 {
withFilledAt++
} else {
missingFilledAt++
@@ -119,8 +120,8 @@ func main() {
}
filledAtStr := "N/A"
if !order.FilledAt.IsZero() {
filledAtStr = order.FilledAt.Format("01-02 15:04")
if order.FilledAt > 0 {
filledAtStr = time.UnixMilli(order.FilledAt).Format("01-02 15:04")
}
fmt.Printf("%-15s %-10s %-10s %-15.2f %-10s %s\n",