Crate krakenrs

Crate krakenrs 

Source
Expand description

A rust crate for making requests to the Kraken Rest API and subscribing to Kraken websockets feeds

KrakenRestAPI is the main touchpoint for the rest side of things.

ws::KrakenWsAPI is the main touchpoint for the websockets side of things.

Modules§

ws
An interface for getting data from Kraken websockets API, while another thread manages the updates from the websockets connection.

Structs§

AddOrderResponse
Add order response
AssetInfo
(Substructure within) Result of kraken public “Assets” API call
AssetPair
(Substructure within) Result of kraken public “Asset Pairs” API call
AssetTickerInfo
(Substructure within) Result of kraken public “Ticker” API call
CancelAllOrdersAfterResponse
Cancel all orders after response
CancelAllOrdersResponse
Cancel all orders response
CancelOrderResponse
Cancel order response
FeeTierInfo
Substructure of GetTradeVolume response
GetOpenOrdersResponse
Get open orders response
GetTradeVolumeResponse
GetTradeVolume response
GetWebSocketsTokenResponse
WebSockets authenitcation token response, including token and expiry
KrakenCredentials
Credentials needed to use private Kraken APIs.
KrakenRestAPI
A connection to the Kraken REST API This only supports blocking http requests for now
KrakenRestClient
A low-level https connection to kraken that can execute public or private methods.
KrakenRestConfig
Configuration needed to initialize a Kraken client. The credentials aren’t needed if only public APIs are used
KrakenRestConfigBuilder
Builder pattern for the KrakenRestConfig object
LastAndData
The LastAndData struct is a helper to deal with wierdness in some of the Kraken REST API schemas.
LimitOrder
A description of a limit order to place
MarketOrder
A description of a market order to place
OrderAdded
Substructure within AddOrderResponse
OrderInfo
Order-info used in OpenOrders and QueryOrders APIs
SystemStatusResponse
Result of kraken public “SystemStatus” API call
TimeResponse
Result of kraken public “Time” API call

Enums§

BsType
Type (buy/sell) These are kebab-case strings in json
BuilderError
An error returned by a config builder
Error
An error that can be generated from the low-level kraken client
OrderFlag
Possible order flags in Kraken. These are options in a comma-separated list
OrderStatus
Possible order statuses in Kraken. These are kebab-case strings in json
OrderType
Possible order types in Kraken. These are kebab-case strings in json

Type Aliases§

AssetPairsResponse
Type alias for response of AssetPairs API call
AssetsResponse
Type alias for response of Assets API call
BalanceResponse
Type alias for response of Balance API call
GetOHLCDataResponse
Response object of Get OHLC data API call (Note: See issue #3 for discussion of strategy)
GetRecentTradesResponse
Response object of Get Recent Trades API call (Note: See issue #3 for discussion of strategy)
Result
Alias for Result that contains the error type for this crate
TickerResponse
Type alias for response of Ticker API call
TxId
TxId are represented as String’s in kraken json api
UserRefId
User-reference id’s are signed 32-bit in kraken json api