MCPcopy Index your code

hub / github.com/barter-rs/barter-rs / functions

Functions1,181 in github.com/barter-rs/barter-rs

↓ 226 callersMethodclone
(&self)
barter-execution/src/client/mock/mod.rs:50
↓ 130 callersMethodinto_iter
(self)
barter-integration/src/collection/one_or_many.rs:166
↓ 119 callersMethodmap
(self, op: F)
barter-data/src/streams/reconnect/mod.rs:22
↓ 103 callersMethodmap
Maps the item using the provided function.
barter-integration/src/socket/update.rs:22
↓ 76 callersMethodsend
(&self, item: Item)
barter-integration/src/channel.rs:60
↓ 34 callersMethoditer
(&self)
barter-integration/src/collection/one_or_many.rs:84
↓ 31 callersFunctionprocess_with_audit
Process and `Event` with the `Engine` and product an [`AuditTick`] of work done.
barter/src/engine/mod.rs:81
↓ 30 callersMethodforward_to
Future for forwarding items in [`Self`] to the provided channel [`Tx`].
barter-data/src/streams/reconnect/stream.rs:131
↓ 30 callersMethodsubscribe
Add a collection of [`Subscription`]s to the [`StreamBuilder`] that will be actioned on a distinct [`WebSocket`](barter_integration::protocol::websock
barter-data/src/streams/builder/mod.rs:77
↓ 26 callersFunctioninit_market_stream
Initialises a [`reconnecting`](`ReconnectingStream`) [`MarketStream`] using a collection of [`Subscription`]s. The provided [`ReconnectionBackoffPoli
barter-data/src/streams/consumer.rs:44
↓ 26 callersMethodinto_iter
(self)
barter/src/execution/builder.rs:379
↓ 26 callersMethodmap_err
Maps the Err value of a Result item.
barter-integration/src/socket/update.rs:48
↓ 25 callersMethodas_ref
(&self)
barter-integration/src/collection/snapshot.rs:25
↓ 22 callersMethodinsert
Insert a new [`OrderBook`] into the [`OrderBookMapMulti`].
barter-data/src/books/map.rs:77
↓ 21 callersMethodinto_iter
(self)
barter/src/engine/execution_tx.rs:58
↓ 21 callersMethoditer
(&'a self)
barter/src/engine/execution_tx.rs:92
↓ 21 callersMethodnext
(&mut self)
barter-integration/src/channel.rs:102
↓ 18 callersMethodas_str
(&self)
barter-data/src/subscription/book.rs:21
↓ 16 callersMethodadd_instrument
(mut self, instrument: Instrument<ExchangeId, Asset>)
barter-instrument/src/index/builder.rs:23
↓ 16 callersFunctiongenerate_execution_instrument_map
( instruments: &IndexedInstruments, exchange: ExchangeId, )
barter-execution/src/map.rs:159
↓ 16 callersMethodinit
Spawn a [`MarketStreamResult<SubscriptionKind::Event>`](MarketStreamResult) consumer loop for each collection of [`Subscription`]s added to [`StreamBu
barter-data/src/streams/builder/mod.rs:126
↓ 15 callersFunctionindexed_instruments
()
barter-execution/src/map.rs:184
↓ 14 callersFunctionextract_next
Assists deserialisation of sequences by attempting to extract & parse the next element in the provided sequence. A [`serde::de::Error`] is returned i
barter-integration/src/serde/de/util.rs:74
↓ 14 callersMethodsend
Send an `Event` to the `Engine`.
barter/src/system/mod.rs:182
↓ 13 callersMethodlen
(&self)
barter-integration/src/collection/one_or_many.rs:62
↓ 12 callersMethodindex
(&self)
barter-instrument/src/exchange.rs:10
↓ 12 callersFunctioninstrument
( exchange: ExchangeId, base: &str, quote: &str, )
barter-instrument/src/lib.rs:142
↓ 12 callersMethodtrading_state
Update the algorithmic `TradingState` of the `Engine`.
barter/src/system/mod.rs:163
↓ 11 callersFunctionmpsc_unbounded
()
barter-integration/src/channel.rs:175
↓ 11 callersMethodupdate
Update the `PnLReturns` from the next [`PositionExited`].
barter/src/statistic/summary/pnl.rs:43
↓ 10 callersMethodadd_instrument_metric_row
(&self, table: &mut Table, label: &str, format_value: F)
barter/src/statistic/summary/display.rs:188
↓ 10 callersMethodbuild
Build the [`SystemBuild`] with the configured builder settings. This constructs all the system components but does not start any tasks or streams. I
barter/src/system/builder.rs:182
↓ 10 callersMethodcontains
(&self, item: &T)
barter-integration/src/collection/one_or_many.rs:51
↓ 10 callersMethodinto_stream
(self)
barter-integration/src/channel.rs:114
↓ 10 callersMethodwith_error_handler
Handles all encountered errors with the provided closure before filtering them out, returning a [`Stream`] of the Ok values. Useful for logging recove
barter-data/src/streams/reconnect/stream.rs:110
↓ 9 callersMethodfind_asset_index
(&self, asset: &AssetNameExchange)
barter-execution/src/map.rs:124
↓ 9 callersFunctiongen_cid
(instrument: usize)
barter/tests/test_engine_process_engine_event_with_audit.rs:708
↓ 9 callersFunctionopen
(time_exchange: DateTime<Utc>)
barter/src/engine/state/order/mod.rs:547
↓ 9 callersMethodvalue
(&self)
barter/src/lib.rs:171
↓ 8 callersFunctionaccount_event_balance
( asset: usize, time_plus: u64, total: f64, free: f64, )
barter/tests/test_engine_process_engine_event_with_audit.rs:927
↓ 8 callersFunctionasset_state
( symbol: &str, balance_total: f64, balance_free: f64, time_exchange: DateTime
barter/src/lib.rs:255
↓ 8 callersMethodfind
Find the `InstrumentKey` associated with the provided [`SubscriptionId`].
barter-data/src/subscription/mod.rs:314
↓ 8 callersMethodfind_instrument_index
( &self, instrument: &InstrumentNameExchange, )
barter-execution/src/map.rs:144
↓ 8 callersMethodinterval
(&self)
barter/src/statistic/time.rs:43
↓ 8 callersMethodmap_err
(self, op: F)
barter-data/src/streams/reconnect/mod.rs:44
↓ 8 callersMethodname
Return the internal asset `SmolStr` name of [`Self`].
barter-instrument/src/asset/name.rs:30
↓ 8 callersFunctionstrategy_id
()
barter/tests/test_engine_process_engine_event_with_audit.rs:704
↓ 7 callersMethodas_str
Return the &str representation of this [`ExchangeId`]
barter-instrument/src/exchange.rs:81
↓ 7 callersFunctionasset
(symbol: &str)
barter-instrument/src/lib.rs:135
↓ 7 callersMethodbuild
(mut self)
barter-instrument/src/index/builder.rs:62
↓ 7 callersMethodgenerate
Generate the latest [`TradingSummary`] at the specific [`TimeInterval`]. For example, pass [`Annual365`](super::time::Annual365) to generate a crypto
barter/src/statistic/summary/mod.rs:148
↓ 7 callersMethodinstrument_index_mut
Return a mutable reference to the `InstrumentState` associated with an `InstrumentIndex`. Panics if `InstrumentState` associated with the `Instrument
barter/src/engine/state/instrument/mod.rs:74
↓ 7 callersMethodinstruments
Return an `Iterator` of references to `InstrumentState`s being tracked, optionally filtered by the provided `InstrumentFilter`.
barter/src/engine/state/instrument/mod.rs:108
↓ 7 callersMethodprint_summary
(&self)
barter/src/statistic/summary/display.rs:12
↓ 7 callersMethodprocess
(&mut self, _: &AccountEvent<ExchangeKey, AssetKey, InstrumentKey>)
barter/src/engine/state/global.rs:17
↓ 7 callersMethodsend_requests
( &self, requests: impl IntoIterator<Item = OrderEvent<Kind, ExchangeKey, InstrumentKey>>,
barter/src/engine/action/send_requests.rs:53
↓ 7 callersMethodtrading_summary_generator
Returns a [`TradingSummaryGenerator`] for the current trading session.
barter/src/engine/mod.rs:318
↓ 7 callersMethodupdate_from_balance
Updates the `AssetState` from an [`AssetBalance`] snapshot, if the snapshot is more recent. This method ensures temporal consistency by only applying
barter/src/engine/state/asset/mod.rs:157
↓ 6 callersMethodaudit
(&mut self, kind: Kind)
barter/src/engine/audit/mod.rs:54
↓ 6 callersFunctiondatetime_utc_from_epoch_duration
Determine the `DateTime<Utc>` from the provided `Duration` since the epoch.
barter-integration/src/serde/de/util.rs:2
↓ 6 callersMethodextend
(self, other: Iter)
barter-integration/src/collection/one_or_many.rs:27
↓ 6 callersFunctioninit_logging
Initialise default non-JSON `Barter` logging. Note that this filters out duplicate logs produced by the `AuditManager` updating its replica `EngineSt
barter/src/logging.rs:8
↓ 6 callersMethodinit_with_runtime
Initialise the system using the provided tokio runtime. Allows specifying a custom runtime for spawning tasks.
barter/src/system/builder.rs:333
↓ 6 callersMethodis_none
(&self)
barter-integration/src/collection/none_one_or_many.rs:79
↓ 6 callersMethodkeys
(&self)
barter-data/src/books/map.rs:35
↓ 6 callersMethodscale
Scale the [`RateOfReturn`] from the current [`TimeInterval`] to the provided [`TimeInterval`]. Unlike risk metrics which use square root scaling, [`R
barter/src/statistic/metric/rate_of_return.rs:38
↓ 6 callersMethodtime
Return `Engine` clock time.
barter/src/engine/mod.rs:360
↓ 6 callersFunctiontime_plus_days
(base: DateTime<Utc>, plus: u64)
barter/src/lib.rs:214
↓ 6 callersMethodtime_request
(&self)
barter-execution/src/client/mock/mod.rs:86
↓ 6 callersMethodupdate
Update the local [`OrderBook`] from a new [`OrderBookEvent`].
barter-data/src/books/mod.rs:69
↓ 5 callersMethodas_event
(&'a self, kind: &'a K)
barter-data/src/event.rs:101
↓ 5 callersMethodaudit_mode
Optionally configure the [`AuditMode`] (enabled or disabled). Controls whether the engine sends the audit events it produces.
barter/src/system/builder.rs:140
↓ 5 callersMethodcancel_orders
Instruct the `Engine` to cancel open orders. Use the `InstrumentFilter` to configure which orders are cancelled.
barter/src/system/mod.rs:155
↓ 5 callersMethodclose_positions
Instruct the `Engine` to close open positions. Use the `InstrumentFilter` to configure which positions are closed.
barter/src/system/mod.rs:145
↓ 5 callersMethodengine_feed_mode
Optionally configure the [`EngineFeedMode`] (`Iterator` or `Stream`). Controls whether the engine processes events synchronously or asynchronously.
barter/src/system/builder.rs:130
↓ 5 callersMethodfiltered
Return a filtered `Iterator` of `InstrumentState`s based on the provided `InstrumentFilter`.
barter/src/engine/state/instrument/mod.rs:182
↓ 5 callersFunctionfind_asset_by_exchange_and_name_internal
( haystack: &[Keyed<AssetIndex, ExchangeAsset<Asset>>], needle_exchange: ExchangeId, needle_name:
barter-instrument/src/index/mod.rs:197
↓ 5 callersMethodfind_exchange_index
(&self, exchange: ExchangeId)
barter-execution/src/map.rs:102
↓ 5 callersFunctioninit_indexed_multi_exchange_market_stream
Initialise an indexed [`DynamicStreams`] using batches of indexed [`Subscription`] batches. This function: 1. Generates indexed market data Subscript
barter-data/src/streams/builder/dynamic/indexed.rs:37
↓ 5 callersMethodis_empty
Returns `true` if no `SendCancelsAndOpensOutput` is completely empty.
barter/src/engine/action/send_requests.rs:135
↓ 5 callersMethodis_terminal
(&self)
barter/src/engine/audit/mod.rs:101
↓ 5 callersMethodmap_kind
(self, op: F)
barter-data/src/event.rs:51
↓ 5 callersMethodmap_ok
(self, op: F)
barter-data/src/streams/reconnect/mod.rs:34
↓ 5 callersMethodreplica_engine_state_mut
(&mut self)
barter/src/engine/audit/state_replica.rs:157
↓ 5 callersMethodrespond_with_latency
Sends the provided `Response` via the [`oneshot::Sender`] after waiting for the latency [`Duration`]. Used to simulate network latency between the ex
barter-execution/src/exchange/mock/mod.rs:192
↓ 5 callersMethodscale
Scale the [`SharpeRatio`] from the current [`TimeInterval`] to the provided [`TimeInterval`]. This scaling assumed the returns are independently and
barter/src/statistic/metric/sharpe.rs:46
↓ 5 callersMethodselect_all
Select and merge every exchange `Stream` using [`select_all`](futures_util::stream::select_all::select_all).
barter-data/src/streams/mod.rs:48
↓ 5 callersMethodshutdown
()
barter/src/lib.rs:142
↓ 5 callersMethodtime_engine_start
Optionally provide the `time_engine_start`. Providing this is useful for back-test scenarios where the time should be seeded with a "historical" cloc
barter/src/engine/state/builder.rs:70
↓ 5 callersMethodupdate_pnl_unrealised
Update [`Position::pnl_unrealised`](Position) with the estimated PnL from closing the [`Position`] at the provided price. Note that this could be cal
barter/src/engine/state/position.rs:347
↓ 4 callersFunctionaccount_event_order_response
( instrument: usize, time_plus: u64, side: Side, price: f64, quantity: f64, filled: f6
barter/tests/test_engine_process_engine_event_with_audit.rs:896
↓ 4 callersFunctionaccount_event_trade
( instrument: usize, time_plus: u64, side: Side, price: f64, quantity: f64, )
barter/tests/test_engine_process_engine_event_with_audit.rs:946
↓ 4 callersMethodadd
(mut self, builder: StreamBuilder<InstrumentKey, Kind>)
barter-data/src/streams/builder/multi.rs:52
↓ 4 callersMethodadd_asset_metric_row
(&self, table: &mut Table, label: &str, format_value: F)
barter/src/statistic/summary/display.rs:273
↓ 4 callersMethodas_ref
(&self)
barter-data/src/exchange/okx/market.rs:47
↓ 4 callersMethodbest
Get best [`Level`] on the [`OrderBookSide`].
barter-data/src/books/mod.rs:204
↓ 4 callersFunctionfind_exchange_by_exchange_id
( haystack: &[Keyed<ExchangeIndex, ExchangeId>], needle: &ExchangeId, )
barter-instrument/src/index/mod.rs:185
↓ 4 callersMethodinit_internal
( self, runtime: tokio::runtime::Handle, )
barter/src/execution/builder.rs:275
↓ 4 callersMethodinstruments
(&self)
barter-execution/src/lib.rs:159
↓ 4 callersMethodkey
(&self)
barter-data/src/instrument.rs:32
next →1–100 of 1,181, ranked by callers