Aggregator API

The Minswap Aggregator API provides direct access to Minswap's aggregation functionality for partners who want to implement their own interface and control the trading logic.

Get current ADA price in multiple currencies

get
Query parameters
currencystring · enumRequired

Currency code to get ADA price in. Common values: usd, eur, jpy.

Example: usdPossible values:
Responses
200
Current ADA price and 24-hour change in requested currency
application/json
get
GET /aggregator/ada-price HTTP/1.1
Host: agg-api.minswap.org
Accept: */*
200

Current ADA price and 24-hour change in requested currency

{
  "currency": "usd",
  "value": {
    "change_24h": -2.34,
    "price": 0.75
  }
}

Query wallet balances and token information

get
Query parameters
addressstringRequired

Cardano wallet address to query

  • Supports both Cbor and Hex format addresses
  • Will be normalized to Cbor format in response
Example: addr1...
amount_in_decimalbooleanOptional

If true, all token balances are returned as decimal strings (e.g., "1.5" ADA), not the smallest unit (e.g., "1500000" lovelace). If false or omitted, balances are in smallest unit.

Responses
200
Detailed wallet balance information including ADA and native tokens
application/json
get
GET /aggregator/wallet HTTP/1.1
Host: agg-api.minswap.org
Accept: */*
200

Detailed wallet balance information including ADA and native tokens

{
  "wallet": "addr1...",
  "ada": "5000000",
  "minimum_lovelace": "text",
  "balance": [
    {
      "asset": {
        "token_id": "text",
        "logo": "text",
        "ticker": "MIN",
        "is_verified": true,
        "price_by_ada": 1.5,
        "project_name": "Minswap",
        "decimals": 6
      },
      "amount": "text"
    }
  ],
  "amount_in_decimal": true
}

Search and filter token information with pagination

post

Search for tokens with optional filtering and pagination support. Results can be filtered to only show verified tokens, specific token IDs, or tokens matching a search query.

Body
querystringRequired

Search query string to match against:

  • Token name (e.g., "Minswap")
  • Token ticker (e.g., "MIN")
  • Policy ID Empty string returns all tokens (subject to other filters)
Example: min
only_verifiedbooleanRequired

When true, returns only tokens verified by Minswap

  • true: Only verified tokens
  • false: All tokens including unverified ones
Example: true
assetsstring[]Optional

Optional list of specific token_ids to fetch Format: Array of "" strings Example: ["29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"]

Example: ["29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"]
search_afterstring[]Optional

Pagination cursor from previous response

Responses
200
Token search results with pagination information
application/json
post
POST /aggregator/tokens HTTP/1.1
Host: agg-api.minswap.org
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "query": "min",
  "only_verified": true,
  "assets": [
    "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"
  ],
  "search_after": [
    "text"
  ]
}
200

Token search results with pagination information

{
  "tokens": [
    {
      "token_id": "text",
      "logo": "text",
      "ticker": "MIN",
      "is_verified": true,
      "price_by_ada": 1.5,
      "project_name": "Minswap",
      "decimals": 6
    }
  ],
  "search_after": [
    "text"
  ]
}

Get optimal swap route and price estimation across DEX protocols

post

Find the best possible swap route and price estimation by aggregating liquidity across multiple DEX protocols. Supports direct swaps and multi-hop routing.

Body
amountstringRequired

Amount of input token.

  • If amount_in_decimal is true: amount is a decimal string (e.g., "1.5" ADA)
  • If amount_in_decimal is false or omitted: amount is in the smallest unit (e.g., "1500000" lovelace) For ADA: 1 ADA = 1,000,000 lovelace. For other tokens: amount * (10 ^ decimals). Examples:
  • "1.5" (with amount_in_decimal=true) means 1.5 ADA or tokens
  • "1000000" (with amount_in_decimal=false) means 1 ADA or token with 6 decimals
token_instringRequired

Input token identifier:

  • For ADA: use "lovelace"
  • For other tokens: use "" format Example: "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e" for MIN token
Example: lovelace
token_outstringRequired

Output token identifier:

  • For ADA: use "lovelace"
  • For other tokens: use "" format Must be different from token_in
