npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

baluni-api

v2.3.4

Published

Api for baluni-cli

Downloads

35

Readme

BALUNI API

Overview

This documentation provides detailed information about the endpoints available in the API. This API interacts with Ethereum blockchain, specifically targeting token swaps via Uniswap V3, and deposit and redemption operations with Yearn Finance vaults.

Endpoints

https://baluni-api.scobrudot.dev/

General

  • GET /
    • Description: Returns a simple "Hello World!" message.
    • Response: "Hello World!"

Uniswap V3 Tokens

  • GET /:chainId/uni-v3/tokens
    • Description: Fetches all tokens from the Uniswap token list filtered by chainId.
    • Parameters:
      • chainId (path): Blockchain chain ID.
    • Response: Array of token objects filtered by the specified chainId.
  • GET /:chainId/uni-v3/tokens/:tokenSymbol
    • Description: Fetches a specific token by tokenSymbol and chainId from the Uniswap token list.
    • Parameters:
      • chainId (path): Blockchain chain ID.
      • tokenSymbol (path): Symbol of the token.
    • Response: Token object matching the specified tokenSymbol and chainId.

Yearn Finance Vaults

  • GET /:chainId/yearn-v3/vaults/:tokenSymbol
    • Description: Fetches a specific Yearn Finance vault by tokenSymbol and chainId, with optional filters for strategy type and boosted status.
    • Parameters:
      • chainId (path): Blockchain chain ID.
      • tokenSymbol (path): Symbol of the token associated with the vault.
      • strategyType (query): "multi" for Multi Strategy, "single" for Single Strategy.
      • boosted (query): "true" to filter for boosted vaults.
    • Response: Detailed information of the filtered Yearn Finance vault.
  • GET /:chainId/yearn-v3/vaults
    • Description: Fetches all Yearn Finance vaults for a given chainId.
    • Parameters:
      • chainId (path): Blockchain chain ID.
    • Response: Array of all Yearn Finance vaults for the specified chainId.

Configuration

  • GET /config/:chainId//:protocolName/:contractName

    • Description: Fetches configuration details for a given chainId, protocolName, and contractName.
    • Parameters:
      • chainId (path): Blockchain chain ID.
      • protocolName (path): Name of the protocol.
      • contractName (path): Name of the contract.
    • Response: Configuration details for the specified parameters.

    Examples:

    • /config/137/uni-v3/ROUTER
    • /config/137/uni-v3/QUOTER
    • /config/137/uni-v3/FACTORY

Swap Tokens

  • GET :chainId/:protocol/swap/:address/:token0/:token1/:reverse/:amount/:slippage

    • Description: Executes a token swap operation based on the provided parameters.
    • Parameters:
      • address, token0, token1, reverse, protocol, chainId, amount, slippage are all path parameters required to perform the swap.
    • Response: Result of the swap operation, including approvals, calldata, and tokens returned.

    Example Protocol: 137/uni-v3/swap/YOUR_ADDRESS/WBTC/USDC/false/0.0001/100

Deposit to Yearn Finance

  • GET :chainId/depositToYearn/:tokenSymbol/:strategy/:boosted/:amount/:receiver
    • Description: Deposits tokens into a specified Yearn Finance vault.
    • Parameters:
      • tokenSymbol, strategy, boosted, amount, receiver, chainId are all path parameters necessary for the deposit operation.
    • Response: Result of the deposit operation.

Redeem from Yearn Finance

  • GET :chainId/redeemFromYearn/:tokenSymbol/:strategy/:boosted/:amount/:receiver
    • Description: Redeems tokens from a specified Yearn Finance vault.
    • Parameters:
      • tokenSymbol, strategy, boosted, amount, receiver, chainId are all path parameters necessary for the redemption operation.
    • Response: Result of the redemption operation.