Appearance
Pump.Fun
Pump.Fun operates as a blockchain-based platform designed to provide real-time data and notifications related to cryptocurrency trade events. Built on the Solana blockchain, it leverages the high throughput and low latency of Solana to deliver instantaneous updates on market activities. Users can connect via WebSocket to subscribe to trade events, enabling real-time monitoring and analysis of buy/sell transactions.
pumpFunTradeSubscribe
Overview
The pumpFunTradeSubscribe
message allows a client to subscribe to real-time buy/sell trade events for a specified cryptocurrency. Upon establishing a WebSocket connection and sending the subscription message, the client will start receiving trade notifications from the server.
Request
Endpoint
WebSocket URL:wss://api.nolimitnodes.com/pump-fun?api_key=YOUR_API_KEY
Payload
The request payload for subscribing to trade events.
json
{
"method": "pumpFunTradeSubscribe",
"params": {
"coinAddress": "4HTXweoVWfRdXTpvrWCctdED6KUi7Ah1aGq76ubMpump",
"referenceId": "REF#1"
}
}
Parameters
Parameter | Type | Description |
---|---|---|
coinAddress | string | "all" to listen to all coin trades, or a specific <coin-address> to receive trades for that coin. |
referenceId | string | A unique identifier for tracking the subscription request and its responses. |
Response
Successful Subscription
The server acknowledges the subscription with a confirmation message containing a subscription ID.
json
{
"status": "Trade Subscribed",
"subscription_id": "9d4a3756-f3de-464d-ae05-c36297984f90",
"reference_id": "REF#1"
}
Trade Event Notification
Once subscribed, the server sends trade notifications in the following format:
json
{
"method": "tradeEventNotification",
"result": {
"metadata": {
"network": "solana",
"chain": "mainnet-beta",
"block": "308693304"
},
"timestamp": 1734706766,
"type": "Buy",
"price": { "sol": "0.0000000780" },
"token_in": {
"token": "So11111111111111111111111111111111111111112",
"amount": 21340983
},
"token_out": {
"token": "4HTXweoVWfRdXTpvrWCctdED6KUi7Ah1aGq76ubMpump",
"amount": 273799880742
},
"wallet": {
"address": "BNArZsgokea5BxYzhzB9BKqhz7C54fYWkL7CPSPCMP8X"
}
},
"subscription_id": "9d4a3756-f3de-464d-ae05-c36297984f90"
}
Response Fields
Field | Type | Description |
---|---|---|
method | string | Specifies the type of notification, e.g., tradeEventNotification . |
result.metadata | object | Contains blockchain details such as network , chain , and the current block . |
result.timestamp | integer | Unix timestamp for the trade event. |
result.type | string | Type of trade event: Buy or Sell . |
result.price | object | Price details, including the value in SOL (native token). |
result.token_in | object | Details of the input token for the trade, including its address and the traded amount. |
result.token_out | object | Details of the output token for the trade, including its address and the received amount. |
result.wallet | object | Information about the wallet involved in the trade, including its address. |
subscription_id | string | The unique ID for the subscription, used to manage the session (e.g., unsubscribe). |
Use Cases
Real-Time Trade Monitoring
By subscribing to a specific coin address, developers can monitor buy/sell events in real-time for that cryptocurrency.Market Analysis and Alerts
Automate alerts or log data for market analysis using the trade event notifications.Trade Subscription Management
The server's acknowledgment provides asubscription_id
that can be used to unsubscribe or verify active subscriptions.Cross-Coin Analysis
Subscribe to"all"
coins for broad market coverage and track patterns across different tokens.
Key Notes
- Subscription Acknowledgment: The server responds with a
subscription_id
to confirm the subscription. Use this ID to manage the subscription. - Dynamic Filtering: By specifying a
coinAddress
, clients can limit the events to specific tokens or choose to monitor all trades. - Trade Details: Each event provides comprehensive information, including blockchain metadata, trade type, and token details.
- Reliability: Ensure proper error handling and reconnection logic in the client to maintain uninterrupted trade updates.
pumpFunTradeUnsubscribe
Overview
The pumpFunTradeUnsubscribe
message allows a client to unsubscribe from receiving real-time buy/sell trade event notifications for a previously subscribed cryptocurrency. This ensures efficient management of WebSocket resources and stops unnecessary updates for the client.
Request
Endpoint
WebSocket URL:wss://api.nolimitnodes.com/pump-fun?api_key=YOUR_API_KEY
Payload
The request payload for unsubscribing from trade events.
json
{
"method": "pumpFunTradeUnsubscribe",
"params": {
"subscriptionId": "9d4a3756-f3de-464d-ae05-c36297984f90"
}
}
Parameters
Parameter | Type | Description |
---|---|---|
subscriptionId | string | The unique subscription ID obtained during the pumpFunTradeSubscribe acknowledgment. |
Response
Successful Unsubscription
The server confirms the unsubscription with the following message:
json
{
"status": "Trade Event Unsubscribed",
"subscription_id": "9d4a3756-f3de-464d-ae05-c36297984f90"
}
Response Fields
Field | Type | Description |
---|---|---|
status | string | Indicates the success of the unsubscription request, e.g., "Trade Event Unsubscribed" . |
subscription_id | string | The unique subscription ID that was successfully unsubscribed. |
Use Cases
Subscription Management
Free up resources and stop receiving unnecessary updates when specific trade data is no longer required.Dynamic Subscriptions
Modify active subscriptions by unsubscribing from old subscriptions and creating new ones with updated parameters.Performance Optimization
Reduce WebSocket traffic by unsubscribing from trades that are no longer relevant to the client.
Key Notes
- Subscription ID Required: Ensure the correct
subscriptionId
is used to successfully unsubscribe from the desired trade events. - Acknowledgment: The server confirms the unsubscription with a response containing the
subscription_id
for reference. - Error Handling: Implement error handling in the client to manage cases where the provided
subscriptionId
is invalid or already unsubscribed. - Reusability: Once unsubscribed, the same
subscriptionId
cannot be reused for new subscriptions.
createEventSubscribe
Overview
The createEventSubscribe
message enables a client to subscribe to real-time notifications of new coin or liquidity pool (LP) creation events on the blockchain. This allows clients to track token ecosystem developments as they happen.
Request
Endpoint
WebSocket URL:wss://api.nolimitnodes.com/pump-fun?api_key=YOUR_API_KEY
Payload
The request payload to subscribe to creation events.
json
{
"method": "pumpFunCreateEventSubscribe",
"params": {
"eventType": "coin",
"referenceId": "REF#1"
}
}
Parameters
Parameter | Type | Description |
---|---|---|
eventType | string | Type of events to subscribe to: "all" , "coin" , or "lp" . |
- "all" : Receive notifications for both coin and LP creations. | ||
- "coin" : Receive notifications for only coin creation events. | ||
- "lp" : Receive notifications for only liquidity pool creation events. | ||
referenceId | string | A unique identifier for tracking the subscription request and its responses. |
Response
Successful Subscription
The server acknowledges the subscription with a confirmation message containing a subscription ID.
json
{
"status": "Create Event Subscribed",
"subscription_id": "9c37a3e8-d39b-497c-902d-162e19a0bcda",
"reference_id": "REF#1"
}
Event Notifications
Once subscribed, the server sends notifications for relevant creation events. Two examples are provided below:
Coin Creation Event
json
{
"method": "createEventNotification",
"result": {
"metadata": {
"network": "solana",
"chain": "mainnet-beta",
"block": "308709941"
},
"timestamp": "1734713628",
"name": "TRUMPCOIN",
"symbol": "TRUMPCOIN",
"uri": "https://ipfs.io/ipfs/QmSSme2anrzV4NWrofS3uzXTq9B1L5Jxy54FgvPcrAsrhe",
"mint": "CWVtv9SQMVibEqzFBLy5FZdLhozzZzRDBbX9HGnypump",
"bondingCurve": "HZzaNo92zpqqyTb3pBr5P9fAJ7GT9xnSAxygWLbgUV7X",
"associatedBondingCurve": "BnNAk9AtBvQS3vmv9UpkEoAqPAC96PMUig9HtMdJescU",
"creator_wallet": {
"address": "91U3uKcD2EuC7eW8bbBtC7ftwrNpmgGmJQFpgBZbaBAB"
},
"event_type": "create_coin"
},
"subscription_id": "9c37a3e8-d39b-497c-902d-162e19a0bcda"
}
LP Creation Event
json
{
"method": "createEventNotification",
"result": {
"metadata": {
"network": "solana",
"chain": "mainnet-beta",
"block": "308709800"
},
"timestamp": "1734713570",
"token": "8HaP7goaJcGknuvoUUEtyoTaXN2TSHhts1JKFjvfpump",
"event_type": "create_lp"
},
"subscription_id": "9c37a3e8-d39b-497c-902d-162e19a0bcda"
}
Response Fields
Field | Type | Description |
---|---|---|
method | string | Specifies the type of notification, e.g., createEventNotification . |
result.metadata | object | Contains blockchain details such as network , chain , and the current block . |
result.timestamp | string | Unix timestamp for the creation event. |
result.name | string | (For coin creation) Name of the created coin. |
result.symbol | string | (For coin creation) Symbol of the created coin. |
result.uri | string | (For coin creation) URI containing additional metadata about the coin. |
result.mint | string | (For coin creation) The mint address of the created coin. |
result.bondingCurve | string | (For coin creation) Address of the bonding curve contract associated with the coin. |
result.associatedBondingCurve | string | (For coin creation) Address of the associated bonding curve for the coin. |
result.creator_wallet | object | (For coin creation) Wallet address of the coin creator. |
result.token | string | (For LP creation) Token address associated with the created liquidity pool. |
result.event_type | string | Type of event, e.g., create_coin or create_lp . |
subscription_id | string | The unique ID for the subscription, used to manage the session (e.g., unsubscribe). |
Use Cases
Monitoring Coin Launches
Track new token launches in real-time to stay informed about ecosystem growth.Liquidity Pool Tracking
Get updates on the creation of new liquidity pools to assess market opportunities.Event Filtering
Use theeventType
parameter to filter for only relevant events (e.g., coins or LPs).Market Intelligence
Build analytics tools to log and analyze trends in token and liquidity pool creation.
Key Notes
- Subscription Management: The server confirms the subscription with a
subscription_id
. Use this ID for unsubscribing or managing active subscriptions. - Dynamic Filtering: Choose
eventType
as"all"
,"coin"
, or"lp"
to focus on relevant events. - Comprehensive Metadata: Each event contains detailed metadata, including blockchain details and event-specific data (e.g., coin name, LP token address).
- Error Handling: Implement robust error handling to manage cases such as invalid
eventType
or disrupted connections.
createEventUnsubscribe
Overview
The createEventUnsubscribe
message allows the client to unsubscribe from receiving real-time notifications of coin or liquidity pool (LP) creation events. This ensures efficient WebSocket resource management and stops unnecessary event notifications.
Request
Endpoint
WebSocket URL:wss://api.nolimitnodes.com/pump-fun?api_key=YOUR_API_KEY
Payload
The request payload for unsubscribing from creation events.
json
{
"method": "pumpFunCreateEventUnsubscribe",
"params": {
"subscriptionId": "9c37a3e8-d39b-497c-902d-162e19a0bcda"
}
}
Parameters
Parameter | Type | Description |
---|---|---|
subscriptionId | string | The unique ID obtained during the createEventSubscribe acknowledgment, identifying the subscription to cancel. |
Response
Successful Unsubscription
The server confirms the unsubscription with the following response:
json
{
"status": "Create Event Unsubscribed",
"subscription_id": "9c37a3e8-d39b-497c-902d-162e19a0bcda"
}
Response Fields
Field | Type | Description |
---|---|---|
status | string | Indicates the success of the unsubscription request, e.g., "Create Event Unsubscribed" . |
subscription_id | string | The unique subscription ID that was successfully unsubscribed. |
Use Cases
Subscription Management
Remove a subscription when notifications for coin or LP creation events are no longer needed.Dynamic Updates
Unsubscribe from outdated subscriptions to make way for new, relevant subscriptions.WebSocket Optimization
Reduce server and client load by terminating unused event streams.
Key Notes
- Subscription ID: Ensure the correct
subscriptionId
is provided to successfully terminate the subscription. - Acknowledgment: The server confirms the unsubscription with a response that includes the
subscription_id
. - Reusability: Once unsubscribed, the same
subscriptionId
cannot be reused to reactivate the subscription.