Minima Docs
  • Minima DeFi Router
  • Quick Start
  • Supported Protocols and Functions
  • Swaps
    • Good to know
    • Query a Swap
    • Exclude Protocols from Route
    • Execute a Swap
  • Reference
    • API Reference
      • Querying a Swap Route
      • Deposit
      • Withdraw
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Withdraw

Query a route to go from an LP position to one ERC20 token in a single transaction

PreviousDeposit

Last updated 2 years ago

get

Get a withdraw route from one lp position to a standard ERC20

Authorizations
Path parameters
tokenInstring · 20 byte EVM addressRequired

Input LP or Gauge token

tokenOutstring · 20 byte EVM addressRequired

Target ERC20

inputAmountstring · Raw uint256 valueRequired

Total amount of input token to be withdrawn

deadlineMsinteger · Unix SecondsOptional

Deadline for quote, defaults to 5 minutes

chainIdinteger · enumOptional

Chain to perform swap on, defaults to 42220 (CELO). More chains coming soon.

Possible values:
Responses
200
Path found Successfully
application/json
get
GET /earn/withdraw HTTP/1.1
Host: router.nodefinance.org
X-API-KEY: YOUR_API_KEY
Accept: */*
200

Path found Successfully

{
  "expectedOut": "text",
  "routerAddress": "text",
  "oneClickFarmAddress": "text",
  "underlyingRoutes": [
    {
      "path": [
        "text"
      ],
      "pairs": [
        "text"
      ],
      "extras": [
        "text"
      ],
      "inputAmount": "text",
      "expectedOutputAmount": "text",
      "deadline": 1,
      "partner": 1,
      "sig": "text"
    }
  ]
}