{"id":15663999,"url":"https://github.com/felixmohr/terratrader","last_synced_at":"2026-01-24T10:04:13.104Z","repository":{"id":236009392,"uuid":"438482936","full_name":"FelixMohr/terratrader","owner":"FelixMohr","description":"Performs terra swap trades for luna/bLuna arbitrage and is able to watch collateral at Anchor to repay UST deposited in case of liquidation risk.","archived":false,"fork":false,"pushed_at":"2021-12-17T14:55:34.000Z","size":81,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-06T19:06:44.133Z","etag":null,"topics":["anchor","arbitrage","bot","luna","terra","trading"],"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/FelixMohr.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}},"created_at":"2021-12-15T03:33:26.000Z","updated_at":"2024-04-22T10:43:53.000Z","dependencies_parsed_at":"2024-04-25T09:49:53.018Z","dependency_job_id":null,"html_url":"https://github.com/FelixMohr/terratrader","commit_stats":null,"previous_names":["felixmohr/terratrader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FelixMohr/terratrader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixMohr%2Fterratrader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixMohr%2Fterratrader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixMohr%2Fterratrader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixMohr%2Fterratrader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FelixMohr","download_url":"https://codeload.github.com/FelixMohr/terratrader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelixMohr%2Fterratrader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28724374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"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":["anchor","arbitrage","bot","luna","terra","trading"],"created_at":"2024-10-03T13:40:50.881Z","updated_at":"2026-01-24T10:04:13.088Z","avatar_url":"https://github.com/FelixMohr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terratrader\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)\n\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg\n    width=616px\n    src=\"files/moon.jpeg\"\n    alt=\"to the moon\"\n/\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## What it does\nThis bot can perform [Terraswap](https://app.terraswap.io) trades for you. It trades on the [Luna/bLuna](https://finder.extraterrestrial.money/mainnet/address/terra1jxazgm67et0ce260kvrpfv50acuushpjsz2y0p) pair.\n\n## Installation\n1. Create  virtual environment: `python -m venv venv`\n2. `. venv/bin/activate`\n3. `pip install -r requirements.txt`\n\n## Using it\n\nSet the environment variables:\n* `PK` private key of your wallet to trade with (read section below on how to find it)\n\nThen execute the following commands:\n\n1. `. venv/bin/activate` (if not done yet)\n2. `python cli.py` will start the CLI\n\n\n### Commands\n* `price`: Show price for selling/buying\n* `amount-luna`: Set the luna amount for buying bLuna\n* `amount-bluna`: Set the bLuna amount for selling bLuna\n* `inv-sell-price`: Sets the price for when to sell bLuna\n* `buy-price`: Sets the price for when to buy bLuna\n* `spread`: Sets the maximum spread (default 0,5%)\n* `mode-buy`: Sets the bot to buying mode (will toggle automatically when bought)\n* `mode-sell`: Sets the bot to selling mode (will toggle automatically when sold)\n* `buy`: Manually buys bLuna\n* `sell`: Manually sells bLuna\n* `bot`: Starts the bot. Stop it with [Ctrl]+[C]\n\n## Finding your private key\n1. Export the \"private key\" in your Terra Station\n2. Decode this base64 string and take the encoded key from the dict\n3. `npm install -g crypto-js`\n4. `export NODE_PATH=/usr/local/lib/node_modules` (check that the path is correct, may need to delete \"local\")\n5. `node scripts/decode_pk.js [ENCODED_PK] [WALLET_PASSWORD]`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixmohr%2Fterratrader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelixmohr%2Fterratrader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixmohr%2Fterratrader/lists"}