Skip to content

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

License

Notifications You must be signed in to change notification settings

Aviksaikat/Get-Curve-Spot-Price

Repository files navigation

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


About

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

Topics

Resources

License

Stars

Watchers

Forks