zSignals API

Recent Activity

Recent swaps and trading activity

Endpoint

GET /v1/market/recent-swaps

Live Example Response

LIVE DATA
Updated every minute
[
  {
    "transaction_hash": "0xb8e1aae0a22d56b8cb7bd02963910d0369a9aeba37847bc9125820eb4aed2161",
    "pool_id": "0x1a3812473f28d4203387e8f3836d07f4215135b9c0a5cd0e304403a04c5d8f53",
    "timestamp": 1759764041,
    "token_symbol": "arbstein",
    "is_buy": false,
    "amount_in": 3.83253363799726,
    "amount_out": 3.83253363799726,
    "volume_usd": 0.34
  }
]
              
            

Request Examples

curl -X GET "https://api.zsignals.xyz/v1/market/recent-swaps" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
            
          
const response = await fetch('https://api.zsignals.xyz/v1/market/recent-swaps', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Accept': 'application/json'
  }
});

const data = await response.json();
console.log(data);
            
          
import requests

response = requests.get(
    'https://api.zsignals.xyz/v1/market/recent-swaps',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Accept': 'application/json'
    }
)

data = response.json()
print(data)
            
          
require 'net/http'
require 'json'

uri = URI('https://api.zsignals.xyz/v1/market/recent-swaps')
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'

response = http.request(request)
data = JSON.parse(response.body)
puts data
            
          

Query Parameters

Parameter Type Description Default
limit integer Number of results to return (1-100) 100
offset integer Skip this many results (for pagination) 0
type string Filter by: buy, sell, all all
min_value decimal Minimum USD value of swaps -
token string Filter by specific token symbol or address -
order string Sort order: asc or desc desc

Example with Parameters

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

Response Schema

Field Type Description
transaction_hashstringEthereum transaction hash
block_numberintegerBlock number
timestampintegerUnix timestamp
from_addressstringSender address
to_addressstringRecipient address
token_inobjectInput token details
token_outobjectOutput token details
usd_valuedecimalTotal USD value
typestringTransaction type (buy/sell)

Error Responses

400 Bad Request

{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "Invalid limit parameter: must be between 1 and 100",
    "details": {
      "parameter": "limit",
      "provided": 150,
      "allowed": "1-100"
    }
  }
}

401 Unauthorized

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key",
    "details": {
      "help": "Include your API key in the Authorization header"
    }
  }
}

429 Too Many Requests

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded",
    "details": {
      "limit": 100,
      "remaining": 0,
      "reset_at": "2024-01-15T12:00:00Z"
    }
  }
}