| Crates.io | tensor-trade-stream |
| lib.rs | tensor-trade-stream |
| version | 0.7.0 |
| created_at | 2024-01-07 16:31:18.230069+00 |
| updated_at | 2024-01-25 16:32:46.966875+00 |
| description | A client for receiving updates from Tensor Trade Marketplace over WebSocket using GraphQL subscriptions. |
| homepage | |
| repository | https://github.com/protecc-labs/tensor-tensor-stream-rs.rs |
| max_upload_size | |
| id | 1091857 |
| size | 898,043 |
A client for receiving updates from Tensor Trade NFT marketplace over WebSocket using GraphQL subscriptions via graphql_ws_client.
use anyhow::Result;
use futures::StreamExt;
use tensor_trade_stream::{
subscribe, TensorswapOrderUpdateAllQuery, TensorswapOrderUpdateAllVariables,
};
#[tokio::main]
async fn main() -> Result<()> {
let (_client, mut stream) =
subscribe::<TensorswapOrderUpdateAllQuery>(TensorswapOrderUpdateAllVariables {}).await?;
while let Some(item) = stream.next().await {
dbg!(Some(item));
}
Ok(())
}