Skip to main content

Module instruments

Module instruments 

Source
Expand description

Resource methods for the instruments API group.

§Operations

MethodOpPath
GETlookup/instruments/lookup/{lookup_type}/{lookup}
GETlist_types/instruments/types
GETget_type/instruments/types/{instrument_type}
GETlist_underlyings/instruments/underlyings/{derivative_type}/{currency}
GETget_instrument_suitability/instruments/validation/suitability/{instrument_id}
GETget_instrument/instruments/{instrument_id}
GETlist_leverages/instruments/{instrument_id}/leverages
GETget_leverage_filters/instruments/{instrument_id}/leverages/filters
GETlist_instrument_trades/instruments/{instrument_id}/trades

§Naming

Two ops are renamed from their docs name so they can co-exist on Client alongside same-named ops in other groups (Rust resolves all resource methods onto a single Client impl):

  • list_trades -> list_instrument_trades — to coexist with tradables::list_tradable_trades and the future accounts::list_trades.
  • get_suitability -> get_instrument_suitability — to coexist with tradables::get_suitability.

Phase 3X may pick a uniform naming scheme.

§204 No Content

All ops except list_types and get_leverage_filters document a 204 response. The base Client::get surfaces an empty body as a Error::Decode; each method here maps that case to an empty Vec (mirroring the tradables precedent). get_leverage_filters returns a single LeverageFilter (no array shape) so 204 is not mapped.

Structs§

LeveragesQuery
Optional query parameters for Client::list_leverages and Client::get_leverage_filters.