{"id":15904783,"url":"https://github.com/afnanenayet/forex-arbitrage","last_synced_at":"2026-02-09T12:03:34.193Z","repository":{"id":37888871,"uuid":"184986084","full_name":"afnanenayet/forex-arbitrage","owner":"afnanenayet","description":"Detect arbitrage opportunities with FOREX pricing data. Written in Rust.","archived":false,"fork":false,"pushed_at":"2023-06-21T22:11:35.000Z","size":145,"stargazers_count":6,"open_issues_count":8,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-04T00:24:11.228Z","etag":null,"topics":["arbitrage","forex","pricing","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afnanenayet.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2019-05-05T05:58:33.000Z","updated_at":"2025-03-18T18:48:16.000Z","dependencies_parsed_at":"2024-10-06T12:42:05.576Z","dependency_job_id":"a9a701f7-d080-4429-9012-b0edae2d5f2d","html_url":"https://github.com/afnanenayet/forex-arbitrage","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/afnanenayet/forex-arbitrage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afnanenayet%2Fforex-arbitrage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afnanenayet%2Fforex-arbitrage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afnanenayet%2Fforex-arbitrage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afnanenayet%2Fforex-arbitrage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afnanenayet","download_url":"https://codeload.github.com/afnanenayet/forex-arbitrage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afnanenayet%2Fforex-arbitrage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269683183,"owners_count":24458628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["arbitrage","forex","pricing","rust"],"created_at":"2024-10-06T12:41:59.548Z","updated_at":"2026-02-09T12:03:29.155Z","avatar_url":"https://github.com/afnanenayet.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# forex arbitrage\n\n## Summary\n\nThis program is a proof of concept showing how you can detect arbitrage\nopportunities using forex pricing data. It uses pricing data from\nexchangeratesapi.io (free) to acquire the pricing data.\n\nThe data is taken and converted into a graph, with the weights being the\nnegative logarithm of the pricing data. The negative log is taken because I am\nusing the Bellman-Ford algorithm to detect arbitrage opportunities. The\nBellman-Ford algorithm detects negative cycles, but we want a situation where\nthe pricing data leads to a _positive_ cycle of prices, such that we can start\nat some currency X, and perform some set of currency conversions such that we\nend up at currency X, but with more money than we started from.\n\nBecause the Bellman-Ford algorithm adds weights, we need to figure out some\ntransformation that allows us to use addition to find a positive weight cycle.\nWe know that `log(a) + log(b) = log(a * b)`, which takes care of the addition\nproblem. Using `-log(x)` lets us turn positive cycles into negative ones, which\nmeans that we can detect arbitrage opportunities by finding a negative cycle in\na graph.\n\n## Usage\n\nThe program saves the generated conversion rate graph as a json file. You can\nchange the name of the json file from the default naming scheme using the `-o`\nflag. You can also elect to load pricing data from a json file using the `-i`\nflag, if you're just messing around or debugging and don't need the most recent\ndata.\n\n## Development\n\nCompile this program with:\n\n```sh\ncargo build\n\n# or\n\ncargo build --release\n```\n\nAll files are formatted using `rustfmt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafnanenayet%2Fforex-arbitrage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafnanenayet%2Fforex-arbitrage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafnanenayet%2Fforex-arbitrage/lists"}