{"id":28089519,"url":"https://github.com/muxe1/crypto-pay-api-sdk","last_synced_at":"2026-04-02T18:45:31.265Z","repository":{"id":49586272,"uuid":"517782672","full_name":"muxe1/crypto-pay-api-sdk","owner":"muxe1","description":"Python SDK for working with Crypto Bot","archived":false,"fork":false,"pushed_at":"2023-05-14T15:08:55.000Z","size":67,"stargazers_count":30,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-07T08:38:54.795Z","etag":null,"topics":["api","crypto","crypto-bot","crypto-pay","cryptobot","cryptopay","python","python3","sdk","ton","ton-coin","toncoin"],"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/muxe1.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,"zenodo":null}},"created_at":"2022-07-25T18:44:54.000Z","updated_at":"2025-11-06T16:35:43.000Z","dependencies_parsed_at":"2025-05-13T12:59:34.975Z","dependency_job_id":"d1576101-95a9-4440-8920-76434d518627","html_url":"https://github.com/muxe1/crypto-pay-api-sdk","commit_stats":null,"previous_names":["muxe1/crypto-pay-api-sdk","sllavon/crypto-pay-api-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muxe1/crypto-pay-api-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxe1%2Fcrypto-pay-api-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxe1%2Fcrypto-pay-api-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxe1%2Fcrypto-pay-api-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxe1%2Fcrypto-pay-api-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muxe1","download_url":"https://codeload.github.com/muxe1/crypto-pay-api-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxe1%2Fcrypto-pay-api-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["api","crypto","crypto-bot","crypto-pay","cryptobot","cryptopay","python","python3","sdk","ton","ton-coin","toncoin"],"created_at":"2025-05-13T12:59:28.565Z","updated_at":"2026-04-02T18:45:31.249Z","avatar_url":"https://github.com/muxe1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://raw.githubusercontent.com/sllavon/crypto-pay-api-sdk/3e83818c975a47f4ca61209b478f2508224058db/media/header.svg)\r\n# @muxel/crypto-pay-api-sdk\r\n## [SDK for working with Crypto Bot](https://t.me/CryptoBot)\r\n\r\n[![Downloads](https://static.pepy.tech/badge/crypto-pay-api-sdk)](https://pepy.tech/project/crypto-pay-api-sdk) [![TON](https://camo.githubusercontent.com/862a7c69bd3b8a405bdd94557b8e6d5a90702f363058e59fd8dadda3adb60a97/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462539322538452d544f4e2d677265656e)](https://ton.org) [![license - MIT](https://camo.githubusercontent.com/63691059c8dda9856bd568ef8bb0b326677b863d8b1fc9237cc096b6fd18a205/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f737461732d70726f6b6f706965762f697079776964676574735f746f67676c655f627574746f6e73)](https://github.com/sllavon/crypto-pay-api-sdk/blob/main/LICENSE) \r\n\r\n# Installation\r\n```sh\r\npip install crypto-pay-api-sdk\r\n```\r\n\r\n# Explanation\r\n\r\nFirst, you need to create your application and get an API token.\r\nOpen [@CryptoBot](http://t.me/CryptoBot?start=pay) or [@CryptoTestnetBot](http://t.me/CryptoTestnetBot?start=pay) (for testnet), end a command `/pay` to create a new app and get API Token.\r\n| Net  | Bot | Hostname |\r\n| ------------- | ------------- | ------------- |\r\n| mainnet  | [@CryptoBot](http://t.me/CryptoBot?start=pay)  | pay.crypt.bot |\r\n| testnet  | [@CryptoTestnetBot](http://t.me/CryptoTestnetBot?start=pay)  | testnet-pay.crypt.bot |\r\n\u003eAll queries to the Crypto Pay API must be sent over HTTPS\r\n\r\n\r\n\r\n# Examples\r\n**Support for all methods [official API](https://help.crypt.bot/crypto-pay-api)**\r\n```python\r\nfrom crypto_pay_api_sdk import cryptopay\r\n\r\nCrypto = cryptopay.Crypto(\"TOKEN\", testnet = True) #default testnet = False\r\n\r\nprint(Crypto.getMe())\r\nprint(Crypto.createInvoice(\"TON\", \"0.4\", params={\"description\": \"Test Invoice\",\r\n                                                 \"expires_in\": 300\r\n                                                 }))\r\n```\r\n\r\n## Methods\r\n\r\n**API**\r\n\r\n* [getMe](#getMe)\r\n* [createInvoice](#createInvoice)\r\n* [transfer](#transfer)\r\n* [getInvoices](#getInvoices)\r\n* [getBalance](#getBalance)\r\n* [getExchangeRates](#getExchangeRates)\r\n* [getCurrencies](#getCurrencies)\r\n\r\n### getMe\r\n\r\nA simple method for testing your app's authentication token. Requires no parameters. Returns basic information about the app.\r\n\r\n```python\r\nCrypto.getMe()\r\n```\r\n\r\n### createInvoice\r\n\r\nUse this method to create a new invoice. Returns object of created invoice.\r\n\r\n* **asset** (string)\r\nCurrency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`.\r\n* **amount** (string)\r\nAmount of the invoice in float. For example: `125.50`\r\n* **description** (string)\r\n*Optional*. Description of the invoice. Up to 1024 symbols.\r\n* **hidden_message** (string)\r\n*Optional*. The message will show when the user pays your invoice.\r\n* **paid_btn_name** (string) default - `callback`\r\n*Optional*. Paid button name. This button will be shown when your invoice was paid. Supported names:\r\n\r\n  * `viewItem` - View Item\r\n  * `openChannel` - Open Channel\r\n  * `openBot` - Open Bot\r\n  * `callback` - Return\r\n\r\n* **paid_btn_url** (string)\r\n*Optional but requried when you use paid_btn_name*. Paid button URL. You can set any payment success link (for example link on your bot). Start with https or http.\r\n* **payload** (string, up to 4kb)\r\n*Optional*. Some data. User ID, payment id, or any data you want to attach to the invoice.\r\n* **allow_comments** (boolean)\r\n*Optional*. Allow adding comments when paying an invoice. Default is true.\r\n* **allow_anonymous** (boolean)\r\n*Optional*. Allow pay invoice as anonymous. Default is true.\r\n* **expires_in** (number)\r\n*Optional*. You can set the expiration date of the invoice in seconds. Use this period: 1-2678400 seconds.\r\n\r\n```python\r\nCrypto.createInvoice(\"BTC\", 1,\r\n                    params = {\r\n                        description: 'kitten',\r\n                        paid_btn_name: viewItem,\r\n                        paid_btn_url: 'http://placekitten.com/150'\r\n                    })\r\n```\r\n\r\n### transfer\r\n\r\nUse this method to send coins from your app to the user. Returns object of completed transfer.\r\n\r\n* **user_id** (number)\r\nTelegram User ID. The user needs to have an account in our bot (send /start if no).\r\n* **asset** (string)\r\nCurrency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`.\r\n* **amount** (string)\r\nAmount of the transfer in float. For example: `125.50`\r\n* **spend_id** (string)\r\nIt is used to make your request idempotent. It's guaranteed that only one of the transfers with the same spend_id will be accepted by Crypto Pay API. This parameter is useful when the transfer should be retried (i.e. request timeout/connection reset/500 HTTP status/etc). You can use a withdrawal id or something. Up to 64 symbols.\r\n* **comment** (string)\r\n*Optional*. The comment of the invoice. The comment will show in the notification about the transfer. Up to 1024 symbols.\r\n\r\n```python\r\nCrypto.transfer(121011054, 'ETH',\r\n                0.1, 'ZG9uYXRl',\r\n                params = {\r\n                    comment: 'donate'\r\n                })\r\n```\r\n\r\n### getInvoices\r\n\r\nUse this method to get invoices of your app. On success, the returns array of invoices.\r\n\r\n* **asset** (string)\r\n*Optional*. Currency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`. Default: all assets.\r\n* **invoice_ids** (string)\r\n*Optional*. Invoice IDs separated by comma.\r\n* **status** (string)\r\n*Optional*. Status of invoices. Available statusses: active or paid. Default: all statusses.\r\n* **offset** (number)\r\n*Optional*. Offset needed to return a specific subset of  invoices. Default 0.\r\n* **count** (number)\r\n*Optional*. Number of invoices to return. Default 100, max 1000.\r\n\r\n```python\r\nCrypto.getInvoices(params = {'asset': \"TON\", 'count': 1})\r\n```\r\n\r\n### getBalance\r\n\r\nUse this method to get balance of your app. Returns array of assets.\r\n\r\n```python\r\nCrypto.getBalance()\r\n```\r\n\r\n### getExchangeRates\r\n\r\nUse this method to get exchange rates of supported currencies. Returns array of currencies.\r\n\r\n```python\r\nCrypto.getExchangeRates()\r\n```\r\n\r\n### getCurrencies\r\n\r\nUse this method to supported currencies. Returns array of currencies.\r\n\r\n```python\r\nCrypto.getCurrencies()\r\n```\r\n\r\n## License\r\nMIT\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuxe1%2Fcrypto-pay-api-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuxe1%2Fcrypto-pay-api-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuxe1%2Fcrypto-pay-api-sdk/lists"}