Recent Activity
Recent swaps and trading activity
Endpoint
GET
/v1/market/recent-swaps
Live Example Response
LIVE DATA
Updated every minute
[
{
"transaction_hash": "0x8cd90d88dd39882d86ad22a25bc7c06a4ea62c0688312f13362630b80d905227",
"pool_id": "0xb621282d89b7de9f41f47b532d49c0163681b2d86fd020494360a3b251c375f7",
"timestamp": 1781387541,
"token_symbol": "deshicryptoguy",
"is_buy": true,
"amount_in": 0.000528797171780005,
"amount_out": 0.000528797171780005,
"volume_usd": 0.0
}
]
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_hash | string | Ethereum transaction hash |
block_number | integer | Block number |
timestamp | integer | Unix timestamp |
from_address | string | Sender address |
to_address | string | Recipient address |
token_in | object | Input token details |
token_out | object | Output token details |
usd_value | decimal | Total USD value |
type | string | Transaction 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"
}
}
}