#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 48/week @ 2024-01-03 52/week @ 2024-01-10 18/week @ 2024-01-17 17/week @ 2024-01-24 51/week @ 2024-02-28 28/week @ 2024-03-13 2/week @ 2024-04-03 165/week @ 2024-04-10

167 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–26MB
~337K SLoC