2.3.2 • Published 4 days ago

baluni-api v2.3.2

Weekly downloads
-
License
AGPL-3.0
Repository
github
Last release
4 days ago

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

4 days ago

2.3.1

4 days ago

2.3.0

8 days ago

2.2.0

8 days ago

2.1.9

8 days ago

2.1.8

9 days ago

2.1.4

12 days ago

2.1.3

12 days ago

2.1.6

12 days ago

2.1.5

12 days ago

2.1.7

12 days ago

2.1.2

13 days ago

2.1.1

18 days ago

2.1.0

18 days ago

2.0.1

19 days ago

2.0.0

19 days ago

1.7.0

20 days ago

1.6.9

20 days ago

1.6.8

21 days ago

1.6.7

22 days ago

1.6.6

1 month ago

1.6.5

1 month ago

1.6.4

1 month ago

1.6.3

1 month ago

1.6.2

1 month ago

1.6.1

1 month ago

1.5.3

2 months ago

1.6.0

2 months ago

1.5.2

2 months ago

1.5.1

2 months ago

1.4.6

2 months ago

1.5.0

2 months ago

1.4.9

2 months ago

1.4.8

2 months ago

1.4.7

2 months ago

1.4.5

2 months ago

1.4.4

2 months ago

1.4.2

2 months ago

1.4.1

2 months ago

1.4.0

2 months ago

1.3.9

2 months ago

1.3.8

2 months ago

1.3.7

2 months ago

1.3.6

2 months ago

1.3.5

2 months ago

1.3.4

2 months ago

1.3.3

2 months ago

1.3.2

2 months ago

1.3.1

2 months ago

1.3.0

2 months ago

1.2.8

2 months ago

1.2.7

2 months ago

1.2.6

2 months ago

1.2.3

2 months ago

1.2.2

2 months ago

1.2.1

2 months ago

1.2.0

2 months ago

1.1.5

2 months ago