Stream trade is a method used to obtain the prices of a specific pair of tokens across multiple decentralized exchanges (DEXs).
Field | Description |
---|---|
Users can stream trades in two ways:
First, the user needs to run the following command in their terminal to install wscat in their system:
After installing wscat, the user needs to create a shell script and paste the following sample code:
Client Side Sample Socket Code :
Once the file has been saved, the user will need to grant permission for it to be executed. This can be accomplished by executing the following command:
After following the above steps, the user needs to run the file. This can be done by entering the filename in the console.
Executing a query:
After executing the aforementioned file(shell script), the user will be prompted to input the appropriate API key.
After entering the API key, the user can subscribe to the following actions:
Make sure you are connected to the WebSocket before you perform the following queries.
Applying a filter in the query:
Users can apply the following filters in their query:-
token0
token1
The above filters can be applied in any combination, using the following syntax:
Sample Query:
First, the user needs to run the following command in their terminal to install wscat in their system:
After installing ws, the user needs to run the following sample code on their device to start streaming:
Client Side Sample Socket Code :
The payload can be modified, depending on the action.
To disconnect from our API, enter ctrl-c
in the connected console.
type
States whether the transaction is from CEX or DEX.
platform
Specific name of CEX or DEX platform.
symbol
Token pair.
price
Price of token pair.
Price discovery is a tool that helps the user to track on-chain data in real-time like transactions of particular addresses. In a decentralized exchange (DEX), the price of an asset can fluctuate based on the action of users, such as swapping, adding/removing liquidity transactions, and can be influenced by factors such as trading volume and the availability of liquidity.
Currently, we support Stream Transaction. We are actively working on the release of Pending Transactions and other significant events.
Stream transactions allow multiple trades to be bundled together and processed as a single transaction on the blockchain. Additionally, stream transactions can enable trading to occur off-chain, which can further improve the speed and efficiency of the trading process.
Stream Gas is a method used to obtain the gas fees given by a public address.
Field | Description |
---|---|
Users can stream gas in two ways:
First, the user needs to run the following command in their terminal to install wscat in their system:
After installing wscat, the user needs to create a shell script and paste the following sample code:
Client Side Sample Socket Code :
Once the file has been saved, the user needs to grant permission for it to be executed. This can be accomplished by executing the following command:
After following the above steps, the user needs to run the file. This can be done by entering the filename in the console.
Executing a query:
After executing the aforementioned file(shell script), the user will be prompted to input the appropriate API key.
After entering the API key, the user can subscribe to the following actions:
Make sure you are connected to the WebSocket before you perform the following queries.
Applying a filter in the query:
Users can apply the following filters in their query:-
addresses
The above filters can be applied in any combination, using the following syntax:
Sample Query:
First, the user needs to run the following command in their terminal to install wscat in their system:
After installing ws, the user needs to run the following sample code on their device to start streaming:
Client Side Sample Socket Code :
The payload can be modified, depending on the action.
To disconnect from our API, enter ctrl-c
in the connected console.
Stream transactions will help you to track the activity of the subscribed address on the blockchain.
Field | Description |
---|---|
Users can stream transactions in two ways:
First, the user needs to run the following command in their terminal to install wscat in their system:
After installing wscat, the user needs to create a shell script and paste the following sample code:
Client Side Sample Socket Code :
Once the file has been saved, the user will need to grant permission for it to be executed. This can be accomplished by executing the following command:
After following the above steps, the user needs to run the file. This can be done by entering the filename in the console.
Executing a query:
After executing the aforementioned file(shell script), the user will be prompted to input the appropriate API key.
After entering the API key, user can subscribe to following actions:
Make sure you are connected to the WebSocket before you perform the following queries.
Applying a filter in the query:
Users can apply the following filters in their query:-
addresses
minAmount(Wei)
maxAmount(Wei)
The above filters can be applied in any combination, using the following syntax:
Sample Query:
First, the user needs to run the following command in their terminal to install wscat in their system:
After installing ws, the user needs to run the following sample code on their device to start streaming:
Client Side Sample Socket Code :
The payload can be modified, depending on the action.
To disconnect from our API, enter ctrl-c
in the connected console.
address
The public address that is subscribed for Gas Streaming
blockNumber
The BlockNumber where the Transaction Occured.
currentPrice
The Current Price for ETH (in USD).
gas
The Gas Object that consists of totalGasUsed and the transactionList with the Current Price (in cents)
blockHash
Hash of the block.
blockNumber
Number of the block.
chainId
0x1
denotes ethereum.
from
Ethereum address of the sender of the transaction.
gas
Gas provided by the sender.
gasPrice
Amount of Ether that the sender is willing to pay for each unit of gas.
hash
Hash of the transaction.
input
The data sent along with the transaction.
nonce
Unique value that is incremented with each transaction and is unique to each account.
v,r,s
Signature values that are used to verify the transaction's authenticity.
to
Ethereum address of the recipient of the transaction.
transactionIndex
Integer of the transactions index position in the block.
type
Type of transaction.
value
Amount of Ether to be transferred in the transaction.