sunglim / systemtrading

my first system trading application
MIT License
0 stars 0 forks source link

crash #83

Closed sunglim closed 8 months ago

sunglim commented 9 months ago
Initialize Korea investment trading.
 ProductionUrl[https://openapi.koreainvestment.com:9443], AppKey[PSdAffYNroYQT79gqspS6qsJrmeAm4x0reUx], AppSecret[rf3UyoeurGasT8Pqzg+p1s65WeJTgt21Gn0utyvJJ3PtB/pyiTyWZCRQHTPsoQYJ/QSbJQcbI5+MpRL8QY+OVbJ2ryE5lCkCqdMgWSkWVRuKYgqbvkGNlRt9aFyR7f3k65C/nkkricKoDZT3BZtJ0bSbZyemLMYo/yIlgi4KsHRcqk9Jp5s=], AccountInfo[{74466375 01}]
tradingbotlog.go:34:
 [Start cron jobs]
[Buy if average is below] log.go:34:
 [start new stragegy]
Call fail. stockcode[055550], error code[0], msg[주문 전송 완료 되었습니다.], responseTime[2023-11-29 03:06:00.831376157 +0000 UTC m=+104.137956551]
[Buy if average is lower than] log.go:22: Triggered
Get token failedpanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x88b405]

goroutine 70 [running]:
github.com/sunglim/systemtrading/order.order({0xc000458140, 0x3, 0x3}, 0xe54ae0)
        /app/order/strategy_buy_everyday_if_below_average.go:23 +0x225
reflect.Value.call({0x9104e0?, 0xa22a48?, 0x7fb4748de3e0?}, {0x9c9d04, 0x4}, {0xc0001b8000, 0x2, 0x0?})
        /usr/local/go/src/reflect/value.go:596 +0xce7
reflect.Value.Call({0x9104e0?, 0xa22a48?, 0xc0000f7bb8?}, {0xc0001b8000?, 0xc0001502d0?, 0xf0?})
        /usr/local/go/src/reflect/value.go:380 +0xb9
github.com/go-co-op/gocron.callJobFuncWithParams({0x9104e0?, 0xa22a48?}, {0xc0000c40c0, 0x2, 0xc0000f7c01?})
        /go/pkg/mod/github.com/go-co-op/gocron@v1.27.0/gocron.go:106 +0x1c5
github.com/go-co-op/gocron.runJob({{{0x0, 0x0}, {0x0, 0x0}}, {0x9104e0, 0xa22a48}, {0xc0000c40c0, 0x2, 0x2}, 0x0, ...})
        /go/pkg/mod/github.com/go-co-op/gocron@v1.27.0/executor.go:75 +0x65
github.com/go-co-op/gocron.(*executor).runJob(_, {{{0x0, 0x0}, {0x0, 0x0}}, {0x9104e0, 0xa22a48}, {0xc0000c40c0, 0x2, 0x2}, ...})
        /go/pkg/mod/github.com/go-co-op/gocron@v1.27.0/executor.go:160 +0x1b8
github.com/go-co-op/gocron.(*executor).run.func1()
        /go/pkg/mod/github.com/go-co-op/gocron@v1.27.0/executor.go:224 +0x385
created by github.com/go-co-op/gocron.(*executor).run in goroutine 50
        /go/pkg/mod/github.com/go-co-op/gocron@v1.27.0/executor.go:192 +0x19d
sunglim commented 9 months ago

The server response was 'failed to order', but error message was nil.

sunglim commented 9 months ago

Get token failed