#crypto-api #crypto #api #api-bindings #tokio

tensor-trade-stream

A client for receiving updates from Tensor Trade Marketplace over WebSocket using GraphQL subscriptions

15 releases (5 breaking)

0.7.0 Jan 25, 2024
0.6.4 Jan 25, 2024
0.5.6 Jan 10, 2024
0.4.0 Jan 8, 2024
0.1.2 Jan 7, 2024

#16 in #crypto-api

Download history 1/week @ 2024-01-26 21/week @ 2024-02-23 30/week @ 2024-03-01 4/week @ 2024-03-08 24/week @ 2024-03-15 161/week @ 2024-04-05 6/week @ 2024-04-12

203 downloads per month

MIT license

43KB
205 lines

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

Dependencies

~11–24MB
~326K SLoC