nash-protocol 0.3.0

state management and cryptography for interacting with nash exchange protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::graphql;
use graphql::updated_orderbook;
use graphql_client::GraphQLQuery;

// Subscribe to order book updates on `Market`.
#[derive(Clone, Debug)]
pub struct SubscribeOrderbook {
    pub market: String,
}

impl SubscribeOrderbook {
    pub fn make_query(&self) -> graphql_client::QueryBody<updated_orderbook::Variables> {
        graphql::UpdatedOrderbook::build_query(updated_orderbook::Variables {
            market_name: self.market.clone(),
        })
    }
}