Installation

go get github.com/coinpaprika/dexpaprika-sdk-go

Prerequisites

  • Go 1.24 or higher
  • Connection to the internet to access the DexPaprika API
  • No API key required

Quick Example: Get Token Price

package main

import (
    "context"
    "fmt"
    "log"
    "time"

    "github.com/coinpaprika/dexpaprika-sdk-go/dexpaprika"
)

func main() {
    // Create client
    client := dexpaprika.NewClient()
    
    // Create context with timeout
    ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    defer cancel()
    
    // Get WETH token details on Ethereum
    token, err := client.Tokens.GetDetails(ctx, "ethereum", "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2")
    if err != nil {
        log.Fatalf("Error getting token details: %v", err)
    }
    
    fmt.Printf("%s: $%.2f\n", token.Name, token.PriceUSD)
    // Output: Wrapped Ether: $3245.67
}

API Methods Reference

Parameters marked with an asterisk (*) are required.
Networks
category
DEXes
category
Pools
category
Tokens
category
Utils
category

Complete Example

Advanced Features

Error Handling

Caching

Pagination Helpers

Custom Configuration

Resources

API Status

The DexPaprika API provides consistent data with stable endpoints. No API key is currently required to access the service. We aim to maintain backward compatibility and provide notice of any significant changes.