Trades
Get Latest Trade
Retrieve the most recent trade across all tokens on Pump.fun
GET
/
trades
/
latest
Get Latest Trade
curl --request GET \
--url https://frontend-api-v3.pump.fun/trades/latestimport requests
url = "https://frontend-api-v3.pump.fun/trades/latest"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://frontend-api-v3.pump.fun/trades/latest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://frontend-api-v3.pump.fun/trades/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://frontend-api-v3.pump.fun/trades/latest"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://frontend-api-v3.pump.fun/trades/latest")
.asString();require 'uri'
require 'net/http'
url = URI("https://frontend-api-v3.pump.fun/trades/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"trade": {
"signature": "<string>",
"mint": "<string>",
"timestamp": "<string>",
"tradeDirection": "<string>",
"amount": 123
}
}Authentication
This endpoint requires JWT authentication via theAuthorization: Bearer <token> header.
Parameters
This endpoint does not accept any parameters.Response
object
Example Request
curl -X GET "https://frontend-api-v3.pump.fun/trades/latest" \
-H "Authorization: Bearer <your_token>" \
-H "Accept: application/json"
import requests
url = "https://frontend-api-v3.pump.fun/trades/latest"
headers = {
"Authorization": "Bearer <your_token>",
"Accept": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://frontend-api-v3.pump.fun/trades/latest', {
method: 'GET',
headers: {
'Authorization': 'Bearer <your_token>',
'Accept': 'application/json'
}
});
const data = await response.json();
console.log(data);
Replace
<your_token> with your actual JWT token.Use Cases
Real-time Activity Monitoring
Poll this endpoint to monitor the latest trading activity across the entire Pump.fun platform. This is useful for:- Detecting new token launches
- Monitoring overall platform activity
- Building real-time activity feeds
- Tracking market sentiment
Example: Polling for Updates
import requests
import time
url = "https://frontend-api-v3.pump.fun/trades/latest"
headers = {
"Authorization": "Bearer <your_token>",
"Accept": "application/json"
}
last_signature = None
while True:
response = requests.get(url, headers=headers)
trade = response.json()
if trade['signature'] != last_signature:
print(f"New trade detected: {trade}")
last_signature = trade['signature']
time.sleep(5) # Poll every 5 seconds
Be mindful of rate limits when polling this endpoint. Implement appropriate delays between requests.
⌘I
Get Latest Trade
curl --request GET \
--url https://frontend-api-v3.pump.fun/trades/latestimport requests
url = "https://frontend-api-v3.pump.fun/trades/latest"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://frontend-api-v3.pump.fun/trades/latest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://frontend-api-v3.pump.fun/trades/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://frontend-api-v3.pump.fun/trades/latest"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://frontend-api-v3.pump.fun/trades/latest")
.asString();require 'uri'
require 'net/http'
url = URI("https://frontend-api-v3.pump.fun/trades/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"trade": {
"signature": "<string>",
"mint": "<string>",
"timestamp": "<string>",
"tradeDirection": "<string>",
"amount": 123
}
}