{"id":18445159,"url":"https://github.com/yeikiu/ts-crypto-cli","last_synced_at":"2025-04-07T23:34:05.229Z","repository":{"id":42713283,"uuid":"275471696","full_name":"yeikiu/ts-crypto-cli","owner":"yeikiu","description":"☠️ UNMAINTAINED - 📈 Handy npm cli/lib to operate against some of the most known Crypto Exchanges","archived":false,"fork":false,"pushed_at":"2023-01-07T21:05:20.000Z","size":2157,"stargazers_count":1,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-30T17:23:51.382Z","etag":null,"topics":["binance","cryptocurrency-exchanges","hitbtc","kraken"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ts-crypto-cli","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yeikiu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-27T23:42:06.000Z","updated_at":"2021-09-28T17:20:40.000Z","dependencies_parsed_at":"2023-02-08T01:47:39.445Z","dependency_job_id":null,"html_url":"https://github.com/yeikiu/ts-crypto-cli","commit_stats":null,"previous_names":[],"tags_count":105,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeikiu%2Fts-crypto-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeikiu%2Fts-crypto-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeikiu%2Fts-crypto-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeikiu%2Fts-crypto-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeikiu","download_url":"https://codeload.github.com/yeikiu/ts-crypto-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223297228,"owners_count":17121977,"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","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":["binance","cryptocurrency-exchanges","hitbtc","kraken"],"created_at":"2024-11-06T07:05:01.541Z","updated_at":"2024-11-06T07:05:02.152Z","avatar_url":"https://github.com/yeikiu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\".ci_badges/npm-version-badge.svg\" /\u003e \u003cimg src=\".ci_badges/npm-dependencies-badge.svg\" /\u003e \u003cimg src=\".ci_badges/npm-devdependencies-badge.svg\" /\u003e\n\n# 🚨 This package has been deprecated\n\n\u003e This package is no longer supported. If you are still interested in a good cli/lib to operate on Kraken we recommend you check the ts-kraken project: https://github.com/yeikiu/ts-kraken\n\n---\n\n# TS Crypto Cli\n\n\u003e A handy npm to operate against some of the most known Crypto Exchanges\n\n- *NEW:* Test it online on the [npm Interactive Playground Demo](https://runkit.com/yeikiu/5f728aa574e29b001b4259d1)\n\n# Option 1 - Use it as a library\n\n- `npm i ts-crypto-cli`\n\n### Library usage demo\n\n\u003e Here is a little handler to perform a safe withdrawal from Kraken in \u003c20 lines of code using the lib.\n\n```typescript\nimport { krakenPrivateApiRequest } from 'ts-crypto-cli'\n\nconst krakenWithdrawAsset = async (asset: string, key: string, withdrawAmount: number): Promise\u003cunknown\u003e =\u003e {\n  const withdrawInfo = await krakenPrivateApiRequest({ url: 'WithdrawInfo', data: {\n      asset,\n      key,\n      amount: withdrawAmount\n  }})\n\n  const { limit } = withdrawInfo\n\n  if (Number(limit) \u003c Number(withdrawAmount)) {\n    throw new Error(`Can´t withdraw ${withdrawAmount} ${asset}. Max. available ${limit}`)\n  }\n\n  return krakenPrivateApiRequest({ url: 'Withdraw', data: {\n    asset,\n    key,\n    amount: withdrawAmount\n  }})\n}\n\nexport {\n  krakenWithdrawAsset\n}\n```\n\n# Option 2 - Launch the REPL cli on a shell\n\n\u003cimg src=\".github/menu_demo.png\" /\u003e\n\n---\n\n## Option 2.1 - Provide a .env file\n\n\u003e Create a .env file under current working directory with your own API credentials and run\n\n- `npx ts-crypto-cli`\n\n### Environment Variables\n\n```\n##\n# Each REST request/response can be optionally recorded to a log file if you set a path here\n##\n#TS_CRYPTO_CLI_LOGS_PATH=./ts_crypto_cli_logs\n\nKRAKEN_API_KEY=\u003c...\u003e\nKRAKEN_API_SECRET=\u003c...\u003e\n\nHITBTC_API_KEY=\u003c...\u003e\nHITBTC_API_SECRET=\u003c...\u003e\n\nBINANCE_API_KEY=\u003c...\u003e\nBINANCE_API_SECRET=\u003c...\u003e\n\n##\n# DEV only\n##\n#DEBUG=ts-crypto-cli:*\n```\n\n\n## Option 2.2 - Inject your keys/secrets to enable private methods\n\n\u003e This method is more secure as you won't need to persist the KEYS to a file\n\n### Powershell (windows)\n\n- `$env:KRAKEN_API_KEY=\"\u003c...\u003e\" ; $env:KRAKEN_API_SECRET=\"\u003c...\u003e\" ; $env:HITBTC_API_KEY=\"\u003c...\u003e\" ; etc... ; npx ts-crypto-cli`\n\n### cmd (windows)\n\n- `set KRAKEN_API_KEY=\u003c...\u003e \u0026 set KRAKEN_API_SECRET=\u003c...\u003e \u0026 set HITBTC_API_KEY=\u003c...\u003e \u0026 etc... \u0026 npx ts-crypto-cli`\n\n### Unix/OSx\n\n- `KRAKEN_API_KEY=\u003c...\u003e KRAKEN_API_SECRET=\u003c...\u003e HITBTC_API_KEY=\u003c...\u003e etc.. npx ts-crypto-cli`\n\n\n# [Documentation](https://yeikiu.github.io/ts-crypto-cli/)\n\n### Handling multiple API credentials\n\nYou can use different API keys/secrets against the same exchange. Generate the new API client instances with one of the following methods:\n\n- `createKrakenPrivateApiClient`\n- `createHitBTCPrivateApiClient`\n- `createBinancePrivateApiClient`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeikiu%2Fts-crypto-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeikiu%2Fts-crypto-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeikiu%2Fts-crypto-cli/lists"}