Installation

# Using Composer
composer require coinpaprika/dexpaprika-sdk-php

# From source
git clone https://github.com/coinpaprika/dexpaprika-sdk-php.git
cd dexpaprika-sdk-php
composer install

Prerequisites

  • PHP 7.4 or higher
  • Composer
  • ext-json PHP extension
  • Connection to the internet to access the DexPaprika API
  • No API key required

Quick Example: Get Token Price

<?php
require_once 'vendor/autoload.php';

use DexPaprika\Client;

// Create client and get WETH price on Ethereum
$client = new Client();
$weth = $client->tokens->getTokenDetails('ethereum', '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2');
echo "{$weth['name']}: \${$weth['price_usd']}";
// Output: Wrapped Ether: $3245.67

API Methods Reference

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

Complete Example

Advanced Features

Error Handling

Caching System

Pagination Helper

Working with Objects

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.