Coder Social home page Coder Social logo

abdularif0705 / crypto_wallet_coingecko Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rollendxavier/crypto_wallet_coingecko

0.0 0.0 0.0 18 KB

Building a Basic Crypto Wallet for Ethereum Network with Web3 & CoinGecko API (https://www.coingecko.com/en/api)

Home Page: https://www.coingecko.com/en/api

License: Apache License 2.0

Python 44.77% HTML 55.23%

crypto_wallet_coingecko's Introduction

Ethereum Wallet Application

This application is a simple Ethereum wallet that allows you to create a new Ethereum account, check the balance of an ERC20 token for a given Ethereum address, and fetch the market chart data for a given ERC20 contract.

Prerequisites

  • Python 3.6 or higher
  • Flask
  • Web3
  • requests

You can install the necessary Python packages using pip:

pip install flask web3 requests

Running the Application

  1. Clone the repository and navigate to the project directory.
  2. Replace 'YOUR_INFURA_PROJECT_ID', 'your-secret-key', and 'YOUR_PASSWORD' in the Python script with your actual Infura project ID, secret key, and password.
  3. Run the application:
python app.py
  1. Open a web browser and navigate to http://localhost:5000.

Endpoints

  • GET /new_account: Creates a new Ethereum account and returns the private key and address.
  • GET /balance/<contract_address>: Returns the balance of the ERC20 token for the Ethereum address stored in the session.
  • POST /send_transaction: Send Ether to other Ethereum addresses
  • GET /market_chart/<contract_address>/<days>: Returns the market chart data for the given ERC20 contract in USD for the specified number of days.

Files

  • app.py: The main Python script that runs the application.
  • erc20_abi.json: The ABI for the ERC20 token standard.
  • templates/index.html: The HTML template for the application's user interface.

Output

image

For more details, please refer to the article published in the coingecko.

crypto_wallet_coingecko's People

Contributors

rollendxavier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.