Coder Social home page Coder Social logo

aviksaikat / get-curve-spot-price Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 370 KB

Get the spot price of tokens from by calling the curve.fi swap router

License: BSD 3-Clause "New" or "Revised" License

Solidity 45.61% Python 54.39%
apeworx curve defi ethereum python python3

get-curve-spot-price's Introduction

Get-Curve-Spot-Price

Python Poetry Pytest

GitHub license git-last-commit GitHub commit activity GitHub top language

๐Ÿ“– Table of Contents


๐Ÿ“ Overview

Get the spot price of any token pair listed on curve.

๐Ÿ“‚ Repository Structure

โ””โ”€โ”€ Get-Curve-Spot-Price/
    โ”œโ”€โ”€ .build/
    โ”‚   โ”œโ”€โ”€ ICurvePool.json
    โ”‚   โ”œโ”€โ”€ IDAI.json
    โ”‚   โ”œโ”€โ”€ IERC20.json
    โ”‚   โ”œโ”€โ”€ IMATIC.json
    โ”‚   โ”œโ”€โ”€ IUSDC.json
    โ”‚   โ”œโ”€โ”€ IWBTC.json
    โ”‚   โ”œโ”€โ”€ IWETH.json
    โ”‚   โ””โ”€โ”€ __local__.json
    โ”œโ”€โ”€ ape-config.yaml
    โ”œโ”€โ”€ contracts/
    โ”‚   โ””โ”€โ”€ interfaces/
    โ”‚       โ”œโ”€โ”€ ICurvePool.sol
    โ”‚       โ”œโ”€โ”€ IDAI.sol
    โ”‚       โ”œโ”€โ”€ IERC20.sol
    โ”‚       โ”œโ”€โ”€ IMATIC.sol
    โ”‚       โ”œโ”€โ”€ IUSDC.sol
    โ”‚       โ”œโ”€โ”€ IWBTC.sol
    โ”‚       โ””โ”€โ”€ IWETH.sol
    โ”œโ”€โ”€ poetry.lock
    โ”œโ”€โ”€ pyproject.toml
    โ””โ”€โ”€ scripts/
        โ”œโ”€โ”€ constants.py
        โ”œโ”€โ”€ get_price.py
        โ”œโ”€โ”€ tokens.py
        โ””โ”€โ”€ utils.py

๐Ÿ”ง Installation

  1. Clone the Get-Curve-Spot-Price repository:
git clone https://github.com/Aviksaikat/Get-Curve-Spot-Price
  1. Change to the project directory:
cd Get-Curve-Spot-Price
  1. Install the dependencies:
poetry install

๐Ÿค– Running Get-Curve-Spot-Price

poery ape run scripts/get_price.py

# Or
poetry shell
ape run scripts/get_price.py

๐Ÿงช Tests

poery ape test

๐Ÿค Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines

Click to expand
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone <your-forked-repo-url>
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear and concise message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.

Once your PR is reviewed and approved, it will be merged into the main branch.



๐Ÿ‘ Acknowledgments

Return


get-curve-spot-price's People

Contributors

aviksaikat avatar

Stargazers

 avatar A.L. avatar

Watchers

 avatar  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.