SolanaStreaming Docs

newPairSubscribe

Subscribe to receive notifications when a new token pair is created on any supported exchange.

Notifications arrive in the order they appear in the blockchain.

Use cases:

  • New PumpFun Tokens
  • PumpFun Migrations
  • New Raydium Pools
  • New Pumpswap Pools
  • Many More...

See Supported DEXs

Note It is strongly suggested you use the blockTime to calculate the notification latency to ensure the data is the most recent available.

It uses commitment level confirmed which allows for a fast response time with reasonable confidence on being included in the blockchain. See more about commitment levels here

Token Metadata
Token metadata consists of information such as the tokens name, symbol, image, socials, decimals, supply, mint authority, freeze authority and more. It is only available on this event when the token is created in the same transaction (usually only done on launch platforms). To get this data if its not available or at a later time, you can use the token metadata rest api call.

Subscriptions to newPairs are limited to 1 per connection.

Field Mappings
Some exchanges don't call the tokens base and quote, they may be called token A and token B for example. For these exchanges, we have mapped the quote and base fields in SolanaStreaming to the associated name from the exchange in the table below. You only need this if you want to see the original token mapping for the exchange. This is only done for new pairs.

Show Field Mappings
Public Dex Pool Type Quote Token Base Token
Raydium
Raydium
CPMM token_0_mint token_1_mint
CLMM token_mint_0 token_mint_1
Launchlab quote_mint base_mint
V4 (Legacy) pcMint coinMint
Pumpfun
Pumpfun
Pumpfun quote base
Pumpswap quote base
Meteora
Meteora
DLMM token_mint_y token_mint_x
DYN1 tokenBMint tokenAMint
DYN2 token_b_mint token_a_mint
DBC quote base
Orca
Orca
Whirlpool tokenMintA tokenMintB
Try it out in the Console

Request Parameters

All parameters are optional. Use include.sourceExchange to receive new pairs from selected exchanges. If omitted, pairs from all supported exchanges are sent.

  • include

    object
    An optional include filter object. Its fields are combined using OR logic.
  • include.sourceExchange (optional)

    array(string)
    An array of case-sensitive exchange names. Supported values: raydium, pumpswap, pumpfun, raydium_launchlab, and meteora.
  • include.migration (optional)

    array(string)
    An array of case-sensitive exchange names to receive pairs migrated from those exchanges. Supported values: pumpfun and raydium_launchlab. This filter is combined with sourceExchange using OR logic.
  • include_pumpfun

    Deprecated
    boolean
    Legacy parameter. Set to true to include Pump.fun pairs. Use include.sourceExchange instead.

Response Fields

  • subscription_id

    unsigned integer
    The subscription id which can be used to unsubscribe and associate websocket messages with the subscription.

Request Example

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "newPairSubscribe"
}

Subscribe to new pairs from selected exchanges.

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "newPairSubscribe",
    "params": {
        "include": {
            "sourceExchange": ["raydium", "pumpfun"]
        }
    }
}

Subscribe to pairs migrated from Pump.fun.

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "newPairSubscribe",
    "params": {
        "include": {
            "migration": ["pumpfun"]
        }
    }
}

Response Example

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "subscription_id": 1
    }
}

newPairNotification

These are the notifications you will receive when newPairSubscribe is called successfully. Notifications do not typically conform to jsonrpc.

Notification Fields

  • subscription_id

    unsigned integer
    The subscription id which was returned when creating the subscription. This can be used to unsubscribe with the newPairUnsubscribe method.
  • method

    string
    The name of the notification.
  • params

    newPairObject

newPairObject

  • slot

    unsigned integer
    The slot of the transaction that created the new pair.
  • signature

    string
    The signature of the transaction that created the new pair.
  • blockTime

    unsigned integer
    The time the block was confirmed in the unix seconds timestamp format. This will match the blocktime in solscan.
  • pair

    pairObject

pairObject

  • sourceExchange

    string
    The name of the exchange the pair is located.
    Supported values: raydium, pumpswap, pumpfun,raydium_launchlab, meteora
  • ammAccount

    string
    The account of the amm. This is the same as the dexscreener pair address. For Pumpfun tokens, this is the bondingCurve account.
  • baseToken

    tokenObject
  • quoteToken

    tokenObject
    The quote token is usually wrapped sol (wSol).
  • baseTokenLiquidityAdded

    string
    The amount of base token liquidity added to the pool upon creation. This is a bigint but formatted as a string for json compatibility. It is the raw amount.
  • quoteTokenLiquidityAdded

    string
    The amount of quote token liquidity added to the pool upon creation. This is a bigint but formatted as a string for json compatibility. It is the raw amount. The quote token is usually wrapped sol (wSol). E.g. a value of "12000000000" raw wSol with 9 decimals would format to be 12 wSol.
  • migration

    string | null
    The name of the exchange the pair was migrated from. (This only happens once per token)
    Supported values: pumpfun

tokenObject

  • account

    string
    The base58 address as a string for the token.
  • info

    tokenInfoObject | null
    Contains extra information about the token. Null if could not be retrieved.

tokenInfoObject

  • decimals

    unsigned integer
    The number of decimals for this token.
  • supply

    string
    The raw amount of supply for this token formatted as a string.
  • metadata

    tokenMetadataObject | null
    Contains token metadata which is stored at a different chain address. Null if the data is not available.
  • mintAuthority

    string | null
    The base58 address of the mint authority if this token has one. Null if the token doesnt have a mint authority.
  • freezeAuthority

    string | null
    The base58 address of the freeze authority if this token has one. Null if the token doesnt have a freeze authority.

tokenMetadataObject

  • name

    string
    The name of the token.
  • symbol

    string
    The symbol of the token.
  • logo

    string | null
    The url of the logo for the token. This is a third party url so the image could take any format. Only visit external links like these with caution. Null if no logo is available.
  • uri

    string | null
    The url for additional metadata in json form. This is the url generated by the token owner. Only visit external links like these with caution. Null if not available.

Notification Example

{
    "slot": 301578636,
    "signature": "UWnvRXCHpmDxb9tQAYYEEoY8r2JVZ3CcbDLpsFp8EGBdv5njjyEkGXhYxcFCc7Y68X15SWrfve4rycvM4vGRJh7",
    "blockTime": 1731688226,
    "pair": {
        "sourceExchange": "raydium",
        "ammAccount": "CDnqCfvxQvncrWpoTT36xBCcthzQyh8RumuvoFsFZNVC",
        "baseToken": {
            "account": "G9GZaVRPiYRfNQF7oqNoeXKwB5jFbLSHe5fxLcCpump"
        },
        "quoteToken": {
            "account": "So11111111111111111111111111111111111111112"
        },
        "baseTokenLiquidityAdded": "206900000000000000",
        "quoteTokenLiquidityAdded": "630000000000"
    }
}