{"id":37142138,"url":"https://github.com/b2broker/simplefix-go","last_synced_at":"2026-01-14T16:41:20.055Z","repository":{"id":42081654,"uuid":"333079714","full_name":"b2broker/simplefix-go","owner":"b2broker","description":"Simple Golang FIX API library","archived":false,"fork":false,"pushed_at":"2025-09-03T08:11:33.000Z","size":337,"stargazers_count":40,"open_issues_count":2,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-03T10:12:57.421Z","etag":null,"topics":["finance","financial-information-exchange","fintech","fixapi","fixprotocol","golang","trading","trading-systems"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b2broker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-26T12:34:53.000Z","updated_at":"2025-09-03T08:10:49.000Z","dependencies_parsed_at":"2025-07-11T10:17:07.536Z","dependency_job_id":"c4ce3473-e3db-42f3-b442-c2c8b3d61ec4","html_url":"https://github.com/b2broker/simplefix-go","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/b2broker/simplefix-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2broker%2Fsimplefix-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2broker%2Fsimplefix-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2broker%2Fsimplefix-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2broker%2Fsimplefix-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b2broker","download_url":"https://codeload.github.com/b2broker/simplefix-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b2broker%2Fsimplefix-go/sbom","scorecard":{"id":221981,"data":{"date":"2025-08-11","repo":{"name":"github.com/b2broker/simplefix-go","commit":"a6c4adb0d2a91b479fecf93119b616453bd21d75"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/.golangci.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/b2broker/simplefix-go/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/b2broker/simplefix-go/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/b2broker/simplefix-go/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/b2broker/simplefix-go/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/b2broker/simplefix-go/go.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Affero General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T02:46:02.776Z","repository_id":42081654,"created_at":"2025-08-17T02:46:02.776Z","updated_at":"2025-08-17T02:46:02.776Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28426152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","financial-information-exchange","fintech","fixapi","fixprotocol","golang","trading","trading-systems"],"created_at":"2026-01-14T16:41:19.329Z","updated_at":"2026-01-14T16:41:20.036Z","avatar_url":"https://github.com/b2broker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Fix\n\n[![Generic badge](https://img.shields.io/github/v/release/b2broker/simplefix-go.svg?style=for-the-badge)](https://github.com/b2broker/simplefix-go/releases/latest)\n[![Generic badge](https://goreportcard.com/badge/github.com/b2broker/simplefix-go?style=for-the-badge)](https://goreportcard.com/report/github.com/b2broker/simplefix-go)\n[![Generic badge](https://img.shields.io/github/stars/b2broker/simplefix-go?style=for-the-badge\u0026logo=GitHub)](https://github.com/b2broker/simplefix-go/stargazers)\n[![Generic badge](https://img.shields.io/badge/Go-\u003e=1.16-blue.svg?style=for-the-badge\u0026logo=go)](https://golang.org/doc/go1.16)\n[![Generic badge](https://img.shields.io/badge/semver-semantic_release-blue.svg?style=for-the-badge\u0026logo=semantic-release)](https://github.com/go-semantic-release/semantic-release)\n\n\u003cdetails\u003e\n\u003csummary\u003eTable of contents\u003c/summary\u003e\n\n## Table of contents\n\n- [What is FIX?](#what-is-fix)\n- [Why SimpleFix Go?](#why-simplefix-go)\n- [Installing SimpleFix Go](#installation)\n- [Using the Generator](#generator)\n- [Getting started with SimpleFix Go](#getting-started)\n- [Customizing messages](#customizing-messages)\n\n\u003c/details\u003e\n\n## What is FIX?\n\nFIX (a shorthand for Financial Information eXchange) is a widely adopted electronic communications protocol used for real-time exchange of information related to trading and markets. FIX connects the global ecosystem of venues, asset managers, banks/brokers, vendors and regulators by standardizing the communication among participants. FIX is a public-domain specification owned and maintained by [FIX Protocol, Ltd (FPL)](https://www.fixtrading.org/).\n\n## Why SimpleFix Go?\n\nSimpleFix Go is an open-source library that allows you to quickly integrate FIX messaging into your environment. The library is entirely written in Go, making it perfect for solutions powered by this programming language. SimpleFix Go supports any FIX API version. To learn about specifics of various FIX protocol versions, refer to the [OnixS website](https://www.onixs.biz/fix-dictionary.html).\n\nYou can provide your own extensions to SimpleFix Go and create a custom FIX dialect. This guide explains the basics of SimpleFix Go installation and provides examples illustrating how to configure and customize the library according to your requirements.\n\n### Main features\n\n- [x] Adding custom fields to the FIX protocol\n- [x] Adding custom messages to the FIX protocol\n- [ ] Adding custom types to the FIX protocol\n- [x] Built-in session pipelines features\n- [x] Built-in Acceptor (for the server side)\n- [x] Built-in Initiator (for the client side)\n- [ ] Validation of incoming messages\n- [x] Validation of outgoing messages\n- [x] A [demo server](https://docs.marksman.b2broker.com/en/fix-api.html#demo-mode) complete with mock data\n- [x] Anything missing? Let us know!\n\n## Installing SimpleFix Go\n\nTo install SimpleFix Go, download the library by executing the following command:\n\n```sh\n$ go get -u github.com/b2broker/simplefix-go\n```\n\n2. Install the *Generator* if you want to use your own XML schema providing a custom set of FIX messaging options:\n\n```sh\n$ cd $GOPATH/src/github.com/b2broker/simplefix-go \u0026\u0026 go install ./...\n```\n\n## Using the Generator\n\nThe *Generator* is used to define the structure of FIX messages, as well as specify their tags and define message type constants and methods required to support any FIX API version.\n\nExamples of code produced by the *Generator* can be found in the [./tests](https://github.com/b2broker/simplefix-go/tree/master/tests/fix44) directory containing an automatically generated Go library based on a stripped-down FIX version 4.4. The library code is generated according to a scheme located in the [./source](https://github.com/b2broker/simplefix-go/tree/master/source) directory.\n\n### Generating a basic FIX library\n\nThe following code generates a FIX library based on an [XML schema](https://github.com/b2broker/simplefix-go/blob/master/source/fix44.xml) defining the library structure:\n\n```sh\nfixgen -o=./fix44 -s=./source/fix44.xml -t=./source/types.xml\n```\n\nAfter executing this command, the generated library code will be located in the [./fix44](https://github.com/b2broker/simplefix-go/tree/master/tests/fix44) directory.\n\n### Specifying Generator parameters\n\nTo create a custom FIX messaging library, prepare two XML files and specify the following parameters for the `fixgen` command:\n\n`-o` — the output directory\n\n`-s` — the path to the main XML schema\n\n`-t` — the path to an XML file specifying value type mapping and informing the *Generator* about proper type casting (although the original FIX protocol features a lot of different value types, Go uses a smaller set of types that should be mapped to the FIX API)\n\nSample XML files are located in the [./source](https://github.com/b2broker/simplefix-go/blob/master/source/) directory. You can use the existing files or modify them as required.\n\n## Getting started with SimpleFix Go\n\nIn this section, you will learn how to specify the session options and start a new FIX session as a client or as a server.\n\n### Specifying session options\n\nThe following sample code illustrates how to use a message builder to create various standard messages, as well as define fields and message tags required for FIX session pipelines. The `fixgen` command will generate the required structure in almost no time.\n\n```\n// In this code, fixgen is your generated FIX package:\n\nvar sessionOpts = session.Opts{\n\tMessageBuilders: session.MessageBuilders{\n\t\tHeaderBuilder:        fixgen.Header{}.New(),\n\t\tTrailerBuilder:       fixgen.Trailer{}.New(),\n\t\tLogonBuilder:         fixgen.Logon{}.New(),\n\t\tLogoutBuilder:        fixgen.Logout{}.New(),\n\t\tRejectBuilder:        fixgen.Reject{}.New(),\n\t\tHeartbeatBuilder:     fixgen.Heartbeat{}.New(),\n\t\tTestRequestBuilder:   fixgen.TestRequest{}.New(),\n\t\tResendRequestBuilder: fixgen.ResendRequest{}.New(),\n\t},\n\tTags: \u0026messages.Tags{\n\t\tMsgType:         mustConvToInt(fixgen.FieldMsgType),\n\t\tMsgSeqNum:       mustConvToInt(fixgen.FieldMsgSeqNum),\n\t\tHeartBtInt:      mustConvToInt(fixgen.FieldHeartBtInt),\n\t\tEncryptedMethod: mustConvToInt(fixgen.FieldEncryptMethod),\n\t},\n\tAllowedEncryptedMethods: map[string]struct{}{\n\t\tfixgen.EnumEncryptMethodNoneother: {},\n\t},\n\tSessionErrorCodes: \u0026messages.SessionErrorCodes{\n\t\tInvalidTagNumber:            mustConvToInt(fixgen.EnumSessionRejectReasonInvalidtagnumber),\n\t\tRequiredTagMissing:          mustConvToInt(fixgen.EnumSessionRejectReasonRequiredtagmissing),\n\t\tTagNotDefinedForMessageType: mustConvToInt(fixgen.EnumSessionRejectReasonTagNotDefinedForThisMessageType),\n\t\tUndefinedTag:                mustConvToInt(fixgen.EnumSessionRejectReasonUndefinedtag),\n\t\tTagSpecialWithoutValue:      mustConvToInt(fixgen.EnumSessionRejectReasonTagspecifiedwithoutavalue),\n\t\tIncorrectValue:              mustConvToInt(fixgen.EnumSessionRejectReasonValueisincorrectoutofrangeforthistag),\n\t\tIncorrectDataFormatValue:    mustConvToInt(fixgen.EnumSessionRejectReasonIncorrectdataformatforvalue),\n\t\tDecryptionProblem:           mustConvToInt(fixgen.EnumSessionRejectReasonDecryptionproblem),\n\t\tSignatureProblem:            mustConvToInt(fixgen.EnumSessionRejectReasonSignatureproblem),\n\t\tCompIDProblem:               mustConvToInt(fixgen.EnumSessionRejectReasonCompidproblem),\n\t\tOther:                       mustConvToInt(fixgen.EnumSessionRejectReasonOther),\n\t},\n}\n```\n\n### Starting as a client\n\nThe *Initiator* is a FIX API client that connects to an existing server.\n\nThe default *Initiator* implementation can be found in the [./initiator/main.go](https://github.com/b2broker/simplefix-go/blob/master/examples/initiator/main.go) file.\n\n### Starting as a server\n\nThe *Acceptor* is a listener that accepts and handles client connection requests. According to the FIX protocol, the *Acceptor* can be both a provider and receiver of data, meaning that it can send requests to the clients as well as read data streams received from them.\n\nThe default *Acceptor* implementation can be found in the [./acceptor/main.go](https://github.com/b2broker/simplefix-go/blob/master/examples/acceptor/main.go) file.\n\n\n## Customizing messages\n\n### Adding custom message fields\n\nThe SimpleFix library features a default session package which provides all the necessary functionality for the standard FIX API pipelines, such as authentication, logging out, heartbeats, message rejects and handling of typical errors. For this reason, if you want to customize the default messages, such as `Logon \u003cA\u003e` or `Heartbeat \u003c0\u003e`, you should configure the `Session` structure in one of the following ways:\n\n- by integrating the existing structure into your custom procedure by way of composition, or simply copying the existing structure and modifying it in your client code\n\n- by modifying the message builder to account for the messages that you want to customize\n\n\n#### Customizing the message builder\n\nThe standard `Session` structure accepts each `MessageBuilder` instance as an auto-generated `Opts` field. Each message builder is an interface, which means that you can create a custom builder, and the library will use it as the default one.\n\nFor example, if you want to add a new `CounterPartyID` field (tag number 22000) to you `Logon` message, you should modify your XML schema by adding a new field to the `fields` section and to your custom `Logon` message:\n\n```xml\n\n\u003cfix\u003e\n    . . .\n    \u003cmessages\u003e\n        \u003cmessage name='Logon' msgcat='admin' msgtype='A'\u003e\n            . . .\n            \u003cfield name='CounterPartyID' required='Y'/\u003e\n            ...\n        \u003c/message\u003e\n    \u003c/messages\u003e\n    . . .\n    \u003cfields\u003e\n        \u003cfield number=\"22000\" name=\"CounterPartyID\" type=\"STRING\"/\u003e\n    \u003c/fields\u003e\n    . . .\n\u003c/fix\u003e\n```\n\nWhile the rest of the code is generated by `fixgen`, you should specify this field manually using a custom builder:\n\n```\n// Your FIX package is generated by fixgen:\n\ntype CustomLogon struct {\n    *fixgen.Logon\n}\n\nfunc (cl *CustomLogon) Build() messages.LogonBuilder {\n    l := cl.Build()\n    l.SetFieldCounterParty(os.Getenv(\"COUNTER_PARTY_ID\"))\n    return l\n}\n```\n\nAfter this, you can use your `CustomLogon` structure (with a new field added to it) as a `LogonBuilder` in the default FIX API pipelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb2broker%2Fsimplefix-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb2broker%2Fsimplefix-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb2broker%2Fsimplefix-go/lists"}