Example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e
slippagenumberRequired

Maximum acceptable slippage percentage:

  • Examples: 0.5 means 0.5% slippage tolerance
  • Used to calculate min_amount_out
Example: 0.5
allow_multi_hopsbooleanOptional

Control whether multi-hop swaps are allowed:

  • true: Allow routing through multiple pools to find best price
  • false: Only allow direct swaps through a single pool

Multi-hop swaps can often provide better prices by routing through intermediate tokens, but may have higher total fees due to multiple swaps. Example: ADA -> MIN -> iUSD might be more efficient than direct ADA -> iUSD

partnerstringOptional

Partner identifier for tracking and analytics:

  • Optional string to identify the partner integration
  • Used for volume tracking and potential fee sharing programs
amount_in_decimalbooleanOptional

If true, the amount field is interpreted as a decimal string (e.g., "1.5" ADA), not the smallest unit (e.g., "1500000" lovelace). If false or omitted, amount is in smallest unit.

Responses
200
Successful route estimation response containing detailed information about: - Token amounts and minimums - Fee breakdowns (LP, DEX, and aggregator fees) - Price impact - Detailed routing paths through different DEX protocols
application/json
post
POST /aggregator/estimate HTTP/1.1
Host: agg-api.minswap.org
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "amount": "text",
  "token_in": "lovelace",
  "token_out": "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e",
  "slippage": 0.5,
  "exclude_protocols": [
    "MinswapV2"
  ],
  "allow_multi_hops": true,
  "partner": "text",
  "amount_in_decimal": true
}
200

Successful route estimation response containing detailed information about:

  • Token amounts and minimums
  • Fee breakdowns (LP, DEX, and aggregator fees)
  • Price impact
  • Detailed routing paths through different DEX protocols
{
  "token_in": "text",
  "token_out": "text",
  "amount_in": "text",
  "amount_out": "text",
  "min_amount_out": "text",
  "total_lp_fee": "text",
  "total_dex_fee": "text",
  "deposits": "text",
  "avg_price_impact": 1,
  "paths": [
    [
      {
        "pool_id": "text",
        "protocol": "MinswapV2",
        "lp_token": "text",
        "token_in": "text",
        "token_out": "text",
        "amount_in": "text",
        "amount_out": "text",
        "min_amount_out": "text",
        "lp_fee": "text",
        "dex_fee": "text",
        "deposits": "text",
        "price_impact": 1
      }
    ]
  ],
  "aggregator_fee": "text",
  "aggregator_fee_percent": 1,
  "amount_in_decimal": true
}

Build unsigned swap transaction

post

Constructs an unsigned Cardano transaction for performing the swap operation. This endpoint uses the results from /estimate to build a valid transaction that can be signed by the user's wallet and submitted to the network.

The transaction will:

  1. Take tokens from the sender's wallet

  2. Execute swaps through specified DEX protocols

  3. Return output tokens to the sender

  4. Handle all necessary ADA deposits and fee payments

Body
senderstringRequired

Cardano wallet address that will:

  • Provide the input tokens
  • Pay transaction fees
  • Receive output tokens
min_amount_outstringRequired

Minimum acceptable output amount Must be greater than or equal to the min_amount_out from the /estimate response to ensure price protection Examples:

  • "1.5" (with amount_in_decimal=true) means 1.5 ADA
  • "1000000" (with amount_in_decimal=false) means 1 ADA
amount_in_decimalbooleanOptional

If true, the amount in the estimate is interpreted as a decimal string (e.g., "1.5" ADA), not the smallest unit (e.g., "1500000" lovelace). If false or omitted, amount is in smallest unit.

