tensor-trade-stream

Crates.iotensor-trade-stream
lib.rstensor-trade-stream
version0.7.0
sourcesrc
created_at2024-01-07 16:31:18.230069
updated_at2024-01-25 16:32:46.966875
descriptionA client for receiving updates from Tensor Trade Marketplace over WebSocket using GraphQL subscriptions.
homepage
repositoryhttps://github.com/protecc-labs/tensor-tensor-stream-rs.rs
max_upload_size
id1091857
size898,043
(mektigboy)

documentation

README

tensor-trade-stream

A client for receiving updates from Tensor Trade NFT marketplace over WebSocket using GraphQL subscriptions via graphql_ws_client.

Documentation

Tensor Trade Documentation

Example

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(())
}

Commit count: 0

cargo fmt