Skip to main content
The official Go SDK provides a context-based, typed client for the Hypermid API. Requires Go 1.21+.

Installation

Configuration

Configuration options

hypermid.New(nil) returns a client using all defaults — useful for quick scripts and the anonymous tier.

Methods

Chains & tokens

Quote / Execute / Status

Balances

GetBalances auto-detects the address ecosystem (EVM, Solana, Bitcoin, NEAR, Sui, Tron) and returns priced holdings plus dust classification.

NEAR Intents deposits

For non-EVM destinations, Execute returns a deposit address. After the user sends funds:

Webhooks

Verify incoming webhook deliveries:

Fiat on-ramp (RampNow)

Partner endpoints (require API key)

SuperSwap inbound receiver

For SuperSwap V2 inbound deposits (PulseChain-side outputs):

ExecuteSwap helper

The SDK provides a high-level ExecuteSwap helper that runs the full swap lifecycle and calls back into your code at each handoff:
ExecuteSwap handles:
  1. Calling Execute
  2. Invoking the right hook based on provider (LI.FI tx vs. NEAR Intents deposit)
  3. Polling status via WaitForLiFiCompletion / WaitForDepositCompletion
  4. Returning the final result
If your flow only needs polling, use the wait helpers directly:

Type guards

Use these to branch on the provider/mode of an ExecuteResponse:
And on statuses:
Chain helpers:

Error handling

The SDK returns typed errors for the common failure modes:

End-to-end example

A complete EVM swap from Ethereum to Arbitrum: