{"id":38158151,"url":"https://github.com/sklinkert/at","last_synced_at":"2026-01-16T23:12:43.146Z","repository":{"id":43575730,"uuid":"431050531","full_name":"sklinkert/at","owner":"sklinkert","description":"Automated Trader (at). This is a framework for building trading bots.","archived":false,"fork":false,"pushed_at":"2024-03-11T09:58:44.000Z","size":14776,"stargazers_count":76,"open_issues_count":5,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-06-18T23:17:02.196Z","etag":null,"topics":["backtest","backtester","backtesting","bitcoin","broker-api","chart","coinbase","crypto","cryptocurrency","ethereum","forex","go","golang","igmarkets","stocks","trading","trading-algorithms","trading-bot","trading-platform","trading-strategies"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sklinkert.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}},"created_at":"2021-11-23T10:08:56.000Z","updated_at":"2024-05-31T20:04:40.000Z","dependencies_parsed_at":"2024-06-18T23:00:05.266Z","dependency_job_id":"cedb1e6e-3e22-4090-a4fc-edd511aa6d2d","html_url":"https://github.com/sklinkert/at","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sklinkert/at","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sklinkert%2Fat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sklinkert%2Fat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sklinkert%2Fat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sklinkert%2Fat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sklinkert","download_url":"https://codeload.github.com/sklinkert/at/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sklinkert%2Fat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28487342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T22:54:02.790Z","status":"ssl_error","status_checked_at":"2026-01-16T22:50:10.344Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["backtest","backtester","backtesting","bitcoin","broker-api","chart","coinbase","crypto","cryptocurrency","ethereum","forex","go","golang","igmarkets","stocks","trading","trading-algorithms","trading-bot","trading-platform","trading-strategies"],"created_at":"2026-01-16T23:12:42.847Z","updated_at":"2026-01-16T23:12:43.134Z","avatar_url":"https://github.com/sklinkert.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automated Trader (at)\n\n[![tests](https://github.com/sklinkert/at/actions/workflows/ci.yaml/badge.svg)](https://github.com/sklinkert/at/actions/workflows/ci.yaml)\n\n**Purpose**: Framework for building automated trading strategies in three steps:\n\n1. Build your own strategy.\n2. Verify it with the backtest module.\n3. Connect it to a real broker API to make some money.\n\nEvery broker API can be implemented. Works for stocks, forex, cryptocurrencies, etc.\n\n**Supported brokers**:\n\n|  Broker    |  Demo account | Paperwallet trading |  Real trading   | Backtesting (historical prices) |\n| ---- | ---- | ---- | ---- | ---- |\n| IG.com   |  ✅    |   ❌   | ✅ | ✅\n|  Coinbase    |   ❌   |  ✅    | ❌ | ✅\n|  FTX    |   ❌   |  ✅    | ❌ | ❌\n\n\n**Disclaimer**: The developers are not liable for any losses arising from the buy or sell of securities. All included strategies are examples and in no case ready trading systems.\n\n## Installation\n\n```sh\ngo get github.com/sklinkert/at\n```\n\nExample backtesting run:\n\n```shell\nINSTRUMENT=\"BTC-USD\" STRATEGY=\"rsi\" CANDLE_DURATION=24h YEAR_FROM=2021 MONTH_FROM=4 YEAR_TO=2021 MONTH_TO=12 PRICE_SOURCE=\"COINBASE\" go run -ldflags=\"-w -s -X main.GitRev=123\" ./cmd/backtesting/main.go\n```\n\nUses ETHUSD candles from Coinbase via api.pattern-trading.com\n\n## Overview\n\n![Overview](docs/overview.png)\n\n## Packages\n\n### broker\n\nImplements concrete broker API. [paperwallet](https://github.com/sklinkert/at/tree/master/internal/paperwallet) can be used if a broker does not offer testing/sandbox accounts for trading without real money. \n\n### trader\n\nThe nerve center of the program. It connects the broker with strategies.\n\n### indicator\n\nImplements various trading indicator like Simple Moving Average (SMA) or RSI. Indicators should implement [this interface](https://github.com/sklinkert/at/blob/master/pkg/indicator/indicator.go).\n\n### strategy\n\nImplements various trading strategies. Each strategy needs to implement [this interface](https://github.com/sklinkert/at/blob/master/internal/strategy/strategy.go#L26) thus the trader is able to connect.\n\nGeneral flow: \n1. Trader sends candlesticks ([what is a candlestick?](https://www.investopedia.com/terms/c/candlestick.asp)) and the current price (tick) to the strategy\n2. Optional: The strategy feeds indicators and retrieves the latest indicator values\n3. The strategy decides if trader should open a new position and which position should be closed.\n4. Trader executes new orders or closes open positions via broker APIs.\n\n### environment overlays (eo) \n\nEOs can help to adjust a strategy according to the market volatility in order to reduce risk. E.g. you might want to buy when RSI indicator is below 25. However, if the market is getting dangerous due to high volatility you might only buy if RSI falls below 10 to ensure you buy only when indicator signals are stronger.\n\n## backtesting\n\nThe `backtest` module can apply historical price simulations to your strategy.\n\nYou can configure tradings fees and spreads to simulate trading like with real money.\n\n![Terminal output](docs/backtest-result.png)\n\nIt can also print a chart with a beautiful equity curve:\n\n![Terminal output](docs/backtest-equity-curve.png)\n\nYou can use Coinbase and **histdata.com** prices for backtestings. Check [cmd/import-histdata](https://github.com/sklinkert/at/tree/master/cmd/import-histdata) for more.\n\n## Contribution\n\nFeel free to send PRs. I'm always happy to discuss and improve the code.\n\nFor hosting I can recommend DigitalOcean:\n\n[![DigitalOcean Referral Badge](https://web-platforms.sfo2.digitaloceanspaces.com/WWW/Badge%203.svg)](https://www.digitalocean.com/?refcode=4a328aa341e2\u0026utm_campaign=Referral_Invite\u0026utm_medium=Referral_Program\u0026utm_source=badge)\n\n## Donations\n\nIn case you want to show some love:\n\n- BTC: 3BNnZUfw9qnLVnza9FvWF6n7tEXfWYVVy2\n- ETH: 0xd30638F4fD54aeDB458d30504DD1cF2ce7563D36\n- XMR: 45At7ezTicAejiLWTAfb28NNXnciH1M67VRrxLRHgfFyimHuPNP7MqbiUgYwwdTzXjbGFwCMsoMoH1Cvv7jPqKKANuaMpjo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsklinkert%2Fat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsklinkert%2Fat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsklinkert%2Fat/lists"}