zSignals API

Quick Start

Get started with the zSignals API in just 5 minutes. Follow these simple steps to make your first API call.

Step 1: Subscribe & Get Your API Key

First, you'll need an active subscription to generate API keys.

  1. Subscribe
  2. Sign in and visit your Account page
  3. Generate a new API key in the API access section

Important: Keep your API key secure and never share it publicly. Treat it like a password.

You can create multiple API keys for different environments (production, staging, etc.) from your account page. All keys share the same rate limits.

Step 2: Make Your First Request

Let's fetch the current trending tokens. Here's a simple example:

curl -X GET "https://api.zsignals.xyz/v1/market/trending" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
          
        
// Install: npm install axios
const axios = require('axios');

async function getTrendingTokens() {
  try {
    const response = await axios.get('https://api.zsignals.xyz/v1/market/trending', {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Accept': 'application/json'
      }
    });

    console.log('Trending tokens:', response.data);
    return response.data;
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

getTrendingTokens();
          
        
# Install: pip install requests
import requests
import json

def get_trending_tokens():
    url = 'https://api.zsignals.xyz/v1/market/trending'
    headers = {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Accept': 'application/json'
    }

    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status()

        data = response.json()
        print('Trending tokens:', json.dumps(data, indent=2))
        return data
    except requests.exceptions.RequestException as error:
        print(f'Error: {error}')
        return None

get_trending_tokens()
          
        
require 'net/http'
require 'json'

def get_trending_tokens
  uri = URI('https://api.zsignals.xyz/v1/market/trending')
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Get.new(uri)
  request['Authorization'] = 'Bearer YOUR_API_KEY'
  request['Accept'] = 'application/json'

  begin
    response = http.request(request)

    if response.code == '200'
      data = JSON.parse(response.body)
      puts JSON.pretty_generate(data)
      data
    else
      puts "Error: #{response.code} - #{response.body}"
      nil
    end
  rescue => error
    puts "Error: #{error.message}"
    nil
  end
end

get_trending_tokens
          
        

Step 3: Understanding the Response

A successful response will return a JSON array of trending tokens:

[
  {
    "rank": 1,
    "symbol": "ENJOY",
    "name": "Enjoy Token",
    "contract_address": "0xc0ffee254729296a45a3885639AC7E10F9d54979",
    "price_usd": 0.000125,
    "market_cap": 2500000,
    "volume_24h": 125000,
    "change_24h": 15.3
  },
  {
    "rank": 2,
    "symbol": "IMAGINE",
    "name": "Imagine Token",
    "contract_address": "0xbada55e5f9981f22d191487fcb6ba63d64f3a4ef",
    "price_usd": 0.000089,
    "market_cap": 1800000,
    "volume_24h": 98000,
    "change_24h": -5.2
  }
]
          
        

Response Fields

Field Type Description
rank integer Position in trending list (1-100)
symbol string Token ticker symbol
name string Full token name
contract_address string Ethereum contract address
price_usd decimal Current price in USD
market_cap decimal Market capitalization in USD
volume_24h decimal 24-hour trading volume in USD
change_24h decimal 24-hour price change percentage

Common Query Parameters

Most endpoints support these optional parameters:

Parameter Type Default Description
limit integer 100 Number of results to return (max: 100)
offset integer 0 Skip this many results (for pagination)
sort string rank Sort field (rank, volume, market_cap, change)
order string desc Sort order (asc or desc)

Example with Parameters

curl -X GET "https://api.zsignals.xyz/v1/market/trending?limit=10&sort=volume&order=desc" \
  -H "Authorization: Bearer YOUR_API_KEY"
        
      

Error Handling

The API uses standard HTTP response codes to indicate success or failure:

Status Code Meaning Description
200 OK Request successful
400 Bad Request Invalid parameters or missing required fields
401 Unauthorized Invalid or missing API key
403 Forbidden Access denied or rate limit exceeded
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Server Error Internal server error

Error Response Format

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "You have exceeded your rate limit of 100 requests per hour",
    "details": {
      "limit": 100,
      "remaining": 0,
      "reset_at": "2024-01-15T12:00:00Z"
    }
  }
}
        
      

Next Steps

Explore Endpoints

Discover all available API endpoints and their parameters.

API Reference →

Authentication

Learn about API authentication and security best practices.

Learn More →