From 99c7f8ccb0fd4caf3780537b863f4f367a9d4a0e Mon Sep 17 00:00:00 2001 From: Ramiro Paz Date: Mon, 11 May 2026 12:34:55 -0300 Subject: [PATCH] fixes --- Makefile | 3 ++ docs/EndTrade.log | 5 ++++ docs/Execution.log | 14 ++++++++++ docs/Timeout.log | 10 +++++++ src/client/fix/builder.go | 2 +- src/client/fix/dict.go | 25 ++++++----------- src/client/fix/manager.go | 58 ++++++++++++++++++--------------------- src/domain/persistence.go | 1 - 8 files changed, 69 insertions(+), 49 deletions(-) create mode 100644 docs/EndTrade.log create mode 100644 docs/Execution.log create mode 100644 docs/Timeout.log diff --git a/Makefile b/Makefile index cdcd5d0..623adf6 100644 --- a/Makefile +++ b/Makefile @@ -64,6 +64,9 @@ linux-build: check-env swag # Build a linux version for prod environment. Set e= deploy: # Deploy to remote server. Set e=environment: prod, dev, demo, open-demo; s=serverName; i=instance; e.g. make deploy e=dev s=nonprodFix i=dpl make build e=$(e) && qscp build/out/distribution/qfixdpl.gz $(s):/home/quantex/qfixtb/dpl/ +open-demo: + make deploy e=open-demo s=nonprodFix + fmt: download-versions # Apply the Go formatter to the code cd tools/check; unset GOPATH; GOBIN=$$PWD/../bin go install mvdan.cc/gofumpt@$(call get_version,gofumpt); @echo "running fmt..." diff --git a/docs/EndTrade.log b/docs/EndTrade.log new file mode 100644 index 0000000..f6889ca --- /dev/null +++ b/docs/EndTrade.log @@ -0,0 +1,5 @@ + +8=FIXT.1.1|9=861|35=R|34=413|49=TRADEWEB|52=20260508-16:51:56.674|56=BYMA_CORI_TEST_12345_DLRDPL|131=LST_20260508_BYMA_CORI_NY1600105.1_1|146=1|55=ARGENT 1.500 07/09/35|48=040114HT0|22=1|460=12|167=CORP|762=REGCORIINV|541=20350709|225=20200904|470=AR|223=1.5|106=ARGENTINE REPUBLIC|54=2|38=10000|64=20260511|15=USD|6110=Sov|60=20260508-16:51:56|423=1|44=-999999|236=-999999|5023=0.000010|66=NY1600105.1|6847=1|75=20260508|464=Y|20086=1|20074=Y|20075=Y|20077=[N/A]|20078=[N/A]|20079=300|20081=300|20090=0|20072=300|20098=0|5745=1|20073=RFQ|20076=Y|20156=Y|20130=20501720000|20138=HSB|561=1|562=1|20175=20210709|20223=American|22630=0|20265=LatAm|20227=Global|23068=TRWB|453=3|448=bymacust|447=C|452=3|802=3|523=BYMA CUST|803=2|523=NY|803=25|523=AR|803=4000|448=BYMA Customer|447=C|452=1|448=DTCC|447=C|452=4|454=1|455=US040114HT09|456=4|5114=2|5113=1|20169=Ca|5113=0|20169=CCC+|10=078 +8=FIXT.1.1|9=203|35=AI|34=418|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:51:56.695|56=TRADEWEB|55=[N/A]|60=20260508-16:51:56.695|117=LST_20260508_BYMA_CORI_NY1600105.1_1|131=LST_20260508_BYMA_CORI_NY1600105.1_1|297=0|10=165 +8=FIXT.1.1|9=292|35=AJ|34=414|49=TRADEWEB|52=20260508-16:52:05.343|56=BYMA_CORI_TEST_12345_DLRDPL|11=LST_20260508_BYMA_CORI_NY1600105.1_1|55=[N/A]|60=20260508-16:52:05|117=[N/A]|131=LST_20260508_BYMA_CORI_NY1600105.1_1|693=LST_20260508_BYMA_CORI_NY1600105.1_1_LISTEND|694=7|20086=1|20103=N/A|20110=NO|22636=Y|10=077 +8=FIXT.1.1|9=211|35=AI|34=419|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:52:05.367|56=TRADEWEB|55=[N/A]|60=20260508-16:52:05.367|131=LST_20260508_BYMA_CORI_NY1600105.1_1|297=0|693=LST_20260508_BYMA_CORI_NY1600105.1_1_LISTEND|10=014 \ No newline at end of file diff --git a/docs/Execution.log b/docs/Execution.log new file mode 100644 index 0000000..488cd5b --- /dev/null +++ b/docs/Execution.log @@ -0,0 +1,14 @@ +8=FIXT.1.1|9=862|35=R|34=393|49=TRADEWEB|52=20260508-16:44:06.978|56=BYMA_CORI_TEST_12345_DLRDPL|131=LST_20260508_BYMA_CORI_NY1600095.1_1|146=1|55=ARGENT 1.500 07/09/35|48=040114HT0|22=1|460=12|167=CORP|762=REGCORIINV|541=20350709|225=20200904|470=AR|223=1.5|106=ARGENTINE REPUBLIC|54=2|38=850000|64=20260511|15=USD|6110=Sov|60=20260508-16:44:06|423=1|44=-999999|236=-999999|5023=0.000010|66=NY1600095.1|6847=1|75=20260508|464=Y|20086=1|20074=Y|20075=Y|20077=[N/A]|20078=[N/A]|20079=300|20081=300|20090=0|20072=300|20098=0|5745=1|20073=RFQ|20076=Y|20156=Y|20130=20501720000|20138=HSB|561=1|562=1|20175=20210709|20223=American|22630=0|20265=LatAm|20227=Global|23068=TRWB|453=3|448=bymacust|447=C|452=3|802=3|523=BYMA CUST|803=2|523=NY|803=25|523=AR|803=4000|448=BYMA Customer|447=C|452=1|448=DTCC|447=C|452=4|454=1|455=US040114HT09|456=4|5114=2|5113=1|20169=Ca|5113=0|20169=CCC+|10=163 +8=FIXT.1.1|9=203|35=AI|34=398|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:44:07.018|56=TRADEWEB|55=[N/A]|60=20260508-16:44:07.018|117=LST_20260508_BYMA_CORI_NY1600095.1_1|131=LST_20260508_BYMA_CORI_NY1600095.1_1|297=0|10=162 +8=FIXT.1.1|9=293|35=S|34=399|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:44:34.096|56=TRADEWEB|15=USD|22=1|38=850000|44=91.00000000|48=040114HT0|54=2|55=[N/A]|60=20260508-16:44:34.096|64=20260511|117=LST_20260508_BYMA_CORI_NY1600095.1_1|131=LST_20260508_BYMA_CORI_NY1600095.1_1|132=91.00000000|423=1|537=211|10=127 +8=FIXT.1.1|9=191|35=CW|34=394|49=TRADEWEB|52=20260508-16:44:34.137|56=BYMA_CORI_TEST_12345_DLRDPL|60=20260508-16:44:34|117=LST_20260508_BYMA_CORI_NY1600095.1_1|131=LST_20260508_BYMA_CORI_NY1600095.1_1|1865=1|10=004 +8=FIXT.1.1|9=80|35=0|34=400|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:45:04.125|56=TRADEWEB|10=169 +8=FIXT.1.1|9=80|35=0|34=395|49=TRADEWEB|52=20260508-16:45:04.142|56=BYMA_CORI_TEST_12345_DLRDPL|10=181 +8=FIXT.1.1|9=391|35=AJ|34=396|49=TRADEWEB|52=20260508-16:45:10.511|56=BYMA_CORI_TEST_12345_DLRDPL|11=LST_20260508_BYMA_CORI_NY1600095.1_1|22=1|38=850000|44=91|48=040114HT0|54=2|55=[N/A]|60=20260508-16:45:10|117=LST_20260508_BYMA_CORI_NY1600095.1_1|131=LST_20260508_BYMA_CORI_NY1600095.1_1|423=1|693=LST_20260508_BYMA_CORI_NY1600095.1_1_TRDREQ|694=1|20074=N|20075=N|20076=N|20079=236|20082=60|20156=N|22630=0|10=127 +8=FIXT.1.1|9=295|35=8|34=397|49=TRADEWEB|52=20260508-16:45:10.514|56=BYMA_CORI_TEST_12345_DLRDPL|6=0|11=LST_20260508_BYMA_CORI_NY1600095.1_1|14=0|17=LST_20260508_BYMA_CORI_NY1600095.1_1_LISTEND-124510.514|37=LST_20260508_BYMA_CORI_NY1600095.1_1|39=A|55=[N/A]|60=20260508-16:45:10|75=20260508|150=A|151=0|20086=1|10=213 +8=FIXT.1.1|9=210|35=AI|34=401|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:45:10.539|56=TRADEWEB|55=[N/A]|60=20260508-16:45:10.539|131=LST_20260508_BYMA_CORI_NY1600095.1_1|297=0|693=LST_20260508_BYMA_CORI_NY1600095.1_1_TRDREQ|10=209 +8=FIXT.1.1|9=261|35=BN|34=402|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:45:10.601|56=TRADEWEB|11=LST_20260508_BYMA_CORI_NY1600095.1_1|17=LST_20260508_BYMA_CORI_NY1600095.1_1_LISTEND-124510.514|37=LST_20260508_BYMA_CORI_NY1600095.1_1|55=[N/A]|60=20260508-16:45:10.601|1036=1|10=232 +8=FIXT.1.1|9=303|35=8|34=398|49=TRADEWEB|52=20260508-16:45:10.666|56=BYMA_CORI_TEST_12345_DLRDPL|6=0|11=LST_20260508_BYMA_CORI_NY1600095.1_1|14=0|17=LST_20260508_BYMA_CORI_NY1600095.1_1_TRDEND-124510.660|37=LST_20260508_BYMA_CORI_NY1600095.1_1|39=2|44=91|54=2|55=[N/A]|60=20260508-16:45:10|75=20260508|150=F|151=0|423=1|10=252 +8=FIXT.1.1|9=260|35=BN|34=403|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:45:10.690|56=TRADEWEB|11=LST_20260508_BYMA_CORI_NY1600095.1_1|17=LST_20260508_BYMA_CORI_NY1600095.1_1_TRDEND-124510.660|37=LST_20260508_BYMA_CORI_NY1600095.1_1|55=[N/A]|60=20260508-16:45:10.690|1036=1|10=168 +8=FIXT.1.1|9=729|35=8|34=399|49=TRADEWEB|52=20260508-16:45:10.738|56=BYMA_CORI_TEST_12345_DLRDPL|6=0|11=LST_20260508_BYMA_CORI_NY1600095.1_1|14=0|17=LST_20260508_BYMA_CORI_NY1600095.1_1_TRDSUMM-124510.736|22=1|37=LST_20260508_BYMA_CORI_NY1600095.1_1|38=850000|39=2|44=91|48=040114HT0|54=2|55=[N/A]|60=20260508-16:45:10.535|64=20260511|75=20260508|150=F|151=0|167=CORP|236=2.61081622|423=1|453=2|448=bymacust|447=C|452=3|802=3|523=BYMA CUST|803=2|523=NY|803=25|523=AR|803=4000|448=BYMA Customer|447=C|452=1|802=1|523=YES|803=4003|454=1|455=US040114HT09|456=4|526=TRD_20260508_BYMA_CORI_213|1003=20260508.BYMA.CORI.213|1907=1|1903=20260508BYMACORI213|1906=5|6731=20260508.BYMA.CORI.213|20115=91|22630=0|22636=Y|23068=TRWB|23096=20260508BYMACORI213|10=051 +8=FIXT.1.1|9=261|35=BN|34=404|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:45:10.781|56=TRADEWEB|11=LST_20260508_BYMA_CORI_NY1600095.1_1|17=LST_20260508_BYMA_CORI_NY1600095.1_1_TRDSUMM-124510.736|37=LST_20260508_BYMA_CORI_NY1600095.1_1|55=[N/A]|60=20260508-16:45:10.781|1036=1|10=027 \ No newline at end of file diff --git a/docs/Timeout.log b/docs/Timeout.log new file mode 100644 index 0000000..f329235 --- /dev/null +++ b/docs/Timeout.log @@ -0,0 +1,10 @@ +8=FIXT.1.1|9=858|35=R|34=416|49=TRADEWEB|52=20260508-16:52:50.205|56=BYMA_CORI_TEST_12345_DLRDPL|131=LST_20260508_BYMA_CORI_NY1600105.2_1|146=1|55=ARGENT 1.500 07/09/35|48=040114HT0|22=1|460=12|167=CORP|762=REGCORIINV|541=20350709|225=20200904|470=AR|223=1.5|106=ARGENTINE REPUBLIC|54=2|38=15000|64=20260511|15=USD|6110=Sov|60=20260508-16:52:50|423=1|44=-999999|236=-999999|5023=0.000010|66=NY1600105.2|6847=1|75=20260508|464=Y|20086=1|20074=Y|20075=Y|20077=[N/A]|20078=[N/A]|20079=60|20081=60|20090=0|20072=60|20098=0|5745=1|20073=RFQ|20076=Y|20156=Y|20130=20501720000|20138=HSB|561=1|562=1|20175=20210709|20223=American|22630=0|20265=LatAm|20227=Global|23068=TRWB|453=3|448=bymacust|447=C|452=3|802=3|523=BYMA CUST|803=2|523=NY|803=25|523=AR|803=4000|448=BYMA Customer|447=C|452=1|448=DTCC|447=C|452=4|454=1|455=US040114HT09|456=4|5114=2|5113=1|20169=Ca|5113=0|20169=CCC+|10=195 +8=FIXT.1.1|9=203|35=AI|34=421|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:52:50.226|56=TRADEWEB|55=[N/A]|60=20260508-16:52:50.226|117=LST_20260508_BYMA_CORI_NY1600105.2_1|131=LST_20260508_BYMA_CORI_NY1600105.2_1|297=0|10=131 +8=FIXT.1.1|9=80|35=0|34=422|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:53:20.289|56=TRADEWEB|10=181 +8=FIXT.1.1|9=80|35=0|34=417|49=TRADEWEB|52=20260508-16:53:20.291|56=BYMA_CORI_TEST_12345_DLRDPL|10=178 +8=FIXT.1.1|9=80|35=0|34=423|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:53:50.295|56=TRADEWEB|10=182 +8=FIXT.1.1|9=80|35=0|34=418|49=TRADEWEB|52=20260508-16:53:50.305|56=BYMA_CORI_TEST_12345_DLRDPL|10=178 +8=FIXT.1.1|9=265|35=AJ|34=419|49=TRADEWEB|52=20260508-16:53:50.698|56=BYMA_CORI_TEST_12345_DLRDPL|11=LST_20260508_BYMA_CORI_NY1600105.2_1|55=[N/A]|60=20260508-16:53:50|117=[N/A]|131=LST_20260508_BYMA_CORI_NY1600105.2_1|693=LST_20260508_BYMA_CORI_NY1600105.2_1_LISTEND|694=8|20086=1|10=010 +8=FIXT.1.1|9=211|35=AI|34=424|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:53:50.721|56=TRADEWEB|55=[N/A]|60=20260508-16:53:50.721|131=LST_20260508_BYMA_CORI_NY1600105.2_1|297=0|693=LST_20260508_BYMA_CORI_NY1600105.2_1_LISTEND|10=002 +8=FIXT.1.1|9=292|35=AJ|34=420|49=TRADEWEB|52=20260508-16:53:53.741|56=BYMA_CORI_TEST_12345_DLRDPL|11=LST_20260508_BYMA_CORI_NY1600105.2_1|55=[N/A]|60=20260508-16:53:53|117=[N/A]|131=LST_20260508_BYMA_CORI_NY1600105.2_1|693=LST_20260508_BYMA_CORI_NY1600105.2_1_LISTEND|694=8|20086=1|20103=N/A|20110=NO|22636=Y|10=088 +8=FIXT.1.1|9=211|35=AI|34=425|49=BYMA_CORI_TEST_12345_DLRDPL|52=20260508-16:53:53.763|56=TRADEWEB|55=[N/A]|60=20260508-16:53:53.763|131=LST_20260508_BYMA_CORI_NY1600105.2_1|297=0|693=LST_20260508_BYMA_CORI_NY1600105.2_1_LISTEND|10=021 \ No newline at end of file diff --git a/src/client/fix/builder.go b/src/client/fix/builder.go index 0d428b9..01ec36e 100644 --- a/src/client/fix/builder.go +++ b/src/client/fix/builder.go @@ -127,7 +127,7 @@ func parseScalar(raw []byte, fixType string) interface{} { s := string(raw) switch fixType { - case "INT", "SEQNUM", "LENGTH", "DAYOFMONTH": + case "INT", "SEQNUM", "LENGTH": var v quickfix.FIXInt if err := v.Read(raw); err == nil { return int(v) diff --git a/src/client/fix/dict.go b/src/client/fix/dict.go index f7fe371..9c965cd 100644 --- a/src/client/fix/dict.go +++ b/src/client/fix/dict.go @@ -25,6 +25,7 @@ func GetMap(fieldMap FieldMap) map[string]interface{} { result := map[string]interface{}{} for f, v := range fieldMap { + slog.Info("try to parse fieldMap: %+v, value: %+v", f, v) k, val := GetKeyValue(f, v) result[k] = val } @@ -42,7 +43,7 @@ func GetKeyValue(f FixField, value FieldValue) (key string, val interface{}) { fMapLst, ok := value.([]FieldMap) if !ok { - err := tracerr.Errorf("could not parse as []FieldMap, value: %+v", value) + err := tracerr.Errorf("could not parse as []FieldMap, value: %+v, key: %s", value, key) slog.Error(err.Error()) } @@ -54,23 +55,15 @@ func GetKeyValue(f FixField, value FieldValue) (key string, val interface{}) { case "BOOLEAN": b, ok := value.(bool) if !ok { - err := tracerr.Errorf("could not parse as bool, value: %+v", value) + err := tracerr.Errorf("could not parse as bool, value: %+v, key: %s", value, key) slog.Error(err.Error()) } val = b - case "INT": + case "INT", "LENGTH", "SEQNUM": i, ok := value.(int) if !ok { - err := tracerr.Errorf("could not parse as int, value: %+v", value) - slog.Error(err.Error()) - } - - val = i - case "SEQNUM": - i, ok := value.(int) - if !ok { - err := tracerr.Errorf("could not parse as int, value: %+v", value) + err := tracerr.Errorf("could not parse as int, value: %+v, key: %s", value, key) slog.Error(err.Error()) } @@ -78,7 +71,7 @@ func GetKeyValue(f FixField, value FieldValue) (key string, val interface{}) { case "UTCTIMESTAMP": t, ok := value.(time.Time) if !ok { - err := tracerr.Errorf("could not parse as Time, value: %+v", value) + err := tracerr.Errorf("could not parse as Time, value: %+v, key: %s", value, key) slog.Error(err.Error()) } @@ -86,7 +79,7 @@ func GetKeyValue(f FixField, value FieldValue) (key string, val interface{}) { case "STRING": s, ok := value.(string) if !ok { - err := tracerr.Errorf("could not parse as string, value: %+v", value) + err := tracerr.Errorf("could not parse as string, value: %+v, key: %s", value, key) slog.Error(err.Error()) } @@ -94,7 +87,7 @@ func GetKeyValue(f FixField, value FieldValue) (key string, val interface{}) { case "CHAR": s, ok := value.(string) if !ok { - err := tracerr.Errorf("could not parse as string, value: %+v", value) + err := tracerr.Errorf("could not parse as string, value: %+v, key: %s", value, key) slog.Error(err.Error()) } @@ -102,7 +95,7 @@ func GetKeyValue(f FixField, value FieldValue) (key string, val interface{}) { default: s, ok := value.(string) if !ok { - err := tracerr.Errorf("could not parse as string, value: %+v", value) + err := tracerr.Errorf("could not parse as string, value: %+v, key: %s", value, key) slog.Error(err.Error()) } diff --git a/src/client/fix/manager.go b/src/client/fix/manager.go index 20003fe..b76ef81 100644 --- a/src/client/fix/manager.go +++ b/src/client/fix/manager.go @@ -201,13 +201,25 @@ func (m *Manager) handleQuoteRequest(msg quoterequest.QuoteRequest, sessionID qu quoteReqID := parsed.QuoteReqID if quoteReqID == "" { - err := tracerr.Errorf("handleQuoteRequest: missing QuoteReqID") + m.notify.SendMsg( + domain.MessageChannelError, + "quoteReqID missing in quote request", + domain.MessageStatusWarning, + nil, + ) + err := tracerr.Errorf("handleQuoteRequest, missing QuoteReqID, quoteRequest: %+v", parsed) slog.Error(err.Error()) return } // Validate LST_ prefix for List Trading flow. if !strings.HasPrefix(quoteReqID, "LST_") { + m.notify.SendMsg( + domain.MessageChannelError, + "quoteReqID ("+quoteReqID+") missing LST_ prefix", + domain.MessageStatusWarning, + nil, + ) slog.Warn("handleQuoteRequest: QuoteReqID missing LST_ prefix, ignoring", "quoteReqID", quoteReqID) return } @@ -225,20 +237,8 @@ func (m *Manager) handleQuoteRequest(msg quoterequest.QuoteRequest, sessionID qu } slog.Info("handleQuoteRequest: NoRelatedSym keys", "quoteReqID", quoteReqID, "keys", relSymKeys) - listID := getString(relSym, "ListID") - negotiationType := getString(relSym, "NegotiationType") ownerTraderID := getString(relSym, "OwnerTraderID") - if listID == "" { - slog.Warn("handleQuoteRequest: missing ListID", "quoteReqID", quoteReqID) - return - } - - if negotiationType != "RFQ" { - slog.Warn("handleQuoteRequest: unexpected NegotiationType", "quoteReqID", quoteReqID, "negotiationType", negotiationType) - return - } - // Send QuoteStatusReport (35=AI) to acknowledge the inquiry. if ackErr := m.sendQuoteStatusReport(quoteReqID, ownerTraderID, sessionID); ackErr != nil { ackErr = tracerr.Errorf("handleQuoteRequest: failed to send QuoteStatusReport (quoteReqID=%s): %w", quoteReqID, ackErr) @@ -418,9 +418,7 @@ func (m *Manager) GetPendingQuoteRequests() []domain.ListTrade { pending := make([]domain.ListTrade, 0) for _, t := range m.trades { - if !t.Quoted { - pending = append(pending, toDomainListTrade(t)) - } + pending = append(pending, toDomainListTrade(t)) } return pending @@ -429,7 +427,6 @@ func (m *Manager) GetPendingQuoteRequests() []domain.ListTrade { func toDomainListTrade(t *listTrade) domain.ListTrade { out := domain.ListTrade{ QuoteRequest: t.QuoteRequest, - Quoted: t.Quoted, } if !t.Price.IsZero() { out.Price = t.Price.String() @@ -447,12 +444,12 @@ func (m *Manager) SendQuote(quoteReqID string, price decimal.Decimal) error { slog.Error(err.Error()) return err } - if t.Quoted { - m.tradesMu.Unlock() - err := tracerr.Errorf("SendQuote: quote already sent for quoteReqID %s", quoteReqID) - slog.Error(err.Error()) - return err - } + // if t.Quoted { + // m.tradesMu.Unlock() + // err := tracerr.Errorf("SendQuote: quote already sent for quoteReqID %s", quoteReqID) + // slog.Error(err.Error()) + // return err + // } sessionID := t.SessionID if sessionID == (quickfix.SessionID{}) { @@ -465,14 +462,13 @@ func (m *Manager) SendQuote(quoteReqID string, price decimal.Decimal) error { } } - relSym := firstGroup(t.QuoteRequest.Body, "NoRelatedSym") - symbol := getString(relSym, "SecurityID") - sIDSource := enum.SecurityIDSource(getString(relSym, "SecurityIDSource")) - currency := getString(relSym, "Currency") - side := enum.Side(getString(relSym, "Side")) - orderQty := getDecimal(relSym, "OrderQty") - settlDate := getString(relSym, "SettlDate") - ownerTraderID := getString(relSym, "OwnerTraderID") + symbol := getString(t.QuoteRequest.Body, "SecurityID") + sIDSource := enum.SecurityIDSource(getString(t.QuoteRequest.Body, "SecurityIDSource")) + currency := getString(t.QuoteRequest.Body, "Currency") + side := enum.Side(getString(t.QuoteRequest.Body, "Side")) + orderQty := getDecimal(t.QuoteRequest.Body, "OrderQty") + settlDate := getString(t.QuoteRequest.Body, "SettlDate") + ownerTraderID := getString(t.QuoteRequest.Body, "OwnerTraderID") m.tradesMu.Unlock() if sIDSource != enum.SecurityIDSource_CUSIP { diff --git a/src/domain/persistence.go b/src/domain/persistence.go index e3db254..cb2aa26 100644 --- a/src/domain/persistence.go +++ b/src/domain/persistence.go @@ -6,7 +6,6 @@ import "time" // ListTrade es la representacion exportada de un trade de List Trading. type ListTrade struct { QuoteRequest FixMessageJSON `json:"quote_request"` - Quoted bool `json:"quoted"` Price string `json:"price,omitempty"` }