Skip to main content
POST
/
sse
/
transactions
Stream real-time swap transactions for multiple pools or tokens
curl --request POST \
  --url https://streaming.dexpaprika.com/sse/transactions \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "chain": "ethereum",
    "address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "request_id": 2147483647
  }
]
'
{
  "chain": "ethereum",
  "pool_id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
  "block_number": "19000000",
  "block_timestamp": "2023-11-07T05:31:56Z",
  "tx_hash": "0xabc123...",
  "sender": "0xd3cda913deb6f0967b991b2d0a373199c2f7c90c",
  "recipient": "0xd3cda913deb6f0967b991b2d0a373199c2f7c90c",
  "token_0": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "token_1": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "amount_0": -1000,
  "amount_1": 500000000,
  "amount_0_usd": -1000.5,
  "amount_1_usd": 998.75,
  "price_0_usd": 1.0005,
  "price_1_usd": 1997.5,
  "volume_usd": 999.625
}

Query Parameters

limit
integer

Maximum event count before server-initiated connection teardown.

Required range: x >= 1

Body

application/json
Maximum array length: 25
chain
string
required

Target blockchain network identifier.

Example:

"ethereum"

address
string
required

Pool or token smart contract address.

Example:

"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"

method
enum<string>
required

Subscription target type.

Available options:
pool,
token
request_id
integer

Optional identifier for tracking multiplexed requests. Defaults to the array index if omitted.

Required range: 0 <= x <= 4294967295

Response

Multiplexed SSE stream successfully established.

Swap transaction event payload. Emitted on the pool or token event channel.

chain
string

Blockchain network identifier.

Example:

"ethereum"

pool_id
string

Pool smart contract address.

Example:

"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"

block_number
string

Block number in which the swap was confirmed (string-encoded integer).

Example:

"19000000"

block_timestamp
string<date-time>

Block timestamp in RFC 3339 format.

tx_hash
string

Transaction hash.

Example:

"0xabc123..."

sender
string

Address that initiated the swap.

Example:

"0xd3cda913deb6f0967b991b2d0a373199c2f7c90c"

recipient
string

Address that received the output tokens.

Example:

"0xd3cda913deb6f0967b991b2d0a373199c2f7c90c"

token_0
string

Address of the first token in the pool.

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

token_1
string

Address of the second token in the pool.

Example:

"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"

amount_0
number

Raw token0 amount from the chain (not decimal-normalised). Negative means tokens left the user's wallet.

Example:

-1000

amount_1
number

Raw token1 amount from the chain (not decimal-normalised). Positive means tokens entered the user's wallet.

Example:

500000000

amount_0_usd
number

USD value of token0 amount (decimal-normalised volume × price). Preserves sign from the underlying volume.

Example:

-1000.5

amount_1_usd
number

USD value of token1 amount (decimal-normalised volume × price). Preserves sign from the underlying volume.

Example:

998.75

price_0_usd
number

USD price per one unit of token0 (after decimal normalisation).

Example:

1.0005

price_1_usd
number

USD price per one unit of token1 (after decimal normalisation).

Example:

1997.5

volume_usd
number

Estimated USD volume of the swap.

Example:

999.625