{"id":17456187,"url":"https://github.com/brennerspear/coinbase_pro_bot_aws_lambda","last_synced_at":"2026-04-11T10:36:43.600Z","repository":{"id":99284979,"uuid":"393522465","full_name":"BrennerSpear/coinbase_pro_bot_aws_lambda","owner":"BrennerSpear","description":"A bot to put on AWS Lambda to do reoccurring buys on Coinbase Pro","archived":false,"fork":false,"pushed_at":"2021-08-14T21:34:04.000Z","size":18950,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-27T13:41:23.677Z","etag":null,"topics":["aws","bitcoin","cryptocurrency","ethereum","lambda","lambda-functions","solana"],"latest_commit_sha":null,"homepage":"","language":"Python","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/BrennerSpear.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-08-06T22:52:56.000Z","updated_at":"2022-05-02T22:48:44.000Z","dependencies_parsed_at":"2023-07-17T23:15:27.434Z","dependency_job_id":null,"html_url":"https://github.com/BrennerSpear/coinbase_pro_bot_aws_lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BrennerSpear/coinbase_pro_bot_aws_lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrennerSpear%2Fcoinbase_pro_bot_aws_lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrennerSpear%2Fcoinbase_pro_bot_aws_lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrennerSpear%2Fcoinbase_pro_bot_aws_lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrennerSpear%2Fcoinbase_pro_bot_aws_lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrennerSpear","download_url":"https://codeload.github.com/BrennerSpear/coinbase_pro_bot_aws_lambda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrennerSpear%2Fcoinbase_pro_bot_aws_lambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31677819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: 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":["aws","bitcoin","cryptocurrency","ethereum","lambda","lambda-functions","solana"],"created_at":"2024-10-18T02:24:33.417Z","updated_at":"2026-04-11T10:36:43.570Z","avatar_url":"https://github.com/BrennerSpear.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coinbase_pro_bot\nA basic Coinbase Pro buying bot that completes market trades in any of their available market pairings. \n\nRelies on [gdax-python](https://github.com/danpaquin/gdax-python). Thank you [danpaquin](https://github.com/danpaquin)\n\nForked from [gdax_bot](https://github.com/kdmukai/gdax_bot). Thank you [kdmukai](https://github.com/kdmukai)\n\nSay hi on twitter: [@brennerspear](https://www.twitter.com/brennerspear)\n\n### Setup\n\n### Create Coinbase Pro API key\nTry this out on Coinbase Pro's sandbox first. The sandbox is a test environment that is not connected to your actual fiat or crypto balances.\n\nLog into your Coinbase/Coinbase Pro account in their test sandbox:\nhttps://public.sandbox.pro.coinbase.com/\n\nFind and follow existing guides for creating an API key. Only grant the \"Trade\" permission. Note the passphrase, the new API key, and API key's secret. Write these down.\n\nWhile you're in the sandbox UI, fund your fiat account by transferring from the absurd fake balance that sits in the linked Coinbase account (remember, this is all just fake test data; no real money or crypto goes through the sandbox).\n\n### Create a lambda function\n[AWS Lambda](https://console.aws.amazon.com/lambda/home?region=us-east-1#/functions)\n\n1. click \"Create Function\"\n2. enter a function name\n3. Runtime: Python 3.8\n4. click \"Create Function\"\n5. click \"Upload from\" --\u003e .zip file\n6. upload the zip in this repo: `my-lambda-deployment-package.zip`\n\n### Configure your lambda function\n\n1. Click \"Configuration\"\n2. Click \"Environment variables\"\n3. Click \"edit\" on the right\n4. add the following 7 key-value pairs you got from Coinbase Pro earlier:\n```\nENV = SANDBOX\n\nCBPRO_PASSPHRASE_SANDBOX = xxx\nCBPRO_API_KEY_SANDBOX = xxx\nCBPRO_SECRET_KEY_SANDBOX = xxx\n\nCBPRO_PASSPHRASE = xxx\nCBPRO_API_KEY = xxx\nCBPRO_SECRET_KEY = xxx\n```\n\nclick save\n\n(We're setting the environment as `SANDBOX` for now so we can do a test run first)\n\n\nWe also need to change the timeout of the lambda function\n\nWithin \"Configuration\", go to:\n1. Click \"General Configuration\"\n2. Click \"edit\" on the right\n3. Edit timeout to 0 min 10 sec\n4. Click \"Save\"\n\n### Try a sandbox test run\n\nClick \"Test\"\nAdd an example event with the following JSON data (The sandbox only has BTC-USD)\n```\n{\n  \"market_name\": \"BTC-USD\",\n  \"order_side\": \"BUY\",\n  \"amount\": \"10\",\n  \"amount_currency\": \"USD\"\n}\n```\n\nClick \"Test\"\n\nIt should give a successful run, and show the output in the dropdown\n\n### Try a production test run\n\nGo back to Configuration --\u003e Environment variables --\u003e edit\n\nChange  `ENV` to `PRODUCTION`\n\nSave and go back to test. Run another test. This time it will actually be buying btc from your real account!\n\n### Scheduling your recurring buys\n\n1. Search in the top search bar for \"EventBridge\" where you'll [create a rule](https://console.aws.amazon.com/events/home?region=us-east-1#/rules/create)\n2. name your rule (I named one of mine \"buy-eth-every-hour)\n3. select \"Schedule\"\n4. Fixed rate every x minutes/hours/days\n5. Target: Lambda function\n6. Function: your function's name\n7. Configure input\n8. select \"Constant (JSON text)\"\n9. copy and paste the JSON data that fits what you want to buy. Example:\n```\n{\n  \"market_name\": \"SOL-USD\",\n  \"order_side\": \"BUY\",\n  \"amount\": \"10\",\n  \"amount_currency\": \"USD\"\n}\n```\n\nClick \"Add target\"\n\nClick \"Create\"\n\nCongratulations! Your bot is running!\n\nYou can create multiple rules if you want to buy multiple different assets.\n\n## Disclaimers\nUse and modify it at your own risk. This is not investment advice. I am not an investment advisor. \n\nThe requirments.txt file probably doesn't match exactly what's in the .zip.\n\n`lambda_function.py` might have some imports it doesn't need.\n\nYou could get rid of the loops and sleeper since you don't actually need a response to execute the trade, but then you won't have any logs.\n\nIf you're going to edit the code and upload, [this tutorial](https://docs.aws.amazon.com/lambda/latest/dg/python-package-create.html#python-package-create-with-dependency) was helpful. Zipping the dependency files + `lambda_function.py` together can be a bit finicky. \n\n\nTODO:\n\nThe environment variables should probably be encrypted in transit. The code needed to decrypt them when they arrive needs to be added. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrennerspear%2Fcoinbase_pro_bot_aws_lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrennerspear%2Fcoinbase_pro_bot_aws_lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrennerspear%2Fcoinbase_pro_bot_aws_lambda/lists"}