Responses
200
Successfully built unsigned transaction The returned CBOR can be signed by the sender's wallet
application/json
post
POST /aggregator/build-tx HTTP/1.1
Host: agg-api.minswap.org
Content-Type: application/json
Accept: */*
Content-Length: 220

{
  "sender": "text",
  "min_amount_out": "text",
  "estimate": {
    "amount": "text",
    "token_in": "text",
    "token_out": "text",
    "slippage": 1,
    "exclude_protocols": [
      "MinswapV2"
    ],
    "allow_multi_hops": true,
    "partner": "text"
  },
  "amount_in_decimal": true
}
200

Successfully built unsigned transaction The returned CBOR can be signed by the sender's wallet

{
  "cbor": "text"
}

Submit signed transaction to network

post

Submits a signed transaction to the Cardano network. This endpoint should be called after getting the unsigned transaction from /build-tx and signing it with the sender's wallet.

The endpoint will:

  1. Validate the transaction and witness data

  2. Submit the transaction to the Cardano network

  3. Return the transaction ID for tracking

Body
cborstringRequired

Unsigned transaction CBOR from /build-tx response Must be the exact CBOR string received, unmodified Example: "84a400..." (hex-encoded CBOR)

witness_setstringRequired

Witness data containing the transaction signature Generated by the sender's wallet when signing Must be hex-encoded Example: "a100..." (hex-encoded witness data)

Responses
200
Transaction successfully submitted to the network The transaction will be processed in the next available block
application/json
post
POST /aggregator/finalize-and-submit-tx HTTP/1.1
Host: agg-api.minswap.org
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "cbor": "text",
  "witness_set": "text"
}
200

Transaction successfully submitted to the network The transaction will be processed in the next available block

{
  "tx_id": "text"
}

Get list of pending swap orders for a wallet

get

Retrieves all pending swap orders for a given wallet address across different DEX protocols. This endpoint is useful for:

  • Finding orders that need to be cancelled

  • Tracking pending transactions

Orders remain pending until they are either:

  • Filled (swap completed)

  • Cancelled (using /cancel-tx)

  • Expired (if the DEX protocol supports expiration)

Query parameters
owner_addressstringRequired

Cardano wallet address to query pending orders for Must be in bech32 format Example: "addr1..."

amount_in_decimalbooleanOptional

If true, all token amounts are returned as decimal strings (e.g., "1.5" ADA), not the smallest unit (e.g., "1500000" lovelace). If false or omitted, amounts are in smallest unit.

Responses
200
Successfully retrieved pending orders Returns an empty array if no pending orders exist
application/json
get
GET /aggregator/pending-orders HTTP/1.1
Host: agg-api.minswap.org
Accept: */*
200

Successfully retrieved pending orders Returns an empty array if no pending orders exist

{
  "orders": [
    {
      "owner_address": "text",
      "protocol": "MinswapV2",
      "token_in": {
        "token_id": "text",
        "logo": "text",
        "ticker": "MIN",
        "is_verified": true,
        "price_by_ada": 1.5,
        "project_name": "Minswap",
        "decimals": 6
      },
      "token_out": {
        "token_id": "text",
        "logo": "text",
        "ticker": "MIN",
        "is_verified": true,
        "price_by_ada": 1.5,
        "project_name": "Minswap",
        "decimals": 6
      },
      "amount_in": "text",
      "min_amount_out": "text",
      "created_at": 1,
      "tx_in": "text",
      "dex_fee": "text",
      "deposit": "text"
    }
  ],
  "amount_in_decimal": true
}

Build transaction to cancel pending orders

post

Builds an unsigned transaction that cancels pending swap orders. This is useful when:

  • A swap transaction is stuck or pending

  • You want to reclaim tokens from an unfilled order

  • You want to cancel multiple orders at once

Supports cancelling orders across multiple DEX protocols Can cancel up to 6 orders in a single transaction

Body
senderstringRequired

Cardano wallet address that:

  • Originally created the orders
  • Will receive refunded tokens

Must be in bech32 format Example: "addr1..."

Responses
200
Successfully built unsigned cancellation transaction The returned CBOR can be signed by the sender's wallet
application/json
post
POST /aggregator/cancel-tx HTTP/1.1
Host: agg-api.minswap.org
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "sender": "text",
  "orders": [
    {
      "tx_in": "text",
      "protocol": "MinswapV2"
    }
  ]
}
200

Successfully built unsigned cancellation transaction The returned CBOR can be signed by the sender's wallet

{
  "cbor": "text"
}

Last updated

Was this helpful?