Crate longportwhale

Crate longportwhale 

Source
Expand description

§WhaleAPI SDK for Rust

longportwhale provides an easy-to-use interface for invokes WhaleAPI]

§Quickstart

Add dependencies to Cargo.toml

[dependencies]
longportwhale = "1.0.0"

Setting environment variables(MacOS/Linux)

export LONGPORT_APP_KEY="App Key get from user center"
export LONGPORT_APP_SECRET="App Secret get from user center"
export LONGPORT_ACCESS_TOKEN="Access Token get from user center"

Setting environment variables(Windows)

setx LONGPORT_APP_KEY "App Key get from user center"
setx LONGPORT_APP_SECRET "App Secret get from user center"
setx LONGPORT_ACCESS_TOKEN "Access Token get from user center"

§Crate features

To avoid compiling unused dependencies, longport gates certain features, all of which are disabled by default:

FeatureDescription
blockingProvides the blocking client API.

§License

Licensed under either of

Re-exports§

pub use trade::TradeContext;
pub use longportwhale_httpcli as httpclient;

Modules§

trade
Trade related types

Macros§

decimal
A macro to construct decimal.

Structs§

Config
Configuration options for LongPort sdk
Decimal
Decimal represents a 128 bit representation of a fixed-precision decimal number. The finite set of values of type Decimal are of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.

Enums§

Error
LongPort OpenAPI SDK error type
Language
Language identifier
Market
Market
SimpleError
Simple error type

Type Aliases§

Result
LongPort OpenAPI SDK result type