pub enum API_Option {
Show 39 variants INFO, ACLASS, ASSET, TRADES, USERREF, START, END, OFS, CLOSE_TIME, DO_CALCS, PAIR, FEE_INFO, OFLAGS, START_TIME, END_TIME, FORMAT, FIELDS, EXPIRE_TIME, VALIDATE, DEADLINE, ORDER_TYPE, TYPE, CLOSE_TYPE, CLOSE_PRICE_1, CLOSE_PRICE_2, PRICE, PRICE_2, TRIGGER, LEVERAGE, TIME_IN_FORCE, VOLUME, INTERVAL, TIMEOUT, SINCE, COUNT, TXID, CONSOLIDATION, ID, CANCEL_RESPONSE, // some variants omitted
}
Expand description

Enumeration of available optional arguments which may be given to some of Kraken’s API’s end-points. Note that the value given to the arguments will always be strings; the comments below indicate how the strings will be interpreted by the exchange.

Variants

INFO

Information to be retrieved, one of “info”, “leverage”, “fees”, or “margin”.

ACLASS

Asset class; the only known valid value seems to be “currency”.

ASSET

An asset (e.g. “usd”) about which to get information. Can also be a comma-delimited list for some functions. Can also be “all”, which is the default when this optional argument is missing.

TRADES

Request to see trades (boolean as str); means slightly different things to different exchange end-points.

USERREF

Restrict results to given user reference ID (i32 as str).

START

Either a UNIX timestamp or transaction ID demarking the start of returned results.

END

Either a UNIX timestmap or transaction ID demarking the end of returned results.

OFS

Offset into full list of results, to effect pagination into the list.

CLOSE_TIME

One of “open”, “close”, or “both”, to determine which time stamp to use for searching/filtering.

DO_CALCS

A boolean indicating whether to do profit and loss calculations.

PAIR

A trading pair, such as “XETCXETH”, or, for some functions, a comma-separated list such as “XXBTCZUSD,XETHXXBT”.

FEE_INFO

A boolean value indicating whether or not to include fee info in the results.

OFLAGS

A comma-delimited list of order flags: “post”, “fcib”, “fciq”, “nompp”. See the upstream documentation for the Kraken_API::add_order end-point for details about the precise meanings of these terms. *

START_TIME

UXIX timestamp of the start of a report.

END_TIME

UNIX timestamp of the end of a report.

FORMAT

One of “CSV” or “TSV”.

FIELDS

Comma-delimited list of fields to include in a report; see the documentation for the AddExport end-point for valid entries.

EXPIRE_TIME

Expiration time, either “+” for a number of seconds from now, or just “N” for a UNIX timestamp.

VALIDATE

Boolean indicating that the order should be validated but not actually submitted.

DEADLINE

Date-time stamp (RFC3339) after which the new order request should be rejected.

ORDER_TYPE

One of “market”, “limit”, “stop-loss”, “take-profit”, “stop-loss-limit”, “take-profit-limit”, or “settle-position”.

TYPE

One of “all”, “any position”, “closed position”, “closing position”, “no position”, to describe the type of trades.

CLOSE_TYPE

One of “limit”, “stop-loss”, “take-profit”, “stop-loss-limit”, or “take-profit-limit”.

CLOSE_PRICE_1

Conditional close order API_Option::PRICE.

CLOSE_PRICE_2

Conditional close order API_Option::PRICE_2.

PRICE

Limit price for limit orders, trigger price for all other types.

PRICE_2

Limit price for “stop-loss-limit” and “take-profit-limit” orders.

TRIGGER

One of “index” or “last” to indicate which price signal triggers an order.

LEVERAGE

Amount of leverage desired.

TIME_IN_FORCE

One of “GTC” (’good ‘til cancelled’), “IOC” (‘immediate or cancel’), or “GTD” (’good ‘til date’).

VOLUME

Order quantity in terms of the base asset.

INTERVAL

Time frame interval in minutes (i32 as str).

TIMEOUT

Time interval in seconds (isize as str).

SINCE

Return data points since the given UNIX timestamp (i32 as str).

COUNT

The maximum number of data to return.

TXID

Varies by function, but lists one or more transaction IDs, or sometimes user reference IDs.

CONSOLIDATION

For the get_open_positions function, carries a market or symbol pair over which to consolidate the open margin positions.

ID

Comma-delimited list of ledger IDs.

CANCEL_RESPONSE

Use pending replace, before complete replace (bool as str).

Trait Implementations

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.