Crate cryptomarket

Source
Expand description

An unofficial SDK for the cryptomrkt API for Rust. The API currently only supports the websocket cryptomrkt API.

use dotenv::*;
use cryptomkt::{TradingClient, NewOrderBuilder, Buy};

let mut client = TradingClient::new(var("private_key")?, var("public_key")?).await?;
let order = NewOrderBuilder::new()
    .symbol("BTCCLP")
    .side(Buy)
    .quantity(1.0)
    .price(100.0)
    .build();
client.place_order(order).await?;

Re-exports§

pub use api::Order;
pub use api::Side;
pub use api::Side::*;

Modules§

api

Structs§

ClientPool
PublicClient
Used to query and subscribe to public market events.
TradingClient
Used to interface with the cryptomkt websocket trading API.
TripleClient
An interface over TradingClient, WalletClient and PublicClient.
WalletClient
An interface over the users wallet movements and balance.

Enums§

Error