{"id":24802593,"url":"https://github.com/christiansassi/phantom-api","last_synced_at":"2025-03-25T05:36:06.251Z","repository":{"id":274797000,"uuid":"923816024","full_name":"christiansassi/phantom-api","owner":"christiansassi","description":"Unofficial library for interacting with the Phantom Wallet API.  For more info https://phantom.app","archived":false,"fork":false,"pushed_at":"2025-01-29T12:24:38.000Z","size":547,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T13:28:07.067Z","etag":null,"topics":["base","bitcoin","ethereum","phantom-wallet","polygon","solana"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christiansassi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-28T21:42:54.000Z","updated_at":"2025-01-29T12:24:41.000Z","dependencies_parsed_at":"2025-01-29T13:28:08.974Z","dependency_job_id":"6b91574a-b20e-4f79-afc5-382cdb60df8d","html_url":"https://github.com/christiansassi/phantom-api","commit_stats":null,"previous_names":["christiansassi/phantom-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiansassi%2Fphantom-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiansassi%2Fphantom-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiansassi%2Fphantom-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiansassi%2Fphantom-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christiansassi","download_url":"https://codeload.github.com/christiansassi/phantom-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407759,"owners_count":20610232,"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":["base","bitcoin","ethereum","phantom-wallet","polygon","solana"],"created_at":"2025-01-30T05:15:43.078Z","updated_at":"2025-03-25T05:36:06.243Z","avatar_url":"https://github.com/christiansassi.png","language":"Python","readme":"# Phantom Wallet API\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo/logo.png\" width=\"50%\" title=\"logo\"\u003e\n\u003c/p\u003e\n\n## Table of contents\n\n-   [Introduction](#introduction)\n    -   [Supported Chains](#supported-chains)\n-   [Functionalities](#functionalities)\n    -   [Learn - learn.py](#learn---learnpy)\n    -   [Quests - quests.py](#quests---questspy)\n    -   [Tokens - tokens.py](#tokens---tokenspy)\n    -   [Trending - trending.py](#trending---trendingpy)\n    -   [Wallet - wallet.py](#wallet---walletpy)\n-   [Project Structure](#project-structure)\n-   [Getting Started](#getting-started)\n-   [What's Missing](#whats-missing)\n\n## Introduction\n\nUnofficial library for interacting with the [Phantom Wallet](https://phantom.app) API.  \n\n### Supported Chains\n\u003cdiv style=\"display: flex; gap: 10px; align-items: center;\"\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/solana/solana-dark.png\"\u003e\n        \u003cimg alt=\"https://phantom.app\" src=\"assets/solana/solana-light.png\" width=\"5%\"\u003e\n    \u003c/picture\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/ethereum/ethereum-dark.png\"\u003e\n        \u003cimg alt=\"https://phantom.app\" src=\"assets/solana/ethereum-light.png\" width=\"5%\"\u003e\n    \u003c/picture\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/base/base-dark.png\"\u003e\n        \u003cimg alt=\"https://phantom.app\" src=\"assets/base/base-light.png\" width=\"5%\"\u003e\n    \u003c/picture\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/sui/sui-dark.png\"\u003e\n        \u003cimg alt=\"https://phantom.app\" src=\"assets/sui/sui-light.png\" width=\"5%\"\u003e\n    \u003c/picture\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/polygon/polygon-dark.png\"\u003e\n        \u003cimg alt=\"https://phantom.app\" src=\"assets/solana/polygon-light.png\" width=\"5%\"\u003e\n    \u003c/picture\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/bitcoin/bitcoin-dark.png\"\u003e\n        \u003cimg alt=\"https://phantom.app\" src=\"assets/bitcoin/bitcoin-light.png\" width=\"5%\"\u003e\n    \u003c/picture\u003e\n\u003c/div\u003e\n\n\n\n\n## Functionalities\n\n### Learn - \u003ca href=\"phantom_api/learn.py\"\u003elearn.py\u003c/a\u003e\n\n- `learn`: Provides useful learning resources based on queried chains.\n\n### Quests - \u003ca href=\"phantom_api/quests.py\"\u003equests.py\u003c/a\u003e\n\n- `get_quests`: Retrieves available quests for specific wallets.\n\n### Tokens - \u003ca href=\"phantom_api/tokens.py\"\u003etokens.py\u003c/a\u003e\n\n- `search_token`: Searches for tokens based on a query, chain IDs, and other filters.\n- `get_token`: Retrieves information about a specific token based on its chain ID and address.\n- `get_price`: Fetches the current price and 24-hour price change for a specific token.\n- `get_price_history`: Retrieves price history of a token over a given time frame.\n\n### Trending - \u003ca href=\"phantom_api/trending.py\"\u003etrending.py\u003c/a\u003e\n\n- `get_trending_tokens`: Returns a list of trending tokens based on various filters like time frame and sort criteria.\n- `get_trending_dapps`: Fetches a list of trending decentralized applications (DApps).\n- `get_trending_collections`: Gets trending collections based on ranking and time frame.\n\n### Wallet - \u003ca href=\"phantom_api/wallet.py\"\u003ewallet.py\u003c/a\u003e\n\n- `get_balance`: Retrieve balances for multiple wallets.\n- `get_quotes`: Retrieve quotes for a specific swap, including cross-chain swaps.\n- `get_best_quote`: Retrieve the best quote for a specific swap, including cross-chain swaps.\n- `get_history`: Retrieve transaction history for multiple wallets.\n- `get_pending_transactions`: Retrieve pending transactions for multiple wallets.\n\n## Project Structure\n\n```\n.\n└── phantom_api\n    ├── core          # Constants, enums, and core configurations\n    ├── learn         # Script related to learning resources\n    ├── quests        # Script to interact with quests\n    ├── tokens        # Scripts for token-related functionalities\n    ├── trending      # Scripts to fetch trending data (tokens, DApps, collections)\n    └── wallet        # Scripts for wallet-related features\n```\n\n## Getting Started\n\n1. Set up the workspace:\n\n    ```bash\n    git clone https://github.com/christiansassi/phantom_api\n    cd phantom_api\n    pip install -r requirements.txt\n    ```\n\n2. You can now use the library in your Python script by importing the necessary modules from the `phantom_api` directory.\n\n## What's Missing\n\n- [TODO](https://github.com/christiansassi/phantom-api/blob/64f8a6ce7ab748b544578124c95d2466c928823e/phantom_api/wallet.py#L230) Implement seamless navigation between multiple transaction pages.\n- This project does not yet support all RPC-based functions, such as token swapping.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiansassi%2Fphantom-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristiansassi%2Fphantom-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiansassi%2Fphantom-api/lists"}