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

Quick Start

Get up and running with the Minima API

PreviousMinima DeFi RouterNextSupported Protocols and Functions

Last updated 2 years ago

API keys (optional)

API Keys are entirely optional, so why even use one for your integration?

  1. 馃攳 Tracking volume! API Keys are how we can track volume per integration, and provide you with details on volume that moves through your specific integration.

  2. 馃捀 Set your own custom trade fee. This fee will be directed to your configured fee collector address

To get your API keys, head over to and click "Start for free." Once you create your account, log-in, go to the "Mission Control" section and click "API Keys" to generate your keys.

Include API Keys

Include your API key in the header such as the following:

X-API-KEY = <API Key>

Good to know: API Keys are entirely optional, your integration will still work without them!

Make your first request

To make your first request, send an authenticated request to the pets endpoint. This will calculate a route.

Good to know: If a route cannot be found between two tokens, you will receive an error message which designates that.

Take a look at how you might call this method:

curl -X GET -G \
    "https://router.nodefinance.org/routes" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "X-Api-Key": <API Key> \
    -d inputToken=0x471EcE3750Da237f93B8E339c536989b8978a438 \
    -d outputToken=0x73a210637f6F6B7005512677Ba6B3C96bb4AA44B \
    -d inputAmount=10000000000000000000000 \
nodefinance.org
get

Get a swap route from one token to another

Authorizations
Path parameters
tokenInstring 路 20 byte EVM addressRequired

Input token for swap

tokenOutstring 路 20 byte EVM addressRequired

Output token

amountInstring 路 Raw uint256 valueRequired

Total amount of input token to be traded

fromstring 路 20 byte EVM addressOptional

Transaction originator. If present, will return a transaction ready to be signed

slippageinteger 路 BPSOptional

Allowed slippage, in bips. Can be congifigured at transaction, defaults to 10 BPS

tostring 路 20 byte EVM addressOptional

Recipient of trade. Defaults to from

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 /routes HTTP/1.1
Host: router.nodefinance.org
X-API-KEY: YOUR_API_KEY
Accept: */*
200

Path found Successfully

{
  "expectedOut": "text",
  "routerAddress": "text",
  "details": {
    "path": [
      "text"
    ],
    "pairs": [
      "text"
    ],
    "extras": [
      "text"
    ],
    "inputAmount": "text",
    "expectedOutputAmount": "text",
    "deadline": 1,
    "partner": 1,
    "sig": "text"
  }
}
  • API keys (optional)
  • Include API Keys
  • Make your first request
  • GET/routes